You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14415 satır
1.4MB

  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["canvg"],{
  2. /***/ "./node_modules/@amcharts/amcharts4/.internal/canvg/index.js":
  3. /*!*******************************************************************!*\
  4. !*** ./node_modules/@amcharts/amcharts4/.internal/canvg/index.js ***!
  5. \*******************************************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
  11. /* harmony export */ "AElement": () => (/* binding */ AElement),
  12. /* harmony export */ "AnimateColorElement": () => (/* binding */ AnimateColorElement),
  13. /* harmony export */ "AnimateElement": () => (/* binding */ AnimateElement),
  14. /* harmony export */ "AnimateTransformElement": () => (/* binding */ AnimateTransformElement),
  15. /* harmony export */ "BoundingBox": () => (/* binding */ BoundingBox),
  16. /* harmony export */ "CB1": () => (/* binding */ CB1),
  17. /* harmony export */ "CB2": () => (/* binding */ CB2),
  18. /* harmony export */ "CB3": () => (/* binding */ CB3),
  19. /* harmony export */ "CB4": () => (/* binding */ CB4),
  20. /* harmony export */ "Canvg": () => (/* binding */ Canvg),
  21. /* harmony export */ "CircleElement": () => (/* binding */ CircleElement),
  22. /* harmony export */ "ClipPathElement": () => (/* binding */ ClipPathElement),
  23. /* harmony export */ "DefsElement": () => (/* binding */ DefsElement),
  24. /* harmony export */ "DescElement": () => (/* binding */ DescElement),
  25. /* harmony export */ "Document": () => (/* binding */ Document),
  26. /* harmony export */ "Element": () => (/* binding */ Element),
  27. /* harmony export */ "EllipseElement": () => (/* binding */ EllipseElement),
  28. /* harmony export */ "FeColorMatrixElement": () => (/* binding */ FeColorMatrixElement),
  29. /* harmony export */ "FeCompositeElement": () => (/* binding */ FeCompositeElement),
  30. /* harmony export */ "FeDropShadowElement": () => (/* binding */ FeDropShadowElement),
  31. /* harmony export */ "FeGaussianBlurElement": () => (/* binding */ FeGaussianBlurElement),
  32. /* harmony export */ "FeMorphologyElement": () => (/* binding */ FeMorphologyElement),
  33. /* harmony export */ "FilterElement": () => (/* binding */ FilterElement),
  34. /* harmony export */ "Font": () => (/* binding */ Font),
  35. /* harmony export */ "FontElement": () => (/* binding */ FontElement),
  36. /* harmony export */ "FontFaceElement": () => (/* binding */ FontFaceElement),
  37. /* harmony export */ "GElement": () => (/* binding */ GElement),
  38. /* harmony export */ "GlyphElement": () => (/* binding */ GlyphElement),
  39. /* harmony export */ "GradientElement": () => (/* binding */ GradientElement),
  40. /* harmony export */ "ImageElement": () => (/* binding */ ImageElement),
  41. /* harmony export */ "LineElement": () => (/* binding */ LineElement),
  42. /* harmony export */ "LinearGradientElement": () => (/* binding */ LinearGradientElement),
  43. /* harmony export */ "MarkerElement": () => (/* binding */ MarkerElement),
  44. /* harmony export */ "MaskElement": () => (/* binding */ MaskElement),
  45. /* harmony export */ "Matrix": () => (/* binding */ Matrix),
  46. /* harmony export */ "MissingGlyphElement": () => (/* binding */ MissingGlyphElement),
  47. /* harmony export */ "Mouse": () => (/* binding */ Mouse),
  48. /* harmony export */ "PSEUDO_ZERO": () => (/* binding */ PSEUDO_ZERO),
  49. /* harmony export */ "Parser": () => (/* binding */ Parser),
  50. /* harmony export */ "PathElement": () => (/* binding */ PathElement),
  51. /* harmony export */ "PathParser": () => (/* binding */ PathParser),
  52. /* harmony export */ "PatternElement": () => (/* binding */ PatternElement),
  53. /* harmony export */ "Point": () => (/* binding */ Point),
  54. /* harmony export */ "PolygonElement": () => (/* binding */ PolygonElement),
  55. /* harmony export */ "PolylineElement": () => (/* binding */ PolylineElement),
  56. /* harmony export */ "Property": () => (/* binding */ Property),
  57. /* harmony export */ "QB1": () => (/* binding */ QB1),
  58. /* harmony export */ "QB2": () => (/* binding */ QB2),
  59. /* harmony export */ "QB3": () => (/* binding */ QB3),
  60. /* harmony export */ "RadialGradientElement": () => (/* binding */ RadialGradientElement),
  61. /* harmony export */ "RectElement": () => (/* binding */ RectElement),
  62. /* harmony export */ "RenderedElement": () => (/* binding */ RenderedElement),
  63. /* harmony export */ "Rotate": () => (/* binding */ Rotate),
  64. /* harmony export */ "SVGElement": () => (/* binding */ SVGElement),
  65. /* harmony export */ "SVGFontLoader": () => (/* binding */ SVGFontLoader),
  66. /* harmony export */ "Scale": () => (/* binding */ Scale),
  67. /* harmony export */ "Screen": () => (/* binding */ Screen),
  68. /* harmony export */ "Skew": () => (/* binding */ Skew),
  69. /* harmony export */ "SkewX": () => (/* binding */ SkewX),
  70. /* harmony export */ "SkewY": () => (/* binding */ SkewY),
  71. /* harmony export */ "StopElement": () => (/* binding */ StopElement),
  72. /* harmony export */ "StyleElement": () => (/* binding */ StyleElement),
  73. /* harmony export */ "SymbolElement": () => (/* binding */ SymbolElement),
  74. /* harmony export */ "TRefElement": () => (/* binding */ TRefElement),
  75. /* harmony export */ "TSpanElement": () => (/* binding */ TSpanElement),
  76. /* harmony export */ "TextElement": () => (/* binding */ TextElement),
  77. /* harmony export */ "TextPathElement": () => (/* binding */ TextPathElement),
  78. /* harmony export */ "TitleElement": () => (/* binding */ TitleElement),
  79. /* harmony export */ "Transform": () => (/* binding */ Transform),
  80. /* harmony export */ "Translate": () => (/* binding */ Translate),
  81. /* harmony export */ "UnknownElement": () => (/* binding */ UnknownElement),
  82. /* harmony export */ "UseElement": () => (/* binding */ UseElement),
  83. /* harmony export */ "ViewPort": () => (/* binding */ ViewPort),
  84. /* harmony export */ "compressSpaces": () => (/* binding */ compressSpaces),
  85. /* harmony export */ "getSelectorSpecificity": () => (/* binding */ getSelectorSpecificity),
  86. /* harmony export */ "normalizeAttributeName": () => (/* binding */ normalizeAttributeName),
  87. /* harmony export */ "normalizeColor": () => (/* binding */ normalizeColor),
  88. /* harmony export */ "parseExternalUrl": () => (/* binding */ parseExternalUrl),
  89. /* harmony export */ "presets": () => (/* binding */ index),
  90. /* harmony export */ "toNumbers": () => (/* binding */ toNumbers),
  91. /* harmony export */ "trimLeft": () => (/* binding */ trimLeft),
  92. /* harmony export */ "trimRight": () => (/* binding */ trimRight),
  93. /* harmony export */ "vectorMagnitude": () => (/* binding */ vectorMagnitude),
  94. /* harmony export */ "vectorsAngle": () => (/* binding */ vectorsAngle),
  95. /* harmony export */ "vectorsRatio": () => (/* binding */ vectorsRatio)
  96. /* harmony export */ });
  97. /* 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");
  98. /* 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__);
  99. /* 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");
  100. /* 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__);
  101. /* 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");
  102. /* 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__);
  103. /* 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");
  104. /* 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__);
  105. /* 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");
  106. /* 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__);
  107. /* 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");
  108. /* 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__);
  109. /* 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");
  110. /* 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");
  111. /* 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__);
  112. /* 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");
  113. /* 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__);
  114. /* 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");
  115. /* 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__);
  116. /* 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");
  117. /* 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__);
  118. /* 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");
  119. /* 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__);
  120. /* 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");
  121. /* 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__);
  122. /* 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");
  123. /* 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__);
  124. /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
  125. /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__);
  126. /* 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");
  127. /* 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");
  128. /* 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");
  129. /* 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");
  130. /* 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");
  131. /* 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__);
  132. /* 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");
  133. /* 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__);
  134. /* 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");
  135. /* 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__);
  136. /* 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");
  137. /* 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__);
  138. /* 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");
  139. /* 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__);
  140. /* 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");
  141. /* 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__);
  142. /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js");
  143. /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_25__);
  144. /* 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");
  145. /* 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__);
  146. /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! rgbcolor */ "./node_modules/rgbcolor/index.js");
  147. /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(rgbcolor__WEBPACK_IMPORTED_MODULE_27__);
  148. /* 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");
  149. /* 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__);
  150. /* 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");
  151. /* 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__);
  152. /* 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");
  153. /* 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");
  154. /* 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");
  155. /* 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");
  156. /* 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__);
  157. /* 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");
  158. /* 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__);
  159. /* 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");
  160. /* 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__);
  161. /* 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");
  162. /* 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__);
  163. /* 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");
  164. /* 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__);
  165. /* 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");
  166. /* 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__);
  167. /* 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");
  168. /* 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");
  169. /* 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__);
  170. /* 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");
  171. /* 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__);
  172. /* 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");
  173. /* 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");
  174. /* 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__);
  175. /* 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");
  176. /* 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__);
  177. /* 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");
  178. /* 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__);
  179. /* 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");
  180. /* 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");
  181. /* 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__);
  182. /* 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");
  183. /* 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__);
  184. /* 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");
  185. /* 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__);
  186. /* 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");
  187. /* 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__);
  188. /* 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");
  189. /* 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__);
  190. /* 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");
  191. /* 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__);
  192. /* 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");
  193. /* 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__);
  194. /* 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");
  195. /* 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__);
  196. /* harmony import */ var stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! stackblur-canvas */ "./node_modules/stackblur-canvas/dist/stackblur-es.js");
  197. /**
  198. * HTML-safe compress white-spaces.
  199. * @param str - String to compress.
  200. */
  201. function compressSpaces(str) {
  202. return str.replace(/(?!\u3000)\s+/gm, ' ');
  203. }
  204. /**
  205. * HTML-safe left trim.
  206. * @param str - String to trim.
  207. */
  208. function trimLeft(str) {
  209. return str.replace(/^[\n \t]+/, '');
  210. }
  211. /**
  212. * HTML-safe right trim.
  213. * @param str - String to trim.
  214. */
  215. function trimRight(str) {
  216. return str.replace(/[\n \t]+$/, '');
  217. }
  218. /**
  219. * String to numbers array.
  220. * @param str - Numbers string.
  221. */
  222. function toNumbers(str) {
  223. var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
  224. return matches.map(parseFloat);
  225. } // Microsoft Edge fix
  226. var allUppercase = /^[A-Z-]+$/;
  227. /**
  228. * Normalize attribute name.
  229. * @param name - Attribute name.
  230. */
  231. function normalizeAttributeName(name) {
  232. if (allUppercase.test(name)) {
  233. return name.toLowerCase();
  234. }
  235. return name;
  236. }
  237. /**
  238. * Parse external URL.
  239. * @param url - CSS url string.
  240. */
  241. function parseExternalUrl(url) {
  242. // single quotes [2]
  243. // v double quotes [3]
  244. // v v no quotes [4]
  245. // v v v
  246. var urlMatch = url.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/) || [];
  247. return urlMatch[2] || urlMatch[3] || urlMatch[4];
  248. }
  249. /**
  250. * Transform floats to integers in rgb colors.
  251. * @param color - Color to normalize.
  252. */
  253. function normalizeColor(color) {
  254. if (!color.startsWith('rgb')) {
  255. return color;
  256. }
  257. var rgbParts = 3;
  258. var normalizedColor = color.replace(/\d+(\.\d+)?/g, function (num, isFloat) {
  259. return rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num;
  260. });
  261. return normalizedColor;
  262. }
  263. // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
  264. var attributeRegex = /(\[[^\]]+\])/g;
  265. var idRegex = /(#[^\s\+>~\.\[:]+)/g;
  266. var classRegex = /(\.[^\s\+>~\.\[:]+)/g;
  267. var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;
  268. var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi;
  269. var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g;
  270. var elementRegex = /([^\s\+>~\.\[:]+)/g;
  271. function findSelectorMatch(selector, regex) {
  272. var matches = selector.match(regex);
  273. if (!matches) {
  274. return [selector, 0];
  275. }
  276. return [selector.replace(regex, ' '), matches.length];
  277. }
  278. /**
  279. * Measure selector specificity.
  280. * @param selector - Selector to measure.
  281. */
  282. function getSelectorSpecificity(selector) {
  283. var specificity = [0, 0, 0];
  284. var currentSelector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 ').replace(/{[\s\S]*/gm, ' ');
  285. var delta = 0;
  286. var _findSelectorMatch = findSelectorMatch(currentSelector, attributeRegex);
  287. var _findSelectorMatch2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch, 2);
  288. currentSelector = _findSelectorMatch2[0];
  289. delta = _findSelectorMatch2[1];
  290. specificity[1] += delta;
  291. var _findSelectorMatch3 = findSelectorMatch(currentSelector, idRegex);
  292. var _findSelectorMatch4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch3, 2);
  293. currentSelector = _findSelectorMatch4[0];
  294. delta = _findSelectorMatch4[1];
  295. specificity[0] += delta;
  296. var _findSelectorMatch5 = findSelectorMatch(currentSelector, classRegex);
  297. var _findSelectorMatch6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch5, 2);
  298. currentSelector = _findSelectorMatch6[0];
  299. delta = _findSelectorMatch6[1];
  300. specificity[1] += delta;
  301. var _findSelectorMatch7 = findSelectorMatch(currentSelector, pseudoElementRegex);
  302. var _findSelectorMatch8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch7, 2);
  303. currentSelector = _findSelectorMatch8[0];
  304. delta = _findSelectorMatch8[1];
  305. specificity[2] += delta;
  306. var _findSelectorMatch9 = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
  307. var _findSelectorMatch10 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch9, 2);
  308. currentSelector = _findSelectorMatch10[0];
  309. delta = _findSelectorMatch10[1];
  310. specificity[1] += delta;
  311. var _findSelectorMatch11 = findSelectorMatch(currentSelector, pseudoClassRegex);
  312. var _findSelectorMatch12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch11, 2);
  313. currentSelector = _findSelectorMatch12[0];
  314. delta = _findSelectorMatch12[1];
  315. specificity[1] += delta;
  316. currentSelector = currentSelector.replace(/[\*\s\+>~]/g, ' ').replace(/[#\.]/g, ' ');
  317. var _findSelectorMatch13 = findSelectorMatch(currentSelector, elementRegex);
  318. var _findSelectorMatch14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch13, 2);
  319. currentSelector = _findSelectorMatch14[0];
  320. delta = _findSelectorMatch14[1];
  321. // lgtm [js/useless-assignment-to-local]
  322. specificity[2] += delta;
  323. return specificity.join('');
  324. }
  325. var PSEUDO_ZERO = .00000001;
  326. /**
  327. * Vector magnitude.
  328. */
  329. function vectorMagnitude(v) {
  330. return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
  331. }
  332. /**
  333. * Ratio between two vectors.
  334. */
  335. function vectorsRatio(u, v) {
  336. return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
  337. }
  338. /**
  339. * Angle between two vectors.
  340. */
  341. function vectorsAngle(u, v) {
  342. return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
  343. }
  344. function CB1(t) {
  345. return t * t * t;
  346. }
  347. function CB2(t) {
  348. return 3 * t * t * (1 - t);
  349. }
  350. function CB3(t) {
  351. return 3 * t * (1 - t) * (1 - t);
  352. }
  353. function CB4(t) {
  354. return (1 - t) * (1 - t) * (1 - t);
  355. }
  356. function QB1(t) {
  357. return t * t;
  358. }
  359. function QB2(t) {
  360. return 2 * t * (1 - t);
  361. }
  362. function QB3(t) {
  363. return (1 - t) * (1 - t);
  364. }
  365. function createCommonjsModule(fn, module) {
  366. return module = { exports: {} }, fn(module, module.exports), module.exports;
  367. }
  368. var runtime_1 = createCommonjsModule(function (module) {
  369. /**
  370. * Copyright (c) 2014-present, Facebook, Inc.
  371. *
  372. * This source code is licensed under the MIT license found in the
  373. * LICENSE file in the root directory of this source tree.
  374. */
  375. var runtime = function (exports) {
  376. var Op = Object.prototype;
  377. var hasOwn = Op.hasOwnProperty;
  378. var undefined$1; // More compressible than void 0.
  379. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  380. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  381. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  382. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  383. function wrap(innerFn, outerFn, self, tryLocsList) {
  384. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  385. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  386. var generator = Object.create(protoGenerator.prototype);
  387. var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
  388. // .throw, and .return methods.
  389. generator._invoke = makeInvokeMethod(innerFn, self, context);
  390. return generator;
  391. }
  392. exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
  393. // record like context.tryEntries[i].completion. This interface could
  394. // have been (and was previously) designed to take a closure to be
  395. // invoked without arguments, but in all the cases we care about we
  396. // already have an existing method we want to call, so there's no need
  397. // to create a new function object. We can even get away with assuming
  398. // the method takes exactly one argument, since that happens to be true
  399. // in every case, so we don't have to touch the arguments object. The
  400. // only additional allocation required is the completion record, which
  401. // has a stable shape and so hopefully should be cheap to allocate.
  402. function tryCatch(fn, obj, arg) {
  403. try {
  404. return {
  405. type: "normal",
  406. arg: fn.call(obj, arg)
  407. };
  408. } catch (err) {
  409. return {
  410. type: "throw",
  411. arg: err
  412. };
  413. }
  414. }
  415. var GenStateSuspendedStart = "suspendedStart";
  416. var GenStateSuspendedYield = "suspendedYield";
  417. var GenStateExecuting = "executing";
  418. var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
  419. // breaking out of the dispatch switch statement.
  420. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
  421. // .constructor.prototype properties for functions that return Generator
  422. // objects. For full spec compliance, you may wish to configure your
  423. // minifier not to mangle the names of these two functions.
  424. function Generator() {}
  425. function GeneratorFunction() {}
  426. function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
  427. // don't natively support it.
  428. var IteratorPrototype = {};
  429. IteratorPrototype[iteratorSymbol] = function () {
  430. return this;
  431. };
  432. var getProto = Object.getPrototypeOf;
  433. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  434. if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  435. // This environment has a native %IteratorPrototype%; use it instead
  436. // of the polyfill.
  437. IteratorPrototype = NativeIteratorPrototype;
  438. }
  439. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  440. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  441. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  442. GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
  443. // Iterator interface in terms of a single ._invoke method.
  444. function defineIteratorMethods(prototype) {
  445. ["next", "throw", "return"].forEach(function (method) {
  446. prototype[method] = function (arg) {
  447. return this._invoke(method, arg);
  448. };
  449. });
  450. }
  451. exports.isGeneratorFunction = function (genFun) {
  452. var ctor = typeof genFun === "function" && genFun.constructor;
  453. return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
  454. // do is to check its .name property.
  455. (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
  456. };
  457. exports.mark = function (genFun) {
  458. if (Object.setPrototypeOf) {
  459. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  460. } else {
  461. genFun.__proto__ = GeneratorFunctionPrototype;
  462. if (!(toStringTagSymbol in genFun)) {
  463. genFun[toStringTagSymbol] = "GeneratorFunction";
  464. }
  465. }
  466. genFun.prototype = Object.create(Gp);
  467. return genFun;
  468. }; // Within the body of any async function, `await x` is transformed to
  469. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  470. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  471. // meant to be awaited.
  472. exports.awrap = function (arg) {
  473. return {
  474. __await: arg
  475. };
  476. };
  477. function AsyncIterator(generator, PromiseImpl) {
  478. function invoke(method, arg, resolve, reject) {
  479. var record = tryCatch(generator[method], generator, arg);
  480. if (record.type === "throw") {
  481. reject(record.arg);
  482. } else {
  483. var result = record.arg;
  484. var value = result.value;
  485. if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
  486. return PromiseImpl.resolve(value.__await).then(function (value) {
  487. invoke("next", value, resolve, reject);
  488. }, function (err) {
  489. invoke("throw", err, resolve, reject);
  490. });
  491. }
  492. return PromiseImpl.resolve(value).then(function (unwrapped) {
  493. // When a yielded Promise is resolved, its final value becomes
  494. // the .value of the Promise<{value,done}> result for the
  495. // current iteration.
  496. result.value = unwrapped;
  497. resolve(result);
  498. }, function (error) {
  499. // If a rejected Promise was yielded, throw the rejection back
  500. // into the async generator function so it can be handled there.
  501. return invoke("throw", error, resolve, reject);
  502. });
  503. }
  504. }
  505. var previousPromise;
  506. function enqueue(method, arg) {
  507. function callInvokeWithMethodAndArg() {
  508. return new PromiseImpl(function (resolve, reject) {
  509. invoke(method, arg, resolve, reject);
  510. });
  511. }
  512. return previousPromise = // If enqueue has been called before, then we want to wait until
  513. // all previous Promises have been resolved before calling invoke,
  514. // so that results are always delivered in the correct order. If
  515. // enqueue has not been called before, then it is important to
  516. // call invoke immediately, without waiting on a callback to fire,
  517. // so that the async generator function has the opportunity to do
  518. // any necessary setup in a predictable way. This predictability
  519. // is why the Promise constructor synchronously invokes its
  520. // executor callback, and why async functions synchronously
  521. // execute code before the first await. Since we implement simple
  522. // async functions in terms of async generators, it is especially
  523. // important to get this right, even though it requires care.
  524. previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
  525. // invocations of the iterator.
  526. callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  527. } // Define the unified helper method that is used to implement .next,
  528. // .throw, and .return (see defineIteratorMethods).
  529. this._invoke = enqueue;
  530. }
  531. defineIteratorMethods(AsyncIterator.prototype);
  532. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  533. return this;
  534. };
  535. exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
  536. // AsyncIterator objects; they just return a Promise for the value of
  537. // the final result produced by the iterator.
  538. exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  539. if (PromiseImpl === void 0) PromiseImpl = Promise;
  540. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  541. return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
  542. : iter.next().then(function (result) {
  543. return result.done ? result.value : iter.next();
  544. });
  545. };
  546. function makeInvokeMethod(innerFn, self, context) {
  547. var state = GenStateSuspendedStart;
  548. return function invoke(method, arg) {
  549. if (state === GenStateExecuting) {
  550. throw new Error("Generator is already running");
  551. }
  552. if (state === GenStateCompleted) {
  553. if (method === "throw") {
  554. throw arg;
  555. } // Be forgiving, per 25.3.3.3.3 of the spec:
  556. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  557. return doneResult();
  558. }
  559. context.method = method;
  560. context.arg = arg;
  561. while (true) {
  562. var delegate = context.delegate;
  563. if (delegate) {
  564. var delegateResult = maybeInvokeDelegate(delegate, context);
  565. if (delegateResult) {
  566. if (delegateResult === ContinueSentinel) continue;
  567. return delegateResult;
  568. }
  569. }
  570. if (context.method === "next") {
  571. // Setting context._sent for legacy support of Babel's
  572. // function.sent implementation.
  573. context.sent = context._sent = context.arg;
  574. } else if (context.method === "throw") {
  575. if (state === GenStateSuspendedStart) {
  576. state = GenStateCompleted;
  577. throw context.arg;
  578. }
  579. context.dispatchException(context.arg);
  580. } else if (context.method === "return") {
  581. context.abrupt("return", context.arg);
  582. }
  583. state = GenStateExecuting;
  584. var record = tryCatch(innerFn, self, context);
  585. if (record.type === "normal") {
  586. // If an exception is thrown from innerFn, we leave state ===
  587. // GenStateExecuting and loop back for another invocation.
  588. state = context.done ? GenStateCompleted : GenStateSuspendedYield;
  589. if (record.arg === ContinueSentinel) {
  590. continue;
  591. }
  592. return {
  593. value: record.arg,
  594. done: context.done
  595. };
  596. } else if (record.type === "throw") {
  597. state = GenStateCompleted; // Dispatch the exception by looping back around to the
  598. // context.dispatchException(context.arg) call above.
  599. context.method = "throw";
  600. context.arg = record.arg;
  601. }
  602. }
  603. };
  604. } // Call delegate.iterator[context.method](context.arg) and handle the
  605. // result, either by returning a { value, done } result from the
  606. // delegate iterator, or by modifying context.method and context.arg,
  607. // setting context.delegate to null, and returning the ContinueSentinel.
  608. function maybeInvokeDelegate(delegate, context) {
  609. var method = delegate.iterator[context.method];
  610. if (method === undefined$1) {
  611. // A .throw or .return when the delegate iterator has no .throw
  612. // method always terminates the yield* loop.
  613. context.delegate = null;
  614. if (context.method === "throw") {
  615. // Note: ["return"] must be used for ES3 parsing compatibility.
  616. if (delegate.iterator["return"]) {
  617. // If the delegate iterator has a return method, give it a
  618. // chance to clean up.
  619. context.method = "return";
  620. context.arg = undefined$1;
  621. maybeInvokeDelegate(delegate, context);
  622. if (context.method === "throw") {
  623. // If maybeInvokeDelegate(context) changed context.method from
  624. // "return" to "throw", let that override the TypeError below.
  625. return ContinueSentinel;
  626. }
  627. }
  628. context.method = "throw";
  629. context.arg = new TypeError("The iterator does not provide a 'throw' method");
  630. }
  631. return ContinueSentinel;
  632. }
  633. var record = tryCatch(method, delegate.iterator, context.arg);
  634. if (record.type === "throw") {
  635. context.method = "throw";
  636. context.arg = record.arg;
  637. context.delegate = null;
  638. return ContinueSentinel;
  639. }
  640. var info = record.arg;
  641. if (!info) {
  642. context.method = "throw";
  643. context.arg = new TypeError("iterator result is not an object");
  644. context.delegate = null;
  645. return ContinueSentinel;
  646. }
  647. if (info.done) {
  648. // Assign the result of the finished delegate to the temporary
  649. // variable specified by delegate.resultName (see delegateYield).
  650. context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
  651. context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
  652. // exception, let the outer generator proceed normally. If
  653. // context.method was "next", forget context.arg since it has been
  654. // "consumed" by the delegate iterator. If context.method was
  655. // "return", allow the original .return call to continue in the
  656. // outer generator.
  657. if (context.method !== "return") {
  658. context.method = "next";
  659. context.arg = undefined$1;
  660. }
  661. } else {
  662. // Re-yield the result returned by the delegate method.
  663. return info;
  664. } // The delegate iterator is finished, so forget it and continue with
  665. // the outer generator.
  666. context.delegate = null;
  667. return ContinueSentinel;
  668. } // Define Generator.prototype.{next,throw,return} in terms of the
  669. // unified ._invoke helper method.
  670. defineIteratorMethods(Gp);
  671. Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
  672. // @@iterator function is called on it. Some browsers' implementations of the
  673. // iterator prototype chain incorrectly implement this, causing the Generator
  674. // object to not be returned from this call. This ensures that doesn't happen.
  675. // See https://github.com/facebook/regenerator/issues/274 for more details.
  676. Gp[iteratorSymbol] = function () {
  677. return this;
  678. };
  679. Gp.toString = function () {
  680. return "[object Generator]";
  681. };
  682. function pushTryEntry(locs) {
  683. var entry = {
  684. tryLoc: locs[0]
  685. };
  686. if (1 in locs) {
  687. entry.catchLoc = locs[1];
  688. }
  689. if (2 in locs) {
  690. entry.finallyLoc = locs[2];
  691. entry.afterLoc = locs[3];
  692. }
  693. this.tryEntries.push(entry);
  694. }
  695. function resetTryEntry(entry) {
  696. var record = entry.completion || {};
  697. record.type = "normal";
  698. delete record.arg;
  699. entry.completion = record;
  700. }
  701. function Context(tryLocsList) {
  702. // The root entry object (effectively a try statement without a catch
  703. // or a finally block) gives us a place to store values thrown from
  704. // locations where there is no enclosing try statement.
  705. this.tryEntries = [{
  706. tryLoc: "root"
  707. }];
  708. tryLocsList.forEach(pushTryEntry, this);
  709. this.reset(true);
  710. }
  711. exports.keys = function (object) {
  712. var keys = [];
  713. for (var key in object) {
  714. keys.push(key);
  715. }
  716. keys.reverse(); // Rather than returning an object with a next method, we keep
  717. // things simple and return the next function itself.
  718. return function next() {
  719. while (keys.length) {
  720. var key = keys.pop();
  721. if (key in object) {
  722. next.value = key;
  723. next.done = false;
  724. return next;
  725. }
  726. } // To avoid creating an additional object, we just hang the .value
  727. // and .done properties off the next function object itself. This
  728. // also ensures that the minifier will not anonymize the function.
  729. next.done = true;
  730. return next;
  731. };
  732. };
  733. function values(iterable) {
  734. if (iterable) {
  735. var iteratorMethod = iterable[iteratorSymbol];
  736. if (iteratorMethod) {
  737. return iteratorMethod.call(iterable);
  738. }
  739. if (typeof iterable.next === "function") {
  740. return iterable;
  741. }
  742. if (!isNaN(iterable.length)) {
  743. var i = -1,
  744. next = function next() {
  745. while (++i < iterable.length) {
  746. if (hasOwn.call(iterable, i)) {
  747. next.value = iterable[i];
  748. next.done = false;
  749. return next;
  750. }
  751. }
  752. next.value = undefined$1;
  753. next.done = true;
  754. return next;
  755. };
  756. return next.next = next;
  757. }
  758. } // Return an iterator with no values.
  759. return {
  760. next: doneResult
  761. };
  762. }
  763. exports.values = values;
  764. function doneResult() {
  765. return {
  766. value: undefined$1,
  767. done: true
  768. };
  769. }
  770. Context.prototype = {
  771. constructor: Context,
  772. reset: function (skipTempReset) {
  773. this.prev = 0;
  774. this.next = 0; // Resetting context._sent for legacy support of Babel's
  775. // function.sent implementation.
  776. this.sent = this._sent = undefined$1;
  777. this.done = false;
  778. this.delegate = null;
  779. this.method = "next";
  780. this.arg = undefined$1;
  781. this.tryEntries.forEach(resetTryEntry);
  782. if (!skipTempReset) {
  783. for (var name in this) {
  784. // Not sure about the optimal order of these conditions:
  785. if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
  786. this[name] = undefined$1;
  787. }
  788. }
  789. }
  790. },
  791. stop: function () {
  792. this.done = true;
  793. var rootEntry = this.tryEntries[0];
  794. var rootRecord = rootEntry.completion;
  795. if (rootRecord.type === "throw") {
  796. throw rootRecord.arg;
  797. }
  798. return this.rval;
  799. },
  800. dispatchException: function (exception) {
  801. if (this.done) {
  802. throw exception;
  803. }
  804. var context = this;
  805. function handle(loc, caught) {
  806. record.type = "throw";
  807. record.arg = exception;
  808. context.next = loc;
  809. if (caught) {
  810. // If the dispatched exception was caught by a catch block,
  811. // then let that catch block handle the exception normally.
  812. context.method = "next";
  813. context.arg = undefined$1;
  814. }
  815. return !!caught;
  816. }
  817. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  818. var entry = this.tryEntries[i];
  819. var record = entry.completion;
  820. if (entry.tryLoc === "root") {
  821. // Exception thrown outside of any try block that could handle
  822. // it, so set the completion value of the entire function to
  823. // throw the exception.
  824. return handle("end");
  825. }
  826. if (entry.tryLoc <= this.prev) {
  827. var hasCatch = hasOwn.call(entry, "catchLoc");
  828. var hasFinally = hasOwn.call(entry, "finallyLoc");
  829. if (hasCatch && hasFinally) {
  830. if (this.prev < entry.catchLoc) {
  831. return handle(entry.catchLoc, true);
  832. } else if (this.prev < entry.finallyLoc) {
  833. return handle(entry.finallyLoc);
  834. }
  835. } else if (hasCatch) {
  836. if (this.prev < entry.catchLoc) {
  837. return handle(entry.catchLoc, true);
  838. }
  839. } else if (hasFinally) {
  840. if (this.prev < entry.finallyLoc) {
  841. return handle(entry.finallyLoc);
  842. }
  843. } else {
  844. throw new Error("try statement without catch or finally");
  845. }
  846. }
  847. }
  848. },
  849. abrupt: function (type, arg) {
  850. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  851. var entry = this.tryEntries[i];
  852. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  853. var finallyEntry = entry;
  854. break;
  855. }
  856. }
  857. if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
  858. // Ignore the finally entry if control is not jumping to a
  859. // location outside the try/catch block.
  860. finallyEntry = null;
  861. }
  862. var record = finallyEntry ? finallyEntry.completion : {};
  863. record.type = type;
  864. record.arg = arg;
  865. if (finallyEntry) {
  866. this.method = "next";
  867. this.next = finallyEntry.finallyLoc;
  868. return ContinueSentinel;
  869. }
  870. return this.complete(record);
  871. },
  872. complete: function (record, afterLoc) {
  873. if (record.type === "throw") {
  874. throw record.arg;
  875. }
  876. if (record.type === "break" || record.type === "continue") {
  877. this.next = record.arg;
  878. } else if (record.type === "return") {
  879. this.rval = this.arg = record.arg;
  880. this.method = "return";
  881. this.next = "end";
  882. } else if (record.type === "normal" && afterLoc) {
  883. this.next = afterLoc;
  884. }
  885. return ContinueSentinel;
  886. },
  887. finish: function (finallyLoc) {
  888. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  889. var entry = this.tryEntries[i];
  890. if (entry.finallyLoc === finallyLoc) {
  891. this.complete(entry.completion, entry.afterLoc);
  892. resetTryEntry(entry);
  893. return ContinueSentinel;
  894. }
  895. }
  896. },
  897. "catch": function (tryLoc) {
  898. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  899. var entry = this.tryEntries[i];
  900. if (entry.tryLoc === tryLoc) {
  901. var record = entry.completion;
  902. if (record.type === "throw") {
  903. var thrown = record.arg;
  904. resetTryEntry(entry);
  905. }
  906. return thrown;
  907. }
  908. } // The context.catch method must only be called with a location
  909. // argument that corresponds to a known catch block.
  910. throw new Error("illegal catch attempt");
  911. },
  912. delegateYield: function (iterable, resultName, nextLoc) {
  913. this.delegate = {
  914. iterator: values(iterable),
  915. resultName: resultName,
  916. nextLoc: nextLoc
  917. };
  918. if (this.method === "next") {
  919. // Deliberately forget the last sent value so that we don't
  920. // accidentally pass it on to the delegate.
  921. this.arg = undefined$1;
  922. }
  923. return ContinueSentinel;
  924. }
  925. }; // Regardless of whether this script is executing as a CommonJS module
  926. // or not, return the runtime object so that we can declare the variable
  927. // regeneratorRuntime in the outer scope, which allows this module to be
  928. // injected easily by `bin/regenerator --include-runtime script.js`.
  929. return exports;
  930. }( // If this script is executing as a CommonJS module, use module.exports
  931. // as the regeneratorRuntime namespace. Otherwise create a new empty
  932. // object. Either way, the resulting object will be used to initialize
  933. // the regeneratorRuntime variable at the top of this file.
  934. module.exports );
  935. try {
  936. regeneratorRuntime = runtime;
  937. } catch (accidentalStrictMode) {
  938. // This module should not be running in strict mode, so the above
  939. // assignment should always work unless something is misconfigured. Just
  940. // in case runtime.js accidentally runs in strict mode, we can escape
  941. // strict mode using a global Function call. This could conceivably fail
  942. // if a Content Security Policy forbids using Function, but in that case
  943. // the proper solution is to fix the accidental strict mode problem. If
  944. // you've misconfigured your bundler to force strict mode and applied a
  945. // CSP to forbid Function, and you're not willing to fix either of those
  946. // problems, please detail your unique predicament in a GitHub issue.
  947. Function("r", "regeneratorRuntime = r")(runtime);
  948. }
  949. });
  950. var Property = /*#__PURE__*/function () {
  951. function Property(document, name, value) {
  952. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Property);
  953. this.document = document;
  954. this.name = name;
  955. this.value = value;
  956. this.isNormalizedColor = false;
  957. }
  958. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Property, [{
  959. key: "hasValue",
  960. value: function hasValue() {
  961. var value = this.value;
  962. return value !== null && value !== '' && value !== 0 && typeof value !== 'undefined';
  963. }
  964. }, {
  965. key: "isString",
  966. value: function isString(regexp) {
  967. var value = this.value;
  968. var result = typeof value === 'string';
  969. if (!result || !regexp) {
  970. return result;
  971. }
  972. return regexp.test(value);
  973. }
  974. }, {
  975. key: "isUrlDefinition",
  976. value: function isUrlDefinition() {
  977. return this.isString(/^url\(/);
  978. }
  979. }, {
  980. key: "isPixels",
  981. value: function isPixels() {
  982. if (!this.hasValue()) {
  983. return false;
  984. }
  985. var asString = this.getString();
  986. switch (true) {
  987. case /px$/.test(asString):
  988. case /^[0-9]+$/.test(asString):
  989. return true;
  990. default:
  991. return false;
  992. }
  993. }
  994. }, {
  995. key: "setValue",
  996. value: function setValue(value) {
  997. this.value = value;
  998. return this;
  999. }
  1000. }, {
  1001. key: "getValue",
  1002. value: function getValue(def) {
  1003. if (typeof def === 'undefined' || this.hasValue()) {
  1004. return this.value;
  1005. }
  1006. return def;
  1007. }
  1008. }, {
  1009. key: "getNumber",
  1010. value: function getNumber(def) {
  1011. if (!this.hasValue()) {
  1012. if (typeof def === 'undefined') {
  1013. return 0;
  1014. }
  1015. return parseFloat(def);
  1016. }
  1017. var value = this.value;
  1018. var n = parseFloat(value);
  1019. if (this.isString(/%$/)) {
  1020. n = n / 100.0;
  1021. }
  1022. return n;
  1023. }
  1024. }, {
  1025. key: "getString",
  1026. value: function getString(def) {
  1027. if (typeof def === 'undefined' || this.hasValue()) {
  1028. return typeof this.value === 'undefined' ? '' : String(this.value);
  1029. }
  1030. return String(def);
  1031. }
  1032. }, {
  1033. key: "getColor",
  1034. value: function getColor(def) {
  1035. var color = this.getString(def);
  1036. if (this.isNormalizedColor) {
  1037. return color;
  1038. }
  1039. this.isNormalizedColor = true;
  1040. color = normalizeColor(color);
  1041. this.value = color;
  1042. return color;
  1043. }
  1044. }, {
  1045. key: "getDpi",
  1046. value: function getDpi() {
  1047. return 96.0; // TODO: compute?
  1048. }
  1049. }, {
  1050. key: "getRem",
  1051. value: function getRem() {
  1052. return this.document.rootEmSize;
  1053. }
  1054. }, {
  1055. key: "getEm",
  1056. value: function getEm() {
  1057. return this.document.emSize;
  1058. }
  1059. }, {
  1060. key: "getUnits",
  1061. value: function getUnits() {
  1062. return this.getString().replace(/[0-9\.\-]/g, '');
  1063. }
  1064. }, {
  1065. key: "getPixels",
  1066. value: function getPixels(axisOrIsFontSize) {
  1067. var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1068. if (!this.hasValue()) {
  1069. return 0;
  1070. }
  1071. var _ref = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize],
  1072. _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
  1073. axis = _ref2[0],
  1074. isFontSize = _ref2[1];
  1075. var viewPort = this.document.screen.viewPort;
  1076. switch (true) {
  1077. case this.isString(/vmin$/):
  1078. return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
  1079. case this.isString(/vmax$/):
  1080. return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
  1081. case this.isString(/vw$/):
  1082. return this.getNumber() / 100.0 * viewPort.computeSize('x');
  1083. case this.isString(/vh$/):
  1084. return this.getNumber() / 100.0 * viewPort.computeSize('y');
  1085. case this.isString(/rem$/):
  1086. return this.getNumber() * this.getRem();
  1087. case this.isString(/em$/):
  1088. return this.getNumber() * this.getEm();
  1089. case this.isString(/ex$/):
  1090. return this.getNumber() * this.getEm() / 2.0;
  1091. case this.isString(/px$/):
  1092. return this.getNumber();
  1093. case this.isString(/pt$/):
  1094. return this.getNumber() * this.getDpi() * (1.0 / 72.0);
  1095. case this.isString(/pc$/):
  1096. return this.getNumber() * 15;
  1097. case this.isString(/cm$/):
  1098. return this.getNumber() * this.getDpi() / 2.54;
  1099. case this.isString(/mm$/):
  1100. return this.getNumber() * this.getDpi() / 25.4;
  1101. case this.isString(/in$/):
  1102. return this.getNumber() * this.getDpi();
  1103. case this.isString(/%$/) && isFontSize:
  1104. return this.getNumber() * this.getEm();
  1105. case this.isString(/%$/):
  1106. return this.getNumber() * viewPort.computeSize(axis);
  1107. default:
  1108. {
  1109. var n = this.getNumber();
  1110. if (processPercent && n < 1.0) {
  1111. return n * viewPort.computeSize(axis);
  1112. }
  1113. return n;
  1114. }
  1115. }
  1116. }
  1117. }, {
  1118. key: "getMilliseconds",
  1119. value: function getMilliseconds() {
  1120. if (!this.hasValue()) {
  1121. return 0;
  1122. }
  1123. if (this.isString(/ms$/)) {
  1124. return this.getNumber();
  1125. }
  1126. return this.getNumber() * 1000;
  1127. }
  1128. }, {
  1129. key: "getRadians",
  1130. value: function getRadians() {
  1131. if (!this.hasValue()) {
  1132. return 0;
  1133. }
  1134. switch (true) {
  1135. case this.isString(/deg$/):
  1136. return this.getNumber() * (Math.PI / 180.0);
  1137. case this.isString(/grad$/):
  1138. return this.getNumber() * (Math.PI / 200.0);
  1139. case this.isString(/rad$/):
  1140. return this.getNumber();
  1141. default:
  1142. return this.getNumber() * (Math.PI / 180.0);
  1143. }
  1144. }
  1145. }, {
  1146. key: "getDefinition",
  1147. value: function getDefinition() {
  1148. var asString = this.getString();
  1149. var name = asString.match(/#([^\)'"]+)/);
  1150. if (name) {
  1151. name = name[1];
  1152. }
  1153. if (!name) {
  1154. name = asString;
  1155. }
  1156. return this.document.definitions[name];
  1157. }
  1158. }, {
  1159. key: "getFillStyleDefinition",
  1160. value: function getFillStyleDefinition(element, opacity) {
  1161. var def = this.getDefinition();
  1162. if (!def) {
  1163. return null;
  1164. } // gradient
  1165. if (typeof def.createGradient === 'function') {
  1166. return def.createGradient(this.document.ctx, element, opacity);
  1167. } // pattern
  1168. if (typeof def.createPattern === 'function') {
  1169. if (def.getHrefAttribute().hasValue()) {
  1170. var patternTransform = def.getAttribute('patternTransform');
  1171. def = def.getHrefAttribute().getDefinition();
  1172. if (patternTransform.hasValue()) {
  1173. def.getAttribute('patternTransform', true).setValue(patternTransform.value);
  1174. }
  1175. }
  1176. return def.createPattern(this.document.ctx, element, opacity);
  1177. }
  1178. return null;
  1179. }
  1180. }, {
  1181. key: "getTextBaseline",
  1182. value: function getTextBaseline() {
  1183. if (!this.hasValue()) {
  1184. return null;
  1185. }
  1186. return Property.textBaselineMapping[this.getString()];
  1187. }
  1188. }, {
  1189. key: "addOpacity",
  1190. value: function addOpacity(opacity) {
  1191. var value = this.getColor();
  1192. var len = value.length;
  1193. var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
  1194. for (var i = 0; i < len; i++) {
  1195. if (value[i] === ',') {
  1196. commas++;
  1197. }
  1198. if (commas === 3) {
  1199. break;
  1200. }
  1201. }
  1202. if (opacity.hasValue() && this.isString() && commas !== 3) {
  1203. var color = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(value);
  1204. if (color.ok) {
  1205. color.alpha = opacity.getNumber();
  1206. value = color.toRGBA();
  1207. }
  1208. }
  1209. return new Property(this.document, this.name, value);
  1210. }
  1211. }], [{
  1212. key: "empty",
  1213. value: function empty(document) {
  1214. return new Property(document, 'EMPTY', '');
  1215. }
  1216. }]);
  1217. return Property;
  1218. }();
  1219. Property.textBaselineMapping = {
  1220. 'baseline': 'alphabetic',
  1221. 'before-edge': 'top',
  1222. 'text-before-edge': 'top',
  1223. 'middle': 'middle',
  1224. 'central': 'middle',
  1225. 'after-edge': 'bottom',
  1226. 'text-after-edge': 'bottom',
  1227. 'ideographic': 'ideographic',
  1228. 'alphabetic': 'alphabetic',
  1229. 'hanging': 'hanging',
  1230. 'mathematical': 'alphabetic'
  1231. };
  1232. var ViewPort = /*#__PURE__*/function () {
  1233. function ViewPort() {
  1234. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ViewPort);
  1235. this.viewPorts = [];
  1236. }
  1237. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ViewPort, [{
  1238. key: "clear",
  1239. value: function clear() {
  1240. this.viewPorts = [];
  1241. }
  1242. }, {
  1243. key: "setCurrent",
  1244. value: function setCurrent(width, height) {
  1245. this.viewPorts.push({
  1246. width: width,
  1247. height: height
  1248. });
  1249. }
  1250. }, {
  1251. key: "removeCurrent",
  1252. value: function removeCurrent() {
  1253. this.viewPorts.pop();
  1254. }
  1255. }, {
  1256. key: "getCurrent",
  1257. value: function getCurrent() {
  1258. var viewPorts = this.viewPorts;
  1259. return viewPorts[viewPorts.length - 1];
  1260. }
  1261. }, {
  1262. key: "computeSize",
  1263. value: function computeSize(d) {
  1264. if (typeof d === 'number') {
  1265. return d;
  1266. }
  1267. if (d === 'x') {
  1268. return this.width;
  1269. }
  1270. if (d === 'y') {
  1271. return this.height;
  1272. }
  1273. return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
  1274. }
  1275. }, {
  1276. key: "width",
  1277. get: function get() {
  1278. return this.getCurrent().width;
  1279. }
  1280. }, {
  1281. key: "height",
  1282. get: function get() {
  1283. return this.getCurrent().height;
  1284. }
  1285. }]);
  1286. return ViewPort;
  1287. }();
  1288. var Point = /*#__PURE__*/function () {
  1289. function Point(x, y) {
  1290. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Point);
  1291. this.x = x;
  1292. this.y = y;
  1293. }
  1294. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Point, [{
  1295. key: "angleTo",
  1296. value: function angleTo(point) {
  1297. return Math.atan2(point.y - this.y, point.x - this.x);
  1298. }
  1299. }, {
  1300. key: "applyTransform",
  1301. value: function applyTransform(transform) {
  1302. var x = this.x,
  1303. y = this.y;
  1304. var xp = x * transform[0] + y * transform[2] + transform[4];
  1305. var yp = x * transform[1] + y * transform[3] + transform[5];
  1306. this.x = xp;
  1307. this.y = yp;
  1308. }
  1309. }], [{
  1310. key: "parse",
  1311. value: function parse(point) {
  1312. var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  1313. var _toNumbers = toNumbers(point),
  1314. _toNumbers2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers, 2),
  1315. _toNumbers2$ = _toNumbers2[0],
  1316. x = _toNumbers2$ === void 0 ? defaultValue : _toNumbers2$,
  1317. _toNumbers2$2 = _toNumbers2[1],
  1318. y = _toNumbers2$2 === void 0 ? defaultValue : _toNumbers2$2;
  1319. return new Point(x, y);
  1320. }
  1321. }, {
  1322. key: "parseScale",
  1323. value: function parseScale(scale) {
  1324. var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  1325. var _toNumbers3 = toNumbers(scale),
  1326. _toNumbers4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers3, 2),
  1327. _toNumbers4$ = _toNumbers4[0],
  1328. x = _toNumbers4$ === void 0 ? defaultValue : _toNumbers4$,
  1329. _toNumbers4$2 = _toNumbers4[1],
  1330. y = _toNumbers4$2 === void 0 ? x : _toNumbers4$2;
  1331. return new Point(x, y);
  1332. }
  1333. }, {
  1334. key: "parsePath",
  1335. value: function parsePath(path) {
  1336. var points = toNumbers(path);
  1337. var len = points.length;
  1338. var pathPoints = [];
  1339. for (var i = 0; i < len; i += 2) {
  1340. pathPoints.push(new Point(points[i], points[i + 1]));
  1341. }
  1342. return pathPoints;
  1343. }
  1344. }]);
  1345. return Point;
  1346. }();
  1347. var Mouse = /*#__PURE__*/function () {
  1348. function Mouse(screen) {
  1349. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Mouse);
  1350. this.screen = screen;
  1351. this.working = false;
  1352. this.events = [];
  1353. this.eventElements = [];
  1354. this.onClick = this.onClick.bind(this);
  1355. this.onMouseMove = this.onMouseMove.bind(this);
  1356. }
  1357. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Mouse, [{
  1358. key: "isWorking",
  1359. value: function isWorking() {
  1360. return this.working;
  1361. }
  1362. }, {
  1363. key: "start",
  1364. value: function start() {
  1365. if (this.working) {
  1366. return;
  1367. }
  1368. var screen = this.screen,
  1369. onClick = this.onClick,
  1370. onMouseMove = this.onMouseMove;
  1371. var canvas = screen.ctx.canvas;
  1372. canvas.onclick = onClick;
  1373. canvas.onmousemove = onMouseMove;
  1374. this.working = true;
  1375. }
  1376. }, {
  1377. key: "stop",
  1378. value: function stop() {
  1379. if (!this.working) {
  1380. return;
  1381. }
  1382. var canvas = this.screen.ctx.canvas;
  1383. this.working = false;
  1384. canvas.onclick = null;
  1385. canvas.onmousemove = null;
  1386. }
  1387. }, {
  1388. key: "hasEvents",
  1389. value: function hasEvents() {
  1390. return this.working && this.events.length > 0;
  1391. }
  1392. }, {
  1393. key: "runEvents",
  1394. value: function runEvents() {
  1395. if (!this.working) {
  1396. return;
  1397. }
  1398. var document = this.screen,
  1399. events = this.events,
  1400. eventElements = this.eventElements;
  1401. var style = document.ctx.canvas.style;
  1402. if (style) {
  1403. style.cursor = '';
  1404. }
  1405. events.forEach(function (_ref, i) {
  1406. var run = _ref.run;
  1407. var element = eventElements[i];
  1408. while (element) {
  1409. run(element);
  1410. element = element.parent;
  1411. }
  1412. }); // done running, clear
  1413. this.events = [];
  1414. this.eventElements = [];
  1415. }
  1416. }, {
  1417. key: "checkPath",
  1418. value: function checkPath(element, ctx) {
  1419. if (!this.working || !ctx) {
  1420. return;
  1421. }
  1422. var events = this.events,
  1423. eventElements = this.eventElements;
  1424. events.forEach(function (_ref2, i) {
  1425. var x = _ref2.x,
  1426. y = _ref2.y;
  1427. if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
  1428. eventElements[i] = element;
  1429. }
  1430. });
  1431. }
  1432. }, {
  1433. key: "checkBoundingBox",
  1434. value: function checkBoundingBox(element, boundingBox) {
  1435. if (!this.working || !boundingBox) {
  1436. return;
  1437. }
  1438. var events = this.events,
  1439. eventElements = this.eventElements;
  1440. events.forEach(function (_ref3, i) {
  1441. var x = _ref3.x,
  1442. y = _ref3.y;
  1443. if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
  1444. eventElements[i] = element;
  1445. }
  1446. });
  1447. }
  1448. }, {
  1449. key: "mapXY",
  1450. value: function mapXY(x, y) {
  1451. var _this$screen = this.screen,
  1452. window = _this$screen.window,
  1453. ctx = _this$screen.ctx;
  1454. var point = new Point(x, y);
  1455. var element = ctx.canvas;
  1456. while (element) {
  1457. point.x -= element.offsetLeft;
  1458. point.y -= element.offsetTop;
  1459. element = element.offsetParent;
  1460. }
  1461. if (window.scrollX) {
  1462. point.x += window.scrollX;
  1463. }
  1464. if (window.scrollY) {
  1465. point.y += window.scrollY;
  1466. }
  1467. return point;
  1468. }
  1469. }, {
  1470. key: "onClick",
  1471. value: function onClick(evt) {
  1472. var _this$mapXY = this.mapXY((evt || event).clientX, (evt || event).clientY),
  1473. x = _this$mapXY.x,
  1474. y = _this$mapXY.y;
  1475. this.events.push({
  1476. type: 'onclick',
  1477. x: x,
  1478. y: y,
  1479. run: function run(event) {
  1480. if (event.onClick) {
  1481. event.onClick();
  1482. }
  1483. }
  1484. });
  1485. }
  1486. }, {
  1487. key: "onMouseMove",
  1488. value: function onMouseMove(evt) {
  1489. var _this$mapXY2 = this.mapXY((evt || event).clientX, (evt || event).clientY),
  1490. x = _this$mapXY2.x,
  1491. y = _this$mapXY2.y;
  1492. this.events.push({
  1493. type: 'onmousemove',
  1494. x: x,
  1495. y: y,
  1496. run: function run(event) {
  1497. if (event.onMouseMove) {
  1498. event.onMouseMove();
  1499. }
  1500. }
  1501. });
  1502. }
  1503. }]);
  1504. return Mouse;
  1505. }();
  1506. var defaultWindow = typeof window !== 'undefined' ? window : null;
  1507. var defaultFetch = typeof fetch !== 'undefined' ? fetch.bind(void 0) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
  1508. : null;
  1509. var Screen = /*#__PURE__*/function () {
  1510. function Screen(ctx) {
  1511. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  1512. _ref$fetch = _ref.fetch,
  1513. fetch = _ref$fetch === void 0 ? defaultFetch : _ref$fetch,
  1514. _ref$window = _ref.window,
  1515. window = _ref$window === void 0 ? defaultWindow : _ref$window;
  1516. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Screen);
  1517. this.ctx = ctx;
  1518. this.FRAMERATE = 30;
  1519. this.MAX_VIRTUAL_PIXELS = 30000;
  1520. this.CLIENT_WIDTH = 800;
  1521. this.CLIENT_HEIGHT = 600;
  1522. this.viewPort = new ViewPort();
  1523. this.mouse = new Mouse(this);
  1524. this.animations = [];
  1525. this.waits = [];
  1526. this.frameDuration = 0;
  1527. this.isReadyLock = false;
  1528. this.isFirstRender = true;
  1529. this.intervalId = null;
  1530. this.window = window;
  1531. this.fetch = fetch;
  1532. }
  1533. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Screen, [{
  1534. key: "wait",
  1535. value: function wait(checker) {
  1536. this.waits.push(checker);
  1537. }
  1538. }, {
  1539. key: "ready",
  1540. value: function ready() {
  1541. if (!this.readyPromise) {
  1542. return Promise.resolve();
  1543. }
  1544. return this.readyPromise;
  1545. }
  1546. }, {
  1547. key: "isReady",
  1548. value: function isReady() {
  1549. if (this.isReadyLock) {
  1550. return true;
  1551. }
  1552. var isReadyLock = this.waits.every(function (_) {
  1553. return _();
  1554. });
  1555. if (isReadyLock) {
  1556. this.waits = [];
  1557. if (this.resolveReady) {
  1558. this.resolveReady();
  1559. }
  1560. }
  1561. this.isReadyLock = isReadyLock;
  1562. return isReadyLock;
  1563. }
  1564. }, {
  1565. key: "setDefaults",
  1566. value: function setDefaults(ctx) {
  1567. // initial values and defaults
  1568. ctx.strokeStyle = 'rgba(0,0,0,0)';
  1569. ctx.lineCap = 'butt';
  1570. ctx.lineJoin = 'miter';
  1571. ctx.miterLimit = 4;
  1572. }
  1573. }, {
  1574. key: "setViewBox",
  1575. value: function setViewBox(_ref2) {
  1576. var document = _ref2.document,
  1577. ctx = _ref2.ctx,
  1578. aspectRatio = _ref2.aspectRatio,
  1579. width = _ref2.width,
  1580. desiredWidth = _ref2.desiredWidth,
  1581. height = _ref2.height,
  1582. desiredHeight = _ref2.desiredHeight,
  1583. _ref2$minX = _ref2.minX,
  1584. minX = _ref2$minX === void 0 ? 0 : _ref2$minX,
  1585. _ref2$minY = _ref2.minY,
  1586. minY = _ref2$minY === void 0 ? 0 : _ref2$minY,
  1587. refX = _ref2.refX,
  1588. refY = _ref2.refY,
  1589. _ref2$clip = _ref2.clip,
  1590. clip = _ref2$clip === void 0 ? false : _ref2$clip,
  1591. _ref2$clipX = _ref2.clipX,
  1592. clipX = _ref2$clipX === void 0 ? 0 : _ref2$clipX,
  1593. _ref2$clipY = _ref2.clipY,
  1594. clipY = _ref2$clipY === void 0 ? 0 : _ref2$clipY;
  1595. // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
  1596. var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
  1597. var _cleanAspectRatio$spl = cleanAspectRatio.split(' '),
  1598. _cleanAspectRatio$spl2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_cleanAspectRatio$spl, 2),
  1599. aspectRatioAlign = _cleanAspectRatio$spl2[0],
  1600. aspectRatioMeetOrSlice = _cleanAspectRatio$spl2[1];
  1601. var align = aspectRatioAlign || 'xMidYMid';
  1602. var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
  1603. var scaleX = width / desiredWidth;
  1604. var scaleY = height / desiredHeight;
  1605. var scaleMin = Math.min(scaleX, scaleY);
  1606. var scaleMax = Math.max(scaleX, scaleY);
  1607. var finalDesiredWidth = desiredWidth;
  1608. var finalDesiredHeight = desiredHeight;
  1609. if (meetOrSlice === 'meet') {
  1610. finalDesiredWidth *= scaleMin;
  1611. finalDesiredHeight *= scaleMin;
  1612. }
  1613. if (meetOrSlice === 'slice') {
  1614. finalDesiredWidth *= scaleMax;
  1615. finalDesiredHeight *= scaleMax;
  1616. }
  1617. var refXProp = new Property(document, 'refX', refX);
  1618. var refYProp = new Property(document, 'refY', refY);
  1619. var hasRefs = refXProp.hasValue() && refYProp.hasValue();
  1620. if (hasRefs) {
  1621. ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
  1622. }
  1623. if (clip) {
  1624. var scaledClipX = scaleMin * clipX;
  1625. var scaledClipY = scaleMin * clipY;
  1626. ctx.beginPath();
  1627. ctx.moveTo(scaledClipX, scaledClipY);
  1628. ctx.lineTo(width, scaledClipY);
  1629. ctx.lineTo(width, height);
  1630. ctx.lineTo(scaledClipX, height);
  1631. ctx.closePath();
  1632. ctx.clip();
  1633. }
  1634. if (!hasRefs) {
  1635. var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
  1636. var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
  1637. var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
  1638. var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
  1639. if (/^xMid/.test(align) && (isMeetMinY || isSliceMaxY)) {
  1640. ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
  1641. }
  1642. if (/YMid$/.test(align) && (isMeetMinX || isSliceMaxX)) {
  1643. ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
  1644. }
  1645. if (/^xMax/.test(align) && (isMeetMinY || isSliceMaxY)) {
  1646. ctx.translate(width - finalDesiredWidth, 0);
  1647. }
  1648. if (/YMax$/.test(align) && (isMeetMinX || isSliceMaxX)) {
  1649. ctx.translate(0, height - finalDesiredHeight);
  1650. }
  1651. } // scale
  1652. switch (true) {
  1653. case align === 'none':
  1654. ctx.scale(scaleX, scaleY);
  1655. break;
  1656. case meetOrSlice === 'meet':
  1657. ctx.scale(scaleMin, scaleMin);
  1658. break;
  1659. case meetOrSlice === 'slice':
  1660. ctx.scale(scaleMax, scaleMax);
  1661. break;
  1662. } // translate
  1663. ctx.translate(-minX, -minY);
  1664. }
  1665. }, {
  1666. key: "start",
  1667. value: function start(element) {
  1668. var _this = this;
  1669. var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  1670. _ref3$enableRedraw = _ref3.enableRedraw,
  1671. enableRedraw = _ref3$enableRedraw === void 0 ? false : _ref3$enableRedraw,
  1672. _ref3$ignoreMouse = _ref3.ignoreMouse,
  1673. ignoreMouse = _ref3$ignoreMouse === void 0 ? false : _ref3$ignoreMouse,
  1674. _ref3$ignoreAnimation = _ref3.ignoreAnimation,
  1675. ignoreAnimation = _ref3$ignoreAnimation === void 0 ? false : _ref3$ignoreAnimation,
  1676. _ref3$ignoreDimension = _ref3.ignoreDimensions,
  1677. ignoreDimensions = _ref3$ignoreDimension === void 0 ? false : _ref3$ignoreDimension,
  1678. _ref3$ignoreClear = _ref3.ignoreClear,
  1679. ignoreClear = _ref3$ignoreClear === void 0 ? false : _ref3$ignoreClear,
  1680. forceRedraw = _ref3.forceRedraw,
  1681. scaleWidth = _ref3.scaleWidth,
  1682. scaleHeight = _ref3.scaleHeight,
  1683. offsetX = _ref3.offsetX,
  1684. offsetY = _ref3.offsetY;
  1685. var FRAMERATE = this.FRAMERATE,
  1686. mouse = this.mouse;
  1687. var frameDuration = 1000 / FRAMERATE;
  1688. this.frameDuration = frameDuration;
  1689. this.readyPromise = new Promise(function (resolve) {
  1690. _this.resolveReady = resolve;
  1691. });
  1692. if (this.isReady()) {
  1693. this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
  1694. }
  1695. if (!enableRedraw) {
  1696. return;
  1697. }
  1698. var now = Date.now();
  1699. var then = now;
  1700. var delta = 0;
  1701. var tick = function tick() {
  1702. now = Date.now();
  1703. delta = now - then;
  1704. if (delta >= frameDuration) {
  1705. then = now - delta % frameDuration;
  1706. if (_this.shouldUpdate(ignoreAnimation, forceRedraw)) {
  1707. _this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
  1708. mouse.runEvents();
  1709. }
  1710. }
  1711. _this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
  1712. };
  1713. if (!ignoreMouse) {
  1714. mouse.start();
  1715. }
  1716. this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
  1717. }
  1718. }, {
  1719. key: "stop",
  1720. value: function stop() {
  1721. if (this.intervalId) {
  1722. raf__WEBPACK_IMPORTED_MODULE_25___default().cancel(this.intervalId);
  1723. this.intervalId = null;
  1724. }
  1725. this.mouse.stop();
  1726. }
  1727. }, {
  1728. key: "shouldUpdate",
  1729. value: function shouldUpdate(ignoreAnimation, forceRedraw) {
  1730. // need update from animations?
  1731. if (!ignoreAnimation) {
  1732. var frameDuration = this.frameDuration;
  1733. var shouldUpdate = this.animations.reduce(function (shouldUpdate, animation) {
  1734. return animation.update(frameDuration) || shouldUpdate;
  1735. }, false);
  1736. if (shouldUpdate) {
  1737. return true;
  1738. }
  1739. } // need update from redraw?
  1740. if (typeof forceRedraw === 'function' && forceRedraw()) {
  1741. return true;
  1742. }
  1743. if (!this.isReadyLock && this.isReady()) {
  1744. return true;
  1745. } // need update from mouse events?
  1746. if (this.mouse.hasEvents()) {
  1747. return true;
  1748. }
  1749. return false;
  1750. }
  1751. }, {
  1752. key: "render",
  1753. value: function render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
  1754. var CLIENT_WIDTH = this.CLIENT_WIDTH,
  1755. CLIENT_HEIGHT = this.CLIENT_HEIGHT,
  1756. viewPort = this.viewPort,
  1757. ctx = this.ctx,
  1758. isFirstRender = this.isFirstRender;
  1759. var canvas = ctx.canvas;
  1760. viewPort.clear();
  1761. if (canvas.width && canvas.height) {
  1762. viewPort.setCurrent(canvas.width, canvas.height);
  1763. } else {
  1764. viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
  1765. }
  1766. var widthStyle = element.getStyle('width');
  1767. var heightStyle = element.getStyle('height');
  1768. if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
  1769. // set canvas size
  1770. if (widthStyle.hasValue()) {
  1771. canvas.width = widthStyle.getPixels('x');
  1772. if (canvas.style) {
  1773. canvas.style.width = "".concat(canvas.width, "px");
  1774. }
  1775. }
  1776. if (heightStyle.hasValue()) {
  1777. canvas.height = heightStyle.getPixels('y');
  1778. if (canvas.style) {
  1779. canvas.style.height = "".concat(canvas.height, "px");
  1780. }
  1781. }
  1782. }
  1783. var cWidth = canvas.clientWidth || canvas.width;
  1784. var cHeight = canvas.clientHeight || canvas.height;
  1785. if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
  1786. cWidth = widthStyle.getPixels('x');
  1787. cHeight = heightStyle.getPixels('y');
  1788. }
  1789. viewPort.setCurrent(cWidth, cHeight);
  1790. if (typeof offsetX === 'number') {
  1791. element.getAttribute('x', true).setValue(offsetX);
  1792. }
  1793. if (typeof offsetY === 'number') {
  1794. element.getAttribute('y', true).setValue(offsetY);
  1795. }
  1796. if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
  1797. var viewBox = toNumbers(element.getAttribute('viewBox').getString());
  1798. var xRatio = 0;
  1799. var yRatio = 0;
  1800. if (typeof scaleWidth === 'number') {
  1801. var _widthStyle = element.getStyle('width');
  1802. if (_widthStyle.hasValue()) {
  1803. xRatio = _widthStyle.getPixels('x') / scaleWidth;
  1804. } else if (!isNaN(viewBox[2])) {
  1805. xRatio = viewBox[2] / scaleWidth;
  1806. }
  1807. }
  1808. if (typeof scaleHeight === 'number') {
  1809. var _heightStyle = element.getStyle('height');
  1810. if (_heightStyle.hasValue()) {
  1811. yRatio = _heightStyle.getPixels('y') / scaleHeight;
  1812. } else if (!isNaN(viewBox[3])) {
  1813. yRatio = viewBox[3] / scaleHeight;
  1814. }
  1815. }
  1816. if (!xRatio) {
  1817. xRatio = yRatio;
  1818. }
  1819. if (!yRatio) {
  1820. yRatio = xRatio;
  1821. }
  1822. element.getAttribute('width', true).setValue(scaleWidth);
  1823. element.getAttribute('height', true).setValue(scaleHeight);
  1824. var transformStyle = element.getStyle('transform', true, true);
  1825. transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
  1826. } // clear and render
  1827. if (!ignoreClear) {
  1828. ctx.clearRect(0, 0, cWidth, cHeight);
  1829. }
  1830. element.render(ctx);
  1831. if (isFirstRender) {
  1832. this.isFirstRender = false;
  1833. }
  1834. }
  1835. }]);
  1836. return Screen;
  1837. }();
  1838. Screen.defaultWindow = defaultWindow;
  1839. Screen.defaultFetch = defaultFetch;
  1840. var defaultFetch$1 = Screen.defaultFetch;
  1841. var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
  1842. var Parser = /*#__PURE__*/function () {
  1843. function Parser() {
  1844. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  1845. _ref$fetch = _ref.fetch,
  1846. fetch = _ref$fetch === void 0 ? defaultFetch$1 : _ref$fetch,
  1847. _ref$DOMParser = _ref.DOMParser,
  1848. DOMParser = _ref$DOMParser === void 0 ? DefaultDOMParser : _ref$DOMParser;
  1849. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Parser);
  1850. this.fetch = fetch;
  1851. this.DOMParser = DOMParser;
  1852. }
  1853. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Parser, [{
  1854. key: "parse",
  1855. value: function () {
  1856. 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) {
  1857. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  1858. while (1) {
  1859. switch (_context.prev = _context.next) {
  1860. case 0:
  1861. if (!/^</.test(resource)) {
  1862. _context.next = 2;
  1863. break;
  1864. }
  1865. return _context.abrupt("return", this.parseFromString(resource));
  1866. case 2:
  1867. return _context.abrupt("return", this.load(resource));
  1868. case 3:
  1869. case "end":
  1870. return _context.stop();
  1871. }
  1872. }
  1873. }, _callee, this);
  1874. }));
  1875. function parse(_x) {
  1876. return _parse.apply(this, arguments);
  1877. }
  1878. return parse;
  1879. }()
  1880. }, {
  1881. key: "parseFromString",
  1882. value: function parseFromString(xml) {
  1883. var parser = new this.DOMParser();
  1884. try {
  1885. return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
  1886. } catch (err) {
  1887. return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
  1888. }
  1889. }
  1890. }, {
  1891. key: "checkDocument",
  1892. value: function checkDocument(document) {
  1893. var parserError = document.getElementsByTagName('parsererror')[0];
  1894. if (parserError) {
  1895. throw new Error(parserError.textContent);
  1896. }
  1897. return document;
  1898. }
  1899. }, {
  1900. key: "load",
  1901. value: function () {
  1902. 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) {
  1903. var response, xml;
  1904. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  1905. while (1) {
  1906. switch (_context2.prev = _context2.next) {
  1907. case 0:
  1908. _context2.next = 2;
  1909. return this.fetch(url);
  1910. case 2:
  1911. response = _context2.sent;
  1912. _context2.next = 5;
  1913. return response.text();
  1914. case 5:
  1915. xml = _context2.sent;
  1916. return _context2.abrupt("return", this.parseFromString(xml));
  1917. case 7:
  1918. case "end":
  1919. return _context2.stop();
  1920. }
  1921. }
  1922. }, _callee2, this);
  1923. }));
  1924. function load(_x2) {
  1925. return _load.apply(this, arguments);
  1926. }
  1927. return load;
  1928. }()
  1929. }]);
  1930. return Parser;
  1931. }();
  1932. var Translate = /*#__PURE__*/function () {
  1933. function Translate(_, point) {
  1934. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Translate);
  1935. this.type = 'translate';
  1936. this.point = null;
  1937. this.point = Point.parse(point);
  1938. }
  1939. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Translate, [{
  1940. key: "apply",
  1941. value: function apply(ctx) {
  1942. var _this$point = this.point,
  1943. x = _this$point.x,
  1944. y = _this$point.y;
  1945. ctx.translate(x || 0.0, y || 0.0);
  1946. }
  1947. }, {
  1948. key: "unapply",
  1949. value: function unapply(ctx) {
  1950. var _this$point2 = this.point,
  1951. x = _this$point2.x,
  1952. y = _this$point2.y;
  1953. ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
  1954. }
  1955. }, {
  1956. key: "applyToPoint",
  1957. value: function applyToPoint(point) {
  1958. var _this$point3 = this.point,
  1959. x = _this$point3.x,
  1960. y = _this$point3.y;
  1961. point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
  1962. }
  1963. }]);
  1964. return Translate;
  1965. }();
  1966. var Rotate = /*#__PURE__*/function () {
  1967. function Rotate(document, rotate) {
  1968. var transformOrigin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1969. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Rotate);
  1970. this.type = 'rotate';
  1971. this.angle = null;
  1972. this.cx = 0;
  1973. this.cy = 0;
  1974. var numbers = toNumbers(rotate);
  1975. this.angle = new Property(document, 'angle', numbers[0]);
  1976. this.cx = (numbers[1] || 0) + (transformOrigin[0] || 0);
  1977. this.cy = (numbers[2] || 0) + (transformOrigin[1] || 0);
  1978. }
  1979. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Rotate, [{
  1980. key: "apply",
  1981. value: function apply(ctx) {
  1982. var cx = this.cx,
  1983. cy = this.cy,
  1984. angle = this.angle;
  1985. ctx.translate(cx, cy);
  1986. ctx.rotate(angle.getRadians());
  1987. ctx.translate(-cx, -cy);
  1988. }
  1989. }, {
  1990. key: "unapply",
  1991. value: function unapply(ctx) {
  1992. var cx = this.cx,
  1993. cy = this.cy,
  1994. angle = this.angle;
  1995. ctx.translate(cx, cy);
  1996. ctx.rotate(-1.0 * angle.getRadians());
  1997. ctx.translate(-cx, -cy);
  1998. }
  1999. }, {
  2000. key: "applyToPoint",
  2001. value: function applyToPoint(point) {
  2002. var cx = this.cx,
  2003. cy = this.cy,
  2004. angle = this.angle;
  2005. var rad = angle.getRadians();
  2006. point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
  2007. ]);
  2008. point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
  2009. point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
  2010. ]);
  2011. }
  2012. }]);
  2013. return Rotate;
  2014. }();
  2015. var Scale = /*#__PURE__*/function () {
  2016. function Scale(_, scale) {
  2017. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Scale);
  2018. this.type = 'scale';
  2019. this.scale = null;
  2020. var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
  2021. if (scaleSize.x === 0 || scaleSize.y === 0) {
  2022. scaleSize.x = PSEUDO_ZERO;
  2023. scaleSize.y = PSEUDO_ZERO;
  2024. }
  2025. this.scale = scaleSize;
  2026. }
  2027. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Scale, [{
  2028. key: "apply",
  2029. value: function apply(ctx) {
  2030. var _this$scale = this.scale,
  2031. x = _this$scale.x,
  2032. y = _this$scale.y;
  2033. ctx.scale(x, y || x);
  2034. }
  2035. }, {
  2036. key: "unapply",
  2037. value: function unapply(ctx) {
  2038. var _this$scale2 = this.scale,
  2039. x = _this$scale2.x,
  2040. y = _this$scale2.y;
  2041. ctx.scale(1.0 / x, 1.0 / y || x);
  2042. }
  2043. }, {
  2044. key: "applyToPoint",
  2045. value: function applyToPoint(point) {
  2046. var _this$scale3 = this.scale,
  2047. x = _this$scale3.x,
  2048. y = _this$scale3.y;
  2049. point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
  2050. }
  2051. }]);
  2052. return Scale;
  2053. }();
  2054. var Matrix = /*#__PURE__*/function () {
  2055. function Matrix(_, matrix) {
  2056. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Matrix);
  2057. this.type = 'matrix';
  2058. this.matrix = [];
  2059. this.matrix = toNumbers(matrix);
  2060. }
  2061. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Matrix, [{
  2062. key: "apply",
  2063. value: function apply(ctx) {
  2064. var matrix = this.matrix;
  2065. ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
  2066. }
  2067. }, {
  2068. key: "unapply",
  2069. value: function unapply(ctx) {
  2070. var matrix = this.matrix;
  2071. var a = matrix[0];
  2072. var b = matrix[2];
  2073. var c = matrix[4];
  2074. var d = matrix[1];
  2075. var e = matrix[3];
  2076. var f = matrix[5];
  2077. var g = 0.0;
  2078. var h = 0.0;
  2079. var i = 1.0;
  2080. var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
  2081. 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));
  2082. }
  2083. }, {
  2084. key: "applyToPoint",
  2085. value: function applyToPoint(point) {
  2086. point.applyTransform(this.matrix);
  2087. }
  2088. }]);
  2089. return Matrix;
  2090. }();
  2091. 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); }; }
  2092. 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; } }
  2093. var Skew = /*#__PURE__*/function (_Matrix) {
  2094. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(Skew, _Matrix);
  2095. var _super = _createSuper(Skew);
  2096. function Skew(document, skew) {
  2097. var _this;
  2098. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Skew);
  2099. _this = _super.call(this, document, skew);
  2100. _this.type = 'skew';
  2101. _this.angle = null;
  2102. _this.angle = new Property(document, 'angle', skew);
  2103. return _this;
  2104. }
  2105. return Skew;
  2106. }(Matrix);
  2107. 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); }; }
  2108. 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; } }
  2109. var SkewX = /*#__PURE__*/function (_Skew) {
  2110. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewX, _Skew);
  2111. var _super = _createSuper$1(SkewX);
  2112. function SkewX(document, skew) {
  2113. var _this;
  2114. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewX);
  2115. _this = _super.call(this, document, skew);
  2116. _this.type = 'skewX';
  2117. _this.matrix = [1, 0, Math.tan(_this.angle.getRadians()), 1, 0, 0];
  2118. return _this;
  2119. }
  2120. return SkewX;
  2121. }(Skew);
  2122. 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); }; }
  2123. 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; } }
  2124. var SkewY = /*#__PURE__*/function (_Skew) {
  2125. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewY, _Skew);
  2126. var _super = _createSuper$2(SkewY);
  2127. function SkewY(document, skew) {
  2128. var _this;
  2129. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewY);
  2130. _this = _super.call(this, document, skew);
  2131. _this.type = 'skewY';
  2132. _this.matrix = [1, Math.tan(_this.angle.getRadians()), 0, 1, 0, 0];
  2133. return _this;
  2134. }
  2135. return SkewY;
  2136. }(Skew);
  2137. function parseTransforms(transform) {
  2138. return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
  2139. }
  2140. function parseTransform(transform) {
  2141. var _transform$split = transform.split('('),
  2142. _transform$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_transform$split, 2),
  2143. type = _transform$split2[0],
  2144. value = _transform$split2[1];
  2145. return [type.trim(), value.trim().replace(')', '')];
  2146. }
  2147. var Transform = /*#__PURE__*/function () {
  2148. function Transform(document, transform, transformOrigin) {
  2149. var _this = this;
  2150. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Transform);
  2151. this.document = document;
  2152. this.transforms = [];
  2153. var data = parseTransforms(transform);
  2154. var originCoords = transformOrigin ? toNumbers(transformOrigin) : [];
  2155. data.forEach(function (transform) {
  2156. if (transform === 'none') {
  2157. return;
  2158. }
  2159. var _parseTransform = parseTransform(transform),
  2160. _parseTransform2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_parseTransform, 2),
  2161. type = _parseTransform2[0],
  2162. value = _parseTransform2[1];
  2163. var TransformType = Transform.transformTypes[type];
  2164. if (typeof TransformType !== 'undefined') {
  2165. _this.transforms.push(new TransformType(_this.document, value, originCoords));
  2166. }
  2167. });
  2168. }
  2169. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Transform, [{
  2170. key: "apply",
  2171. value: function apply(ctx) {
  2172. var transforms = this.transforms;
  2173. var len = transforms.length;
  2174. for (var i = 0; i < len; i++) {
  2175. transforms[i].apply(ctx);
  2176. }
  2177. }
  2178. }, {
  2179. key: "unapply",
  2180. value: function unapply(ctx) {
  2181. var transforms = this.transforms;
  2182. var len = transforms.length;
  2183. for (var i = len - 1; i >= 0; i--) {
  2184. transforms[i].unapply(ctx);
  2185. }
  2186. } // TODO: applyToPoint unused ... remove?
  2187. }, {
  2188. key: "applyToPoint",
  2189. value: function applyToPoint(point) {
  2190. var transforms = this.transforms;
  2191. var len = transforms.length;
  2192. for (var i = 0; i < len; i++) {
  2193. transforms[i].applyToPoint(point);
  2194. }
  2195. }
  2196. }], [{
  2197. key: "fromElement",
  2198. value: function fromElement(document, element) {
  2199. var transformStyle = element.getStyle('transform', false, true);
  2200. var transformOriginStyle = element.getStyle('transform-origin', false, true);
  2201. if (transformStyle.hasValue()) {
  2202. return new Transform(document, transformStyle.getString(), transformOriginStyle.getString());
  2203. }
  2204. return null;
  2205. }
  2206. }]);
  2207. return Transform;
  2208. }();
  2209. Transform.transformTypes = {
  2210. translate: Translate,
  2211. rotate: Rotate,
  2212. scale: Scale,
  2213. matrix: Matrix,
  2214. skewX: SkewX,
  2215. skewY: SkewY
  2216. };
  2217. var Element = /*#__PURE__*/function () {
  2218. function Element(document, node) {
  2219. var _this = this;
  2220. var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2221. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Element);
  2222. this.document = document;
  2223. this.node = node;
  2224. this.captureTextNodes = captureTextNodes;
  2225. this.attributes = {};
  2226. this.styles = {};
  2227. this.stylesSpecificity = {};
  2228. this.animationFrozen = false;
  2229. this.animationFrozenValue = '';
  2230. this.parent = null;
  2231. this.children = [];
  2232. if (!node || node.nodeType !== 1) {
  2233. // ELEMENT_NODE
  2234. return;
  2235. } // add attributes
  2236. Array.from(node.attributes).forEach(function (attribute) {
  2237. var nodeName = normalizeAttributeName(attribute.nodeName);
  2238. _this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
  2239. });
  2240. this.addStylesFromStyleDefinition(); // add inline styles
  2241. if (this.getAttribute('style').hasValue()) {
  2242. var styles = this.getAttribute('style').getString().split(';').map(function (_) {
  2243. return _.trim();
  2244. });
  2245. styles.forEach(function (style) {
  2246. if (!style) {
  2247. return;
  2248. }
  2249. var _style$split$map = style.split(':').map(function (_) {
  2250. return _.trim();
  2251. }),
  2252. _style$split$map2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_style$split$map, 2),
  2253. name = _style$split$map2[0],
  2254. value = _style$split$map2[1];
  2255. _this.styles[name] = new Property(document, name, value);
  2256. });
  2257. }
  2258. var definitions = document.definitions;
  2259. var id = this.getAttribute('id'); // add id
  2260. if (id.hasValue()) {
  2261. if (!definitions[id.getValue()]) {
  2262. definitions[id.getValue()] = this;
  2263. }
  2264. }
  2265. Array.from(node.childNodes).forEach(function (childNode) {
  2266. if (childNode.nodeType === 1) {
  2267. _this.addChild(childNode); // ELEMENT_NODE
  2268. } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
  2269. var textNode = document.createTextNode(childNode);
  2270. if (textNode.getText().length > 0) {
  2271. _this.addChild(textNode); // TEXT_NODE
  2272. }
  2273. }
  2274. });
  2275. }
  2276. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Element, [{
  2277. key: "getAttribute",
  2278. value: function getAttribute(name) {
  2279. var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2280. var attr = this.attributes[name];
  2281. if (!attr && createIfNotExists) {
  2282. var _attr = new Property(this.document, name, '');
  2283. this.attributes[name] = _attr;
  2284. return _attr;
  2285. }
  2286. return attr || Property.empty(this.document);
  2287. }
  2288. }, {
  2289. key: "getHrefAttribute",
  2290. value: function getHrefAttribute() {
  2291. for (var key in this.attributes) {
  2292. if (key === 'href' || /:href$/.test(key)) {
  2293. return this.attributes[key];
  2294. }
  2295. }
  2296. return Property.empty(this.document);
  2297. }
  2298. }, {
  2299. key: "getStyle",
  2300. value: function getStyle(name) {
  2301. var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2302. var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2303. var style = this.styles[name];
  2304. if (style) {
  2305. return style;
  2306. }
  2307. var attr = this.getAttribute(name);
  2308. if (attr && attr.hasValue()) {
  2309. this.styles[name] = attr; // move up to me to cache
  2310. return attr;
  2311. }
  2312. if (!skipAncestors) {
  2313. var parent = this.parent;
  2314. if (parent) {
  2315. var parentStyle = parent.getStyle(name);
  2316. if (parentStyle && parentStyle.hasValue()) {
  2317. return parentStyle;
  2318. }
  2319. }
  2320. }
  2321. if (createIfNotExists) {
  2322. var _style = new Property(this.document, name, '');
  2323. this.styles[name] = _style;
  2324. return _style;
  2325. }
  2326. return style || Property.empty(this.document);
  2327. }
  2328. }, {
  2329. key: "render",
  2330. value: function render(ctx) {
  2331. // don't render display=none
  2332. // don't render visibility=hidden
  2333. if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
  2334. return;
  2335. }
  2336. ctx.save();
  2337. if (this.getStyle('mask').hasValue()) {
  2338. // mask
  2339. var mask = this.getStyle('mask').getDefinition();
  2340. if (mask) {
  2341. this.applyEffects(ctx);
  2342. mask.apply(ctx, this);
  2343. }
  2344. } else if (this.getStyle('filter').getValue('none') !== 'none') {
  2345. // filter
  2346. var filter = this.getStyle('filter').getDefinition();
  2347. if (filter) {
  2348. this.applyEffects(ctx);
  2349. filter.apply(ctx, this);
  2350. }
  2351. } else {
  2352. this.setContext(ctx);
  2353. this.renderChildren(ctx);
  2354. this.clearContext(ctx);
  2355. }
  2356. ctx.restore();
  2357. }
  2358. }, {
  2359. key: "setContext",
  2360. value: function setContext(_) {}
  2361. }, {
  2362. key: "applyEffects",
  2363. value: function applyEffects(ctx) {
  2364. // transform
  2365. var transform = Transform.fromElement(this.document, this);
  2366. if (transform) {
  2367. transform.apply(ctx);
  2368. } // clip
  2369. var clipPathStyleProp = this.getStyle('clip-path', false, true);
  2370. if (clipPathStyleProp.hasValue()) {
  2371. var clip = clipPathStyleProp.getDefinition();
  2372. if (clip) {
  2373. clip.apply(ctx);
  2374. }
  2375. }
  2376. }
  2377. }, {
  2378. key: "clearContext",
  2379. value: function clearContext(_) {}
  2380. }, {
  2381. key: "renderChildren",
  2382. value: function renderChildren(ctx) {
  2383. this.children.forEach(function (child) {
  2384. child.render(ctx);
  2385. });
  2386. }
  2387. }, {
  2388. key: "addChild",
  2389. value: function addChild(childNode) {
  2390. var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
  2391. child.parent = this;
  2392. if (!Element.ignoreChildTypes.includes(child.type)) {
  2393. this.children.push(child);
  2394. }
  2395. }
  2396. }, {
  2397. key: "matchesSelector",
  2398. value: function matchesSelector(selector) {
  2399. var node = this.node;
  2400. if (typeof node.matches === 'function') {
  2401. return node.matches(selector);
  2402. }
  2403. var styleClasses = node.getAttribute('class');
  2404. if (!styleClasses || styleClasses === '') {
  2405. return false;
  2406. }
  2407. return styleClasses.split(' ').some(function (styleClass) {
  2408. if (".".concat(styleClass) === selector) {
  2409. return true;
  2410. }
  2411. });
  2412. }
  2413. }, {
  2414. key: "addStylesFromStyleDefinition",
  2415. value: function addStylesFromStyleDefinition() {
  2416. var _this$document = this.document,
  2417. styles = _this$document.styles,
  2418. stylesSpecificity = _this$document.stylesSpecificity;
  2419. for (var selector in styles) {
  2420. if (selector[0] !== '@' && this.matchesSelector(selector)) {
  2421. var style = styles[selector];
  2422. var specificity = stylesSpecificity[selector];
  2423. if (style) {
  2424. for (var name in style) {
  2425. var existingSpecificity = this.stylesSpecificity[name];
  2426. if (typeof existingSpecificity === 'undefined') {
  2427. existingSpecificity = '000';
  2428. }
  2429. if (specificity >= existingSpecificity) {
  2430. this.styles[name] = style[name];
  2431. this.stylesSpecificity[name] = specificity;
  2432. }
  2433. }
  2434. }
  2435. }
  2436. }
  2437. }
  2438. }, {
  2439. key: "removeStyles",
  2440. value: function removeStyles(element, ignoreStyles) {
  2441. var toRestore = ignoreStyles.reduce(function (toRestore, name) {
  2442. var styleProp = element.getStyle(name);
  2443. if (!styleProp.hasValue()) {
  2444. return toRestore;
  2445. }
  2446. var value = styleProp.getString();
  2447. styleProp.setValue('');
  2448. return [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__.default)(toRestore), [[name, value]]);
  2449. }, []);
  2450. return toRestore;
  2451. }
  2452. }, {
  2453. key: "restoreStyles",
  2454. value: function restoreStyles(element, styles) {
  2455. styles.forEach(function (_ref) {
  2456. var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
  2457. name = _ref2[0],
  2458. value = _ref2[1];
  2459. element.getStyle(name, true).setValue(value);
  2460. });
  2461. }
  2462. }]);
  2463. return Element;
  2464. }();
  2465. Element.ignoreChildTypes = ['title'];
  2466. 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); }; }
  2467. 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; } }
  2468. var UnknownElement = /*#__PURE__*/function (_Element) {
  2469. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UnknownElement, _Element);
  2470. var _super = _createSuper$3(UnknownElement);
  2471. function UnknownElement(document, node, captureTextNodes) {
  2472. var _this;
  2473. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UnknownElement);
  2474. _this = _super.call(this, document, node, captureTextNodes);
  2475. return _this;
  2476. }
  2477. return UnknownElement;
  2478. }(Element);
  2479. function wrapFontFamily(fontFamily) {
  2480. var trimmed = fontFamily.trim();
  2481. return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
  2482. }
  2483. function prepareFontFamily(fontFamily) {
  2484. return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
  2485. }
  2486. /**
  2487. * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
  2488. */
  2489. function prepareFontStyle(fontStyle) {
  2490. if (!fontStyle) {
  2491. return '';
  2492. }
  2493. var targetFontStyle = fontStyle.trim().toLowerCase();
  2494. switch (targetFontStyle) {
  2495. case 'normal':
  2496. case 'italic':
  2497. case 'oblique':
  2498. case 'inherit':
  2499. case 'initial':
  2500. case 'unset':
  2501. return targetFontStyle;
  2502. default:
  2503. if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
  2504. return targetFontStyle;
  2505. }
  2506. return '';
  2507. }
  2508. }
  2509. /**
  2510. * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
  2511. */
  2512. function prepareFontWeight(fontWeight) {
  2513. if (!fontWeight) {
  2514. return '';
  2515. }
  2516. var targetFontWeight = fontWeight.trim().toLowerCase();
  2517. switch (targetFontWeight) {
  2518. case 'normal':
  2519. case 'bold':
  2520. case 'lighter':
  2521. case 'bolder':
  2522. case 'inherit':
  2523. case 'initial':
  2524. case 'unset':
  2525. return targetFontWeight;
  2526. default:
  2527. if (/^[\d.]+$/.test(targetFontWeight)) {
  2528. return targetFontWeight;
  2529. }
  2530. return '';
  2531. }
  2532. }
  2533. var Font = /*#__PURE__*/function () {
  2534. function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
  2535. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Font);
  2536. var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
  2537. this.fontFamily = fontFamily || inheritFont.fontFamily;
  2538. this.fontSize = fontSize || inheritFont.fontSize;
  2539. this.fontStyle = fontStyle || inheritFont.fontStyle;
  2540. this.fontWeight = fontWeight || inheritFont.fontWeight;
  2541. this.fontVariant = fontVariant || inheritFont.fontVariant;
  2542. }
  2543. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Font, [{
  2544. key: "toString",
  2545. value: function toString() {
  2546. return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
  2547. prepareFontFamily(this.fontFamily)].join(' ').trim();
  2548. }
  2549. }], [{
  2550. key: "parse",
  2551. value: function parse() {
  2552. var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  2553. var inherit = arguments.length > 1 ? arguments[1] : undefined;
  2554. var fontStyle = '';
  2555. var fontVariant = '';
  2556. var fontWeight = '';
  2557. var fontSize = '';
  2558. var fontFamily = '';
  2559. var parts = compressSpaces(font).trim().split(' ');
  2560. var set = {
  2561. fontSize: false,
  2562. fontStyle: false,
  2563. fontWeight: false,
  2564. fontVariant: false
  2565. };
  2566. parts.forEach(function (part) {
  2567. switch (true) {
  2568. case !set.fontStyle && Font.styles.includes(part):
  2569. if (part !== 'inherit') {
  2570. fontStyle = part;
  2571. }
  2572. set.fontStyle = true;
  2573. break;
  2574. case !set.fontVariant && Font.variants.includes(part):
  2575. if (part !== 'inherit') {
  2576. fontVariant = part;
  2577. }
  2578. set.fontStyle = true;
  2579. set.fontVariant = true;
  2580. break;
  2581. case !set.fontWeight && Font.weights.includes(part):
  2582. if (part !== 'inherit') {
  2583. fontWeight = part;
  2584. }
  2585. set.fontStyle = true;
  2586. set.fontVariant = true;
  2587. set.fontWeight = true;
  2588. break;
  2589. case !set.fontSize:
  2590. if (part !== 'inherit') {
  2591. var _part$split = part.split('/');
  2592. var _part$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_part$split, 1);
  2593. fontSize = _part$split2[0];
  2594. }
  2595. set.fontStyle = true;
  2596. set.fontVariant = true;
  2597. set.fontWeight = true;
  2598. set.fontSize = true;
  2599. break;
  2600. default:
  2601. if (part !== 'inherit') {
  2602. fontFamily += part;
  2603. }
  2604. }
  2605. });
  2606. return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
  2607. }
  2608. }]);
  2609. return Font;
  2610. }();
  2611. Font.styles = 'normal|italic|oblique|inherit';
  2612. Font.variants = 'normal|small-caps|inherit';
  2613. Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
  2614. var BoundingBox = /*#__PURE__*/function () {
  2615. function BoundingBox() {
  2616. var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
  2617. var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
  2618. var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
  2619. var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
  2620. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, BoundingBox);
  2621. this.x1 = x1;
  2622. this.y1 = y1;
  2623. this.x2 = x2;
  2624. this.y2 = y2;
  2625. this.addPoint(x1, y1);
  2626. this.addPoint(x2, y2);
  2627. }
  2628. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(BoundingBox, [{
  2629. key: "addPoint",
  2630. value: function addPoint(x, y) {
  2631. if (typeof x !== 'undefined') {
  2632. if (isNaN(this.x1) || isNaN(this.x2)) {
  2633. this.x1 = x;
  2634. this.x2 = x;
  2635. }
  2636. if (x < this.x1) {
  2637. this.x1 = x;
  2638. }
  2639. if (x > this.x2) {
  2640. this.x2 = x;
  2641. }
  2642. }
  2643. if (typeof y !== 'undefined') {
  2644. if (isNaN(this.y1) || isNaN(this.y2)) {
  2645. this.y1 = y;
  2646. this.y2 = y;
  2647. }
  2648. if (y < this.y1) {
  2649. this.y1 = y;
  2650. }
  2651. if (y > this.y2) {
  2652. this.y2 = y;
  2653. }
  2654. }
  2655. }
  2656. }, {
  2657. key: "addX",
  2658. value: function addX(x) {
  2659. this.addPoint(x, null);
  2660. }
  2661. }, {
  2662. key: "addY",
  2663. value: function addY(y) {
  2664. this.addPoint(null, y);
  2665. }
  2666. }, {
  2667. key: "addBoundingBox",
  2668. value: function addBoundingBox(boundingBox) {
  2669. if (!boundingBox) {
  2670. return;
  2671. }
  2672. var x1 = boundingBox.x1,
  2673. y1 = boundingBox.y1,
  2674. x2 = boundingBox.x2,
  2675. y2 = boundingBox.y2;
  2676. this.addPoint(x1, y1);
  2677. this.addPoint(x2, y2);
  2678. }
  2679. }, {
  2680. key: "sumCubic",
  2681. value: function sumCubic(t, p0, p1, p2, p3) {
  2682. 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;
  2683. }
  2684. }, {
  2685. key: "bezierCurveAdd",
  2686. value: function bezierCurveAdd(forX, p0, p1, p2, p3) {
  2687. var b = 6 * p0 - 12 * p1 + 6 * p2;
  2688. var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
  2689. var c = 3 * p1 - 3 * p0;
  2690. if (a === 0) {
  2691. if (b === 0) {
  2692. return;
  2693. }
  2694. var t = -c / b;
  2695. if (0 < t && t < 1) {
  2696. if (forX) {
  2697. this.addX(this.sumCubic(t, p0, p1, p2, p3));
  2698. } else {
  2699. this.addY(this.sumCubic(t, p0, p1, p2, p3));
  2700. }
  2701. }
  2702. return;
  2703. }
  2704. var b2ac = Math.pow(b, 2) - 4 * c * a;
  2705. if (b2ac < 0) {
  2706. return;
  2707. }
  2708. var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
  2709. if (0 < t1 && t1 < 1) {
  2710. if (forX) {
  2711. this.addX(this.sumCubic(t1, p0, p1, p2, p3));
  2712. } else {
  2713. this.addY(this.sumCubic(t1, p0, p1, p2, p3));
  2714. }
  2715. }
  2716. var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
  2717. if (0 < t2 && t2 < 1) {
  2718. if (forX) {
  2719. this.addX(this.sumCubic(t2, p0, p1, p2, p3));
  2720. } else {
  2721. this.addY(this.sumCubic(t2, p0, p1, p2, p3));
  2722. }
  2723. }
  2724. } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
  2725. }, {
  2726. key: "addBezierCurve",
  2727. value: function addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
  2728. this.addPoint(p0x, p0y);
  2729. this.addPoint(p3x, p3y);
  2730. this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
  2731. this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
  2732. }
  2733. }, {
  2734. key: "addQuadraticCurve",
  2735. value: function addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
  2736. var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
  2737. var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
  2738. var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
  2739. var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
  2740. this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
  2741. }
  2742. }, {
  2743. key: "isPointInBox",
  2744. value: function isPointInBox(x, y) {
  2745. var x1 = this.x1,
  2746. y1 = this.y1,
  2747. x2 = this.x2,
  2748. y2 = this.y2;
  2749. return x1 <= x && x <= x2 && y1 <= y && y <= y2;
  2750. }
  2751. }, {
  2752. key: "x",
  2753. get: function get() {
  2754. return this.x1;
  2755. }
  2756. }, {
  2757. key: "y",
  2758. get: function get() {
  2759. return this.y1;
  2760. }
  2761. }, {
  2762. key: "width",
  2763. get: function get() {
  2764. return this.x2 - this.x1;
  2765. }
  2766. }, {
  2767. key: "height",
  2768. get: function get() {
  2769. return this.y2 - this.y1;
  2770. }
  2771. }]);
  2772. return BoundingBox;
  2773. }();
  2774. 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); }; }
  2775. 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; } }
  2776. var RenderedElement = /*#__PURE__*/function (_Element) {
  2777. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RenderedElement, _Element);
  2778. var _super = _createSuper$4(RenderedElement);
  2779. function RenderedElement() {
  2780. var _this;
  2781. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RenderedElement);
  2782. _this = _super.apply(this, arguments);
  2783. _this.modifiedEmSizeStack = false;
  2784. return _this;
  2785. }
  2786. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RenderedElement, [{
  2787. key: "calculateOpacity",
  2788. value: function calculateOpacity() {
  2789. var opacity = 1.0; // tslint:disable-next-line: no-this-assignment
  2790. var element = this;
  2791. while (element) {
  2792. var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
  2793. if (opacityStyle.hasValue()) {
  2794. opacity *= opacityStyle.getNumber();
  2795. }
  2796. element = element.parent;
  2797. }
  2798. return opacity;
  2799. }
  2800. }, {
  2801. key: "setContext",
  2802. value: function setContext(ctx) {
  2803. var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2804. if (!fromMeasure) {
  2805. // causes stack overflow when measuring text with gradients
  2806. // fill
  2807. var fillStyleProp = this.getStyle('fill');
  2808. var fillOpacityStyleProp = this.getStyle('fill-opacity');
  2809. var strokeStyleProp = this.getStyle('stroke');
  2810. var strokeOpacityProp = this.getStyle('stroke-opacity');
  2811. if (fillStyleProp.isUrlDefinition()) {
  2812. var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
  2813. if (fillStyle) {
  2814. ctx.fillStyle = fillStyle;
  2815. }
  2816. } else if (fillStyleProp.hasValue()) {
  2817. if (fillStyleProp.getString() === 'currentColor') {
  2818. fillStyleProp.setValue(this.getStyle('color').getColor());
  2819. }
  2820. var _fillStyle = fillStyleProp.getColor();
  2821. if (_fillStyle !== 'inherit') {
  2822. ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
  2823. }
  2824. }
  2825. if (fillOpacityStyleProp.hasValue()) {
  2826. var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
  2827. ctx.fillStyle = _fillStyle2;
  2828. } // stroke
  2829. if (strokeStyleProp.isUrlDefinition()) {
  2830. var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
  2831. if (strokeStyle) {
  2832. ctx.strokeStyle = strokeStyle;
  2833. }
  2834. } else if (strokeStyleProp.hasValue()) {
  2835. if (strokeStyleProp.getString() === 'currentColor') {
  2836. strokeStyleProp.setValue(this.getStyle('color').getColor());
  2837. }
  2838. var _strokeStyle = strokeStyleProp.getString();
  2839. if (_strokeStyle !== 'inherit') {
  2840. ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
  2841. }
  2842. }
  2843. if (strokeOpacityProp.hasValue()) {
  2844. var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
  2845. ctx.strokeStyle = _strokeStyle2;
  2846. }
  2847. var strokeWidthStyleProp = this.getStyle('stroke-width');
  2848. if (strokeWidthStyleProp.hasValue()) {
  2849. var newLineWidth = strokeWidthStyleProp.getPixels();
  2850. ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
  2851. : newLineWidth;
  2852. }
  2853. var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
  2854. var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
  2855. var strokeMiterlimitProp = this.getStyle('stroke-miterlimit');
  2856. var pointOrderStyleProp = this.getStyle('paint-order');
  2857. var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
  2858. var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
  2859. if (strokeLinecapStyleProp.hasValue()) {
  2860. ctx.lineCap = strokeLinecapStyleProp.getString();
  2861. }
  2862. if (strokeLinejoinStyleProp.hasValue()) {
  2863. ctx.lineJoin = strokeLinejoinStyleProp.getString();
  2864. }
  2865. if (strokeMiterlimitProp.hasValue()) {
  2866. ctx.miterLimit = strokeMiterlimitProp.getNumber();
  2867. }
  2868. if (pointOrderStyleProp.hasValue()) {
  2869. // ?
  2870. ctx.paintOrder = pointOrderStyleProp.getValue();
  2871. }
  2872. if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
  2873. var gaps = toNumbers(strokeDasharrayStyleProp.getString());
  2874. if (typeof ctx.setLineDash !== 'undefined') {
  2875. ctx.setLineDash(gaps);
  2876. } else if (typeof ctx.webkitLineDash !== 'undefined') {
  2877. ctx.webkitLineDash = gaps;
  2878. } else if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
  2879. ctx.mozDash = gaps;
  2880. }
  2881. var offset = strokeDashoffsetProp.getPixels();
  2882. if (typeof ctx.lineDashOffset !== 'undefined') {
  2883. ctx.lineDashOffset = offset;
  2884. } else if (typeof ctx.webkitLineDashOffset !== 'undefined') {
  2885. ctx.webkitLineDashOffset = offset;
  2886. } else if (typeof ctx.mozDashOffset !== 'undefined') {
  2887. ctx.mozDashOffset = offset;
  2888. }
  2889. }
  2890. } // font
  2891. this.modifiedEmSizeStack = false;
  2892. if (typeof ctx.font !== 'undefined') {
  2893. var fontStyleProp = this.getStyle('font');
  2894. var fontStyleStyleProp = this.getStyle('font-style');
  2895. var fontVariantStyleProp = this.getStyle('font-variant');
  2896. var fontWeightStyleProp = this.getStyle('font-weight');
  2897. var fontSizeStyleProp = this.getStyle('font-size');
  2898. var fontFamilyStyleProp = this.getStyle('font-family');
  2899. 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));
  2900. fontStyleStyleProp.setValue(font.fontStyle);
  2901. fontVariantStyleProp.setValue(font.fontVariant);
  2902. fontWeightStyleProp.setValue(font.fontWeight);
  2903. fontSizeStyleProp.setValue(font.fontSize);
  2904. fontFamilyStyleProp.setValue(font.fontFamily);
  2905. ctx.font = font.toString();
  2906. if (fontSizeStyleProp.isPixels()) {
  2907. this.document.emSize = fontSizeStyleProp.getPixels();
  2908. this.modifiedEmSizeStack = true;
  2909. }
  2910. }
  2911. if (!fromMeasure) {
  2912. // effects
  2913. this.applyEffects(ctx); // opacity
  2914. ctx.globalAlpha = this.calculateOpacity();
  2915. }
  2916. }
  2917. }, {
  2918. key: "clearContext",
  2919. value: function clearContext(ctx) {
  2920. (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);
  2921. if (this.modifiedEmSizeStack) {
  2922. this.document.popEmSize();
  2923. }
  2924. }
  2925. }]);
  2926. return RenderedElement;
  2927. }(Element);
  2928. 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); }; }
  2929. 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; } }
  2930. var TextElement = /*#__PURE__*/function (_RenderedElement) {
  2931. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextElement, _RenderedElement);
  2932. var _super = _createSuper$5(TextElement);
  2933. function TextElement(document, node, captureTextNodes) {
  2934. var _this;
  2935. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextElement);
  2936. _this = _super.call(this, document, node, (this instanceof TextElement ? this.constructor : void 0) === TextElement ? true : captureTextNodes);
  2937. _this.type = 'text';
  2938. _this.x = 0;
  2939. _this.y = 0;
  2940. _this.measureCache = -1;
  2941. return _this;
  2942. }
  2943. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextElement, [{
  2944. key: "setContext",
  2945. value: function setContext(ctx) {
  2946. var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2947. (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);
  2948. var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
  2949. if (textBaseline) {
  2950. ctx.textBaseline = textBaseline;
  2951. }
  2952. }
  2953. }, {
  2954. key: "initializeCoordinates",
  2955. value: function initializeCoordinates(ctx) {
  2956. this.x = this.getAttribute('x').getPixels('x');
  2957. this.y = this.getAttribute('y').getPixels('y');
  2958. var dxAttr = this.getAttribute('dx');
  2959. var dyAttr = this.getAttribute('dy');
  2960. if (dxAttr.hasValue()) {
  2961. this.x += dxAttr.getPixels('x');
  2962. }
  2963. if (dyAttr.hasValue()) {
  2964. this.y += dyAttr.getPixels('y');
  2965. }
  2966. this.x += this.getAnchorDelta(ctx, this, 0);
  2967. }
  2968. }, {
  2969. key: "getBoundingBox",
  2970. value: function getBoundingBox(ctx) {
  2971. var _this2 = this;
  2972. if (this.type !== 'text') {
  2973. return this.getTElementBoundingBox(ctx);
  2974. }
  2975. this.initializeCoordinates(ctx);
  2976. var boundingBox = null;
  2977. this.children.forEach(function (_, i) {
  2978. var childBoundingBox = _this2.getChildBoundingBox(ctx, _this2, _this2, i);
  2979. if (!boundingBox) {
  2980. boundingBox = childBoundingBox;
  2981. } else {
  2982. boundingBox.addBoundingBox(childBoundingBox);
  2983. }
  2984. });
  2985. return boundingBox;
  2986. }
  2987. }, {
  2988. key: "getFontSize",
  2989. value: function getFontSize() {
  2990. var document = this.document,
  2991. parent = this.parent;
  2992. var inheritFontSize = Font.parse(document.ctx.font).fontSize;
  2993. var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
  2994. return fontSize;
  2995. }
  2996. }, {
  2997. key: "getTElementBoundingBox",
  2998. value: function getTElementBoundingBox(ctx) {
  2999. var fontSize = this.getFontSize();
  3000. return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
  3001. }
  3002. }, {
  3003. key: "getGlyph",
  3004. value: function getGlyph(font, text, i) {
  3005. var char = text[i];
  3006. var glyph = null;
  3007. if (font.isArabic) {
  3008. var len = text.length;
  3009. var prevChar = text[i - 1];
  3010. var nextChar = text[i + 1];
  3011. var arabicForm = 'isolated';
  3012. if ((i === 0 || prevChar === ' ') && i < len - 2 && nextChar !== ' ') {
  3013. arabicForm = 'terminal';
  3014. }
  3015. if (i > 0 && prevChar !== ' ' && i < len - 2 && nextChar !== ' ') {
  3016. arabicForm = 'medial';
  3017. }
  3018. if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
  3019. arabicForm = 'initial';
  3020. }
  3021. if (typeof font.glyphs[char] !== 'undefined') {
  3022. glyph = font.glyphs[char][arabicForm];
  3023. if (!glyph && font.glyphs[char].type === 'glyph') {
  3024. glyph = font.glyphs[char];
  3025. }
  3026. }
  3027. } else {
  3028. glyph = font.glyphs[char];
  3029. }
  3030. if (!glyph) {
  3031. glyph = font.missingGlyph;
  3032. }
  3033. return glyph;
  3034. }
  3035. }, {
  3036. key: "getText",
  3037. value: function getText() {
  3038. return '';
  3039. }
  3040. }, {
  3041. key: "getTextFromNode",
  3042. value: function getTextFromNode(node) {
  3043. var textNode = node || this.node;
  3044. var childNodes = Array.from(textNode.parentNode.childNodes);
  3045. var index = childNodes.indexOf(textNode);
  3046. var lastIndex = childNodes.length - 1;
  3047. var text = compressSpaces(textNode.value || textNode.text || textNode.textContent || '');
  3048. if (index === 0) {
  3049. text = trimLeft(text);
  3050. }
  3051. if (index === lastIndex) {
  3052. text = trimRight(text);
  3053. }
  3054. return text;
  3055. }
  3056. }, {
  3057. key: "renderChildren",
  3058. value: function renderChildren(ctx) {
  3059. var _this3 = this;
  3060. if (this.type !== 'text') {
  3061. this.renderTElementChildren(ctx);
  3062. return;
  3063. }
  3064. this.initializeCoordinates(ctx);
  3065. this.children.forEach(function (_, i) {
  3066. _this3.renderChild(ctx, _this3, _this3, i);
  3067. });
  3068. var mouse = this.document.screen.mouse; // Do not calc bounding box if mouse is not working.
  3069. if (mouse.isWorking()) {
  3070. mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
  3071. }
  3072. }
  3073. }, {
  3074. key: "renderTElementChildren",
  3075. value: function renderTElementChildren(ctx) {
  3076. var document = this.document,
  3077. parent = this.parent;
  3078. var renderText = this.getText();
  3079. var customFont = parent.getStyle('font-family').getDefinition();
  3080. if (customFont) {
  3081. var unitsPerEm = customFont.fontFace.unitsPerEm;
  3082. var ctxFont = Font.parse(document.ctx.font);
  3083. var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
  3084. var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
  3085. var scale = fontSize / unitsPerEm;
  3086. var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
  3087. var dx = toNumbers(parent.getAttribute('dx').getString());
  3088. var len = text.length;
  3089. for (var i = 0; i < len; i++) {
  3090. var glyph = this.getGlyph(customFont, text, i);
  3091. ctx.translate(this.x, this.y);
  3092. ctx.scale(scale, -scale);
  3093. var lw = ctx.lineWidth;
  3094. ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
  3095. if (fontStyle === 'italic') {
  3096. ctx.transform(1, 0, .4, 1, 0, 0);
  3097. }
  3098. glyph.render(ctx);
  3099. if (fontStyle === 'italic') {
  3100. ctx.transform(1, 0, -.4, 1, 0, 0);
  3101. }
  3102. ctx.lineWidth = lw;
  3103. ctx.scale(1 / scale, -1 / scale);
  3104. ctx.translate(-this.x, -this.y);
  3105. this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
  3106. if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
  3107. this.x += dx[i];
  3108. }
  3109. }
  3110. return;
  3111. }
  3112. var x = this.x,
  3113. y = this.y;
  3114. if (ctx.paintOrder === 'stroke') {
  3115. if (ctx.strokeStyle) {
  3116. ctx.strokeText(renderText, x, y);
  3117. }
  3118. if (ctx.fillStyle) {
  3119. ctx.fillText(renderText, x, y);
  3120. }
  3121. } else {
  3122. if (ctx.fillStyle) {
  3123. ctx.fillText(renderText, x, y);
  3124. }
  3125. if (ctx.strokeStyle) {
  3126. ctx.strokeText(renderText, x, y);
  3127. }
  3128. }
  3129. }
  3130. }, {
  3131. key: "getAnchorDelta",
  3132. value: function getAnchorDelta(ctx, parent, startI) {
  3133. var textAnchor = this.getStyle('text-anchor').getString('start');
  3134. if (textAnchor !== 'start') {
  3135. var children = parent.children;
  3136. var len = children.length;
  3137. var child = null;
  3138. var width = 0;
  3139. for (var i = startI; i < len; i++) {
  3140. child = children[i];
  3141. if (i > startI && child.getAttribute('x').hasValue() || child.getAttribute('text-anchor').hasValue()) {
  3142. break; // new group
  3143. }
  3144. width += child.measureTextRecursive(ctx);
  3145. }
  3146. return -1 * (textAnchor === 'end' ? width : width / 2.0);
  3147. }
  3148. return 0;
  3149. }
  3150. }, {
  3151. key: "adjustChildCoordinates",
  3152. value: function adjustChildCoordinates(ctx, textParent, parent, i) {
  3153. var child = parent.children[i];
  3154. if (typeof child.measureText !== 'function') {
  3155. return child;
  3156. }
  3157. ctx.save();
  3158. child.setContext(ctx, true);
  3159. var xAttr = child.getAttribute('x');
  3160. var yAttr = child.getAttribute('y');
  3161. var dxAttr = child.getAttribute('dx');
  3162. var dyAttr = child.getAttribute('dy');
  3163. var textAnchor = child.getAttribute('text-anchor').getString('start');
  3164. if (i === 0 && child.type !== 'textNode') {
  3165. if (!xAttr.hasValue()) {
  3166. xAttr.setValue(textParent.getAttribute('x').getValue('0'));
  3167. }
  3168. if (!yAttr.hasValue()) {
  3169. yAttr.setValue(textParent.getAttribute('y').getValue('0'));
  3170. }
  3171. if (!dxAttr.hasValue()) {
  3172. dxAttr.setValue(textParent.getAttribute('dx').getValue('0'));
  3173. }
  3174. if (!dyAttr.hasValue()) {
  3175. dyAttr.setValue(textParent.getAttribute('dy').getValue('0'));
  3176. }
  3177. }
  3178. if (xAttr.hasValue()) {
  3179. child.x = xAttr.getPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
  3180. if (textAnchor !== 'start') {
  3181. var width = child.measureTextRecursive(ctx);
  3182. child.x += -1 * (textAnchor === 'end' ? width : width / 2.0);
  3183. }
  3184. if (dxAttr.hasValue()) {
  3185. child.x += dxAttr.getPixels('x');
  3186. }
  3187. } else {
  3188. if (textAnchor !== 'start') {
  3189. var _width = child.measureTextRecursive(ctx);
  3190. textParent.x += -1 * (textAnchor === 'end' ? _width : _width / 2.0);
  3191. }
  3192. if (dxAttr.hasValue()) {
  3193. textParent.x += dxAttr.getPixels('x');
  3194. }
  3195. child.x = textParent.x;
  3196. }
  3197. textParent.x = child.x + child.measureText(ctx);
  3198. if (yAttr.hasValue()) {
  3199. child.y = yAttr.getPixels('y');
  3200. if (dyAttr.hasValue()) {
  3201. child.y += dyAttr.getPixels('y');
  3202. }
  3203. } else {
  3204. if (dyAttr.hasValue()) {
  3205. textParent.y += dyAttr.getPixels('y');
  3206. }
  3207. child.y = textParent.y;
  3208. }
  3209. textParent.y = child.y;
  3210. child.clearContext(ctx);
  3211. ctx.restore();
  3212. return child;
  3213. }
  3214. }, {
  3215. key: "getChildBoundingBox",
  3216. value: function getChildBoundingBox(ctx, textParent, parent, i) {
  3217. var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
  3218. var boundingBox = child.getBoundingBox(ctx);
  3219. if (!boundingBox) {
  3220. return null;
  3221. }
  3222. child.children.forEach(function (_, i) {
  3223. var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
  3224. boundingBox.addBoundingBox(childBoundingBox);
  3225. });
  3226. return boundingBox;
  3227. }
  3228. }, {
  3229. key: "renderChild",
  3230. value: function renderChild(ctx, textParent, parent, i) {
  3231. var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
  3232. child.render(ctx);
  3233. child.children.forEach(function (_, i) {
  3234. textParent.renderChild(ctx, textParent, child, i);
  3235. });
  3236. }
  3237. }, {
  3238. key: "measureTextRecursive",
  3239. value: function measureTextRecursive(ctx) {
  3240. var width = this.children.reduce(function (width, child) {
  3241. return width + child.measureTextRecursive(ctx);
  3242. }, this.measureText(ctx));
  3243. return width;
  3244. }
  3245. }, {
  3246. key: "measureText",
  3247. value: function measureText(ctx) {
  3248. var measureCache = this.measureCache;
  3249. if (~measureCache) {
  3250. return measureCache;
  3251. }
  3252. var renderText = this.getText();
  3253. var measure = this.measureTargetText(ctx, renderText);
  3254. this.measureCache = measure;
  3255. return measure;
  3256. }
  3257. }, {
  3258. key: "measureTargetText",
  3259. value: function measureTargetText(ctx, targetText) {
  3260. if (!targetText.length) {
  3261. return 0;
  3262. }
  3263. var parent = this.parent;
  3264. var customFont = parent.getStyle('font-family').getDefinition();
  3265. if (customFont) {
  3266. var fontSize = this.getFontSize();
  3267. var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
  3268. var dx = toNumbers(parent.getAttribute('dx').getString());
  3269. var len = text.length;
  3270. var _measure = 0;
  3271. for (var i = 0; i < len; i++) {
  3272. var glyph = this.getGlyph(customFont, text, i);
  3273. _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
  3274. if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
  3275. _measure += dx[i];
  3276. }
  3277. }
  3278. return _measure;
  3279. }
  3280. if (!ctx.measureText) {
  3281. return targetText.length * 10;
  3282. }
  3283. ctx.save();
  3284. this.setContext(ctx, true);
  3285. var _ctx$measureText = ctx.measureText(targetText),
  3286. measure = _ctx$measureText.width;
  3287. this.clearContext(ctx);
  3288. ctx.restore();
  3289. return measure;
  3290. }
  3291. }]);
  3292. return TextElement;
  3293. }(RenderedElement);
  3294. 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); }; }
  3295. 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; } }
  3296. var TSpanElement = /*#__PURE__*/function (_TextElement) {
  3297. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TSpanElement, _TextElement);
  3298. var _super = _createSuper$6(TSpanElement);
  3299. function TSpanElement(document, node, captureTextNodes) {
  3300. var _this;
  3301. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TSpanElement);
  3302. _this = _super.call(this, document, node, (this instanceof TSpanElement ? this.constructor : void 0) === TSpanElement ? true : captureTextNodes);
  3303. _this.type = 'tspan'; // if this node has children, then they own the text
  3304. _this.text = _this.children.length > 0 ? '' : _this.getTextFromNode();
  3305. return _this;
  3306. }
  3307. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TSpanElement, [{
  3308. key: "getText",
  3309. value: function getText() {
  3310. return this.text;
  3311. }
  3312. }]);
  3313. return TSpanElement;
  3314. }(TextElement);
  3315. 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); }; }
  3316. 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; } }
  3317. var TextNode = /*#__PURE__*/function (_TSpanElement) {
  3318. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextNode, _TSpanElement);
  3319. var _super = _createSuper$7(TextNode);
  3320. function TextNode() {
  3321. var _this;
  3322. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextNode);
  3323. _this = _super.apply(this, arguments);
  3324. _this.type = 'textNode';
  3325. return _this;
  3326. }
  3327. return TextNode;
  3328. }(TSpanElement);
  3329. function preparePath(path) {
  3330. var d = path.replace(/,/gm, ' ') // get rid of all commas
  3331. // As the end of a match can also be the start of the next match, we need to run this replace twice.
  3332. .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
  3333. .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
  3334. .replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2') // prefix commands with spaces
  3335. .replace(/([0-9])([+\-])/gm, '$1 $2') // separate digits on +- signs
  3336. // Again, we need to run this twice to find all occurances
  3337. .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
  3338. .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
  3339. .replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm, '$1 $2 $3 '); // shorthand elliptical arc path syntax
  3340. return compressSpaces(d).trim();
  3341. }
  3342. var PathParser = /*#__PURE__*/function () {
  3343. function PathParser(path) {
  3344. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathParser);
  3345. this.control = null;
  3346. this.start = null;
  3347. this.current = null;
  3348. this.command = '';
  3349. this.tokens = [];
  3350. this.i = -1;
  3351. this.previousCommand = '';
  3352. this.points = [];
  3353. this.angles = [];
  3354. this.tokens = preparePath(path).split(' ');
  3355. }
  3356. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathParser, [{
  3357. key: "reset",
  3358. value: function reset() {
  3359. this.i = -1;
  3360. this.command = '';
  3361. this.previousCommand = '';
  3362. this.start = new Point(0, 0);
  3363. this.control = new Point(0, 0);
  3364. this.current = new Point(0, 0);
  3365. this.points = [];
  3366. this.angles = [];
  3367. }
  3368. }, {
  3369. key: "isEnd",
  3370. value: function isEnd() {
  3371. var i = this.i,
  3372. tokens = this.tokens;
  3373. return i >= tokens.length - 1;
  3374. }
  3375. }, {
  3376. key: "isCommandOrEnd",
  3377. value: function isCommandOrEnd() {
  3378. if (this.isEnd()) {
  3379. return true;
  3380. }
  3381. var i = this.i,
  3382. tokens = this.tokens;
  3383. return /^[A-Za-z]$/.test(tokens[i + 1]);
  3384. }
  3385. }, {
  3386. key: "isRelativeCommand",
  3387. value: function isRelativeCommand() {
  3388. switch (this.command) {
  3389. case 'm':
  3390. case 'l':
  3391. case 'h':
  3392. case 'v':
  3393. case 'c':
  3394. case 's':
  3395. case 'q':
  3396. case 't':
  3397. case 'a':
  3398. case 'z':
  3399. return true;
  3400. default:
  3401. return false;
  3402. }
  3403. }
  3404. }, {
  3405. key: "getToken",
  3406. value: function getToken() {
  3407. this.i++;
  3408. return this.tokens[this.i];
  3409. }
  3410. }, {
  3411. key: "getScalar",
  3412. value: function getScalar() {
  3413. return parseFloat(this.getToken());
  3414. }
  3415. }, {
  3416. key: "nextCommand",
  3417. value: function nextCommand() {
  3418. this.previousCommand = this.command;
  3419. this.command = this.getToken();
  3420. }
  3421. }, {
  3422. key: "getPoint",
  3423. value: function getPoint() {
  3424. var point = new Point(this.getScalar(), this.getScalar());
  3425. return this.makeAbsolute(point);
  3426. }
  3427. }, {
  3428. key: "getAsControlPoint",
  3429. value: function getAsControlPoint() {
  3430. var point = this.getPoint();
  3431. this.control = point;
  3432. return point;
  3433. }
  3434. }, {
  3435. key: "getAsCurrentPoint",
  3436. value: function getAsCurrentPoint() {
  3437. var point = this.getPoint();
  3438. this.current = point;
  3439. return point;
  3440. }
  3441. }, {
  3442. key: "getReflectedControlPoint",
  3443. value: function getReflectedControlPoint() {
  3444. var previousCommand = this.previousCommand.toLowerCase();
  3445. if (previousCommand !== 'c' && previousCommand !== 's' && previousCommand !== 'q' && previousCommand !== 't') {
  3446. return this.current;
  3447. } // reflect point
  3448. var _this$current = this.current,
  3449. cx = _this$current.x,
  3450. cy = _this$current.y,
  3451. _this$control = this.control,
  3452. ox = _this$control.x,
  3453. oy = _this$control.y;
  3454. var point = new Point(2 * cx - ox, 2 * cy - oy);
  3455. return point;
  3456. }
  3457. }, {
  3458. key: "makeAbsolute",
  3459. value: function makeAbsolute(point) {
  3460. if (this.isRelativeCommand()) {
  3461. var _this$current2 = this.current,
  3462. x = _this$current2.x,
  3463. y = _this$current2.y;
  3464. point.x += x;
  3465. point.y += y;
  3466. }
  3467. return point;
  3468. }
  3469. }, {
  3470. key: "addMarker",
  3471. value: function addMarker(point, from, priorTo) {
  3472. var points = this.points,
  3473. angles = this.angles; // if the last angle isn't filled in because we didn't have this point yet ...
  3474. if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
  3475. angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
  3476. }
  3477. this.addMarkerAngle(point, from ? from.angleTo(point) : null);
  3478. }
  3479. }, {
  3480. key: "addMarkerAngle",
  3481. value: function addMarkerAngle(point, angle) {
  3482. this.points.push(point);
  3483. this.angles.push(angle);
  3484. }
  3485. }, {
  3486. key: "getMarkerPoints",
  3487. value: function getMarkerPoints() {
  3488. return this.points;
  3489. }
  3490. }, {
  3491. key: "getMarkerAngles",
  3492. value: function getMarkerAngles() {
  3493. var angles = this.angles;
  3494. var len = angles.length;
  3495. for (var i = 0; i < len; i++) {
  3496. if (!angles[i]) {
  3497. for (var j = i + 1; j < len; j++) {
  3498. if (angles[j]) {
  3499. angles[i] = angles[j];
  3500. break;
  3501. }
  3502. }
  3503. }
  3504. }
  3505. return angles;
  3506. }
  3507. }]);
  3508. return PathParser;
  3509. }();
  3510. 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); }; }
  3511. 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; } }
  3512. var PathElement = /*#__PURE__*/function (_RenderedElement) {
  3513. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PathElement, _RenderedElement);
  3514. var _super = _createSuper$8(PathElement);
  3515. function PathElement(document, node, captureTextNodes) {
  3516. var _this;
  3517. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathElement);
  3518. _this = _super.call(this, document, node, captureTextNodes);
  3519. _this.type = 'path';
  3520. _this.pathParser = null;
  3521. _this.pathParser = new PathParser(_this.getAttribute('d').getString());
  3522. return _this;
  3523. }
  3524. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathElement, [{
  3525. key: "path",
  3526. value: function path(ctx) {
  3527. var pathParser = this.pathParser;
  3528. var boundingBox = new BoundingBox();
  3529. pathParser.reset();
  3530. if (ctx) {
  3531. ctx.beginPath();
  3532. }
  3533. while (!pathParser.isEnd()) {
  3534. pathParser.nextCommand();
  3535. switch (pathParser.command) {
  3536. case 'M':
  3537. case 'm':
  3538. this.pathM(ctx, boundingBox);
  3539. break;
  3540. case 'L':
  3541. case 'l':
  3542. this.pathL(ctx, boundingBox);
  3543. break;
  3544. case 'H':
  3545. case 'h':
  3546. this.pathH(ctx, boundingBox);
  3547. break;
  3548. case 'V':
  3549. case 'v':
  3550. this.pathV(ctx, boundingBox);
  3551. break;
  3552. case 'C':
  3553. case 'c':
  3554. this.pathC(ctx, boundingBox);
  3555. break;
  3556. case 'S':
  3557. case 's':
  3558. this.pathS(ctx, boundingBox);
  3559. break;
  3560. case 'Q':
  3561. case 'q':
  3562. this.pathQ(ctx, boundingBox);
  3563. break;
  3564. case 'T':
  3565. case 't':
  3566. this.pathT(ctx, boundingBox);
  3567. break;
  3568. case 'A':
  3569. case 'a':
  3570. this.pathA(ctx, boundingBox);
  3571. break;
  3572. case 'Z':
  3573. case 'z':
  3574. this.pathZ(ctx, boundingBox);
  3575. break;
  3576. }
  3577. }
  3578. return boundingBox;
  3579. }
  3580. }, {
  3581. key: "getBoundingBox",
  3582. value: function getBoundingBox(_) {
  3583. return this.path();
  3584. }
  3585. }, {
  3586. key: "getMarkers",
  3587. value: function getMarkers() {
  3588. var pathParser = this.pathParser;
  3589. var points = pathParser.getMarkerPoints();
  3590. var angles = pathParser.getMarkerAngles();
  3591. var markers = points.map(function (point, i) {
  3592. return [point, angles[i]];
  3593. });
  3594. return markers;
  3595. }
  3596. }, {
  3597. key: "renderChildren",
  3598. value: function renderChildren(ctx) {
  3599. this.path(ctx);
  3600. this.document.screen.mouse.checkPath(this, ctx);
  3601. var fillRuleStyleProp = this.getStyle('fill-rule');
  3602. if (ctx.fillStyle !== '') {
  3603. if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
  3604. ctx.fill(fillRuleStyleProp.getString());
  3605. } else {
  3606. ctx.fill();
  3607. }
  3608. }
  3609. if (ctx.strokeStyle !== '') {
  3610. ctx.stroke();
  3611. }
  3612. var markers = this.getMarkers();
  3613. if (markers) {
  3614. var markersLastIndex = markers.length - 1;
  3615. var markerStartStyleProp = this.getStyle('marker-start');
  3616. var markerMidStyleProp = this.getStyle('marker-mid');
  3617. var markerEndStyleProp = this.getStyle('marker-end');
  3618. if (markerStartStyleProp.isUrlDefinition()) {
  3619. var marker = markerStartStyleProp.getDefinition();
  3620. var _markers$ = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[0], 2),
  3621. point = _markers$[0],
  3622. angle = _markers$[1];
  3623. marker.render(ctx, point, angle);
  3624. }
  3625. if (markerMidStyleProp.isUrlDefinition()) {
  3626. var _marker = markerMidStyleProp.getDefinition();
  3627. for (var i = 1; i < markersLastIndex; i++) {
  3628. var _markers$i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[i], 2),
  3629. _point = _markers$i[0],
  3630. _angle = _markers$i[1];
  3631. _marker.render(ctx, _point, _angle);
  3632. }
  3633. }
  3634. if (markerEndStyleProp.isUrlDefinition()) {
  3635. var _marker2 = markerEndStyleProp.getDefinition();
  3636. var _markers$markersLastI = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[markersLastIndex], 2),
  3637. _point2 = _markers$markersLastI[0],
  3638. _angle2 = _markers$markersLastI[1];
  3639. _marker2.render(ctx, _point2, _angle2);
  3640. }
  3641. }
  3642. }
  3643. }, {
  3644. key: "pathM",
  3645. value: function pathM(ctx, boundingBox) {
  3646. var pathParser = this.pathParser;
  3647. var point = pathParser.getAsCurrentPoint();
  3648. var x = point.x,
  3649. y = point.y;
  3650. pathParser.addMarker(point);
  3651. boundingBox.addPoint(x, y);
  3652. if (ctx) {
  3653. ctx.moveTo(x, y);
  3654. }
  3655. pathParser.start = pathParser.current;
  3656. while (!pathParser.isCommandOrEnd()) {
  3657. var _point3 = pathParser.getAsCurrentPoint();
  3658. var _x = _point3.x,
  3659. _y = _point3.y;
  3660. pathParser.addMarker(_point3, pathParser.start);
  3661. boundingBox.addPoint(_x, _y);
  3662. if (ctx) {
  3663. ctx.lineTo(_x, _y);
  3664. }
  3665. }
  3666. }
  3667. }, {
  3668. key: "pathL",
  3669. value: function pathL(ctx, boundingBox) {
  3670. var pathParser = this.pathParser;
  3671. while (!pathParser.isCommandOrEnd()) {
  3672. var current = pathParser.current;
  3673. var point = pathParser.getAsCurrentPoint();
  3674. var x = point.x,
  3675. y = point.y;
  3676. pathParser.addMarker(point, current);
  3677. boundingBox.addPoint(x, y);
  3678. if (ctx) {
  3679. ctx.lineTo(x, y);
  3680. }
  3681. }
  3682. }
  3683. }, {
  3684. key: "pathH",
  3685. value: function pathH(ctx, boundingBox) {
  3686. var pathParser = this.pathParser;
  3687. while (!pathParser.isCommandOrEnd()) {
  3688. var current = pathParser.current;
  3689. var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
  3690. pathParser.addMarker(point, current);
  3691. pathParser.current = point;
  3692. boundingBox.addPoint(point.x, point.y);
  3693. if (ctx) {
  3694. ctx.lineTo(point.x, point.y);
  3695. }
  3696. }
  3697. }
  3698. }, {
  3699. key: "pathV",
  3700. value: function pathV(ctx, boundingBox) {
  3701. var pathParser = this.pathParser;
  3702. while (!pathParser.isCommandOrEnd()) {
  3703. var current = pathParser.current;
  3704. var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
  3705. pathParser.addMarker(point, current);
  3706. pathParser.current = point;
  3707. boundingBox.addPoint(point.x, point.y);
  3708. if (ctx) {
  3709. ctx.lineTo(point.x, point.y);
  3710. }
  3711. }
  3712. }
  3713. }, {
  3714. key: "pathC",
  3715. value: function pathC(ctx, boundingBox) {
  3716. var pathParser = this.pathParser;
  3717. while (!pathParser.isCommandOrEnd()) {
  3718. var current = pathParser.current;
  3719. var point = pathParser.getPoint();
  3720. var controlPoint = pathParser.getAsControlPoint();
  3721. var currentPoint = pathParser.getAsCurrentPoint();
  3722. pathParser.addMarker(currentPoint, controlPoint, point);
  3723. boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3724. if (ctx) {
  3725. ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3726. }
  3727. }
  3728. }
  3729. }, {
  3730. key: "pathS",
  3731. value: function pathS(ctx, boundingBox) {
  3732. var pathParser = this.pathParser;
  3733. while (!pathParser.isCommandOrEnd()) {
  3734. var current = pathParser.current;
  3735. var point = pathParser.getReflectedControlPoint();
  3736. var controlPoint = pathParser.getAsControlPoint();
  3737. var currentPoint = pathParser.getAsCurrentPoint();
  3738. pathParser.addMarker(currentPoint, controlPoint, point);
  3739. boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3740. if (ctx) {
  3741. ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3742. }
  3743. }
  3744. }
  3745. }, {
  3746. key: "pathQ",
  3747. value: function pathQ(ctx, boundingBox) {
  3748. var pathParser = this.pathParser;
  3749. while (!pathParser.isCommandOrEnd()) {
  3750. var current = pathParser.current;
  3751. var controlPoint = pathParser.getAsControlPoint();
  3752. var currentPoint = pathParser.getAsCurrentPoint();
  3753. pathParser.addMarker(currentPoint, controlPoint, controlPoint);
  3754. boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3755. if (ctx) {
  3756. ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3757. }
  3758. }
  3759. }
  3760. }, {
  3761. key: "pathT",
  3762. value: function pathT(ctx, boundingBox) {
  3763. var pathParser = this.pathParser;
  3764. while (!pathParser.isCommandOrEnd()) {
  3765. var current = pathParser.current;
  3766. var controlPoint = pathParser.getReflectedControlPoint();
  3767. pathParser.control = controlPoint;
  3768. var currentPoint = pathParser.getAsCurrentPoint();
  3769. pathParser.addMarker(currentPoint, controlPoint, controlPoint);
  3770. boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3771. if (ctx) {
  3772. ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3773. }
  3774. }
  3775. }
  3776. }, {
  3777. key: "pathA",
  3778. value: function pathA(ctx, boundingBox) {
  3779. var pathParser = this.pathParser;
  3780. while (!pathParser.isCommandOrEnd()) {
  3781. var current = pathParser.current;
  3782. var rx = pathParser.getScalar();
  3783. var ry = pathParser.getScalar();
  3784. var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0);
  3785. var largeArcFlag = pathParser.getScalar();
  3786. var sweepFlag = pathParser.getScalar();
  3787. var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
  3788. // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
  3789. // x1', y1'
  3790. 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
  3791. var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
  3792. if (l > 1) {
  3793. rx *= Math.sqrt(l);
  3794. ry *= Math.sqrt(l);
  3795. } // cx', cy'
  3796. 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)));
  3797. if (isNaN(s)) {
  3798. s = 0;
  3799. }
  3800. var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
  3801. 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
  3802. var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // angle delta
  3803. var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
  3804. var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
  3805. var ad = vectorsAngle(u, v);
  3806. if (vectorsRatio(u, v) <= -1) {
  3807. ad = Math.PI;
  3808. }
  3809. if (vectorsRatio(u, v) >= 1) {
  3810. ad = 0;
  3811. } // for markers
  3812. var dir = 1 - sweepFlag ? 1.0 : -1.0;
  3813. var ah = a1 + dir * (ad / 2.0);
  3814. var halfWay = new Point(centp.x + rx * Math.cos(ah), centp.y + ry * Math.sin(ah));
  3815. pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
  3816. pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
  3817. boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
  3818. if (ctx && !isNaN(a1) && !isNaN(ad)) {
  3819. var r = rx > ry ? rx : ry;
  3820. var sx = rx > ry ? 1 : rx / ry;
  3821. var sy = rx > ry ? ry / rx : 1;
  3822. ctx.translate(centp.x, centp.y);
  3823. ctx.rotate(xAxisRotation);
  3824. ctx.scale(sx, sy);
  3825. ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
  3826. ctx.scale(1 / sx, 1 / sy);
  3827. ctx.rotate(-xAxisRotation);
  3828. ctx.translate(-centp.x, -centp.y);
  3829. }
  3830. }
  3831. }
  3832. }, {
  3833. key: "pathZ",
  3834. value: function pathZ(ctx, boundingBox) {
  3835. var pathParser = this.pathParser;
  3836. if (ctx) {
  3837. // only close path if it is not a straight line
  3838. if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
  3839. ctx.closePath();
  3840. }
  3841. }
  3842. pathParser.current = pathParser.start;
  3843. }
  3844. }]);
  3845. return PathElement;
  3846. }(RenderedElement);
  3847. 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); }; }
  3848. 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; } }
  3849. var SVGElement = /*#__PURE__*/function (_RenderedElement) {
  3850. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SVGElement, _RenderedElement);
  3851. var _super = _createSuper$9(SVGElement);
  3852. function SVGElement() {
  3853. var _this;
  3854. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGElement);
  3855. _this = _super.apply(this, arguments);
  3856. _this.type = 'svg';
  3857. _this.root = false;
  3858. return _this;
  3859. }
  3860. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGElement, [{
  3861. key: "clearContext",
  3862. value: function clearContext(ctx) {
  3863. (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);
  3864. this.document.screen.viewPort.removeCurrent();
  3865. }
  3866. }, {
  3867. key: "setContext",
  3868. value: function setContext(ctx) {
  3869. var document = this.document;
  3870. var screen = document.screen,
  3871. window = document.window;
  3872. var canvas = ctx.canvas;
  3873. screen.setDefaults(ctx);
  3874. if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
  3875. ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
  3876. var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
  3877. if (fontSizeProp.hasValue()) {
  3878. document.rootEmSize = fontSizeProp.getPixels('y');
  3879. document.emSize = document.rootEmSize;
  3880. }
  3881. }
  3882. (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
  3883. if (!this.getAttribute('x').hasValue()) {
  3884. this.getAttribute('x', true).setValue(0);
  3885. }
  3886. if (!this.getAttribute('y').hasValue()) {
  3887. this.getAttribute('y', true).setValue(0);
  3888. }
  3889. ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
  3890. var _screen$viewPort = screen.viewPort,
  3891. width = _screen$viewPort.width,
  3892. height = _screen$viewPort.height;
  3893. if (!this.getStyle('width').hasValue()) {
  3894. this.getStyle('width', true).setValue('100%');
  3895. }
  3896. if (!this.getStyle('height').hasValue()) {
  3897. this.getStyle('height', true).setValue('100%');
  3898. }
  3899. if (!this.getStyle('color').hasValue()) {
  3900. this.getStyle('color', true).setValue('black');
  3901. }
  3902. var refXAttr = this.getAttribute('refX');
  3903. var refYAttr = this.getAttribute('refY');
  3904. var viewBoxAttr = this.getAttribute('viewBox');
  3905. var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
  3906. var clip = !this.root && this.getAttribute('overflow').getValue('hidden') !== 'visible';
  3907. var minX = 0;
  3908. var minY = 0;
  3909. var clipX = 0;
  3910. var clipY = 0;
  3911. if (viewBox) {
  3912. minX = viewBox[0];
  3913. minY = viewBox[1];
  3914. }
  3915. if (!this.root) {
  3916. width = this.getStyle('width').getPixels('x');
  3917. height = this.getStyle('height').getPixels('y');
  3918. if (this.type === 'marker') {
  3919. clipX = minX;
  3920. clipY = minY;
  3921. minX = 0;
  3922. minY = 0;
  3923. }
  3924. }
  3925. screen.viewPort.setCurrent(width, height);
  3926. if (viewBox) {
  3927. width = viewBox[2];
  3928. height = viewBox[3];
  3929. }
  3930. document.setViewBox({
  3931. ctx: ctx,
  3932. aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
  3933. width: screen.viewPort.width,
  3934. desiredWidth: width,
  3935. height: screen.viewPort.height,
  3936. desiredHeight: height,
  3937. minX: minX,
  3938. minY: minY,
  3939. refX: refXAttr.getValue(),
  3940. refY: refYAttr.getValue(),
  3941. clip: clip,
  3942. clipX: clipX,
  3943. clipY: clipY
  3944. });
  3945. if (viewBox) {
  3946. screen.viewPort.removeCurrent();
  3947. screen.viewPort.setCurrent(width, height);
  3948. }
  3949. }
  3950. /**
  3951. * Resize SVG to fit in given size.
  3952. * @param width
  3953. * @param height
  3954. * @param preserveAspectRatio
  3955. */
  3956. }, {
  3957. key: "resize",
  3958. value: function resize(width) {
  3959. var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
  3960. var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  3961. var widthAttr = this.getAttribute('width', true);
  3962. var heightAttr = this.getAttribute('height', true);
  3963. var viewBoxAttr = this.getAttribute('viewBox');
  3964. var styleAttr = this.getAttribute('style');
  3965. var originWidth = widthAttr.getNumber(0);
  3966. var originHeight = heightAttr.getNumber(0);
  3967. if (preserveAspectRatio) {
  3968. if (typeof preserveAspectRatio === 'string') {
  3969. this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
  3970. } else {
  3971. var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
  3972. if (preserveAspectRatioAttr.hasValue()) {
  3973. preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
  3974. }
  3975. }
  3976. }
  3977. widthAttr.setValue(width);
  3978. heightAttr.setValue(height);
  3979. if (!viewBoxAttr.hasValue()) {
  3980. viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
  3981. }
  3982. if (styleAttr.hasValue()) {
  3983. var widthStyle = this.getStyle('width');
  3984. var heightStyle = this.getStyle('height');
  3985. if (widthStyle.hasValue()) {
  3986. widthStyle.setValue("".concat(width, "px"));
  3987. }
  3988. if (heightStyle.hasValue()) {
  3989. heightStyle.setValue("".concat(height, "px"));
  3990. }
  3991. }
  3992. }
  3993. }]);
  3994. return SVGElement;
  3995. }(RenderedElement);
  3996. 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); }; }
  3997. 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; } }
  3998. var RectElement = /*#__PURE__*/function (_PathElement) {
  3999. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RectElement, _PathElement);
  4000. var _super = _createSuper$a(RectElement);
  4001. function RectElement() {
  4002. var _this;
  4003. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RectElement);
  4004. _this = _super.apply(this, arguments);
  4005. _this.type = 'rect';
  4006. return _this;
  4007. }
  4008. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RectElement, [{
  4009. key: "path",
  4010. value: function path(ctx) {
  4011. var x = this.getAttribute('x').getPixels('x');
  4012. var y = this.getAttribute('y').getPixels('y');
  4013. var width = this.getStyle('width').getPixels('x');
  4014. var height = this.getStyle('height').getPixels('y');
  4015. var rxAttr = this.getAttribute('rx');
  4016. var ryAttr = this.getAttribute('ry');
  4017. var rx = rxAttr.getPixels('x');
  4018. var ry = ryAttr.getPixels('y');
  4019. if (rxAttr.hasValue() && !ryAttr.hasValue()) {
  4020. ry = rx;
  4021. }
  4022. if (ryAttr.hasValue() && !rxAttr.hasValue()) {
  4023. rx = ry;
  4024. }
  4025. rx = Math.min(rx, width / 2.0);
  4026. ry = Math.min(ry, height / 2.0);
  4027. if (ctx) {
  4028. var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
  4029. ctx.beginPath(); // always start the path so we don't fill prior paths
  4030. if (height > 0 && width > 0) {
  4031. ctx.moveTo(x + rx, y);
  4032. ctx.lineTo(x + width - rx, y);
  4033. ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
  4034. ctx.lineTo(x + width, y + height - ry);
  4035. ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
  4036. ctx.lineTo(x + rx, y + height);
  4037. ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
  4038. ctx.lineTo(x, y + ry);
  4039. ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
  4040. ctx.closePath();
  4041. }
  4042. }
  4043. return new BoundingBox(x, y, x + width, y + height);
  4044. }
  4045. }, {
  4046. key: "getMarkers",
  4047. value: function getMarkers() {
  4048. return null;
  4049. }
  4050. }]);
  4051. return RectElement;
  4052. }(PathElement);
  4053. 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); }; }
  4054. 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; } }
  4055. var CircleElement = /*#__PURE__*/function (_PathElement) {
  4056. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(CircleElement, _PathElement);
  4057. var _super = _createSuper$b(CircleElement);
  4058. function CircleElement() {
  4059. var _this;
  4060. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, CircleElement);
  4061. _this = _super.apply(this, arguments);
  4062. _this.type = 'circle';
  4063. return _this;
  4064. }
  4065. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(CircleElement, [{
  4066. key: "path",
  4067. value: function path(ctx) {
  4068. var cx = this.getAttribute('cx').getPixels('x');
  4069. var cy = this.getAttribute('cy').getPixels('y');
  4070. var r = this.getAttribute('r').getPixels();
  4071. if (ctx && r > 0) {
  4072. ctx.beginPath();
  4073. ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
  4074. ctx.closePath();
  4075. }
  4076. return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
  4077. }
  4078. }, {
  4079. key: "getMarkers",
  4080. value: function getMarkers() {
  4081. return null;
  4082. }
  4083. }]);
  4084. return CircleElement;
  4085. }(PathElement);
  4086. 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); }; }
  4087. 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; } }
  4088. var EllipseElement = /*#__PURE__*/function (_PathElement) {
  4089. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(EllipseElement, _PathElement);
  4090. var _super = _createSuper$c(EllipseElement);
  4091. function EllipseElement() {
  4092. var _this;
  4093. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, EllipseElement);
  4094. _this = _super.apply(this, arguments);
  4095. _this.type = 'ellipse';
  4096. return _this;
  4097. }
  4098. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(EllipseElement, [{
  4099. key: "path",
  4100. value: function path(ctx) {
  4101. var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
  4102. var rx = this.getAttribute('rx').getPixels('x');
  4103. var ry = this.getAttribute('ry').getPixels('y');
  4104. var cx = this.getAttribute('cx').getPixels('x');
  4105. var cy = this.getAttribute('cy').getPixels('y');
  4106. if (ctx && rx > 0 && ry > 0) {
  4107. ctx.beginPath();
  4108. ctx.moveTo(cx + rx, cy);
  4109. ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
  4110. ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
  4111. ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
  4112. ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
  4113. ctx.closePath();
  4114. }
  4115. return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
  4116. }
  4117. }, {
  4118. key: "getMarkers",
  4119. value: function getMarkers() {
  4120. return null;
  4121. }
  4122. }]);
  4123. return EllipseElement;
  4124. }(PathElement);
  4125. 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); }; }
  4126. 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; } }
  4127. var LineElement = /*#__PURE__*/function (_PathElement) {
  4128. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LineElement, _PathElement);
  4129. var _super = _createSuper$d(LineElement);
  4130. function LineElement() {
  4131. var _this;
  4132. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LineElement);
  4133. _this = _super.apply(this, arguments);
  4134. _this.type = 'line';
  4135. return _this;
  4136. }
  4137. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LineElement, [{
  4138. key: "getPoints",
  4139. value: function getPoints() {
  4140. 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'))];
  4141. }
  4142. }, {
  4143. key: "path",
  4144. value: function path(ctx) {
  4145. var _this$getPoints = this.getPoints(),
  4146. _this$getPoints2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints, 2),
  4147. _this$getPoints2$ = _this$getPoints2[0],
  4148. x0 = _this$getPoints2$.x,
  4149. y0 = _this$getPoints2$.y,
  4150. _this$getPoints2$2 = _this$getPoints2[1],
  4151. x1 = _this$getPoints2$2.x,
  4152. y1 = _this$getPoints2$2.y;
  4153. if (ctx) {
  4154. ctx.beginPath();
  4155. ctx.moveTo(x0, y0);
  4156. ctx.lineTo(x1, y1);
  4157. }
  4158. return new BoundingBox(x0, y0, x1, y1);
  4159. }
  4160. }, {
  4161. key: "getMarkers",
  4162. value: function getMarkers() {
  4163. var _this$getPoints3 = this.getPoints(),
  4164. _this$getPoints4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints3, 2),
  4165. p0 = _this$getPoints4[0],
  4166. p1 = _this$getPoints4[1];
  4167. var a = p0.angleTo(p1);
  4168. return [[p0, a], [p1, a]];
  4169. }
  4170. }]);
  4171. return LineElement;
  4172. }(PathElement);
  4173. 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); }; }
  4174. 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; } }
  4175. var PolylineElement = /*#__PURE__*/function (_PathElement) {
  4176. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolylineElement, _PathElement);
  4177. var _super = _createSuper$e(PolylineElement);
  4178. function PolylineElement(document, node, captureTextNodes) {
  4179. var _this;
  4180. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolylineElement);
  4181. _this = _super.call(this, document, node, captureTextNodes);
  4182. _this.type = 'polyline';
  4183. _this.points = [];
  4184. _this.points = Point.parsePath(_this.getAttribute('points').getString());
  4185. return _this;
  4186. }
  4187. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolylineElement, [{
  4188. key: "path",
  4189. value: function path(ctx) {
  4190. var points = this.points;
  4191. var _points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(points, 1),
  4192. _points$ = _points[0],
  4193. x0 = _points$.x,
  4194. y0 = _points$.y;
  4195. var boundingBox = new BoundingBox(x0, y0);
  4196. if (ctx) {
  4197. ctx.beginPath();
  4198. ctx.moveTo(x0, y0);
  4199. }
  4200. points.forEach(function (_ref) {
  4201. var x = _ref.x,
  4202. y = _ref.y;
  4203. boundingBox.addPoint(x, y);
  4204. if (ctx) {
  4205. ctx.lineTo(x, y);
  4206. }
  4207. });
  4208. return boundingBox;
  4209. }
  4210. }, {
  4211. key: "getMarkers",
  4212. value: function getMarkers() {
  4213. var points = this.points;
  4214. var lastIndex = points.length - 1;
  4215. var markers = [];
  4216. points.forEach(function (point, i) {
  4217. if (i === lastIndex) {
  4218. return;
  4219. }
  4220. markers.push([point, point.angleTo(points[i + 1])]);
  4221. });
  4222. if (markers.length > 0) {
  4223. markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
  4224. }
  4225. return markers;
  4226. }
  4227. }]);
  4228. return PolylineElement;
  4229. }(PathElement);
  4230. 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); }; }
  4231. 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; } }
  4232. var PolygonElement = /*#__PURE__*/function (_PolylineElement) {
  4233. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolygonElement, _PolylineElement);
  4234. var _super = _createSuper$f(PolygonElement);
  4235. function PolygonElement() {
  4236. var _this;
  4237. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolygonElement);
  4238. _this = _super.apply(this, arguments);
  4239. _this.type = 'polygon';
  4240. return _this;
  4241. }
  4242. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolygonElement, [{
  4243. key: "path",
  4244. value: function path(ctx) {
  4245. 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);
  4246. var _this$points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(this.points, 1),
  4247. _this$points$ = _this$points[0],
  4248. x = _this$points$.x,
  4249. y = _this$points$.y;
  4250. if (ctx) {
  4251. ctx.lineTo(x, y);
  4252. ctx.closePath();
  4253. }
  4254. return boundingBox;
  4255. }
  4256. }]);
  4257. return PolygonElement;
  4258. }(PolylineElement);
  4259. 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); }; }
  4260. 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; } }
  4261. var PatternElement = /*#__PURE__*/function (_Element) {
  4262. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PatternElement, _Element);
  4263. var _super = _createSuper$g(PatternElement);
  4264. function PatternElement() {
  4265. var _this;
  4266. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PatternElement);
  4267. _this = _super.apply(this, arguments);
  4268. _this.type = 'pattern';
  4269. return _this;
  4270. }
  4271. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PatternElement, [{
  4272. key: "createPattern",
  4273. value: function createPattern(ctx, _, parentOpacityProp) {
  4274. var width = this.getStyle('width').getPixels('x', true);
  4275. var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
  4276. var patternSvg = new SVGElement(this.document, null);
  4277. patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
  4278. patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
  4279. patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
  4280. patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
  4281. patternSvg.children = this.children;
  4282. var patternCanvas = this.document.createCanvas(width, height);
  4283. var patternCtx = patternCanvas.getContext('2d');
  4284. var xAttr = this.getAttribute('x');
  4285. var yAttr = this.getAttribute('y');
  4286. if (xAttr.hasValue() && yAttr.hasValue()) {
  4287. patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
  4288. }
  4289. if (parentOpacityProp.hasValue()) {
  4290. this.styles['fill-opacity'] = parentOpacityProp;
  4291. } else {
  4292. Reflect.deleteProperty(this.styles, 'fill-opacity');
  4293. } // render 3x3 grid so when we transform there's no white space on edges
  4294. for (var x = -1; x <= 1; x++) {
  4295. for (var y = -1; y <= 1; y++) {
  4296. patternCtx.save();
  4297. patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
  4298. patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
  4299. patternSvg.render(patternCtx);
  4300. patternCtx.restore();
  4301. }
  4302. }
  4303. var pattern = ctx.createPattern(patternCanvas, 'repeat');
  4304. return pattern;
  4305. }
  4306. }]);
  4307. return PatternElement;
  4308. }(Element);
  4309. 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); }; }
  4310. 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; } }
  4311. var MarkerElement = /*#__PURE__*/function (_Element) {
  4312. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MarkerElement, _Element);
  4313. var _super = _createSuper$h(MarkerElement);
  4314. function MarkerElement() {
  4315. var _this;
  4316. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MarkerElement);
  4317. _this = _super.apply(this, arguments);
  4318. _this.type = 'marker';
  4319. return _this;
  4320. }
  4321. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MarkerElement, [{
  4322. key: "render",
  4323. value: function render(ctx, point, angle) {
  4324. if (!point) {
  4325. return;
  4326. }
  4327. var x = point.x,
  4328. y = point.y;
  4329. var orient = this.getAttribute('orient').getValue('auto');
  4330. var markerUnits = this.getAttribute('markerUnits').getValue('strokeWidth');
  4331. ctx.translate(x, y);
  4332. if (orient === 'auto') {
  4333. ctx.rotate(angle);
  4334. }
  4335. if (markerUnits === 'strokeWidth') {
  4336. ctx.scale(ctx.lineWidth, ctx.lineWidth);
  4337. }
  4338. ctx.save(); // render me using a temporary svg element
  4339. var markerSvg = new SVGElement(this.document, null);
  4340. markerSvg.type = this.type;
  4341. markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
  4342. markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
  4343. markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
  4344. markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
  4345. markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
  4346. markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
  4347. markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
  4348. markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
  4349. markerSvg.children = this.children;
  4350. markerSvg.render(ctx);
  4351. ctx.restore();
  4352. if (markerUnits === 'strokeWidth') {
  4353. ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
  4354. }
  4355. if (orient === 'auto') {
  4356. ctx.rotate(-angle);
  4357. }
  4358. ctx.translate(-x, -y);
  4359. }
  4360. }]);
  4361. return MarkerElement;
  4362. }(Element);
  4363. 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); }; }
  4364. 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; } }
  4365. var DefsElement = /*#__PURE__*/function (_Element) {
  4366. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DefsElement, _Element);
  4367. var _super = _createSuper$i(DefsElement);
  4368. function DefsElement() {
  4369. var _this;
  4370. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DefsElement);
  4371. _this = _super.apply(this, arguments);
  4372. _this.type = 'defs';
  4373. return _this;
  4374. }
  4375. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(DefsElement, [{
  4376. key: "render",
  4377. value: function render() {// NOOP
  4378. }
  4379. }]);
  4380. return DefsElement;
  4381. }(Element);
  4382. 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); }; }
  4383. 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; } }
  4384. var GElement = /*#__PURE__*/function (_RenderedElement) {
  4385. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GElement, _RenderedElement);
  4386. var _super = _createSuper$j(GElement);
  4387. function GElement() {
  4388. var _this;
  4389. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GElement);
  4390. _this = _super.apply(this, arguments);
  4391. _this.type = 'g';
  4392. return _this;
  4393. }
  4394. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GElement, [{
  4395. key: "getBoundingBox",
  4396. value: function getBoundingBox(ctx) {
  4397. var boundingBox = new BoundingBox();
  4398. this.children.forEach(function (child) {
  4399. boundingBox.addBoundingBox(child.getBoundingBox(ctx));
  4400. });
  4401. return boundingBox;
  4402. }
  4403. }]);
  4404. return GElement;
  4405. }(RenderedElement);
  4406. 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); }; }
  4407. 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; } }
  4408. var GradientElement = /*#__PURE__*/function (_Element) {
  4409. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GradientElement, _Element);
  4410. var _super = _createSuper$k(GradientElement);
  4411. function GradientElement(document, node, captureTextNodes) {
  4412. var _this;
  4413. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GradientElement);
  4414. _this = _super.call(this, document, node, captureTextNodes);
  4415. _this.attributesToInherit = ['gradientUnits'];
  4416. _this.stops = [];
  4417. var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
  4418. stops = _assertThisInitialize.stops,
  4419. children = _assertThisInitialize.children;
  4420. children.forEach(function (child) {
  4421. if (child.type === 'stop') {
  4422. stops.push(child);
  4423. }
  4424. });
  4425. return _this;
  4426. }
  4427. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GradientElement, [{
  4428. key: "getGradientUnits",
  4429. value: function getGradientUnits() {
  4430. return this.getAttribute('gradientUnits').getString('objectBoundingBox');
  4431. }
  4432. }, {
  4433. key: "createGradient",
  4434. value: function createGradient(ctx, element, parentOpacityProp) {
  4435. var _this2 = this;
  4436. // tslint:disable-next-line: no-this-assignment
  4437. var stopsContainer = this;
  4438. if (this.getHrefAttribute().hasValue()) {
  4439. stopsContainer = this.getHrefAttribute().getDefinition();
  4440. this.inheritStopContainer(stopsContainer);
  4441. }
  4442. var _stopsContainer = stopsContainer,
  4443. stops = _stopsContainer.stops;
  4444. var gradient = this.getGradient(ctx, element);
  4445. if (!gradient) {
  4446. return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
  4447. }
  4448. stops.forEach(function (stop) {
  4449. gradient.addColorStop(stop.offset, _this2.addParentOpacity(parentOpacityProp, stop.color));
  4450. });
  4451. if (this.getAttribute('gradientTransform').hasValue()) {
  4452. // render as transformed pattern on temporary canvas
  4453. var document = this.document;
  4454. var _document$screen = document.screen,
  4455. MAX_VIRTUAL_PIXELS = _document$screen.MAX_VIRTUAL_PIXELS,
  4456. viewPort = _document$screen.viewPort;
  4457. var _viewPort$viewPorts = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(viewPort.viewPorts, 1),
  4458. rootView = _viewPort$viewPorts[0];
  4459. var rect = new RectElement(document, null);
  4460. rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
  4461. rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
  4462. rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
  4463. rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
  4464. var group = new GElement(document, null);
  4465. group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
  4466. group.children = [rect];
  4467. var patternSvg = new SVGElement(document, null);
  4468. patternSvg.attributes.x = new Property(document, 'x', 0);
  4469. patternSvg.attributes.y = new Property(document, 'y', 0);
  4470. patternSvg.attributes.width = new Property(document, 'width', rootView.width);
  4471. patternSvg.attributes.height = new Property(document, 'height', rootView.height);
  4472. patternSvg.children = [group];
  4473. var patternCanvas = document.createCanvas(rootView.width, rootView.height);
  4474. var patternCtx = patternCanvas.getContext('2d');
  4475. patternCtx.fillStyle = gradient;
  4476. patternSvg.render(patternCtx);
  4477. return patternCtx.createPattern(patternCanvas, 'no-repeat');
  4478. }
  4479. return gradient;
  4480. }
  4481. }, {
  4482. key: "inheritStopContainer",
  4483. value: function inheritStopContainer(stopsContainer) {
  4484. var _this3 = this;
  4485. this.attributesToInherit.forEach(function (attributeToInherit) {
  4486. if (!_this3.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
  4487. _this3.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
  4488. }
  4489. });
  4490. }
  4491. }, {
  4492. key: "addParentOpacity",
  4493. value: function addParentOpacity(parentOpacityProp, color) {
  4494. if (parentOpacityProp.hasValue()) {
  4495. var colorProp = new Property(this.document, 'color', color);
  4496. return colorProp.addOpacity(parentOpacityProp).getColor();
  4497. }
  4498. return color;
  4499. }
  4500. }]);
  4501. return GradientElement;
  4502. }(Element);
  4503. 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); }; }
  4504. 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; } }
  4505. var LinearGradientElement = /*#__PURE__*/function (_GradientElement) {
  4506. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LinearGradientElement, _GradientElement);
  4507. var _super = _createSuper$l(LinearGradientElement);
  4508. function LinearGradientElement(document, node, captureTextNodes) {
  4509. var _this;
  4510. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LinearGradientElement);
  4511. _this = _super.call(this, document, node, captureTextNodes);
  4512. _this.type = 'linearGradient';
  4513. _this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
  4514. return _this;
  4515. }
  4516. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LinearGradientElement, [{
  4517. key: "getGradient",
  4518. value: function getGradient(ctx, element) {
  4519. var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
  4520. var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
  4521. if (isBoundingBoxUnits && !boundingBox) {
  4522. return null;
  4523. }
  4524. if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
  4525. this.getAttribute('x1', true).setValue(0);
  4526. this.getAttribute('y1', true).setValue(0);
  4527. this.getAttribute('x2', true).setValue(1);
  4528. this.getAttribute('y2', true).setValue(0);
  4529. }
  4530. var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
  4531. var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
  4532. var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
  4533. var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
  4534. if (x1 === x2 && y1 === y2) {
  4535. return null;
  4536. }
  4537. return ctx.createLinearGradient(x1, y1, x2, y2);
  4538. }
  4539. }]);
  4540. return LinearGradientElement;
  4541. }(GradientElement);
  4542. 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); }; }
  4543. 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; } }
  4544. var RadialGradientElement = /*#__PURE__*/function (_GradientElement) {
  4545. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RadialGradientElement, _GradientElement);
  4546. var _super = _createSuper$m(RadialGradientElement);
  4547. function RadialGradientElement(document, node, captureTextNodes) {
  4548. var _this;
  4549. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RadialGradientElement);
  4550. _this = _super.call(this, document, node, captureTextNodes);
  4551. _this.type = 'radialGradient';
  4552. _this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
  4553. return _this;
  4554. }
  4555. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RadialGradientElement, [{
  4556. key: "getGradient",
  4557. value: function getGradient(ctx, element) {
  4558. var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
  4559. var boundingBox = element.getBoundingBox(ctx);
  4560. if (isBoundingBoxUnits && !boundingBox) {
  4561. return null;
  4562. }
  4563. if (!this.getAttribute('cx').hasValue()) {
  4564. this.getAttribute('cx', true).setValue('50%');
  4565. }
  4566. if (!this.getAttribute('cy').hasValue()) {
  4567. this.getAttribute('cy', true).setValue('50%');
  4568. }
  4569. if (!this.getAttribute('r').hasValue()) {
  4570. this.getAttribute('r', true).setValue('50%');
  4571. }
  4572. var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
  4573. var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
  4574. var fx = cx;
  4575. var fy = cy;
  4576. if (this.getAttribute('fx').hasValue()) {
  4577. fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
  4578. }
  4579. if (this.getAttribute('fy').hasValue()) {
  4580. fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
  4581. }
  4582. var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
  4583. var fr = this.getAttribute('fr').getPixels();
  4584. return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
  4585. }
  4586. }]);
  4587. return RadialGradientElement;
  4588. }(GradientElement);
  4589. 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); }; }
  4590. 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; } }
  4591. var StopElement = /*#__PURE__*/function (_Element) {
  4592. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StopElement, _Element);
  4593. var _super = _createSuper$n(StopElement);
  4594. function StopElement(document, node, captureTextNodes) {
  4595. var _this;
  4596. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StopElement);
  4597. _this = _super.call(this, document, node, captureTextNodes);
  4598. _this.type = 'stop';
  4599. var offset = Math.max(0, Math.min(1, _this.getAttribute('offset').getNumber()));
  4600. var stopOpacity = _this.getStyle('stop-opacity');
  4601. var stopColor = _this.getStyle('stop-color', true);
  4602. if (stopColor.getString() === '') {
  4603. stopColor.setValue('#000');
  4604. }
  4605. if (stopOpacity.hasValue()) {
  4606. stopColor = stopColor.addOpacity(stopOpacity);
  4607. }
  4608. _this.offset = offset;
  4609. _this.color = stopColor.getColor();
  4610. return _this;
  4611. }
  4612. return StopElement;
  4613. }(Element);
  4614. 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); }; }
  4615. 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; } }
  4616. var AnimateElement = /*#__PURE__*/function (_Element) {
  4617. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateElement, _Element);
  4618. var _super = _createSuper$o(AnimateElement);
  4619. function AnimateElement(document, node, captureTextNodes) {
  4620. var _this;
  4621. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateElement);
  4622. _this = _super.call(this, document, node, captureTextNodes);
  4623. _this.type = 'animate';
  4624. _this.duration = 0;
  4625. _this.initialValue = null;
  4626. _this.initialUnits = '';
  4627. _this.removed = false;
  4628. _this.frozen = false;
  4629. document.screen.animations.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
  4630. _this.begin = _this.getAttribute('begin').getMilliseconds();
  4631. _this.maxDuration = _this.begin + _this.getAttribute('dur').getMilliseconds();
  4632. _this.from = _this.getAttribute('from');
  4633. _this.to = _this.getAttribute('to');
  4634. _this.values = _this.getAttribute('values');
  4635. if (_this.values.hasValue()) {
  4636. _this.values.setValue(_this.values.getString().split(';'));
  4637. }
  4638. return _this;
  4639. }
  4640. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateElement, [{
  4641. key: "getProperty",
  4642. value: function getProperty() {
  4643. var attributeType = this.getAttribute('attributeType').getString();
  4644. var attributeName = this.getAttribute('attributeName').getString();
  4645. if (attributeType === 'CSS') {
  4646. return this.parent.getStyle(attributeName, true);
  4647. }
  4648. return this.parent.getAttribute(attributeName, true);
  4649. }
  4650. }, {
  4651. key: "calcValue",
  4652. value: function calcValue() {
  4653. var initialUnits = this.initialUnits;
  4654. var _this$getProgress = this.getProgress(),
  4655. progress = _this$getProgress.progress,
  4656. from = _this$getProgress.from,
  4657. to = _this$getProgress.to; // tween value linearly
  4658. var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
  4659. if (initialUnits === '%') {
  4660. newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
  4661. }
  4662. return "".concat(newValue).concat(initialUnits);
  4663. }
  4664. }, {
  4665. key: "update",
  4666. value: function update(delta) {
  4667. var parent = this.parent;
  4668. var prop = this.getProperty(); // set initial value
  4669. if (!this.initialValue) {
  4670. this.initialValue = prop.getString();
  4671. this.initialUnits = prop.getUnits();
  4672. } // if we're past the end time
  4673. if (this.duration > this.maxDuration) {
  4674. var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
  4675. if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
  4676. this.duration = 0;
  4677. } else if (fill === 'freeze' && !this.frozen) {
  4678. this.frozen = true;
  4679. parent.animationFrozen = true;
  4680. parent.animationFrozenValue = prop.getString();
  4681. } else if (fill === 'remove' && !this.removed) {
  4682. this.removed = true;
  4683. prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
  4684. return true;
  4685. }
  4686. return false;
  4687. }
  4688. this.duration += delta; // if we're past the begin time
  4689. var updated = false;
  4690. if (this.begin < this.duration) {
  4691. var newValue = this.calcValue(); // tween
  4692. var typeAttr = this.getAttribute('type');
  4693. if (typeAttr.hasValue()) {
  4694. // for transform, etc.
  4695. var type = typeAttr.getString();
  4696. newValue = "".concat(type, "(").concat(newValue, ")");
  4697. }
  4698. prop.setValue(newValue);
  4699. updated = true;
  4700. }
  4701. return updated;
  4702. }
  4703. }, {
  4704. key: "getProgress",
  4705. value: function getProgress() {
  4706. var document = this.document,
  4707. values = this.values;
  4708. var result = {
  4709. progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
  4710. };
  4711. if (values.hasValue()) {
  4712. var p = result.progress * (values.getValue().length - 1);
  4713. var lb = Math.floor(p);
  4714. var ub = Math.ceil(p);
  4715. result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
  4716. result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
  4717. result.progress = (p - lb) / (ub - lb);
  4718. } else {
  4719. result.from = this.from;
  4720. result.to = this.to;
  4721. }
  4722. return result;
  4723. }
  4724. }]);
  4725. return AnimateElement;
  4726. }(Element);
  4727. 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); }; }
  4728. 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; } }
  4729. var AnimateColorElement = /*#__PURE__*/function (_AnimateElement) {
  4730. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateColorElement, _AnimateElement);
  4731. var _super = _createSuper$p(AnimateColorElement);
  4732. function AnimateColorElement() {
  4733. var _this;
  4734. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateColorElement);
  4735. _this = _super.apply(this, arguments);
  4736. _this.type = 'animateColor';
  4737. return _this;
  4738. }
  4739. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateColorElement, [{
  4740. key: "calcValue",
  4741. value: function calcValue() {
  4742. var _this$getProgress = this.getProgress(),
  4743. progress = _this$getProgress.progress,
  4744. from = _this$getProgress.from,
  4745. to = _this$getProgress.to;
  4746. var colorFrom = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(from.getColor());
  4747. var colorTo = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(to.getColor());
  4748. if (colorFrom.ok && colorTo.ok) {
  4749. // tween color linearly
  4750. var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
  4751. var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
  4752. var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
  4753. return "rgb(".concat(parseInt(r, 10), ", ").concat(parseInt(g, 10), ", ").concat(parseInt(b, 10), ")");
  4754. }
  4755. return this.getAttribute('from').getColor();
  4756. }
  4757. }]);
  4758. return AnimateColorElement;
  4759. }(AnimateElement);
  4760. 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); }; }
  4761. 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; } }
  4762. var AnimateTransformElement = /*#__PURE__*/function (_AnimateElement) {
  4763. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateTransformElement, _AnimateElement);
  4764. var _super = _createSuper$q(AnimateTransformElement);
  4765. function AnimateTransformElement() {
  4766. var _this;
  4767. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateTransformElement);
  4768. _this = _super.apply(this, arguments);
  4769. _this.type = 'animateTransform';
  4770. return _this;
  4771. }
  4772. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateTransformElement, [{
  4773. key: "calcValue",
  4774. value: function calcValue() {
  4775. var _this$getProgress = this.getProgress(),
  4776. progress = _this$getProgress.progress,
  4777. from = _this$getProgress.from,
  4778. to = _this$getProgress.to; // tween value linearly
  4779. var transformFrom = toNumbers(from.getString());
  4780. var transformTo = toNumbers(to.getString());
  4781. var newValue = transformFrom.map(function (from, i) {
  4782. var to = transformTo[i];
  4783. return from + (to - from) * progress;
  4784. }).join(' ');
  4785. return newValue;
  4786. }
  4787. }]);
  4788. return AnimateTransformElement;
  4789. }(AnimateElement);
  4790. 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; } } }; }
  4791. 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); }
  4792. 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; }
  4793. 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); }; }
  4794. 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; } }
  4795. var FontElement = /*#__PURE__*/function (_Element) {
  4796. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontElement, _Element);
  4797. var _super = _createSuper$r(FontElement);
  4798. function FontElement(document, node, captureTextNodes) {
  4799. var _this;
  4800. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontElement);
  4801. _this = _super.call(this, document, node, captureTextNodes);
  4802. _this.type = 'font';
  4803. _this.glyphs = {};
  4804. _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
  4805. var definitions = document.definitions;
  4806. var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
  4807. children = _assertThisInitialize.children;
  4808. var _iterator = _createForOfIteratorHelper(children),
  4809. _step;
  4810. try {
  4811. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  4812. var child = _step.value;
  4813. switch (child.type) {
  4814. case 'font-face':
  4815. {
  4816. _this.fontFace = child;
  4817. var fontFamilyStyle = child.getStyle('font-family');
  4818. if (fontFamilyStyle.hasValue()) {
  4819. definitions[fontFamilyStyle.getString()] = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this);
  4820. }
  4821. break;
  4822. }
  4823. case 'missing-glyph':
  4824. _this.missingGlyph = child;
  4825. break;
  4826. case 'glyph':
  4827. {
  4828. var glyph = child;
  4829. if (glyph.arabicForm) {
  4830. _this.isRTL = true;
  4831. _this.isArabic = true;
  4832. if (typeof _this.glyphs[glyph.unicode] === 'undefined') {
  4833. _this.glyphs[glyph.unicode] = {};
  4834. }
  4835. _this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
  4836. } else {
  4837. _this.glyphs[glyph.unicode] = glyph;
  4838. }
  4839. break;
  4840. }
  4841. default:
  4842. }
  4843. }
  4844. } catch (err) {
  4845. _iterator.e(err);
  4846. } finally {
  4847. _iterator.f();
  4848. }
  4849. return _this;
  4850. }
  4851. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FontElement, [{
  4852. key: "render",
  4853. value: function render() {// NO RENDER
  4854. }
  4855. }]);
  4856. return FontElement;
  4857. }(Element);
  4858. 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); }; }
  4859. 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; } }
  4860. var FontFaceElement = /*#__PURE__*/function (_Element) {
  4861. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontFaceElement, _Element);
  4862. var _super = _createSuper$s(FontFaceElement);
  4863. function FontFaceElement(document, node, captureTextNodes) {
  4864. var _this;
  4865. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontFaceElement);
  4866. _this = _super.call(this, document, node, captureTextNodes);
  4867. _this.type = 'font-face';
  4868. _this.ascent = _this.getAttribute('ascent').getNumber();
  4869. _this.descent = _this.getAttribute('descent').getNumber();
  4870. _this.unitsPerEm = _this.getAttribute('units-per-em').getNumber();
  4871. return _this;
  4872. }
  4873. return FontFaceElement;
  4874. }(Element);
  4875. 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); }; }
  4876. 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; } }
  4877. var MissingGlyphElement = /*#__PURE__*/function (_PathElement) {
  4878. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MissingGlyphElement, _PathElement);
  4879. var _super = _createSuper$t(MissingGlyphElement);
  4880. function MissingGlyphElement() {
  4881. var _this;
  4882. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MissingGlyphElement);
  4883. _this = _super.apply(this, arguments);
  4884. _this.type = 'missing-glyph';
  4885. _this.horizAdvX = 0;
  4886. return _this;
  4887. }
  4888. return MissingGlyphElement;
  4889. }(PathElement);
  4890. 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); }; }
  4891. 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; } }
  4892. var GlyphElement = /*#__PURE__*/function (_PathElement) {
  4893. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GlyphElement, _PathElement);
  4894. var _super = _createSuper$u(GlyphElement);
  4895. function GlyphElement(document, node, captureTextNodes) {
  4896. var _this;
  4897. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GlyphElement);
  4898. _this = _super.call(this, document, node, captureTextNodes);
  4899. _this.type = 'glyph';
  4900. _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
  4901. _this.unicode = _this.getAttribute('unicode').getString();
  4902. _this.arabicForm = _this.getAttribute('arabic-form').getString();
  4903. return _this;
  4904. }
  4905. return GlyphElement;
  4906. }(PathElement);
  4907. 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); }; }
  4908. 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; } }
  4909. var TRefElement = /*#__PURE__*/function (_TextElement) {
  4910. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TRefElement, _TextElement);
  4911. var _super = _createSuper$v(TRefElement);
  4912. function TRefElement() {
  4913. var _this;
  4914. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TRefElement);
  4915. _this = _super.apply(this, arguments);
  4916. _this.type = 'tref';
  4917. return _this;
  4918. }
  4919. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TRefElement, [{
  4920. key: "getText",
  4921. value: function getText() {
  4922. var element = this.getHrefAttribute().getDefinition();
  4923. if (element) {
  4924. var firstChild = element.children[0];
  4925. if (firstChild) {
  4926. return firstChild.getText();
  4927. }
  4928. }
  4929. return '';
  4930. }
  4931. }]);
  4932. return TRefElement;
  4933. }(TextElement);
  4934. 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); }; }
  4935. 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; } }
  4936. var AElement = /*#__PURE__*/function (_TextElement) {
  4937. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AElement, _TextElement);
  4938. var _super = _createSuper$w(AElement);
  4939. function AElement(document, node, captureTextNodes) {
  4940. var _this;
  4941. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AElement);
  4942. _this = _super.call(this, document, node, captureTextNodes);
  4943. _this.type = 'a';
  4944. var childNodes = node.childNodes;
  4945. var firstChild = childNodes[0];
  4946. var hasText = childNodes.length > 0 && Array.from(childNodes).every(function (node) {
  4947. return node.nodeType === 3;
  4948. });
  4949. _this.hasText = hasText;
  4950. _this.text = hasText ? _this.getTextFromNode(firstChild) : '';
  4951. return _this;
  4952. }
  4953. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AElement, [{
  4954. key: "getText",
  4955. value: function getText() {
  4956. return this.text;
  4957. }
  4958. }, {
  4959. key: "renderChildren",
  4960. value: function renderChildren(ctx) {
  4961. if (this.hasText) {
  4962. // render as text element
  4963. (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);
  4964. var document = this.document,
  4965. x = this.x,
  4966. y = this.y;
  4967. var mouse = document.screen.mouse;
  4968. var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
  4969. if (mouse.isWorking()) {
  4970. mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
  4971. }
  4972. } else if (this.children.length > 0) {
  4973. // render as temporary group
  4974. var g = new GElement(this.document, null);
  4975. g.children = this.children;
  4976. g.parent = this;
  4977. g.render(ctx);
  4978. }
  4979. }
  4980. }, {
  4981. key: "onClick",
  4982. value: function onClick() {
  4983. var window = this.document.window;
  4984. if (window) {
  4985. window.open(this.getHrefAttribute().getString());
  4986. }
  4987. }
  4988. }, {
  4989. key: "onMouseMove",
  4990. value: function onMouseMove() {
  4991. var ctx = this.document.ctx;
  4992. ctx.canvas.style.cursor = 'pointer';
  4993. }
  4994. }]);
  4995. return AElement;
  4996. }(TextElement);
  4997. 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; } } }; }
  4998. 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); }
  4999. 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; }
  5000. 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); }; }
  5001. 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; } }
  5002. var TextPathElement = /*#__PURE__*/function (_TextElement) {
  5003. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextPathElement, _TextElement);
  5004. var _super = _createSuper$x(TextPathElement);
  5005. function TextPathElement(document, node, captureTextNodes) {
  5006. var _this;
  5007. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextPathElement);
  5008. _this = _super.call(this, document, node, captureTextNodes);
  5009. _this.type = 'textPath';
  5010. _this.textWidth = 0;
  5011. _this.textHeight = 0;
  5012. _this.pathLength = -1;
  5013. _this.glyphInfo = null;
  5014. _this.letterSpacingCache = [];
  5015. _this.measuresCache = new Map([['', 0]]);
  5016. var pathElement = _this.getHrefAttribute().getDefinition();
  5017. _this.text = _this.getTextFromNode();
  5018. _this.dataArray = _this.parsePathData(pathElement);
  5019. return _this;
  5020. }
  5021. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextPathElement, [{
  5022. key: "getText",
  5023. value: function getText() {
  5024. return this.text;
  5025. }
  5026. }, {
  5027. key: "path",
  5028. value: function path(ctx) {
  5029. var dataArray = this.dataArray;
  5030. if (ctx) {
  5031. ctx.beginPath();
  5032. }
  5033. dataArray.forEach(function (_ref) {
  5034. var command = _ref.command,
  5035. points = _ref.points;
  5036. switch (command) {
  5037. case 'L':
  5038. if (ctx) {
  5039. ctx.lineTo(points[0], points[1]);
  5040. }
  5041. break;
  5042. case 'M':
  5043. if (ctx) {
  5044. ctx.moveTo(points[0], points[1]);
  5045. }
  5046. break;
  5047. case 'C':
  5048. if (ctx) {
  5049. ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
  5050. }
  5051. break;
  5052. case 'Q':
  5053. if (ctx) {
  5054. ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
  5055. }
  5056. break;
  5057. case 'A':
  5058. {
  5059. var cx = points[0];
  5060. var cy = points[1];
  5061. var rx = points[2];
  5062. var ry = points[3];
  5063. var theta = points[4];
  5064. var dTheta = points[5];
  5065. var psi = points[6];
  5066. var fs = points[7];
  5067. var r = rx > ry ? rx : ry;
  5068. var scaleX = rx > ry ? 1 : rx / ry;
  5069. var scaleY = rx > ry ? ry / rx : 1;
  5070. if (ctx) {
  5071. ctx.translate(cx, cy);
  5072. ctx.rotate(psi);
  5073. ctx.scale(scaleX, scaleY);
  5074. ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
  5075. ctx.scale(1 / scaleX, 1 / scaleY);
  5076. ctx.rotate(-psi);
  5077. ctx.translate(-cx, -cy);
  5078. }
  5079. break;
  5080. }
  5081. case 'z':
  5082. if (ctx) {
  5083. ctx.closePath();
  5084. }
  5085. break;
  5086. }
  5087. });
  5088. }
  5089. }, {
  5090. key: "renderChildren",
  5091. value: function renderChildren(ctx) {
  5092. this.setTextData(ctx);
  5093. ctx.save();
  5094. var textDecoration = this.parent.getStyle('text-decoration').getString();
  5095. var fontSize = this.getFontSize();
  5096. var glyphInfo = this.glyphInfo;
  5097. var fill = ctx.fillStyle;
  5098. if (textDecoration === 'underline') {
  5099. ctx.beginPath();
  5100. }
  5101. glyphInfo.forEach(function (glyph, i) {
  5102. var p0 = glyph.p0,
  5103. p1 = glyph.p1,
  5104. partialText = glyph.text;
  5105. ctx.save();
  5106. ctx.translate(p0.x, p0.y);
  5107. ctx.rotate(glyphInfo[i].rotation);
  5108. if (ctx.fillStyle) {
  5109. ctx.fillText(partialText, 0, 0);
  5110. }
  5111. if (ctx.strokeStyle) {
  5112. ctx.strokeText(partialText, 0, 0);
  5113. }
  5114. ctx.restore();
  5115. if (textDecoration === 'underline') {
  5116. if (i === 0) {
  5117. ctx.moveTo(p0.x, p0.y + fontSize / 8);
  5118. }
  5119. ctx.lineTo(p1.x, p1.y + fontSize / 5);
  5120. } //// To assist with debugging visually, uncomment following
  5121. //
  5122. // ctx.beginPath();
  5123. // if (i % 2)
  5124. // ctx.strokeStyle = 'red';
  5125. // else
  5126. // ctx.strokeStyle = 'green';
  5127. // ctx.moveTo(p0.x, p0.y);
  5128. // ctx.lineTo(p1.x, p1.y);
  5129. // ctx.stroke();
  5130. // ctx.closePath();
  5131. });
  5132. if (textDecoration === 'underline') {
  5133. ctx.lineWidth = fontSize / 20;
  5134. ctx.strokeStyle = fill;
  5135. ctx.stroke();
  5136. ctx.closePath();
  5137. }
  5138. ctx.restore();
  5139. }
  5140. }, {
  5141. key: "getLetterSpacingAt",
  5142. value: function getLetterSpacingAt() {
  5143. var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  5144. return this.letterSpacingCache[idx] || 0;
  5145. }
  5146. }, {
  5147. key: "findSegmentToFitChar",
  5148. value: function findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, c, charI) {
  5149. var offset = inputOffset;
  5150. var glyphWidth = this.measureText(ctx, c);
  5151. if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
  5152. glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
  5153. }
  5154. if (charI > -1) {
  5155. offset += this.getLetterSpacingAt(charI);
  5156. }
  5157. var splineStep = this.textHeight / 20;
  5158. var segment = {
  5159. p0: this.getEquidistantPointOnPath(offset, splineStep),
  5160. p1: this.getEquidistantPointOnPath(offset + glyphWidth, splineStep)
  5161. };
  5162. offset += glyphWidth;
  5163. return {
  5164. offset: offset,
  5165. segment: segment
  5166. };
  5167. }
  5168. }, {
  5169. key: "measureText",
  5170. value: function measureText(ctx, text) {
  5171. var measuresCache = this.measuresCache;
  5172. var targetText = text || this.getText();
  5173. if (measuresCache.has(targetText)) {
  5174. return measuresCache.get(targetText);
  5175. }
  5176. var measure = this.measureTargetText(ctx, targetText);
  5177. measuresCache.set(targetText, measure);
  5178. return measure;
  5179. } // This method supposes what all custom fonts already loaded.
  5180. // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
  5181. // You need to call this method manually to update glyphs cache.
  5182. }, {
  5183. key: "setTextData",
  5184. value: function setTextData(ctx) {
  5185. var _this2 = this;
  5186. if (this.glyphInfo) {
  5187. return;
  5188. }
  5189. var renderText = this.getText();
  5190. var chars = renderText.split('');
  5191. var spacesNumber = renderText.split(' ').length - 1;
  5192. var dx = toNumbers(this.parent.getAttribute('dx').getString('0'));
  5193. var anchor = this.parent.getStyle('text-anchor').getString('start');
  5194. var thisSpacing = this.getStyle('letter-spacing');
  5195. var parentSpacing = this.parent.getStyle('letter-spacing');
  5196. var letterSpacing = 0;
  5197. if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
  5198. letterSpacing = parentSpacing.getPixels();
  5199. } else if (thisSpacing.hasValue()) {
  5200. if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
  5201. letterSpacing = thisSpacing.getPixels();
  5202. }
  5203. } // fill letter-spacing cache
  5204. var letterSpacingCache = [];
  5205. var textLen = renderText.length;
  5206. this.letterSpacingCache = letterSpacingCache;
  5207. for (var i = 0; i < textLen; i++) {
  5208. letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
  5209. }
  5210. var dxSum = letterSpacingCache.reduce(function (acc, cur) {
  5211. return acc + cur || 0;
  5212. }, 0);
  5213. this.textWidth = this.measureText(ctx);
  5214. this.textHeight = this.getFontSize();
  5215. var textFullWidth = Math.max(this.textWidth + dxSum, 0);
  5216. this.glyphInfo = [];
  5217. var fullPathWidth = this.getPathLength();
  5218. var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
  5219. var offset = 0;
  5220. if (anchor === 'middle' || anchor === 'center') {
  5221. offset = -textFullWidth / 2;
  5222. }
  5223. if (anchor === 'end' || anchor === 'right') {
  5224. offset = -textFullWidth;
  5225. }
  5226. offset += startOffset;
  5227. chars.forEach(function (char, i) {
  5228. // Find such segment what distance between p0 and p1 is approx. width of glyph
  5229. var _this2$findSegmentToF = _this2.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, char, i),
  5230. nextOffset = _this2$findSegmentToF.offset,
  5231. segment = _this2$findSegmentToF.segment;
  5232. offset = nextOffset;
  5233. if (!segment.p0 || !segment.p1) {
  5234. return;
  5235. }
  5236. 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.
  5237. // Can foresee having a rough pair table built in that the developer can override as needed.
  5238. // Or use "dx" attribute of the <text> node as a naive replacement
  5239. var kern = 0; // placeholder for future implementation
  5240. var midpoint = _this2.getPointOnLine(kern + width / 2.0, segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y);
  5241. var rotation = Math.atan2(segment.p1.y - segment.p0.y, segment.p1.x - segment.p0.x);
  5242. _this2.glyphInfo.push({
  5243. transposeX: midpoint.x,
  5244. transposeY: midpoint.y,
  5245. text: chars[i],
  5246. p0: segment.p0,
  5247. p1: segment.p1,
  5248. rotation: rotation
  5249. });
  5250. });
  5251. }
  5252. }, {
  5253. key: "parsePathData",
  5254. value: function parsePathData(path) {
  5255. this.pathLength = -1; // reset path length
  5256. if (!path) {
  5257. return [];
  5258. }
  5259. var pathCommands = [];
  5260. var pathParser = path.pathParser;
  5261. pathParser.reset(); // convert l, H, h, V, and v to L
  5262. while (!pathParser.isEnd()) {
  5263. var current = pathParser.current;
  5264. var startX = current ? current.x : 0;
  5265. var startY = current ? current.y : 0;
  5266. var cmd = '';
  5267. var points = [];
  5268. pathParser.nextCommand();
  5269. var upperCommand = pathParser.command.toUpperCase();
  5270. switch (pathParser.command) {
  5271. case 'M':
  5272. case 'm':
  5273. cmd = this.pathM(pathParser, points);
  5274. break;
  5275. case 'L':
  5276. case 'l':
  5277. cmd = this.pathL(pathParser, points);
  5278. break;
  5279. case 'H':
  5280. case 'h':
  5281. cmd = this.pathH(pathParser, points);
  5282. break;
  5283. case 'V':
  5284. case 'v':
  5285. cmd = this.pathV(pathParser, points);
  5286. break;
  5287. case 'C':
  5288. case 'c':
  5289. this.pathC(pathParser, points);
  5290. break;
  5291. case 'S':
  5292. case 's':
  5293. cmd = this.pathS(pathParser, points);
  5294. break;
  5295. case 'Q':
  5296. case 'q':
  5297. this.pathQ(pathParser, points);
  5298. break;
  5299. case 'T':
  5300. case 't':
  5301. cmd = this.pathT(pathParser, points);
  5302. break;
  5303. case 'A':
  5304. case 'a':
  5305. points = this.pathA(pathParser);
  5306. break;
  5307. case 'Z':
  5308. case 'z':
  5309. pathParser.current = pathParser.start;
  5310. break;
  5311. }
  5312. if (upperCommand !== 'Z') {
  5313. pathCommands.push({
  5314. command: cmd || upperCommand,
  5315. points: points,
  5316. start: {
  5317. x: startX,
  5318. y: startY
  5319. },
  5320. pathLength: this.calcLength(startX, startY, cmd || upperCommand, points)
  5321. });
  5322. } else {
  5323. pathCommands.push({
  5324. command: 'z',
  5325. points: [],
  5326. pathLength: 0
  5327. });
  5328. }
  5329. }
  5330. return pathCommands;
  5331. }
  5332. }, {
  5333. key: "pathM",
  5334. value: function pathM(pathParser, points) {
  5335. var p = pathParser.getAsCurrentPoint(); // pathParser.addMarker(p);
  5336. points.push(p.x, p.y);
  5337. pathParser.start = pathParser.current;
  5338. while (!pathParser.isCommandOrEnd()) {
  5339. var _p = pathParser.getAsCurrentPoint();
  5340. points.push(_p.x, _p.y);
  5341. return 'L';
  5342. }
  5343. }
  5344. }, {
  5345. key: "pathL",
  5346. value: function pathL(pathParser, points) {
  5347. while (!pathParser.isCommandOrEnd()) {
  5348. var p = pathParser.getAsCurrentPoint();
  5349. points.push(p.x, p.y);
  5350. }
  5351. return 'L';
  5352. }
  5353. }, {
  5354. key: "pathH",
  5355. value: function pathH(pathParser, points) {
  5356. while (!pathParser.isCommandOrEnd()) {
  5357. var current = pathParser.current;
  5358. var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
  5359. points.push(point.x, point.y);
  5360. pathParser.current = point;
  5361. }
  5362. return 'L';
  5363. }
  5364. }, {
  5365. key: "pathV",
  5366. value: function pathV(pathParser, points) {
  5367. while (!pathParser.isCommandOrEnd()) {
  5368. var current = pathParser.current;
  5369. var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
  5370. points.push(point.x, point.y);
  5371. pathParser.current = point;
  5372. }
  5373. return 'L';
  5374. }
  5375. }, {
  5376. key: "pathC",
  5377. value: function pathC(pathParser, points) {
  5378. while (!pathParser.isCommandOrEnd()) {
  5379. var point = pathParser.getPoint();
  5380. var controlPoint = pathParser.getAsControlPoint();
  5381. var currentPoint = pathParser.getAsCurrentPoint();
  5382. points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5383. }
  5384. }
  5385. }, {
  5386. key: "pathS",
  5387. value: function pathS(pathParser, points) {
  5388. while (!pathParser.isCommandOrEnd()) {
  5389. var point = pathParser.getReflectedControlPoint();
  5390. var controlPoint = pathParser.getAsControlPoint();
  5391. var currentPoint = pathParser.getAsCurrentPoint();
  5392. points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5393. }
  5394. return 'C';
  5395. }
  5396. }, {
  5397. key: "pathQ",
  5398. value: function pathQ(pathParser, points) {
  5399. while (!pathParser.isCommandOrEnd()) {
  5400. var controlPoint = pathParser.getAsControlPoint();
  5401. var currentPoint = pathParser.getAsCurrentPoint();
  5402. points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5403. }
  5404. }
  5405. }, {
  5406. key: "pathT",
  5407. value: function pathT(pathParser, points) {
  5408. while (!pathParser.isCommandOrEnd()) {
  5409. var controlPoint = pathParser.getReflectedControlPoint();
  5410. pathParser.control = controlPoint;
  5411. var currentPoint = pathParser.getAsCurrentPoint();
  5412. points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5413. }
  5414. return 'Q';
  5415. }
  5416. }, {
  5417. key: "pathA",
  5418. value: function pathA(pathParser) {
  5419. while (!pathParser.isCommandOrEnd()) {
  5420. var current = pathParser.current; // x1, y1
  5421. var rx = pathParser.getScalar();
  5422. var ry = pathParser.getScalar();
  5423. var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0); // φ
  5424. var largeArcFlag = pathParser.getScalar(); // fA
  5425. var sweepFlag = pathParser.getScalar(); // fS
  5426. var currentPoint = pathParser.getAsCurrentPoint(); // x2, y2
  5427. // Conversion from endpoint to center parameterization
  5428. // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
  5429. // x1', y1'
  5430. 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
  5431. var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
  5432. if (l > 1) {
  5433. rx *= Math.sqrt(l);
  5434. ry *= Math.sqrt(l);
  5435. } // cx', cy'
  5436. 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)));
  5437. if (isNaN(s)) {
  5438. s = 0;
  5439. }
  5440. var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
  5441. 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
  5442. var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // θ1
  5443. // angle delta
  5444. var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
  5445. var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
  5446. var ad = vectorsAngle(u, v); // Δθ
  5447. if (vectorsRatio(u, v) <= -1) {
  5448. ad = Math.PI;
  5449. }
  5450. if (vectorsRatio(u, v) >= 1) {
  5451. ad = 0;
  5452. }
  5453. if (sweepFlag === 0 && ad > 0) {
  5454. ad = ad - 2 * Math.PI;
  5455. }
  5456. if (sweepFlag === 1 && ad < 0) {
  5457. ad = ad + 2 * Math.PI;
  5458. }
  5459. return [centp.x, centp.y, rx, ry, a1, ad, xAxisRotation, sweepFlag];
  5460. }
  5461. }
  5462. }, {
  5463. key: "calcLength",
  5464. value: function calcLength(x, y, cmd, points) {
  5465. var len = 0;
  5466. var p1 = null;
  5467. var p2 = null;
  5468. var t = 0;
  5469. switch (cmd) {
  5470. case 'L':
  5471. return this.getLineLength(x, y, points[0], points[1]);
  5472. case 'C':
  5473. // Approximates by breaking curve into 100 line segments
  5474. len = 0.0;
  5475. p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
  5476. for (t = 0.01; t <= 1; t += 0.01) {
  5477. p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
  5478. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5479. p1 = p2;
  5480. }
  5481. return len;
  5482. case 'Q':
  5483. // Approximates by breaking curve into 100 line segments
  5484. len = 0.0;
  5485. p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
  5486. for (t = 0.01; t <= 1; t += 0.01) {
  5487. p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
  5488. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5489. p1 = p2;
  5490. }
  5491. return len;
  5492. case 'A':
  5493. // Approximates by breaking curve into line segments
  5494. len = 0.0;
  5495. var start = points[4]; // 4 = theta
  5496. var dTheta = points[5]; // 5 = dTheta
  5497. var end = points[4] + dTheta;
  5498. var inc = Math.PI / 180.0; // 1 degree resolution
  5499. if (Math.abs(start - end) < inc) {
  5500. inc = Math.abs(start - end);
  5501. } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
  5502. p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
  5503. if (dTheta < 0) {
  5504. // clockwise
  5505. for (t = start - inc; t > end; t -= inc) {
  5506. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
  5507. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5508. p1 = p2;
  5509. }
  5510. } else {
  5511. // counter-clockwise
  5512. for (t = start + inc; t < end; t += inc) {
  5513. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
  5514. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5515. p1 = p2;
  5516. }
  5517. }
  5518. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
  5519. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5520. return len;
  5521. }
  5522. return 0;
  5523. }
  5524. }, {
  5525. key: "getPointOnLine",
  5526. value: function getPointOnLine(dist, P1x, P1y, P2x, P2y) {
  5527. var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : P1x;
  5528. var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : P1y;
  5529. var m = (P2y - P1y) / (P2x - P1x + PSEUDO_ZERO);
  5530. var run = Math.sqrt(dist * dist / (1 + m * m));
  5531. if (P2x < P1x) {
  5532. run *= -1;
  5533. }
  5534. var rise = m * run;
  5535. var pt = null;
  5536. if (P2x === P1x) {
  5537. // vertical line
  5538. pt = {
  5539. x: fromX,
  5540. y: fromY + rise
  5541. };
  5542. } else if ((fromY - P1y) / (fromX - P1x + PSEUDO_ZERO) === m) {
  5543. pt = {
  5544. x: fromX + run,
  5545. y: fromY + rise
  5546. };
  5547. } else {
  5548. var ix = 0;
  5549. var iy = 0;
  5550. var len = this.getLineLength(P1x, P1y, P2x, P2y);
  5551. if (len < PSEUDO_ZERO) {
  5552. return null;
  5553. }
  5554. var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);
  5555. u = u / (len * len);
  5556. ix = P1x + u * (P2x - P1x);
  5557. iy = P1y + u * (P2y - P1y);
  5558. var pRise = this.getLineLength(fromX, fromY, ix, iy);
  5559. var pRun = Math.sqrt(dist * dist - pRise * pRise);
  5560. run = Math.sqrt(pRun * pRun / (1 + m * m));
  5561. if (P2x < P1x) {
  5562. run *= -1;
  5563. }
  5564. rise = m * run;
  5565. pt = {
  5566. x: ix + run,
  5567. y: iy + rise
  5568. };
  5569. }
  5570. return pt;
  5571. }
  5572. }, {
  5573. key: "getPointOnPath",
  5574. value: function getPointOnPath(distance) {
  5575. var fullLen = this.getPathLength();
  5576. var cumulativePathLength = 0;
  5577. var p = null;
  5578. if (distance < -0.00005 || distance - 0.00005 > fullLen) {
  5579. return null;
  5580. }
  5581. var dataArray = this.dataArray;
  5582. var _iterator = _createForOfIteratorHelper$1(dataArray),
  5583. _step;
  5584. try {
  5585. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  5586. var pathCmd = _step.value;
  5587. if (pathCmd && (pathCmd.pathLength < 0.00005 || cumulativePathLength + pathCmd.pathLength + 0.00005 < distance)) {
  5588. cumulativePathLength += pathCmd.pathLength;
  5589. continue;
  5590. }
  5591. var delta = distance - cumulativePathLength;
  5592. var currentT = 0;
  5593. switch (pathCmd.command) {
  5594. case 'L':
  5595. p = this.getPointOnLine(delta, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.start.x, pathCmd.start.y);
  5596. break;
  5597. case 'A':
  5598. var start = pathCmd.points[4]; // 4 = theta
  5599. var dTheta = pathCmd.points[5]; // 5 = dTheta
  5600. var end = pathCmd.points[4] + dTheta;
  5601. currentT = start + delta / pathCmd.pathLength * dTheta;
  5602. if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
  5603. break;
  5604. }
  5605. p = this.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);
  5606. break;
  5607. case 'C':
  5608. currentT = delta / pathCmd.pathLength;
  5609. if (currentT > 1) {
  5610. currentT = 1;
  5611. }
  5612. 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]);
  5613. break;
  5614. case 'Q':
  5615. currentT = delta / pathCmd.pathLength;
  5616. if (currentT > 1) {
  5617. currentT = 1;
  5618. }
  5619. p = this.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);
  5620. break;
  5621. default:
  5622. }
  5623. if (p) {
  5624. return p;
  5625. }
  5626. break;
  5627. }
  5628. } catch (err) {
  5629. _iterator.e(err);
  5630. } finally {
  5631. _iterator.f();
  5632. }
  5633. return null;
  5634. }
  5635. }, {
  5636. key: "getLineLength",
  5637. value: function getLineLength(x1, y1, x2, y2) {
  5638. return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  5639. }
  5640. }, {
  5641. key: "getPathLength",
  5642. value: function getPathLength() {
  5643. if (this.pathLength === -1) {
  5644. this.pathLength = this.dataArray.reduce(function (length, command) {
  5645. return command.pathLength > 0 ? length + command.pathLength : length;
  5646. }, 0);
  5647. }
  5648. return this.pathLength;
  5649. }
  5650. }, {
  5651. key: "getPointOnCubicBezier",
  5652. value: function getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {
  5653. var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);
  5654. var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);
  5655. return {
  5656. x: x,
  5657. y: y
  5658. };
  5659. }
  5660. }, {
  5661. key: "getPointOnQuadraticBezier",
  5662. value: function getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {
  5663. var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);
  5664. var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);
  5665. return {
  5666. x: x,
  5667. y: y
  5668. };
  5669. }
  5670. }, {
  5671. key: "getPointOnEllipticalArc",
  5672. value: function getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
  5673. var cosPsi = Math.cos(psi);
  5674. var sinPsi = Math.sin(psi);
  5675. var pt = {
  5676. x: rx * Math.cos(theta),
  5677. y: ry * Math.sin(theta)
  5678. };
  5679. return {
  5680. x: cx + (pt.x * cosPsi - pt.y * sinPsi),
  5681. y: cy + (pt.x * sinPsi + pt.y * cosPsi)
  5682. };
  5683. } // TODO need some optimisations. possibly build cache only for curved segments?
  5684. }, {
  5685. key: "buildEquidistantCache",
  5686. value: function buildEquidistantCache(inputStep, inputPrecision) {
  5687. var fullLen = this.getPathLength();
  5688. var precision = inputPrecision || 0.25; // accuracy vs performance
  5689. var step = inputStep || fullLen / 100;
  5690. if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
  5691. // Prepare cache
  5692. this.equidistantCache = {
  5693. step: step,
  5694. precision: precision,
  5695. points: []
  5696. }; // Calculate points
  5697. var s = 0;
  5698. for (var l = 0; l <= fullLen; l += precision) {
  5699. var p0 = this.getPointOnPath(l);
  5700. var p1 = this.getPointOnPath(l + precision);
  5701. if (!p0 || !p1) {
  5702. continue;
  5703. }
  5704. s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
  5705. if (s >= step) {
  5706. this.equidistantCache.points.push({
  5707. x: p0.x,
  5708. y: p0.y,
  5709. distance: l
  5710. });
  5711. s -= step;
  5712. }
  5713. }
  5714. }
  5715. }
  5716. }, {
  5717. key: "getEquidistantPointOnPath",
  5718. value: function getEquidistantPointOnPath(targetDistance, step, precision) {
  5719. this.buildEquidistantCache(step, precision);
  5720. if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
  5721. return null;
  5722. }
  5723. var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
  5724. return this.equidistantCache.points[idx] || null;
  5725. }
  5726. }]);
  5727. return TextPathElement;
  5728. }(TextElement);
  5729. 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); }; }
  5730. 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; } }
  5731. var ImageElement = /*#__PURE__*/function (_RenderedElement) {
  5732. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ImageElement, _RenderedElement);
  5733. var _super = _createSuper$y(ImageElement);
  5734. function ImageElement(document, node, captureTextNodes) {
  5735. var _this;
  5736. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ImageElement);
  5737. _this = _super.call(this, document, node, captureTextNodes);
  5738. _this.type = 'image';
  5739. _this.loaded = false;
  5740. var href = _this.getHrefAttribute().getString();
  5741. if (!href) {
  5742. return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(_this);
  5743. }
  5744. var isSvg = /\.svg$/.test(href);
  5745. document.images.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
  5746. if (!isSvg) {
  5747. _this.loadImage(href);
  5748. } else {
  5749. _this.loadSvg(href);
  5750. }
  5751. _this.isSvg = isSvg;
  5752. return _this;
  5753. }
  5754. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ImageElement, [{
  5755. key: "loadImage",
  5756. value: function () {
  5757. 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) {
  5758. var image;
  5759. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  5760. while (1) {
  5761. switch (_context.prev = _context.next) {
  5762. case 0:
  5763. _context.prev = 0;
  5764. _context.next = 3;
  5765. return this.document.createImage(href);
  5766. case 3:
  5767. image = _context.sent;
  5768. this.image = image;
  5769. _context.next = 10;
  5770. break;
  5771. case 7:
  5772. _context.prev = 7;
  5773. _context.t0 = _context["catch"](0);
  5774. // tslint:disable-next-line: no-console
  5775. console.error("Error while loading image \"".concat(href, "\":"), _context.t0);
  5776. case 10:
  5777. this.loaded = true;
  5778. case 11:
  5779. case "end":
  5780. return _context.stop();
  5781. }
  5782. }
  5783. }, _callee, this, [[0, 7]]);
  5784. }));
  5785. function loadImage(_x) {
  5786. return _loadImage.apply(this, arguments);
  5787. }
  5788. return loadImage;
  5789. }()
  5790. }, {
  5791. key: "loadSvg",
  5792. value: function () {
  5793. 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) {
  5794. var response, svg;
  5795. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  5796. while (1) {
  5797. switch (_context2.prev = _context2.next) {
  5798. case 0:
  5799. _context2.prev = 0;
  5800. _context2.next = 3;
  5801. return this.document.fetch(href);
  5802. case 3:
  5803. response = _context2.sent;
  5804. _context2.next = 6;
  5805. return response.text();
  5806. case 6:
  5807. svg = _context2.sent;
  5808. this.image = svg;
  5809. _context2.next = 13;
  5810. break;
  5811. case 10:
  5812. _context2.prev = 10;
  5813. _context2.t0 = _context2["catch"](0);
  5814. // tslint:disable-next-line: no-console
  5815. console.error("Error while loading image \"".concat(href, "\":"), _context2.t0);
  5816. case 13:
  5817. this.loaded = true;
  5818. case 14:
  5819. case "end":
  5820. return _context2.stop();
  5821. }
  5822. }
  5823. }, _callee2, this, [[0, 10]]);
  5824. }));
  5825. function loadSvg(_x2) {
  5826. return _loadSvg.apply(this, arguments);
  5827. }
  5828. return loadSvg;
  5829. }()
  5830. }, {
  5831. key: "renderChildren",
  5832. value: function renderChildren(ctx) {
  5833. var document = this.document,
  5834. image = this.image,
  5835. loaded = this.loaded;
  5836. var x = this.getAttribute('x').getPixels('x');
  5837. var y = this.getAttribute('y').getPixels('y');
  5838. var width = this.getStyle('width').getPixels('x');
  5839. var height = this.getStyle('height').getPixels('y');
  5840. if (!loaded || !image || !width || !height) {
  5841. return;
  5842. }
  5843. ctx.save();
  5844. if (this.isSvg) {
  5845. document.canvg.forkString(ctx, this.image, {
  5846. ignoreMouse: true,
  5847. ignoreAnimation: true,
  5848. ignoreDimensions: true,
  5849. ignoreClear: true,
  5850. offsetX: x,
  5851. offsetY: y,
  5852. scaleWidth: width,
  5853. scaleHeight: height
  5854. }).render();
  5855. } else {
  5856. var _image = this.image;
  5857. ctx.translate(x, y);
  5858. document.setViewBox({
  5859. ctx: ctx,
  5860. aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
  5861. width: width,
  5862. desiredWidth: _image.width,
  5863. height: height,
  5864. desiredHeight: _image.height
  5865. });
  5866. if (this.loaded) {
  5867. if (typeof _image.complete === 'undefined' || _image.complete) {
  5868. ctx.drawImage(_image, 0, 0);
  5869. }
  5870. }
  5871. }
  5872. ctx.restore();
  5873. }
  5874. }, {
  5875. key: "getBoundingBox",
  5876. value: function getBoundingBox() {
  5877. var x = this.getAttribute('x').getPixels('x');
  5878. var y = this.getAttribute('y').getPixels('y');
  5879. var width = this.getStyle('width').getPixels('x');
  5880. var height = this.getStyle('height').getPixels('y');
  5881. return new BoundingBox(x, y, x + width, y + height);
  5882. }
  5883. }]);
  5884. return ImageElement;
  5885. }(RenderedElement);
  5886. 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); }; }
  5887. 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; } }
  5888. var SymbolElement = /*#__PURE__*/function (_RenderedElement) {
  5889. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SymbolElement, _RenderedElement);
  5890. var _super = _createSuper$z(SymbolElement);
  5891. function SymbolElement() {
  5892. var _this;
  5893. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SymbolElement);
  5894. _this = _super.apply(this, arguments);
  5895. _this.type = 'symbol';
  5896. return _this;
  5897. }
  5898. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SymbolElement, [{
  5899. key: "render",
  5900. value: function render(_) {// NO RENDER
  5901. }
  5902. }]);
  5903. return SymbolElement;
  5904. }(RenderedElement);
  5905. var SVGFontLoader = /*#__PURE__*/function () {
  5906. function SVGFontLoader(document) {
  5907. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGFontLoader);
  5908. this.document = document;
  5909. this.loaded = false;
  5910. document.fonts.push(this);
  5911. }
  5912. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGFontLoader, [{
  5913. key: "load",
  5914. value: function () {
  5915. 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) {
  5916. var document, svgDocument, fonts;
  5917. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  5918. while (1) {
  5919. switch (_context.prev = _context.next) {
  5920. case 0:
  5921. _context.prev = 0;
  5922. document = this.document;
  5923. _context.next = 4;
  5924. return document.canvg.parser.load(url);
  5925. case 4:
  5926. svgDocument = _context.sent;
  5927. fonts = svgDocument.getElementsByTagName('font');
  5928. Array.from(fonts).forEach(function (fontNode) {
  5929. var font = document.createElement(fontNode);
  5930. document.definitions[fontFamily] = font;
  5931. });
  5932. _context.next = 12;
  5933. break;
  5934. case 9:
  5935. _context.prev = 9;
  5936. _context.t0 = _context["catch"](0);
  5937. // tslint:disable-next-line: no-console
  5938. console.error("Error while loading font \"".concat(url, "\":"), _context.t0);
  5939. case 12:
  5940. this.loaded = true;
  5941. case 13:
  5942. case "end":
  5943. return _context.stop();
  5944. }
  5945. }
  5946. }, _callee, this, [[0, 9]]);
  5947. }));
  5948. function load(_x, _x2) {
  5949. return _load.apply(this, arguments);
  5950. }
  5951. return load;
  5952. }()
  5953. }]);
  5954. return SVGFontLoader;
  5955. }();
  5956. 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); }; }
  5957. 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; } }
  5958. var StyleElement = /*#__PURE__*/function (_Element) {
  5959. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StyleElement, _Element);
  5960. var _super = _createSuper$A(StyleElement);
  5961. function StyleElement(document, node, captureTextNodes) {
  5962. var _this;
  5963. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StyleElement);
  5964. _this = _super.call(this, document, node, captureTextNodes);
  5965. _this.type = 'style';
  5966. var css = compressSpaces(Array.from(node.childNodes).map(function (_) {
  5967. return _.data;
  5968. }).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
  5969. .replace(/@import.*;/g, '') // remove imports
  5970. );
  5971. var cssDefs = css.split('}');
  5972. cssDefs.forEach(function (_) {
  5973. var def = _.trim();
  5974. if (!def) {
  5975. return;
  5976. }
  5977. var cssParts = def.split('{');
  5978. var cssClasses = cssParts[0].split(',');
  5979. var cssProps = cssParts[1].split(';');
  5980. cssClasses.forEach(function (_) {
  5981. var cssClass = _.trim();
  5982. if (!cssClass) {
  5983. return;
  5984. }
  5985. var props = document.styles[cssClass] || {};
  5986. cssProps.forEach(function (cssProp) {
  5987. var prop = cssProp.indexOf(':');
  5988. var name = cssProp.substr(0, prop).trim();
  5989. var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
  5990. if (name && value) {
  5991. props[name] = new Property(document, name, value);
  5992. }
  5993. });
  5994. document.styles[cssClass] = props;
  5995. document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
  5996. if (cssClass === '@font-face') {
  5997. // && !nodeEnv
  5998. var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
  5999. var srcs = props.src.getString().split(',');
  6000. srcs.forEach(function (src) {
  6001. if (src.indexOf('format("svg")') > 0) {
  6002. var url = parseExternalUrl(src);
  6003. if (url) {
  6004. new SVGFontLoader(document).load(fontFamily, url);
  6005. }
  6006. }
  6007. });
  6008. }
  6009. });
  6010. });
  6011. return _this;
  6012. }
  6013. return StyleElement;
  6014. }(Element);
  6015. StyleElement.parseExternalUrl = parseExternalUrl;
  6016. 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); }; }
  6017. 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; } }
  6018. var UseElement = /*#__PURE__*/function (_RenderedElement) {
  6019. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UseElement, _RenderedElement);
  6020. var _super = _createSuper$B(UseElement);
  6021. function UseElement() {
  6022. var _this;
  6023. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UseElement);
  6024. _this = _super.apply(this, arguments);
  6025. _this.type = 'use';
  6026. return _this;
  6027. }
  6028. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(UseElement, [{
  6029. key: "setContext",
  6030. value: function setContext(ctx) {
  6031. (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);
  6032. var xAttr = this.getAttribute('x');
  6033. var yAttr = this.getAttribute('y');
  6034. if (xAttr.hasValue()) {
  6035. ctx.translate(xAttr.getPixels('x'), 0);
  6036. }
  6037. if (yAttr.hasValue()) {
  6038. ctx.translate(0, yAttr.getPixels('y'));
  6039. }
  6040. }
  6041. }, {
  6042. key: "path",
  6043. value: function path(ctx) {
  6044. var element = this.element;
  6045. if (element) {
  6046. element.path(ctx);
  6047. }
  6048. }
  6049. }, {
  6050. key: "renderChildren",
  6051. value: function renderChildren(ctx) {
  6052. var document = this.document,
  6053. element = this.element;
  6054. if (element) {
  6055. var tempSvg = element;
  6056. if (element.type === 'symbol') {
  6057. // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
  6058. tempSvg = new SVGElement(document, null);
  6059. tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
  6060. tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
  6061. tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
  6062. tempSvg.children = element.children;
  6063. }
  6064. if (tempSvg.type === 'svg') {
  6065. var widthStyle = this.getStyle('width', false, true);
  6066. var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
  6067. if (widthStyle.hasValue()) {
  6068. tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
  6069. }
  6070. if (heightStyle.hasValue()) {
  6071. tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
  6072. }
  6073. }
  6074. var oldParent = tempSvg.parent;
  6075. tempSvg.parent = this;
  6076. tempSvg.render(ctx);
  6077. tempSvg.parent = oldParent;
  6078. }
  6079. }
  6080. }, {
  6081. key: "getBoundingBox",
  6082. value: function getBoundingBox(ctx) {
  6083. var element = this.element;
  6084. if (element) {
  6085. return element.getBoundingBox(ctx);
  6086. }
  6087. return null;
  6088. }
  6089. }, {
  6090. key: "elementTransform",
  6091. value: function elementTransform() {
  6092. var document = this.document,
  6093. element = this.element;
  6094. return Transform.fromElement(document, element);
  6095. }
  6096. }, {
  6097. key: "element",
  6098. get: function get() {
  6099. if (!this._element) {
  6100. this._element = this.getHrefAttribute().getDefinition();
  6101. }
  6102. return this._element;
  6103. }
  6104. }]);
  6105. return UseElement;
  6106. }(RenderedElement);
  6107. 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); }; }
  6108. 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; } }
  6109. function imGet(img, x, y, width, _, rgba) {
  6110. return img[y * width * 4 + x * 4 + rgba];
  6111. }
  6112. function imSet(img, x, y, width, _, rgba, val) {
  6113. img[y * width * 4 + x * 4 + rgba] = val;
  6114. }
  6115. function m(matrix, i, v) {
  6116. var mi = matrix[i];
  6117. return mi * (mi < 0 ? v - 255 : v);
  6118. }
  6119. function c(a, m1, m2, m3) {
  6120. return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
  6121. }
  6122. var FeColorMatrixElement = /*#__PURE__*/function (_Element) {
  6123. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeColorMatrixElement, _Element);
  6124. var _super = _createSuper$C(FeColorMatrixElement);
  6125. function FeColorMatrixElement(document, node, captureTextNodes) {
  6126. var _this;
  6127. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeColorMatrixElement);
  6128. _this = _super.call(this, document, node, captureTextNodes);
  6129. _this.type = 'feColorMatrix';
  6130. var matrix = toNumbers(_this.getAttribute('values').getString());
  6131. switch (_this.getAttribute('type').getString('matrix')) {
  6132. // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
  6133. case 'saturate':
  6134. {
  6135. var s = matrix[0];
  6136. 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];
  6137. break;
  6138. }
  6139. case 'hueRotate':
  6140. {
  6141. var a = matrix[0] * Math.PI / 180.0;
  6142. 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];
  6143. break;
  6144. }
  6145. case 'luminanceToAlpha':
  6146. 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];
  6147. break;
  6148. }
  6149. _this.matrix = matrix;
  6150. _this.includeOpacity = _this.getAttribute('includeOpacity').hasValue();
  6151. return _this;
  6152. }
  6153. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeColorMatrixElement, [{
  6154. key: "apply",
  6155. value: function apply(ctx, _, __, width, height) {
  6156. // assuming x==0 && y==0 for now
  6157. var includeOpacity = this.includeOpacity,
  6158. matrix = this.matrix;
  6159. var srcData = ctx.getImageData(0, 0, width, height);
  6160. for (var y = 0; y < height; y++) {
  6161. for (var x = 0; x < width; x++) {
  6162. var r = imGet(srcData.data, x, y, width, height, 0);
  6163. var g = imGet(srcData.data, x, y, width, height, 1);
  6164. var b = imGet(srcData.data, x, y, width, height, 2);
  6165. var a = imGet(srcData.data, x, y, width, height, 3);
  6166. var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
  6167. var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
  6168. var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
  6169. var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
  6170. if (includeOpacity) {
  6171. nr = ng = nb = 0;
  6172. na *= a / 255;
  6173. }
  6174. imSet(srcData.data, x, y, width, height, 0, nr);
  6175. imSet(srcData.data, x, y, width, height, 1, ng);
  6176. imSet(srcData.data, x, y, width, height, 2, nb);
  6177. imSet(srcData.data, x, y, width, height, 3, na);
  6178. }
  6179. }
  6180. ctx.clearRect(0, 0, width, height);
  6181. ctx.putImageData(srcData, 0, 0);
  6182. }
  6183. }]);
  6184. return FeColorMatrixElement;
  6185. }(Element);
  6186. 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); }; }
  6187. 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; } }
  6188. var MaskElement = /*#__PURE__*/function (_Element) {
  6189. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MaskElement, _Element);
  6190. var _super = _createSuper$D(MaskElement);
  6191. function MaskElement() {
  6192. var _this;
  6193. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MaskElement);
  6194. _this = _super.apply(this, arguments);
  6195. _this.type = 'mask';
  6196. return _this;
  6197. }
  6198. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MaskElement, [{
  6199. key: "apply",
  6200. value: function apply(ctx, element) {
  6201. var document = this.document; // render as temp svg
  6202. var x = this.getAttribute('x').getPixels('x');
  6203. var y = this.getAttribute('y').getPixels('y');
  6204. var width = this.getStyle('width').getPixels('x');
  6205. var height = this.getStyle('height').getPixels('y');
  6206. if (!width && !height) {
  6207. var boundingBox = new BoundingBox();
  6208. this.children.forEach(function (child) {
  6209. boundingBox.addBoundingBox(child.getBoundingBox(ctx));
  6210. });
  6211. x = Math.floor(boundingBox.x1);
  6212. y = Math.floor(boundingBox.y1);
  6213. width = Math.floor(boundingBox.width);
  6214. height = Math.floor(boundingBox.height);
  6215. }
  6216. var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
  6217. var maskCanvas = document.createCanvas(x + width, y + height);
  6218. var maskCtx = maskCanvas.getContext('2d');
  6219. document.screen.setDefaults(maskCtx);
  6220. this.renderChildren(maskCtx); // convert mask to alpha with a fake node
  6221. // TODO: refactor out apply from feColorMatrix
  6222. new FeColorMatrixElement(document, {
  6223. nodeType: 1,
  6224. childNodes: [],
  6225. attributes: [{
  6226. nodeName: 'type',
  6227. value: 'luminanceToAlpha'
  6228. }, {
  6229. nodeName: 'includeOpacity',
  6230. value: 'true'
  6231. }]
  6232. }).apply(maskCtx, 0, 0, x + width, y + height);
  6233. var tmpCanvas = document.createCanvas(x + width, y + height);
  6234. var tmpCtx = tmpCanvas.getContext('2d');
  6235. document.screen.setDefaults(tmpCtx);
  6236. element.render(tmpCtx);
  6237. tmpCtx.globalCompositeOperation = 'destination-in';
  6238. tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
  6239. tmpCtx.fillRect(0, 0, x + width, y + height);
  6240. ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
  6241. ctx.fillRect(0, 0, x + width, y + height); // reassign mask
  6242. this.restoreStyles(element, ignoredStyles);
  6243. }
  6244. }, {
  6245. key: "render",
  6246. value: function render(_) {// NO RENDER
  6247. }
  6248. }]);
  6249. return MaskElement;
  6250. }(Element);
  6251. MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
  6252. 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); }; }
  6253. 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; } }
  6254. var noop = function noop() {};
  6255. var ClipPathElement = /*#__PURE__*/function (_Element) {
  6256. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ClipPathElement, _Element);
  6257. var _super = _createSuper$E(ClipPathElement);
  6258. function ClipPathElement() {
  6259. var _this;
  6260. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ClipPathElement);
  6261. _this = _super.apply(this, arguments);
  6262. _this.type = 'clipPath';
  6263. return _this;
  6264. }
  6265. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ClipPathElement, [{
  6266. key: "apply",
  6267. value: function apply(ctx) {
  6268. var document = this.document;
  6269. var contextProto = Reflect.getPrototypeOf(ctx);
  6270. var beginPath = ctx.beginPath,
  6271. closePath = ctx.closePath;
  6272. if (contextProto) {
  6273. contextProto.beginPath = noop;
  6274. contextProto.closePath = noop;
  6275. }
  6276. Reflect.apply(beginPath, ctx, []);
  6277. this.children.forEach(function (child) {
  6278. if (typeof child.path === 'undefined') {
  6279. return;
  6280. }
  6281. var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
  6282. if (!transform) {
  6283. transform = Transform.fromElement(document, child);
  6284. }
  6285. if (transform) {
  6286. transform.apply(ctx);
  6287. }
  6288. child.path(ctx);
  6289. if (contextProto) {
  6290. contextProto.closePath = closePath;
  6291. }
  6292. if (transform) {
  6293. transform.unapply(ctx);
  6294. }
  6295. });
  6296. Reflect.apply(closePath, ctx, []);
  6297. ctx.clip();
  6298. if (contextProto) {
  6299. contextProto.beginPath = beginPath;
  6300. contextProto.closePath = closePath;
  6301. }
  6302. }
  6303. }, {
  6304. key: "render",
  6305. value: function render(_) {// NO RENDER
  6306. }
  6307. }]);
  6308. return ClipPathElement;
  6309. }(Element);
  6310. 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); }; }
  6311. 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; } }
  6312. var FilterElement = /*#__PURE__*/function (_Element) {
  6313. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FilterElement, _Element);
  6314. var _super = _createSuper$F(FilterElement);
  6315. function FilterElement() {
  6316. var _this;
  6317. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FilterElement);
  6318. _this = _super.apply(this, arguments);
  6319. _this.type = 'filter';
  6320. return _this;
  6321. }
  6322. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FilterElement, [{
  6323. key: "apply",
  6324. value: function apply(ctx, element) {
  6325. // render as temp svg
  6326. var document = this.document,
  6327. children = this.children;
  6328. var boundingBox = element.getBoundingBox(ctx);
  6329. if (!boundingBox) {
  6330. return;
  6331. }
  6332. var px = 0;
  6333. var py = 0;
  6334. children.forEach(function (child) {
  6335. var efd = child.extraFilterDistance || 0;
  6336. px = Math.max(px, efd);
  6337. py = Math.max(py, efd);
  6338. });
  6339. var width = Math.floor(boundingBox.width);
  6340. var height = Math.floor(boundingBox.height);
  6341. var tmpCanvasWidth = width + 2 * px;
  6342. var tmpCanvasHeight = height + 2 * py;
  6343. if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
  6344. return;
  6345. }
  6346. var x = Math.floor(boundingBox.x);
  6347. var y = Math.floor(boundingBox.y);
  6348. var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
  6349. var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
  6350. var tmpCtx = tmpCanvas.getContext('2d');
  6351. document.screen.setDefaults(tmpCtx);
  6352. tmpCtx.translate(-x + px, -y + py);
  6353. element.render(tmpCtx); // apply filters
  6354. children.forEach(function (child) {
  6355. if (typeof child.apply === 'function') {
  6356. child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
  6357. }
  6358. }); // render on me
  6359. ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
  6360. this.restoreStyles(element, ignoredStyles);
  6361. }
  6362. }, {
  6363. key: "render",
  6364. value: function render(_) {// NO RENDER
  6365. }
  6366. }]);
  6367. return FilterElement;
  6368. }(Element);
  6369. FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
  6370. 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); }; }
  6371. 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; } }
  6372. var FeDropShadowElement = /*#__PURE__*/function (_Element) {
  6373. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeDropShadowElement, _Element);
  6374. var _super = _createSuper$G(FeDropShadowElement);
  6375. function FeDropShadowElement(document, node, captureTextNodes) {
  6376. var _this;
  6377. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeDropShadowElement);
  6378. _this = _super.call(this, document, node, captureTextNodes);
  6379. _this.type = 'feDropShadow';
  6380. _this.addStylesFromStyleDefinition();
  6381. return _this;
  6382. }
  6383. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeDropShadowElement, [{
  6384. key: "apply",
  6385. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6386. }
  6387. }]);
  6388. return FeDropShadowElement;
  6389. }(Element);
  6390. 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); }; }
  6391. 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; } }
  6392. var FeMorphologyElement = /*#__PURE__*/function (_Element) {
  6393. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeMorphologyElement, _Element);
  6394. var _super = _createSuper$H(FeMorphologyElement);
  6395. function FeMorphologyElement() {
  6396. var _this;
  6397. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeMorphologyElement);
  6398. _this = _super.apply(this, arguments);
  6399. _this.type = 'feMorphology';
  6400. return _this;
  6401. }
  6402. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeMorphologyElement, [{
  6403. key: "apply",
  6404. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6405. }
  6406. }]);
  6407. return FeMorphologyElement;
  6408. }(Element);
  6409. 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); }; }
  6410. 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; } }
  6411. var FeCompositeElement = /*#__PURE__*/function (_Element) {
  6412. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeCompositeElement, _Element);
  6413. var _super = _createSuper$I(FeCompositeElement);
  6414. function FeCompositeElement() {
  6415. var _this;
  6416. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeCompositeElement);
  6417. _this = _super.apply(this, arguments);
  6418. _this.type = 'feComposite';
  6419. return _this;
  6420. }
  6421. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeCompositeElement, [{
  6422. key: "apply",
  6423. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6424. }
  6425. }]);
  6426. return FeCompositeElement;
  6427. }(Element);
  6428. 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); }; }
  6429. 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; } }
  6430. var FeGaussianBlurElement = /*#__PURE__*/function (_Element) {
  6431. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeGaussianBlurElement, _Element);
  6432. var _super = _createSuper$J(FeGaussianBlurElement);
  6433. function FeGaussianBlurElement(document, node, captureTextNodes) {
  6434. var _this;
  6435. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeGaussianBlurElement);
  6436. _this = _super.call(this, document, node, captureTextNodes);
  6437. _this.type = 'feGaussianBlur';
  6438. _this.blurRadius = Math.floor(_this.getAttribute('stdDeviation').getNumber());
  6439. _this.extraFilterDistance = _this.blurRadius;
  6440. return _this;
  6441. }
  6442. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeGaussianBlurElement, [{
  6443. key: "apply",
  6444. value: function apply(ctx, x, y, width, height) {
  6445. var document = this.document,
  6446. blurRadius = this.blurRadius;
  6447. var body = document.window ? document.window.document.body : null;
  6448. var canvas = ctx.canvas; // StackBlur requires canvas be on document
  6449. canvas.id = document.getUniqueId();
  6450. if (body) {
  6451. canvas.style.display = 'none';
  6452. body.appendChild(canvas);
  6453. }
  6454. (0,stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__.canvasRGBA)(canvas, x, y, width, height, blurRadius);
  6455. if (body) {
  6456. body.removeChild(canvas);
  6457. }
  6458. }
  6459. }]);
  6460. return FeGaussianBlurElement;
  6461. }(Element);
  6462. 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); }; }
  6463. 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; } }
  6464. var TitleElement = /*#__PURE__*/function (_Element) {
  6465. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TitleElement, _Element);
  6466. var _super = _createSuper$K(TitleElement);
  6467. function TitleElement() {
  6468. var _this;
  6469. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TitleElement);
  6470. _this = _super.apply(this, arguments);
  6471. _this.type = 'title';
  6472. return _this;
  6473. }
  6474. return TitleElement;
  6475. }(Element);
  6476. 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); }; }
  6477. 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; } }
  6478. var DescElement = /*#__PURE__*/function (_Element) {
  6479. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DescElement, _Element);
  6480. var _super = _createSuper$L(DescElement);
  6481. function DescElement() {
  6482. var _this;
  6483. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DescElement);
  6484. _this = _super.apply(this, arguments);
  6485. _this.type = 'desc';
  6486. return _this;
  6487. }
  6488. return DescElement;
  6489. }(Element);
  6490. var elementTypes = {
  6491. 'svg': SVGElement,
  6492. 'rect': RectElement,
  6493. 'circle': CircleElement,
  6494. 'ellipse': EllipseElement,
  6495. 'line': LineElement,
  6496. 'polyline': PolylineElement,
  6497. 'polygon': PolygonElement,
  6498. 'path': PathElement,
  6499. 'pattern': PatternElement,
  6500. 'marker': MarkerElement,
  6501. 'defs': DefsElement,
  6502. 'linearGradient': LinearGradientElement,
  6503. 'radialGradient': RadialGradientElement,
  6504. 'stop': StopElement,
  6505. 'animate': AnimateElement,
  6506. 'animateColor': AnimateColorElement,
  6507. 'animateTransform': AnimateTransformElement,
  6508. 'font': FontElement,
  6509. 'font-face': FontFaceElement,
  6510. 'missing-glyph': MissingGlyphElement,
  6511. 'glyph': GlyphElement,
  6512. 'text': TextElement,
  6513. 'tspan': TSpanElement,
  6514. 'tref': TRefElement,
  6515. 'a': AElement,
  6516. 'textPath': TextPathElement,
  6517. 'image': ImageElement,
  6518. 'g': GElement,
  6519. 'symbol': SymbolElement,
  6520. 'style': StyleElement,
  6521. 'use': UseElement,
  6522. 'mask': MaskElement,
  6523. 'clipPath': ClipPathElement,
  6524. 'filter': FilterElement,
  6525. 'feDropShadow': FeDropShadowElement,
  6526. 'feMorphology': FeMorphologyElement,
  6527. 'feComposite': FeCompositeElement,
  6528. 'feColorMatrix': FeColorMatrixElement,
  6529. 'feGaussianBlur': FeGaussianBlurElement,
  6530. 'title': TitleElement,
  6531. 'desc': DescElement
  6532. };
  6533. 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; }
  6534. 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; }
  6535. function createCanvas(width, height) {
  6536. var canvas = document.createElement('canvas');
  6537. canvas.width = width;
  6538. canvas.height = height;
  6539. return canvas;
  6540. }
  6541. function createImage(_x) {
  6542. return _createImage.apply(this, arguments);
  6543. }
  6544. function _createImage() {
  6545. _createImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(src) {
  6546. var anonymousCrossOrigin,
  6547. image,
  6548. _args = arguments;
  6549. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6550. while (1) {
  6551. switch (_context.prev = _context.next) {
  6552. case 0:
  6553. anonymousCrossOrigin = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
  6554. image = document.createElement('img');
  6555. if (anonymousCrossOrigin) {
  6556. image.crossOrigin = 'Anonymous';
  6557. }
  6558. return _context.abrupt("return", new Promise(function (resolve, reject) {
  6559. image.onload = function () {
  6560. resolve(image);
  6561. };
  6562. image.onerror = function () {
  6563. reject();
  6564. };
  6565. image.src = src;
  6566. }));
  6567. case 4:
  6568. case "end":
  6569. return _context.stop();
  6570. }
  6571. }
  6572. }, _callee);
  6573. }));
  6574. return _createImage.apply(this, arguments);
  6575. }
  6576. var Document = /*#__PURE__*/function () {
  6577. function Document(canvg) {
  6578. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  6579. _ref$rootEmSize = _ref.rootEmSize,
  6580. rootEmSize = _ref$rootEmSize === void 0 ? 12 : _ref$rootEmSize,
  6581. _ref$emSize = _ref.emSize,
  6582. emSize = _ref$emSize === void 0 ? 12 : _ref$emSize,
  6583. _ref$createCanvas = _ref.createCanvas,
  6584. createCanvas = _ref$createCanvas === void 0 ? Document.createCanvas : _ref$createCanvas,
  6585. _ref$createImage = _ref.createImage,
  6586. createImage = _ref$createImage === void 0 ? Document.createImage : _ref$createImage,
  6587. anonymousCrossOrigin = _ref.anonymousCrossOrigin;
  6588. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Document);
  6589. this.canvg = canvg;
  6590. this.definitions = {};
  6591. this.styles = {};
  6592. this.stylesSpecificity = {};
  6593. this.images = [];
  6594. this.fonts = [];
  6595. this.emSizeStack = [];
  6596. this.uniqueId = 0;
  6597. this.screen = canvg.screen;
  6598. this.rootEmSize = rootEmSize;
  6599. this.emSize = emSize;
  6600. this.createCanvas = createCanvas;
  6601. this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
  6602. this.screen.wait(this.isImagesLoaded.bind(this));
  6603. this.screen.wait(this.isFontsLoaded.bind(this));
  6604. }
  6605. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Document, [{
  6606. key: "bindCreateImage",
  6607. value: function bindCreateImage(createImage, anonymousCrossOrigin) {
  6608. if (typeof anonymousCrossOrigin === 'boolean') {
  6609. return function (source, forceAnonymousCrossOrigin) {
  6610. return createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
  6611. };
  6612. }
  6613. return createImage;
  6614. }
  6615. }, {
  6616. key: "popEmSize",
  6617. value: function popEmSize() {
  6618. var emSizeStack = this.emSizeStack;
  6619. emSizeStack.pop();
  6620. }
  6621. }, {
  6622. key: "getUniqueId",
  6623. value: function getUniqueId() {
  6624. return "canvg".concat(++this.uniqueId);
  6625. }
  6626. }, {
  6627. key: "isImagesLoaded",
  6628. value: function isImagesLoaded() {
  6629. return this.images.every(function (_) {
  6630. return _.loaded;
  6631. });
  6632. }
  6633. }, {
  6634. key: "isFontsLoaded",
  6635. value: function isFontsLoaded() {
  6636. return this.fonts.every(function (_) {
  6637. return _.loaded;
  6638. });
  6639. }
  6640. }, {
  6641. key: "createDocumentElement",
  6642. value: function createDocumentElement(document) {
  6643. var documentElement = this.createElement(document.documentElement);
  6644. documentElement.root = true;
  6645. documentElement.addStylesFromStyleDefinition();
  6646. this.documentElement = documentElement;
  6647. return documentElement;
  6648. }
  6649. }, {
  6650. key: "createElement",
  6651. value: function createElement(node) {
  6652. var elementType = node.nodeName.replace(/^[^:]+:/, '');
  6653. var ElementType = Document.elementTypes[elementType];
  6654. if (typeof ElementType !== 'undefined') {
  6655. return new ElementType(this, node);
  6656. }
  6657. return new UnknownElement(this, node);
  6658. }
  6659. }, {
  6660. key: "createTextNode",
  6661. value: function createTextNode(node) {
  6662. return new TextNode(this, node);
  6663. }
  6664. }, {
  6665. key: "setViewBox",
  6666. value: function setViewBox(config) {
  6667. this.screen.setViewBox(_objectSpread({
  6668. document: this
  6669. }, config));
  6670. }
  6671. }, {
  6672. key: "window",
  6673. get: function get() {
  6674. return this.screen.window;
  6675. }
  6676. }, {
  6677. key: "fetch",
  6678. get: function get() {
  6679. return this.screen.fetch;
  6680. }
  6681. }, {
  6682. key: "ctx",
  6683. get: function get() {
  6684. return this.screen.ctx;
  6685. }
  6686. }, {
  6687. key: "emSize",
  6688. get: function get() {
  6689. var emSizeStack = this.emSizeStack;
  6690. return emSizeStack[emSizeStack.length - 1];
  6691. },
  6692. set: function set(value) {
  6693. var emSizeStack = this.emSizeStack;
  6694. emSizeStack.push(value);
  6695. }
  6696. }]);
  6697. return Document;
  6698. }();
  6699. Document.createCanvas = createCanvas;
  6700. Document.createImage = createImage;
  6701. Document.elementTypes = elementTypes;
  6702. 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; }
  6703. 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; }
  6704. /**
  6705. * SVG renderer on canvas.
  6706. */
  6707. var Canvg = /*#__PURE__*/function () {
  6708. /**
  6709. * Main constructor.
  6710. * @param ctx - Rendering context.
  6711. * @param svg - SVG Document.
  6712. * @param options - Rendering options.
  6713. */
  6714. function Canvg(ctx, svg) {
  6715. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6716. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Canvg);
  6717. this.parser = new Parser(options);
  6718. this.screen = new Screen(ctx, options);
  6719. this.options = options;
  6720. var document = new Document(this, options);
  6721. var documentElement = document.createDocumentElement(svg);
  6722. this.document = document;
  6723. this.documentElement = documentElement;
  6724. }
  6725. /**
  6726. * Create Canvg isntance from SVG source string or URL.
  6727. * @param ctx - Rendering context.
  6728. * @param svg - SVG source string or URL.
  6729. * @param options - Rendering options.
  6730. */
  6731. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Canvg, [{
  6732. key: "fork",
  6733. /**
  6734. * Create new Canvg instance with inherited options.
  6735. * @param ctx - Rendering context.
  6736. * @param svg - SVG source string or URL.
  6737. * @param options - Rendering options.
  6738. */
  6739. value: function fork(ctx, svg) {
  6740. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6741. return Canvg.from(ctx, svg, _objectSpread$1({}, this.options, {}, options));
  6742. }
  6743. /**
  6744. * Create new Canvg instance with inherited options.
  6745. * @param ctx - Rendering context.
  6746. * @param svg - SVG source string.
  6747. * @param options - Rendering options.
  6748. */
  6749. }, {
  6750. key: "forkString",
  6751. value: function forkString(ctx, svg) {
  6752. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6753. return Canvg.fromString(ctx, svg, _objectSpread$1({}, this.options, {}, options));
  6754. }
  6755. /**
  6756. * Document is ready promise.
  6757. */
  6758. }, {
  6759. key: "ready",
  6760. value: function ready() {
  6761. return this.screen.ready();
  6762. }
  6763. /**
  6764. * Document is ready value.
  6765. */
  6766. }, {
  6767. key: "isReady",
  6768. value: function isReady() {
  6769. return this.screen.isReady();
  6770. }
  6771. /**
  6772. * Render only first frame, ignoring animations and mouse.
  6773. * @param options - Rendering options.
  6774. */
  6775. }, {
  6776. key: "render",
  6777. value: function () {
  6778. var _render = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
  6779. var options,
  6780. _args = arguments;
  6781. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6782. while (1) {
  6783. switch (_context.prev = _context.next) {
  6784. case 0:
  6785. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  6786. this.start(_objectSpread$1({
  6787. enableRedraw: true,
  6788. ignoreAnimation: true,
  6789. ignoreMouse: true
  6790. }, options));
  6791. _context.next = 4;
  6792. return this.ready();
  6793. case 4:
  6794. this.stop();
  6795. case 5:
  6796. case "end":
  6797. return _context.stop();
  6798. }
  6799. }
  6800. }, _callee, this);
  6801. }));
  6802. function render() {
  6803. return _render.apply(this, arguments);
  6804. }
  6805. return render;
  6806. }()
  6807. /**
  6808. * Start rendering.
  6809. * @param options - Render options.
  6810. */
  6811. }, {
  6812. key: "start",
  6813. value: function start() {
  6814. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  6815. var documentElement = this.documentElement,
  6816. screen = this.screen,
  6817. baseOptions = this.options;
  6818. screen.start(documentElement, _objectSpread$1({
  6819. enableRedraw: true
  6820. }, baseOptions, {}, options));
  6821. }
  6822. /**
  6823. * Stop rendering.
  6824. */
  6825. }, {
  6826. key: "stop",
  6827. value: function stop() {
  6828. this.screen.stop();
  6829. }
  6830. /**
  6831. * Resize SVG to fit in given size.
  6832. * @param width
  6833. * @param height
  6834. * @param preserveAspectRatio
  6835. */
  6836. }, {
  6837. key: "resize",
  6838. value: function resize(width) {
  6839. var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
  6840. var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  6841. this.documentElement.resize(width, height, preserveAspectRatio);
  6842. }
  6843. }], [{
  6844. key: "from",
  6845. value: function () {
  6846. 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) {
  6847. var options,
  6848. parser,
  6849. svgDocument,
  6850. _args2 = arguments;
  6851. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  6852. while (1) {
  6853. switch (_context2.prev = _context2.next) {
  6854. case 0:
  6855. options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
  6856. parser = new Parser(options);
  6857. _context2.next = 4;
  6858. return parser.parse(svg);
  6859. case 4:
  6860. svgDocument = _context2.sent;
  6861. return _context2.abrupt("return", new Canvg(ctx, svgDocument, options));
  6862. case 6:
  6863. case "end":
  6864. return _context2.stop();
  6865. }
  6866. }
  6867. }, _callee2);
  6868. }));
  6869. function from(_x, _x2) {
  6870. return _from.apply(this, arguments);
  6871. }
  6872. return from;
  6873. }()
  6874. /**
  6875. * Create Canvg isntance from SVG source string.
  6876. * @param ctx - Rendering context.
  6877. * @param svg - SVG source string.
  6878. * @param options - Rendering options.
  6879. */
  6880. }, {
  6881. key: "fromString",
  6882. value: function fromString(ctx, svg) {
  6883. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6884. var parser = new Parser(options);
  6885. var svgDocument = parser.parseFromString(svg);
  6886. return new Canvg(ctx, svgDocument, options);
  6887. }
  6888. }]);
  6889. return Canvg;
  6890. }();
  6891. /**
  6892. * Options preset for `OffscreenCanvas`.
  6893. * @param config - Preset requirements.
  6894. * @param config.DOMParser - XML/HTML parser from string into DOM Document.
  6895. */
  6896. function offscreen() {
  6897. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  6898. DOMParserFallback = _ref.DOMParser;
  6899. var preset = {
  6900. window: null,
  6901. ignoreAnimation: true,
  6902. ignoreMouse: true,
  6903. DOMParser: DOMParserFallback,
  6904. createCanvas: function createCanvas(width, height) {
  6905. return new OffscreenCanvas(width, height);
  6906. },
  6907. createImage: function createImage(url) {
  6908. return (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
  6909. var response, blob, img;
  6910. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6911. while (1) {
  6912. switch (_context.prev = _context.next) {
  6913. case 0:
  6914. _context.next = 2;
  6915. return fetch(url);
  6916. case 2:
  6917. response = _context.sent;
  6918. _context.next = 5;
  6919. return response.blob();
  6920. case 5:
  6921. blob = _context.sent;
  6922. _context.next = 8;
  6923. return createImageBitmap(blob);
  6924. case 8:
  6925. img = _context.sent;
  6926. return _context.abrupt("return", img);
  6927. case 10:
  6928. case "end":
  6929. return _context.stop();
  6930. }
  6931. }
  6932. }, _callee);
  6933. }))();
  6934. }
  6935. };
  6936. if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
  6937. Reflect.deleteProperty(preset, 'DOMParser');
  6938. }
  6939. return preset;
  6940. }
  6941. /**
  6942. * Options preset for `node-canvas`.
  6943. * @param config - Preset requirements.
  6944. * @param config.DOMParser - XML/HTML parser from string into DOM Document.
  6945. * @param config.canvas - `node-canvas` exports.
  6946. * @param config.fetch - WHATWG-compatible `fetch` function.
  6947. */
  6948. function node(_ref) {
  6949. var DOMParser = _ref.DOMParser,
  6950. canvas = _ref.canvas,
  6951. fetch = _ref.fetch;
  6952. return {
  6953. window: null,
  6954. ignoreAnimation: true,
  6955. ignoreMouse: true,
  6956. DOMParser: DOMParser,
  6957. fetch: fetch,
  6958. createCanvas: canvas.createCanvas,
  6959. createImage: canvas.loadImage
  6960. };
  6961. }
  6962. var index = /*#__PURE__*/Object.freeze({
  6963. __proto__: null,
  6964. offscreen: offscreen,
  6965. node: node
  6966. });
  6967. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Canvg);
  6968. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9yZWdlbmVyYXRvci1ydW50aW1lL3J1bnRpbWUuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTQtcHJlc2VudCwgRmFjZWJvb2ssIEluYy5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqL1xuXG52YXIgcnVudGltZSA9IChmdW5jdGlvbiAoZXhwb3J0cykge1xuICBcInVzZSBzdHJpY3RcIjtcblxuICB2YXIgT3AgPSBPYmplY3QucHJvdG90eXBlO1xuICB2YXIgaGFzT3duID0gT3AuaGFzT3duUHJvcGVydHk7XG4gIHZhciB1bmRlZmluZWQ7IC8vIE1vcmUgY29tcHJlc3NpYmxlIHRoYW4gdm9pZCAwLlxuICB2YXIgJFN5bWJvbCA9IHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rpb25cIiA/IFN5bWJvbCA6IHt9O1xuICB2YXIgaXRlcmF0b3JTeW1ib2wgPSAkU3ltYm9sLml0ZXJhdG9yIHx8IFwiQEBpdGVyYXRvclwiO1xuICB2YXIgYXN5bmNJdGVyYXRvclN5bWJvbCA9ICRTeW1ib2wuYXN5bmNJdGVyYXRvciB8fCBcIkBAYXN5bmNJdGVyYXRvclwiO1xuICB2YXIgdG9TdHJpbmdUYWdTeW1ib2wgPSAkU3ltYm9sLnRv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ltcGwpIHtcbiAgICBmdW5jdGlvbiBpbnZva2UobWV0aG9kLCBhcmcsIHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGdlbmVyYXRvclttZXRob2RdLCBnZW5lcmF0b3IsIGFyZyk7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICByZWplY3QocmVjb3JkLmFyZyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgcmVzdWx0ID0gcmVjb3JkLmFyZztcbiAgICAgICAgdmFyIHZhbHVlID0gcmVzdWx0LnZhbHVlO1xuICAgICAgICBpZiAodmFsdWUgJiZcbiAgICAgICAgICAgIHR5cGVvZiB2YWx1ZSA9PT0gXCJvYmplY3RcIiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwodmFsdWUsIFwiX19hd2FpdFwiKSkge1xuICAgICAgICAgIHJldHVybiBQcm9taXNlSW1wbC5yZXNvbHZlKHZhbHVlLl9fYXdhaXQpLnRoZW4oZnVuY3Rpb24odmFsdWUpIHtcbiAgICAgICAgICAgIGludm9rZShcIm5leHRcIiwgdmFsdWUsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSwgZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICBpbnZva2UoXCJ0aHJvd1wiLCBlcnIsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gUHJvbWlzZUltcGwucmVzb2x2ZSh2YWx1ZSkudGhlbihmdW5jdGlvbih1bndyYXBwZWQpIHtcbiAgICAgICAgICAvLyBXaGVuIGEgeWllbGRlZCBQcm9taXNlIGlzIHJlc29sdmVkLCBpdHMgZmluYWwgdmFsdWUgYmVjb21lc1xuICAgICAgICAgIC8vIHRoZSAudmFsdWUgb2YgdGhlIFByb21pc2U8e3ZhbHVlLGRvbmV9PiByZXN1bHQgZm9yI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RlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT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b3JNZXRob2QpIHtcbiAgICAgICAgcmV0dXJuIGl0ZXJhdG9yTWV0aG9kLmNhbGwoaXRlcmFibGUpO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIGl0ZXJhYmxlLm5leHQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4gaXRlcmFibGU7XG4gICAgICB9XG5cbiAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICB2YXIgaSA9IC0xLCBuZXh0ID0gZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5vIHZhbHVlcy5cbiAgICByZXR1cm4geyBuZXh0OiBkb25lUmVzdWx0IH07XG4gIH1cbiAgZXhwb3J0cy52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgZnVuY3Rpb24gZG9uZVJlc3VsdCgpIHtcbiAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIH1cblxuICBDb250ZXh0LnByb3RvdHlwZSA9IHtcbiAgICBjb25zdHJ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V0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICByZXNldF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. "use strict";
  6976. __webpack_require__.r(__webpack_exports__);
  6977. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6978. /* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
  6979. /* harmony export */ });
  6980. function _arrayLikeToArray(arr, len) {
  6981. if (len == null || len > arr.length) len = arr.length;
  6982. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  6983. arr2[i] = arr[i];
  6984. }
  6985. return arr2;
  6986. }
  6987. /***/ }),
  6988. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
  6989. /*!*******************************************************************!*\
  6990. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
  6991. \*******************************************************************/
  6992. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  6993. "use strict";
  6994. __webpack_require__.r(__webpack_exports__);
  6995. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6996. /* harmony export */ "default": () => (/* binding */ _arrayWithHoles)
  6997. /* harmony export */ });
  6998. function _arrayWithHoles(arr) {
  6999. if (Array.isArray(arr)) return arr;
  7000. }
  7001. /***/ }),
  7002. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js":
  7003. /*!**********************************************************************!*\
  7004. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
  7005. \**********************************************************************/
  7006. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7007. "use strict";
  7008. __webpack_require__.r(__webpack_exports__);
  7009. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7010. /* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
  7011. /* harmony export */ });
  7012. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  7013. function _arrayWithoutHoles(arr) {
  7014. if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr);
  7015. }
  7016. /***/ }),
  7017. /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
  7018. /*!**************************************************************************!*\
  7019. !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
  7020. \**************************************************************************/
  7021. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7022. "use strict";
  7023. __webpack_require__.r(__webpack_exports__);
  7024. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7025. /* harmony export */ "default": () => (/* binding */ _assertThisInitialized)
  7026. /* harmony export */ });
  7027. function _assertThisInitialized(self) {
  7028. if (self === void 0) {
  7029. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  7030. }
  7031. return self;
  7032. }
  7033. /***/ }),
  7034. /***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":
  7035. /*!*********************************************************************!*\
  7036. !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
  7037. \*********************************************************************/
  7038. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7039. "use strict";
  7040. __webpack_require__.r(__webpack_exports__);
  7041. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7042. /* harmony export */ "default": () => (/* binding */ _asyncToGenerator)
  7043. /* harmony export */ });
  7044. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  7045. try {
  7046. var info = gen[key](arg);
  7047. var value = info.value;
  7048. } catch (error) {
  7049. reject(error);
  7050. return;
  7051. }
  7052. if (info.done) {
  7053. resolve(value);
  7054. } else {
  7055. Promise.resolve(value).then(_next, _throw);
  7056. }
  7057. }
  7058. function _asyncToGenerator(fn) {
  7059. return function () {
  7060. var self = this,
  7061. args = arguments;
  7062. return new Promise(function (resolve, reject) {
  7063. var gen = fn.apply(self, args);
  7064. function _next(value) {
  7065. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  7066. }
  7067. function _throw(err) {
  7068. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  7069. }
  7070. _next(undefined);
  7071. });
  7072. };
  7073. }
  7074. /***/ }),
  7075. /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
  7076. /*!*******************************************************************!*\
  7077. !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
  7078. \*******************************************************************/
  7079. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7080. "use strict";
  7081. __webpack_require__.r(__webpack_exports__);
  7082. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7083. /* harmony export */ "default": () => (/* binding */ _classCallCheck)
  7084. /* harmony export */ });
  7085. function _classCallCheck(instance, Constructor) {
  7086. if (!(instance instanceof Constructor)) {
  7087. throw new TypeError("Cannot call a class as a function");
  7088. }
  7089. }
  7090. /***/ }),
  7091. /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
  7092. /*!****************************************************************!*\
  7093. !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
  7094. \****************************************************************/
  7095. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7096. "use strict";
  7097. __webpack_require__.r(__webpack_exports__);
  7098. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7099. /* harmony export */ "default": () => (/* binding */ _createClass)
  7100. /* harmony export */ });
  7101. function _defineProperties(target, props) {
  7102. for (var i = 0; i < props.length; i++) {
  7103. var descriptor = props[i];
  7104. descriptor.enumerable = descriptor.enumerable || false;
  7105. descriptor.configurable = true;
  7106. if ("value" in descriptor) descriptor.writable = true;
  7107. Object.defineProperty(target, descriptor.key, descriptor);
  7108. }
  7109. }
  7110. function _createClass(Constructor, protoProps, staticProps) {
  7111. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  7112. if (staticProps) _defineProperties(Constructor, staticProps);
  7113. return Constructor;
  7114. }
  7115. /***/ }),
  7116. /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
  7117. /*!*******************************************************************!*\
  7118. !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
  7119. \*******************************************************************/
  7120. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7121. "use strict";
  7122. __webpack_require__.r(__webpack_exports__);
  7123. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7124. /* harmony export */ "default": () => (/* binding */ _defineProperty)
  7125. /* harmony export */ });
  7126. function _defineProperty(obj, key, value) {
  7127. if (key in obj) {
  7128. Object.defineProperty(obj, key, {
  7129. value: value,
  7130. enumerable: true,
  7131. configurable: true,
  7132. writable: true
  7133. });
  7134. } else {
  7135. obj[key] = value;
  7136. }
  7137. return obj;
  7138. }
  7139. /***/ }),
  7140. /***/ "./node_modules/@babel/runtime/helpers/esm/get.js":
  7141. /*!********************************************************!*\
  7142. !*** ./node_modules/@babel/runtime/helpers/esm/get.js ***!
  7143. \********************************************************/
  7144. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7145. "use strict";
  7146. __webpack_require__.r(__webpack_exports__);
  7147. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7148. /* harmony export */ "default": () => (/* binding */ _get)
  7149. /* harmony export */ });
  7150. /* harmony import */ var _superPropBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superPropBase.js */ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js");
  7151. function _get(target, property, receiver) {
  7152. if (typeof Reflect !== "undefined" && Reflect.get) {
  7153. _get = Reflect.get;
  7154. } else {
  7155. _get = function _get(target, property, receiver) {
  7156. var base = (0,_superPropBase_js__WEBPACK_IMPORTED_MODULE_0__.default)(target, property);
  7157. if (!base) return;
  7158. var desc = Object.getOwnPropertyDescriptor(base, property);
  7159. if (desc.get) {
  7160. return desc.get.call(receiver);
  7161. }
  7162. return desc.value;
  7163. };
  7164. }
  7165. return _get(target, property, receiver || target);
  7166. }
  7167. /***/ }),
  7168. /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
  7169. /*!*******************************************************************!*\
  7170. !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
  7171. \*******************************************************************/
  7172. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7173. "use strict";
  7174. __webpack_require__.r(__webpack_exports__);
  7175. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7176. /* harmony export */ "default": () => (/* binding */ _getPrototypeOf)
  7177. /* harmony export */ });
  7178. function _getPrototypeOf(o) {
  7179. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  7180. return o.__proto__ || Object.getPrototypeOf(o);
  7181. };
  7182. return _getPrototypeOf(o);
  7183. }
  7184. /***/ }),
  7185. /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
  7186. /*!*************************************************************!*\
  7187. !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
  7188. \*************************************************************/
  7189. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7190. "use strict";
  7191. __webpack_require__.r(__webpack_exports__);
  7192. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7193. /* harmony export */ "default": () => (/* binding */ _inherits)
  7194. /* harmony export */ });
  7195. /* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
  7196. function _inherits(subClass, superClass) {
  7197. if (typeof superClass !== "function" && superClass !== null) {
  7198. throw new TypeError("Super expression must either be null or a function");
  7199. }
  7200. subClass.prototype = Object.create(superClass && superClass.prototype, {
  7201. constructor: {
  7202. value: subClass,
  7203. writable: true,
  7204. configurable: true
  7205. }
  7206. });
  7207. if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(subClass, superClass);
  7208. }
  7209. /***/ }),
  7210. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
  7211. /*!********************************************************************!*\
  7212. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
  7213. \********************************************************************/
  7214. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7215. "use strict";
  7216. __webpack_require__.r(__webpack_exports__);
  7217. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7218. /* harmony export */ "default": () => (/* binding */ _iterableToArray)
  7219. /* harmony export */ });
  7220. function _iterableToArray(iter) {
  7221. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  7222. }
  7223. /***/ }),
  7224. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
  7225. /*!*************************************************************************!*\
  7226. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
  7227. \*************************************************************************/
  7228. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7229. "use strict";
  7230. __webpack_require__.r(__webpack_exports__);
  7231. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7232. /* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit)
  7233. /* harmony export */ });
  7234. function _iterableToArrayLimit(arr, i) {
  7235. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  7236. if (_i == null) return;
  7237. var _arr = [];
  7238. var _n = true;
  7239. var _d = false;
  7240. var _s, _e;
  7241. try {
  7242. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  7243. _arr.push(_s.value);
  7244. if (i && _arr.length === i) break;
  7245. }
  7246. } catch (err) {
  7247. _d = true;
  7248. _e = err;
  7249. } finally {
  7250. try {
  7251. if (!_n && _i["return"] != null) _i["return"]();
  7252. } finally {
  7253. if (_d) throw _e;
  7254. }
  7255. }
  7256. return _arr;
  7257. }
  7258. /***/ }),
  7259. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
  7260. /*!********************************************************************!*\
  7261. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
  7262. \********************************************************************/
  7263. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7264. "use strict";
  7265. __webpack_require__.r(__webpack_exports__);
  7266. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7267. /* harmony export */ "default": () => (/* binding */ _nonIterableRest)
  7268. /* harmony export */ });
  7269. function _nonIterableRest() {
  7270. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  7271. }
  7272. /***/ }),
  7273. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js":
  7274. /*!**********************************************************************!*\
  7275. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
  7276. \**********************************************************************/
  7277. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7278. "use strict";
  7279. __webpack_require__.r(__webpack_exports__);
  7280. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7281. /* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
  7282. /* harmony export */ });
  7283. function _nonIterableSpread() {
  7284. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  7285. }
  7286. /***/ }),
  7287. /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
  7288. /*!******************************************************************************!*\
  7289. !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
  7290. \******************************************************************************/
  7291. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7292. "use strict";
  7293. __webpack_require__.r(__webpack_exports__);
  7294. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7295. /* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn)
  7296. /* harmony export */ });
  7297. /* 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");
  7298. /* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  7299. function _possibleConstructorReturn(self, call) {
  7300. if (call && ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__.default)(call) === "object" || typeof call === "function")) {
  7301. return call;
  7302. } else if (call !== void 0) {
  7303. throw new TypeError("Derived constructors may only return object or undefined");
  7304. }
  7305. return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__.default)(self);
  7306. }
  7307. /***/ }),
  7308. /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
  7309. /*!*******************************************************************!*\
  7310. !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  7311. \*******************************************************************/
  7312. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7313. "use strict";
  7314. __webpack_require__.r(__webpack_exports__);
  7315. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7316. /* harmony export */ "default": () => (/* binding */ _setPrototypeOf)
  7317. /* harmony export */ });
  7318. function _setPrototypeOf(o, p) {
  7319. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  7320. o.__proto__ = p;
  7321. return o;
  7322. };
  7323. return _setPrototypeOf(o, p);
  7324. }
  7325. /***/ }),
  7326. /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
  7327. /*!******************************************************************!*\
  7328. !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
  7329. \******************************************************************/
  7330. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7331. "use strict";
  7332. __webpack_require__.r(__webpack_exports__);
  7333. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7334. /* harmony export */ "default": () => (/* binding */ _slicedToArray)
  7335. /* harmony export */ });
  7336. /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
  7337. /* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
  7338. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  7339. /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
  7340. function _slicedToArray(arr, i) {
  7341. 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)();
  7342. }
  7343. /***/ }),
  7344. /***/ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js":
  7345. /*!******************************************************************!*\
  7346. !*** ./node_modules/@babel/runtime/helpers/esm/superPropBase.js ***!
  7347. \******************************************************************/
  7348. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7349. "use strict";
  7350. __webpack_require__.r(__webpack_exports__);
  7351. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7352. /* harmony export */ "default": () => (/* binding */ _superPropBase)
  7353. /* harmony export */ });
  7354. /* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
  7355. function _superPropBase(object, property) {
  7356. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  7357. object = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(object);
  7358. if (object === null) break;
  7359. }
  7360. return object;
  7361. }
  7362. /***/ }),
  7363. /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
  7364. /*!**********************************************************************!*\
  7365. !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
  7366. \**********************************************************************/
  7367. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7368. "use strict";
  7369. __webpack_require__.r(__webpack_exports__);
  7370. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7371. /* harmony export */ "default": () => (/* binding */ _toConsumableArray)
  7372. /* harmony export */ });
  7373. /* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js");
  7374. /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
  7375. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  7376. /* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js");
  7377. function _toConsumableArray(arr) {
  7378. 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)();
  7379. }
  7380. /***/ }),
  7381. /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
  7382. /*!***********************************************************!*\
  7383. !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
  7384. \***********************************************************/
  7385. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7386. "use strict";
  7387. __webpack_require__.r(__webpack_exports__);
  7388. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7389. /* harmony export */ "default": () => (/* binding */ _typeof)
  7390. /* harmony export */ });
  7391. function _typeof(obj) {
  7392. "@babel/helpers - typeof";
  7393. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  7394. _typeof = function _typeof(obj) {
  7395. return typeof obj;
  7396. };
  7397. } else {
  7398. _typeof = function _typeof(obj) {
  7399. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  7400. };
  7401. }
  7402. return _typeof(obj);
  7403. }
  7404. /***/ }),
  7405. /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
  7406. /*!*******************************************************************************!*\
  7407. !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
  7408. \*******************************************************************************/
  7409. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7410. "use strict";
  7411. __webpack_require__.r(__webpack_exports__);
  7412. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7413. /* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
  7414. /* harmony export */ });
  7415. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  7416. function _unsupportedIterableToArray(o, minLen) {
  7417. if (!o) return;
  7418. if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
  7419. var n = Object.prototype.toString.call(o).slice(8, -1);
  7420. if (n === "Object" && o.constructor) n = o.constructor.name;
  7421. if (n === "Map" || n === "Set") return Array.from(o);
  7422. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
  7423. }
  7424. /***/ }),
  7425. /***/ "./node_modules/@babel/runtime/regenerator/index.js":
  7426. /*!**********************************************************!*\
  7427. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  7428. \**********************************************************/
  7429. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7430. module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
  7431. /***/ }),
  7432. /***/ "./node_modules/core-js/internals/an-instance.js":
  7433. /*!*******************************************************!*\
  7434. !*** ./node_modules/core-js/internals/an-instance.js ***!
  7435. \*******************************************************/
  7436. /***/ ((module) => {
  7437. module.exports = function (it, Constructor, name) {
  7438. if (!(it instanceof Constructor)) {
  7439. throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  7440. } return it;
  7441. };
  7442. /***/ }),
  7443. /***/ "./node_modules/core-js/internals/array-fill.js":
  7444. /*!******************************************************!*\
  7445. !*** ./node_modules/core-js/internals/array-fill.js ***!
  7446. \******************************************************/
  7447. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7448. "use strict";
  7449. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7450. var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
  7451. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7452. // `Array.prototype.fill` method implementation
  7453. // https://tc39.es/ecma262/#sec-array.prototype.fill
  7454. module.exports = function fill(value /* , start = 0, end = @length */) {
  7455. var O = toObject(this);
  7456. var length = toLength(O.length);
  7457. var argumentsLength = arguments.length;
  7458. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  7459. var end = argumentsLength > 2 ? arguments[2] : undefined;
  7460. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  7461. while (endPos > index) O[index++] = value;
  7462. return O;
  7463. };
  7464. /***/ }),
  7465. /***/ "./node_modules/core-js/internals/array-from.js":
  7466. /*!******************************************************!*\
  7467. !*** ./node_modules/core-js/internals/array-from.js ***!
  7468. \******************************************************/
  7469. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7470. "use strict";
  7471. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7472. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7473. var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js");
  7474. var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
  7475. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7476. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  7477. var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
  7478. // `Array.from` method implementation
  7479. // https://tc39.es/ecma262/#sec-array.from
  7480. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  7481. var O = toObject(arrayLike);
  7482. var C = typeof this == 'function' ? this : Array;
  7483. var argumentsLength = arguments.length;
  7484. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  7485. var mapping = mapfn !== undefined;
  7486. var iteratorMethod = getIteratorMethod(O);
  7487. var index = 0;
  7488. var length, result, step, iterator, next, value;
  7489. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  7490. // if the target is not iterable or it's an array with the default iterator - use a simple case
  7491. if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
  7492. iterator = iteratorMethod.call(O);
  7493. next = iterator.next;
  7494. result = new C();
  7495. for (;!(step = next.call(iterator)).done; index++) {
  7496. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  7497. createProperty(result, index, value);
  7498. }
  7499. } else {
  7500. length = toLength(O.length);
  7501. result = new C(length);
  7502. for (;length > index; index++) {
  7503. value = mapping ? mapfn(O[index], index) : O[index];
  7504. createProperty(result, index, value);
  7505. }
  7506. }
  7507. result.length = index;
  7508. return result;
  7509. };
  7510. /***/ }),
  7511. /***/ "./node_modules/core-js/internals/array-reduce.js":
  7512. /*!********************************************************!*\
  7513. !*** ./node_modules/core-js/internals/array-reduce.js ***!
  7514. \********************************************************/
  7515. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7516. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  7517. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7518. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
  7519. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7520. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  7521. var createMethod = function (IS_RIGHT) {
  7522. return function (that, callbackfn, argumentsLength, memo) {
  7523. aFunction(callbackfn);
  7524. var O = toObject(that);
  7525. var self = IndexedObject(O);
  7526. var length = toLength(O.length);
  7527. var index = IS_RIGHT ? length - 1 : 0;
  7528. var i = IS_RIGHT ? -1 : 1;
  7529. if (argumentsLength < 2) while (true) {
  7530. if (index in self) {
  7531. memo = self[index];
  7532. index += i;
  7533. break;
  7534. }
  7535. index += i;
  7536. if (IS_RIGHT ? index < 0 : length <= index) {
  7537. throw TypeError('Reduce of empty array with no initial value');
  7538. }
  7539. }
  7540. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  7541. memo = callbackfn(memo, self[index], index, O);
  7542. }
  7543. return memo;
  7544. };
  7545. };
  7546. module.exports = {
  7547. // `Array.prototype.reduce` method
  7548. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  7549. left: createMethod(false),
  7550. // `Array.prototype.reduceRight` method
  7551. // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  7552. right: createMethod(true)
  7553. };
  7554. /***/ }),
  7555. /***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js":
  7556. /*!****************************************************************************!*\
  7557. !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
  7558. \****************************************************************************/
  7559. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7560. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  7561. var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
  7562. // call something on iterator step with safe closing on error
  7563. module.exports = function (iterator, fn, value, ENTRIES) {
  7564. try {
  7565. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  7566. } catch (error) {
  7567. iteratorClose(iterator);
  7568. throw error;
  7569. }
  7570. };
  7571. /***/ }),
  7572. /***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js":
  7573. /*!**************************************************************************!*\
  7574. !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
  7575. \**************************************************************************/
  7576. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7577. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7578. var ITERATOR = wellKnownSymbol('iterator');
  7579. var SAFE_CLOSING = false;
  7580. try {
  7581. var called = 0;
  7582. var iteratorWithReturn = {
  7583. next: function () {
  7584. return { done: !!called++ };
  7585. },
  7586. 'return': function () {
  7587. SAFE_CLOSING = true;
  7588. }
  7589. };
  7590. iteratorWithReturn[ITERATOR] = function () {
  7591. return this;
  7592. };
  7593. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  7594. Array.from(iteratorWithReturn, function () { throw 2; });
  7595. } catch (error) { /* empty */ }
  7596. module.exports = function (exec, SKIP_CLOSING) {
  7597. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  7598. var ITERATION_SUPPORT = false;
  7599. try {
  7600. var object = {};
  7601. object[ITERATOR] = function () {
  7602. return {
  7603. next: function () {
  7604. return { done: ITERATION_SUPPORT = true };
  7605. }
  7606. };
  7607. };
  7608. exec(object);
  7609. } catch (error) { /* empty */ }
  7610. return ITERATION_SUPPORT;
  7611. };
  7612. /***/ }),
  7613. /***/ "./node_modules/core-js/internals/classof.js":
  7614. /*!***************************************************!*\
  7615. !*** ./node_modules/core-js/internals/classof.js ***!
  7616. \***************************************************/
  7617. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7618. var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
  7619. var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  7620. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7621. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  7622. // ES3 wrong here
  7623. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  7624. // fallback for IE11 Script Access Denied error
  7625. var tryGet = function (it, key) {
  7626. try {
  7627. return it[key];
  7628. } catch (error) { /* empty */ }
  7629. };
  7630. // getting tag from ES6+ `Object.prototype.toString`
  7631. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  7632. var O, tag, result;
  7633. return it === undefined ? 'Undefined' : it === null ? 'Null'
  7634. // @@toStringTag case
  7635. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
  7636. // builtinTag case
  7637. : CORRECT_ARGUMENTS ? classofRaw(O)
  7638. // ES3 arguments fallback
  7639. : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
  7640. };
  7641. /***/ }),
  7642. /***/ "./node_modules/core-js/internals/collection-strong.js":
  7643. /*!*************************************************************!*\
  7644. !*** ./node_modules/core-js/internals/collection-strong.js ***!
  7645. \*************************************************************/
  7646. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7647. "use strict";
  7648. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  7649. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  7650. var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
  7651. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7652. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  7653. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  7654. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  7655. var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
  7656. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  7657. var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js").fastKey;
  7658. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  7659. var setInternalState = InternalStateModule.set;
  7660. var internalStateGetterFor = InternalStateModule.getterFor;
  7661. module.exports = {
  7662. getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
  7663. var C = wrapper(function (that, iterable) {
  7664. anInstance(that, C, CONSTRUCTOR_NAME);
  7665. setInternalState(that, {
  7666. type: CONSTRUCTOR_NAME,
  7667. index: create(null),
  7668. first: undefined,
  7669. last: undefined,
  7670. size: 0
  7671. });
  7672. if (!DESCRIPTORS) that.size = 0;
  7673. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  7674. });
  7675. var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
  7676. var define = function (that, key, value) {
  7677. var state = getInternalState(that);
  7678. var entry = getEntry(that, key);
  7679. var previous, index;
  7680. // change existing entry
  7681. if (entry) {
  7682. entry.value = value;
  7683. // create new entry
  7684. } else {
  7685. state.last = entry = {
  7686. index: index = fastKey(key, true),
  7687. key: key,
  7688. value: value,
  7689. previous: previous = state.last,
  7690. next: undefined,
  7691. removed: false
  7692. };
  7693. if (!state.first) state.first = entry;
  7694. if (previous) previous.next = entry;
  7695. if (DESCRIPTORS) state.size++;
  7696. else that.size++;
  7697. // add to index
  7698. if (index !== 'F') state.index[index] = entry;
  7699. } return that;
  7700. };
  7701. var getEntry = function (that, key) {
  7702. var state = getInternalState(that);
  7703. // fast case
  7704. var index = fastKey(key);
  7705. var entry;
  7706. if (index !== 'F') return state.index[index];
  7707. // frozen object case
  7708. for (entry = state.first; entry; entry = entry.next) {
  7709. if (entry.key == key) return entry;
  7710. }
  7711. };
  7712. redefineAll(C.prototype, {
  7713. // `{ Map, Set }.prototype.clear()` methods
  7714. // https://tc39.es/ecma262/#sec-map.prototype.clear
  7715. // https://tc39.es/ecma262/#sec-set.prototype.clear
  7716. clear: function clear() {
  7717. var that = this;
  7718. var state = getInternalState(that);
  7719. var data = state.index;
  7720. var entry = state.first;
  7721. while (entry) {
  7722. entry.removed = true;
  7723. if (entry.previous) entry.previous = entry.previous.next = undefined;
  7724. delete data[entry.index];
  7725. entry = entry.next;
  7726. }
  7727. state.first = state.last = undefined;
  7728. if (DESCRIPTORS) state.size = 0;
  7729. else that.size = 0;
  7730. },
  7731. // `{ Map, Set }.prototype.delete(key)` methods
  7732. // https://tc39.es/ecma262/#sec-map.prototype.delete
  7733. // https://tc39.es/ecma262/#sec-set.prototype.delete
  7734. 'delete': function (key) {
  7735. var that = this;
  7736. var state = getInternalState(that);
  7737. var entry = getEntry(that, key);
  7738. if (entry) {
  7739. var next = entry.next;
  7740. var prev = entry.previous;
  7741. delete state.index[entry.index];
  7742. entry.removed = true;
  7743. if (prev) prev.next = next;
  7744. if (next) next.previous = prev;
  7745. if (state.first == entry) state.first = next;
  7746. if (state.last == entry) state.last = prev;
  7747. if (DESCRIPTORS) state.size--;
  7748. else that.size--;
  7749. } return !!entry;
  7750. },
  7751. // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
  7752. // https://tc39.es/ecma262/#sec-map.prototype.foreach
  7753. // https://tc39.es/ecma262/#sec-set.prototype.foreach
  7754. forEach: function forEach(callbackfn /* , that = undefined */) {
  7755. var state = getInternalState(this);
  7756. var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  7757. var entry;
  7758. while (entry = entry ? entry.next : state.first) {
  7759. boundFunction(entry.value, entry.key, this);
  7760. // revert to the last existing entry
  7761. while (entry && entry.removed) entry = entry.previous;
  7762. }
  7763. },
  7764. // `{ Map, Set}.prototype.has(key)` methods
  7765. // https://tc39.es/ecma262/#sec-map.prototype.has
  7766. // https://tc39.es/ecma262/#sec-set.prototype.has
  7767. has: function has(key) {
  7768. return !!getEntry(this, key);
  7769. }
  7770. });
  7771. redefineAll(C.prototype, IS_MAP ? {
  7772. // `Map.prototype.get(key)` method
  7773. // https://tc39.es/ecma262/#sec-map.prototype.get
  7774. get: function get(key) {
  7775. var entry = getEntry(this, key);
  7776. return entry && entry.value;
  7777. },
  7778. // `Map.prototype.set(key, value)` method
  7779. // https://tc39.es/ecma262/#sec-map.prototype.set
  7780. set: function set(key, value) {
  7781. return define(this, key === 0 ? 0 : key, value);
  7782. }
  7783. } : {
  7784. // `Set.prototype.add(value)` method
  7785. // https://tc39.es/ecma262/#sec-set.prototype.add
  7786. add: function add(value) {
  7787. return define(this, value = value === 0 ? 0 : value, value);
  7788. }
  7789. });
  7790. if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
  7791. get: function () {
  7792. return getInternalState(this).size;
  7793. }
  7794. });
  7795. return C;
  7796. },
  7797. setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
  7798. var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
  7799. var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
  7800. var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
  7801. // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
  7802. // https://tc39.es/ecma262/#sec-map.prototype.entries
  7803. // https://tc39.es/ecma262/#sec-map.prototype.keys
  7804. // https://tc39.es/ecma262/#sec-map.prototype.values
  7805. // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
  7806. // https://tc39.es/ecma262/#sec-set.prototype.entries
  7807. // https://tc39.es/ecma262/#sec-set.prototype.keys
  7808. // https://tc39.es/ecma262/#sec-set.prototype.values
  7809. // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
  7810. defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
  7811. setInternalState(this, {
  7812. type: ITERATOR_NAME,
  7813. target: iterated,
  7814. state: getInternalCollectionState(iterated),
  7815. kind: kind,
  7816. last: undefined
  7817. });
  7818. }, function () {
  7819. var state = getInternalIteratorState(this);
  7820. var kind = state.kind;
  7821. var entry = state.last;
  7822. // revert to the last existing entry
  7823. while (entry && entry.removed) entry = entry.previous;
  7824. // get next entry
  7825. if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
  7826. // or finish the iteration
  7827. state.target = undefined;
  7828. return { value: undefined, done: true };
  7829. }
  7830. // return step by kind
  7831. if (kind == 'keys') return { value: entry.key, done: false };
  7832. if (kind == 'values') return { value: entry.value, done: false };
  7833. return { value: [entry.key, entry.value], done: false };
  7834. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  7835. // `{ Map, Set }.prototype[@@species]` accessors
  7836. // https://tc39.es/ecma262/#sec-get-map-@@species
  7837. // https://tc39.es/ecma262/#sec-get-set-@@species
  7838. setSpecies(CONSTRUCTOR_NAME);
  7839. }
  7840. };
  7841. /***/ }),
  7842. /***/ "./node_modules/core-js/internals/collection.js":
  7843. /*!******************************************************!*\
  7844. !*** ./node_modules/core-js/internals/collection.js ***!
  7845. \******************************************************/
  7846. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7847. "use strict";
  7848. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  7849. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  7850. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  7851. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  7852. var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js");
  7853. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  7854. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  7855. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  7856. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  7857. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  7858. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  7859. var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
  7860. module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
  7861. var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
  7862. var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
  7863. var ADDER = IS_MAP ? 'set' : 'add';
  7864. var NativeConstructor = global[CONSTRUCTOR_NAME];
  7865. var NativePrototype = NativeConstructor && NativeConstructor.prototype;
  7866. var Constructor = NativeConstructor;
  7867. var exported = {};
  7868. var fixMethod = function (KEY) {
  7869. var nativeMethod = NativePrototype[KEY];
  7870. redefine(NativePrototype, KEY,
  7871. KEY == 'add' ? function add(value) {
  7872. nativeMethod.call(this, value === 0 ? 0 : value);
  7873. return this;
  7874. } : KEY == 'delete' ? function (key) {
  7875. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  7876. } : KEY == 'get' ? function get(key) {
  7877. return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
  7878. } : KEY == 'has' ? function has(key) {
  7879. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  7880. } : function set(key, value) {
  7881. nativeMethod.call(this, key === 0 ? 0 : key, value);
  7882. return this;
  7883. }
  7884. );
  7885. };
  7886. var REPLACE = isForced(
  7887. CONSTRUCTOR_NAME,
  7888. typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
  7889. new NativeConstructor().entries().next();
  7890. }))
  7891. );
  7892. if (REPLACE) {
  7893. // create collection constructor
  7894. Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
  7895. InternalMetadataModule.REQUIRED = true;
  7896. } else if (isForced(CONSTRUCTOR_NAME, true)) {
  7897. var instance = new Constructor();
  7898. // early implementations not supports chaining
  7899. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  7900. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  7901. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  7902. // most early implementations doesn't supports iterables, most modern - not close it correctly
  7903. // eslint-disable-next-line no-new -- required for testing
  7904. var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
  7905. // for early implementations -0 and +0 not the same
  7906. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  7907. // V8 ~ Chromium 42- fails only with 5+ elements
  7908. var $instance = new NativeConstructor();
  7909. var index = 5;
  7910. while (index--) $instance[ADDER](index, index);
  7911. return !$instance.has(-0);
  7912. });
  7913. if (!ACCEPT_ITERABLES) {
  7914. Constructor = wrapper(function (dummy, iterable) {
  7915. anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
  7916. var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
  7917. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  7918. return that;
  7919. });
  7920. Constructor.prototype = NativePrototype;
  7921. NativePrototype.constructor = Constructor;
  7922. }
  7923. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  7924. fixMethod('delete');
  7925. fixMethod('has');
  7926. IS_MAP && fixMethod('get');
  7927. }
  7928. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  7929. // weak collections should not contains .clear method
  7930. if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
  7931. }
  7932. exported[CONSTRUCTOR_NAME] = Constructor;
  7933. $({ global: true, forced: Constructor != NativeConstructor }, exported);
  7934. setToStringTag(Constructor, CONSTRUCTOR_NAME);
  7935. if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
  7936. return Constructor;
  7937. };
  7938. /***/ }),
  7939. /***/ "./node_modules/core-js/internals/correct-prototype-getter.js":
  7940. /*!********************************************************************!*\
  7941. !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
  7942. \********************************************************************/
  7943. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7944. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  7945. module.exports = !fails(function () {
  7946. function F() { /* empty */ }
  7947. F.prototype.constructor = null;
  7948. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  7949. return Object.getPrototypeOf(new F()) !== F.prototype;
  7950. });
  7951. /***/ }),
  7952. /***/ "./node_modules/core-js/internals/create-iterator-constructor.js":
  7953. /*!***********************************************************************!*\
  7954. !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
  7955. \***********************************************************************/
  7956. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7957. "use strict";
  7958. var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js").IteratorPrototype;
  7959. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  7960. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  7961. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  7962. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  7963. var returnThis = function () { return this; };
  7964. module.exports = function (IteratorConstructor, NAME, next) {
  7965. var TO_STRING_TAG = NAME + ' Iterator';
  7966. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  7967. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  7968. Iterators[TO_STRING_TAG] = returnThis;
  7969. return IteratorConstructor;
  7970. };
  7971. /***/ }),
  7972. /***/ "./node_modules/core-js/internals/create-property.js":
  7973. /*!***********************************************************!*\
  7974. !*** ./node_modules/core-js/internals/create-property.js ***!
  7975. \***********************************************************/
  7976. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7977. "use strict";
  7978. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  7979. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  7980. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  7981. module.exports = function (object, key, value) {
  7982. var propertyKey = toPrimitive(key);
  7983. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  7984. else object[propertyKey] = value;
  7985. };
  7986. /***/ }),
  7987. /***/ "./node_modules/core-js/internals/define-iterator.js":
  7988. /*!***********************************************************!*\
  7989. !*** ./node_modules/core-js/internals/define-iterator.js ***!
  7990. \***********************************************************/
  7991. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7992. "use strict";
  7993. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  7994. var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "./node_modules/core-js/internals/create-iterator-constructor.js");
  7995. var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  7996. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  7997. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  7998. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  7999. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  8000. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8001. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  8002. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8003. var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js");
  8004. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  8005. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  8006. var ITERATOR = wellKnownSymbol('iterator');
  8007. var KEYS = 'keys';
  8008. var VALUES = 'values';
  8009. var ENTRIES = 'entries';
  8010. var returnThis = function () { return this; };
  8011. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  8012. createIteratorConstructor(IteratorConstructor, NAME, next);
  8013. var getIterationMethod = function (KIND) {
  8014. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  8015. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  8016. switch (KIND) {
  8017. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  8018. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  8019. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  8020. } return function () { return new IteratorConstructor(this); };
  8021. };
  8022. var TO_STRING_TAG = NAME + ' Iterator';
  8023. var INCORRECT_VALUES_NAME = false;
  8024. var IterablePrototype = Iterable.prototype;
  8025. var nativeIterator = IterablePrototype[ITERATOR]
  8026. || IterablePrototype['@@iterator']
  8027. || DEFAULT && IterablePrototype[DEFAULT];
  8028. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  8029. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  8030. var CurrentIteratorPrototype, methods, KEY;
  8031. // fix native
  8032. if (anyNativeIterator) {
  8033. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  8034. if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  8035. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  8036. if (setPrototypeOf) {
  8037. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  8038. } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
  8039. createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
  8040. }
  8041. }
  8042. // Set @@toStringTag to native iterators
  8043. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  8044. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  8045. }
  8046. }
  8047. // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
  8048. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  8049. INCORRECT_VALUES_NAME = true;
  8050. defaultIterator = function values() { return nativeIterator.call(this); };
  8051. }
  8052. // define iterator
  8053. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  8054. createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  8055. }
  8056. Iterators[NAME] = defaultIterator;
  8057. // export additional methods
  8058. if (DEFAULT) {
  8059. methods = {
  8060. values: getIterationMethod(VALUES),
  8061. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  8062. entries: getIterationMethod(ENTRIES)
  8063. };
  8064. if (FORCED) for (KEY in methods) {
  8065. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  8066. redefine(IterablePrototype, KEY, methods[KEY]);
  8067. }
  8068. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  8069. }
  8070. return methods;
  8071. };
  8072. /***/ }),
  8073. /***/ "./node_modules/core-js/internals/define-well-known-symbol.js":
  8074. /*!********************************************************************!*\
  8075. !*** ./node_modules/core-js/internals/define-well-known-symbol.js ***!
  8076. \********************************************************************/
  8077. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8078. var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
  8079. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8080. var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
  8081. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  8082. module.exports = function (NAME) {
  8083. var Symbol = path.Symbol || (path.Symbol = {});
  8084. if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
  8085. value: wrappedWellKnownSymbolModule.f(NAME)
  8086. });
  8087. };
  8088. /***/ }),
  8089. /***/ "./node_modules/core-js/internals/engine-is-browser.js":
  8090. /*!*************************************************************!*\
  8091. !*** ./node_modules/core-js/internals/engine-is-browser.js ***!
  8092. \*************************************************************/
  8093. /***/ ((module) => {
  8094. module.exports = typeof window == 'object';
  8095. /***/ }),
  8096. /***/ "./node_modules/core-js/internals/engine-is-ios.js":
  8097. /*!*********************************************************!*\
  8098. !*** ./node_modules/core-js/internals/engine-is-ios.js ***!
  8099. \*********************************************************/
  8100. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8101. var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
  8102. module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);
  8103. /***/ }),
  8104. /***/ "./node_modules/core-js/internals/engine-is-node.js":
  8105. /*!**********************************************************!*\
  8106. !*** ./node_modules/core-js/internals/engine-is-node.js ***!
  8107. \**********************************************************/
  8108. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8109. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  8110. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8111. module.exports = classof(global.process) == 'process';
  8112. /***/ }),
  8113. /***/ "./node_modules/core-js/internals/engine-is-webos-webkit.js":
  8114. /*!******************************************************************!*\
  8115. !*** ./node_modules/core-js/internals/engine-is-webos-webkit.js ***!
  8116. \******************************************************************/
  8117. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8118. var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
  8119. module.exports = /web0s(?!.*chrome)/i.test(userAgent);
  8120. /***/ }),
  8121. /***/ "./node_modules/core-js/internals/freezing.js":
  8122. /*!****************************************************!*\
  8123. !*** ./node_modules/core-js/internals/freezing.js ***!
  8124. \****************************************************/
  8125. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8126. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8127. module.exports = !fails(function () {
  8128. // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
  8129. return Object.isExtensible(Object.preventExtensions({}));
  8130. });
  8131. /***/ }),
  8132. /***/ "./node_modules/core-js/internals/function-bind.js":
  8133. /*!*********************************************************!*\
  8134. !*** ./node_modules/core-js/internals/function-bind.js ***!
  8135. \*********************************************************/
  8136. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8137. "use strict";
  8138. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8139. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8140. var slice = [].slice;
  8141. var factories = {};
  8142. var construct = function (C, argsLength, args) {
  8143. if (!(argsLength in factories)) {
  8144. for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
  8145. // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
  8146. factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  8147. } return factories[argsLength](C, args);
  8148. };
  8149. // `Function.prototype.bind` method implementation
  8150. // https://tc39.es/ecma262/#sec-function.prototype.bind
  8151. module.exports = Function.bind || function bind(that /* , ...args */) {
  8152. var fn = aFunction(this);
  8153. var partArgs = slice.call(arguments, 1);
  8154. var boundFunction = function bound(/* args... */) {
  8155. var args = partArgs.concat(slice.call(arguments));
  8156. return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  8157. };
  8158. if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  8159. return boundFunction;
  8160. };
  8161. /***/ }),
  8162. /***/ "./node_modules/core-js/internals/get-iterator-method.js":
  8163. /*!***************************************************************!*\
  8164. !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
  8165. \***************************************************************/
  8166. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8167. var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
  8168. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8169. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8170. var ITERATOR = wellKnownSymbol('iterator');
  8171. module.exports = function (it) {
  8172. if (it != undefined) return it[ITERATOR]
  8173. || it['@@iterator']
  8174. || Iterators[classof(it)];
  8175. };
  8176. /***/ }),
  8177. /***/ "./node_modules/core-js/internals/host-report-errors.js":
  8178. /*!**************************************************************!*\
  8179. !*** ./node_modules/core-js/internals/host-report-errors.js ***!
  8180. \**************************************************************/
  8181. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8182. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8183. module.exports = function (a, b) {
  8184. var console = global.console;
  8185. if (console && console.error) {
  8186. arguments.length === 1 ? console.error(a) : console.error(a, b);
  8187. }
  8188. };
  8189. /***/ }),
  8190. /***/ "./node_modules/core-js/internals/internal-metadata.js":
  8191. /*!*************************************************************!*\
  8192. !*** ./node_modules/core-js/internals/internal-metadata.js ***!
  8193. \*************************************************************/
  8194. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8195. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  8196. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8197. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8198. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  8199. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
  8200. var FREEZING = __webpack_require__(/*! ../internals/freezing */ "./node_modules/core-js/internals/freezing.js");
  8201. var METADATA = uid('meta');
  8202. var id = 0;
  8203. // eslint-disable-next-line es/no-object-isextensible -- safe
  8204. var isExtensible = Object.isExtensible || function () {
  8205. return true;
  8206. };
  8207. var setMetadata = function (it) {
  8208. defineProperty(it, METADATA, { value: {
  8209. objectID: 'O' + ++id, // object ID
  8210. weakData: {} // weak collections IDs
  8211. } });
  8212. };
  8213. var fastKey = function (it, create) {
  8214. // return a primitive with prefix
  8215. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  8216. if (!has(it, METADATA)) {
  8217. // can't set metadata to uncaught frozen object
  8218. if (!isExtensible(it)) return 'F';
  8219. // not necessary to add metadata
  8220. if (!create) return 'E';
  8221. // add missing metadata
  8222. setMetadata(it);
  8223. // return object ID
  8224. } return it[METADATA].objectID;
  8225. };
  8226. var getWeakData = function (it, create) {
  8227. if (!has(it, METADATA)) {
  8228. // can't set metadata to uncaught frozen object
  8229. if (!isExtensible(it)) return true;
  8230. // not necessary to add metadata
  8231. if (!create) return false;
  8232. // add missing metadata
  8233. setMetadata(it);
  8234. // return the store of weak collections IDs
  8235. } return it[METADATA].weakData;
  8236. };
  8237. // add metadata on freeze-family methods calling
  8238. var onFreeze = function (it) {
  8239. if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
  8240. return it;
  8241. };
  8242. var meta = module.exports = {
  8243. REQUIRED: false,
  8244. fastKey: fastKey,
  8245. getWeakData: getWeakData,
  8246. onFreeze: onFreeze
  8247. };
  8248. hiddenKeys[METADATA] = true;
  8249. /***/ }),
  8250. /***/ "./node_modules/core-js/internals/is-array-iterator-method.js":
  8251. /*!********************************************************************!*\
  8252. !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
  8253. \********************************************************************/
  8254. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8255. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8256. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8257. var ITERATOR = wellKnownSymbol('iterator');
  8258. var ArrayPrototype = Array.prototype;
  8259. // check on default Array iterator
  8260. module.exports = function (it) {
  8261. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  8262. };
  8263. /***/ }),
  8264. /***/ "./node_modules/core-js/internals/iterate.js":
  8265. /*!***************************************************!*\
  8266. !*** ./node_modules/core-js/internals/iterate.js ***!
  8267. \***************************************************/
  8268. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8269. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8270. var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
  8271. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  8272. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  8273. var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
  8274. var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
  8275. var Result = function (stopped, result) {
  8276. this.stopped = stopped;
  8277. this.result = result;
  8278. };
  8279. module.exports = function (iterable, unboundFunction, options) {
  8280. var that = options && options.that;
  8281. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  8282. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  8283. var INTERRUPTED = !!(options && options.INTERRUPTED);
  8284. var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
  8285. var iterator, iterFn, index, length, result, next, step;
  8286. var stop = function (condition) {
  8287. if (iterator) iteratorClose(iterator);
  8288. return new Result(true, condition);
  8289. };
  8290. var callFn = function (value) {
  8291. if (AS_ENTRIES) {
  8292. anObject(value);
  8293. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  8294. } return INTERRUPTED ? fn(value, stop) : fn(value);
  8295. };
  8296. if (IS_ITERATOR) {
  8297. iterator = iterable;
  8298. } else {
  8299. iterFn = getIteratorMethod(iterable);
  8300. if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
  8301. // optimisation for array iterators
  8302. if (isArrayIteratorMethod(iterFn)) {
  8303. for (index = 0, length = toLength(iterable.length); length > index; index++) {
  8304. result = callFn(iterable[index]);
  8305. if (result && result instanceof Result) return result;
  8306. } return new Result(false);
  8307. }
  8308. iterator = iterFn.call(iterable);
  8309. }
  8310. next = iterator.next;
  8311. while (!(step = next.call(iterator)).done) {
  8312. try {
  8313. result = callFn(step.value);
  8314. } catch (error) {
  8315. iteratorClose(iterator);
  8316. throw error;
  8317. }
  8318. if (typeof result == 'object' && result && result instanceof Result) return result;
  8319. } return new Result(false);
  8320. };
  8321. /***/ }),
  8322. /***/ "./node_modules/core-js/internals/iterator-close.js":
  8323. /*!**********************************************************!*\
  8324. !*** ./node_modules/core-js/internals/iterator-close.js ***!
  8325. \**********************************************************/
  8326. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8327. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8328. module.exports = function (iterator) {
  8329. var returnMethod = iterator['return'];
  8330. if (returnMethod !== undefined) {
  8331. return anObject(returnMethod.call(iterator)).value;
  8332. }
  8333. };
  8334. /***/ }),
  8335. /***/ "./node_modules/core-js/internals/iterators-core.js":
  8336. /*!**********************************************************!*\
  8337. !*** ./node_modules/core-js/internals/iterators-core.js ***!
  8338. \**********************************************************/
  8339. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8340. "use strict";
  8341. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8342. var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  8343. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  8344. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8345. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8346. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  8347. var ITERATOR = wellKnownSymbol('iterator');
  8348. var BUGGY_SAFARI_ITERATORS = false;
  8349. var returnThis = function () { return this; };
  8350. // `%IteratorPrototype%` object
  8351. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  8352. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  8353. /* eslint-disable es/no-array-prototype-keys -- safe */
  8354. if ([].keys) {
  8355. arrayIterator = [].keys();
  8356. // Safari 8 has buggy iterators w/o `next`
  8357. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  8358. else {
  8359. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  8360. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  8361. }
  8362. }
  8363. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  8364. var test = {};
  8365. // FF44- legacy iterators case
  8366. return IteratorPrototype[ITERATOR].call(test) !== test;
  8367. });
  8368. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  8369. // `%IteratorPrototype%[@@iterator]()` method
  8370. // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
  8371. if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  8372. createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
  8373. }
  8374. module.exports = {
  8375. IteratorPrototype: IteratorPrototype,
  8376. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  8377. };
  8378. /***/ }),
  8379. /***/ "./node_modules/core-js/internals/iterators.js":
  8380. /*!*****************************************************!*\
  8381. !*** ./node_modules/core-js/internals/iterators.js ***!
  8382. \*****************************************************/
  8383. /***/ ((module) => {
  8384. module.exports = {};
  8385. /***/ }),
  8386. /***/ "./node_modules/core-js/internals/microtask.js":
  8387. /*!*****************************************************!*\
  8388. !*** ./node_modules/core-js/internals/microtask.js ***!
  8389. \*****************************************************/
  8390. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8391. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8392. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  8393. var macrotask = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
  8394. var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
  8395. var IS_WEBOS_WEBKIT = __webpack_require__(/*! ../internals/engine-is-webos-webkit */ "./node_modules/core-js/internals/engine-is-webos-webkit.js");
  8396. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  8397. var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
  8398. var document = global.document;
  8399. var process = global.process;
  8400. var Promise = global.Promise;
  8401. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  8402. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
  8403. var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  8404. var flush, head, last, notify, toggle, node, promise, then;
  8405. // modern engines have queueMicrotask method
  8406. if (!queueMicrotask) {
  8407. flush = function () {
  8408. var parent, fn;
  8409. if (IS_NODE && (parent = process.domain)) parent.exit();
  8410. while (head) {
  8411. fn = head.fn;
  8412. head = head.next;
  8413. try {
  8414. fn();
  8415. } catch (error) {
  8416. if (head) notify();
  8417. else last = undefined;
  8418. throw error;
  8419. }
  8420. } last = undefined;
  8421. if (parent) parent.enter();
  8422. };
  8423. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  8424. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  8425. if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
  8426. toggle = true;
  8427. node = document.createTextNode('');
  8428. new MutationObserver(flush).observe(node, { characterData: true });
  8429. notify = function () {
  8430. node.data = toggle = !toggle;
  8431. };
  8432. // environments with maybe non-completely correct, but existent Promise
  8433. } else if (Promise && Promise.resolve) {
  8434. // Promise.resolve without an argument throws an error in LG WebOS 2
  8435. promise = Promise.resolve(undefined);
  8436. // workaround of WebKit ~ iOS Safari 10.1 bug
  8437. promise.constructor = Promise;
  8438. then = promise.then;
  8439. notify = function () {
  8440. then.call(promise, flush);
  8441. };
  8442. // Node.js without promises
  8443. } else if (IS_NODE) {
  8444. notify = function () {
  8445. process.nextTick(flush);
  8446. };
  8447. // for other environments - macrotask based on:
  8448. // - setImmediate
  8449. // - MessageChannel
  8450. // - window.postMessag
  8451. // - onreadystatechange
  8452. // - setTimeout
  8453. } else {
  8454. notify = function () {
  8455. // strange IE + webpack dev server bug - use .call(global)
  8456. macrotask.call(global, flush);
  8457. };
  8458. }
  8459. }
  8460. module.exports = queueMicrotask || function (fn) {
  8461. var task = { fn: fn, next: undefined };
  8462. if (last) last.next = task;
  8463. if (!head) {
  8464. head = task;
  8465. notify();
  8466. } last = task;
  8467. };
  8468. /***/ }),
  8469. /***/ "./node_modules/core-js/internals/native-promise-constructor.js":
  8470. /*!**********************************************************************!*\
  8471. !*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
  8472. \**********************************************************************/
  8473. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8474. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8475. module.exports = global.Promise;
  8476. /***/ }),
  8477. /***/ "./node_modules/core-js/internals/new-promise-capability.js":
  8478. /*!******************************************************************!*\
  8479. !*** ./node_modules/core-js/internals/new-promise-capability.js ***!
  8480. \******************************************************************/
  8481. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8482. "use strict";
  8483. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8484. var PromiseCapability = function (C) {
  8485. var resolve, reject;
  8486. this.promise = new C(function ($$resolve, $$reject) {
  8487. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  8488. resolve = $$resolve;
  8489. reject = $$reject;
  8490. });
  8491. this.resolve = aFunction(resolve);
  8492. this.reject = aFunction(reject);
  8493. };
  8494. // `NewPromiseCapability` abstract operation
  8495. // https://tc39.es/ecma262/#sec-newpromisecapability
  8496. module.exports.f = function (C) {
  8497. return new PromiseCapability(C);
  8498. };
  8499. /***/ }),
  8500. /***/ "./node_modules/core-js/internals/object-get-own-property-names-external.js":
  8501. /*!**********************************************************************************!*\
  8502. !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
  8503. \**********************************************************************************/
  8504. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8505. /* eslint-disable es/no-object-getownpropertynames -- safe */
  8506. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  8507. var $getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
  8508. var toString = {}.toString;
  8509. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  8510. ? Object.getOwnPropertyNames(window) : [];
  8511. var getWindowNames = function (it) {
  8512. try {
  8513. return $getOwnPropertyNames(it);
  8514. } catch (error) {
  8515. return windowNames.slice();
  8516. }
  8517. };
  8518. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  8519. module.exports.f = function getOwnPropertyNames(it) {
  8520. return windowNames && toString.call(it) == '[object Window]'
  8521. ? getWindowNames(it)
  8522. : $getOwnPropertyNames(toIndexedObject(it));
  8523. };
  8524. /***/ }),
  8525. /***/ "./node_modules/core-js/internals/object-get-prototype-of.js":
  8526. /*!*******************************************************************!*\
  8527. !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
  8528. \*******************************************************************/
  8529. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8530. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8531. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  8532. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  8533. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
  8534. var IE_PROTO = sharedKey('IE_PROTO');
  8535. var ObjectPrototype = Object.prototype;
  8536. // `Object.getPrototypeOf` method
  8537. // https://tc39.es/ecma262/#sec-object.getprototypeof
  8538. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  8539. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  8540. O = toObject(O);
  8541. if (has(O, IE_PROTO)) return O[IE_PROTO];
  8542. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  8543. return O.constructor.prototype;
  8544. } return O instanceof Object ? ObjectPrototype : null;
  8545. };
  8546. /***/ }),
  8547. /***/ "./node_modules/core-js/internals/object-to-string.js":
  8548. /*!************************************************************!*\
  8549. !*** ./node_modules/core-js/internals/object-to-string.js ***!
  8550. \************************************************************/
  8551. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8552. "use strict";
  8553. var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
  8554. var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
  8555. // `Object.prototype.toString` method implementation
  8556. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  8557. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  8558. return '[object ' + classof(this) + ']';
  8559. };
  8560. /***/ }),
  8561. /***/ "./node_modules/core-js/internals/perform.js":
  8562. /*!***************************************************!*\
  8563. !*** ./node_modules/core-js/internals/perform.js ***!
  8564. \***************************************************/
  8565. /***/ ((module) => {
  8566. module.exports = function (exec) {
  8567. try {
  8568. return { error: false, value: exec() };
  8569. } catch (error) {
  8570. return { error: true, value: error };
  8571. }
  8572. };
  8573. /***/ }),
  8574. /***/ "./node_modules/core-js/internals/promise-resolve.js":
  8575. /*!***********************************************************!*\
  8576. !*** ./node_modules/core-js/internals/promise-resolve.js ***!
  8577. \***********************************************************/
  8578. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8579. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8580. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8581. var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
  8582. module.exports = function (C, x) {
  8583. anObject(C);
  8584. if (isObject(x) && x.constructor === C) return x;
  8585. var promiseCapability = newPromiseCapability.f(C);
  8586. var resolve = promiseCapability.resolve;
  8587. resolve(x);
  8588. return promiseCapability.promise;
  8589. };
  8590. /***/ }),
  8591. /***/ "./node_modules/core-js/internals/redefine-all.js":
  8592. /*!********************************************************!*\
  8593. !*** ./node_modules/core-js/internals/redefine-all.js ***!
  8594. \********************************************************/
  8595. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8596. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  8597. module.exports = function (target, src, options) {
  8598. for (var key in src) redefine(target, key, src[key], options);
  8599. return target;
  8600. };
  8601. /***/ }),
  8602. /***/ "./node_modules/core-js/internals/set-species.js":
  8603. /*!*******************************************************!*\
  8604. !*** ./node_modules/core-js/internals/set-species.js ***!
  8605. \*******************************************************/
  8606. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8607. "use strict";
  8608. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  8609. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  8610. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8611. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  8612. var SPECIES = wellKnownSymbol('species');
  8613. module.exports = function (CONSTRUCTOR_NAME) {
  8614. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  8615. var defineProperty = definePropertyModule.f;
  8616. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  8617. defineProperty(Constructor, SPECIES, {
  8618. configurable: true,
  8619. get: function () { return this; }
  8620. });
  8621. }
  8622. };
  8623. /***/ }),
  8624. /***/ "./node_modules/core-js/internals/set-to-string-tag.js":
  8625. /*!*************************************************************!*\
  8626. !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
  8627. \*************************************************************/
  8628. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8629. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  8630. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8631. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8632. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  8633. module.exports = function (it, TAG, STATIC) {
  8634. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  8635. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  8636. }
  8637. };
  8638. /***/ }),
  8639. /***/ "./node_modules/core-js/internals/string-trim-forced.js":
  8640. /*!**************************************************************!*\
  8641. !*** ./node_modules/core-js/internals/string-trim-forced.js ***!
  8642. \**************************************************************/
  8643. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8644. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8645. var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
  8646. var non = '\u200B\u0085\u180E';
  8647. // check that a method works with the correct list
  8648. // of whitespaces and has a correct name
  8649. module.exports = function (METHOD_NAME) {
  8650. return fails(function () {
  8651. return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  8652. });
  8653. };
  8654. /***/ }),
  8655. /***/ "./node_modules/core-js/internals/task.js":
  8656. /*!************************************************!*\
  8657. !*** ./node_modules/core-js/internals/task.js ***!
  8658. \************************************************/
  8659. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8660. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8661. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8662. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  8663. var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
  8664. var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
  8665. var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
  8666. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  8667. var location = global.location;
  8668. var set = global.setImmediate;
  8669. var clear = global.clearImmediate;
  8670. var process = global.process;
  8671. var MessageChannel = global.MessageChannel;
  8672. var Dispatch = global.Dispatch;
  8673. var counter = 0;
  8674. var queue = {};
  8675. var ONREADYSTATECHANGE = 'onreadystatechange';
  8676. var defer, channel, port;
  8677. var run = function (id) {
  8678. // eslint-disable-next-line no-prototype-builtins -- safe
  8679. if (queue.hasOwnProperty(id)) {
  8680. var fn = queue[id];
  8681. delete queue[id];
  8682. fn();
  8683. }
  8684. };
  8685. var runner = function (id) {
  8686. return function () {
  8687. run(id);
  8688. };
  8689. };
  8690. var listener = function (event) {
  8691. run(event.data);
  8692. };
  8693. var post = function (id) {
  8694. // old engines have not location.origin
  8695. global.postMessage(id + '', location.protocol + '//' + location.host);
  8696. };
  8697. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  8698. if (!set || !clear) {
  8699. set = function setImmediate(fn) {
  8700. var args = [];
  8701. var i = 1;
  8702. while (arguments.length > i) args.push(arguments[i++]);
  8703. queue[++counter] = function () {
  8704. // eslint-disable-next-line no-new-func -- spec requirement
  8705. (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
  8706. };
  8707. defer(counter);
  8708. return counter;
  8709. };
  8710. clear = function clearImmediate(id) {
  8711. delete queue[id];
  8712. };
  8713. // Node.js 0.8-
  8714. if (IS_NODE) {
  8715. defer = function (id) {
  8716. process.nextTick(runner(id));
  8717. };
  8718. // Sphere (JS game engine) Dispatch API
  8719. } else if (Dispatch && Dispatch.now) {
  8720. defer = function (id) {
  8721. Dispatch.now(runner(id));
  8722. };
  8723. // Browsers with MessageChannel, includes WebWorkers
  8724. // except iOS - https://github.com/zloirock/core-js/issues/624
  8725. } else if (MessageChannel && !IS_IOS) {
  8726. channel = new MessageChannel();
  8727. port = channel.port2;
  8728. channel.port1.onmessage = listener;
  8729. defer = bind(port.postMessage, port, 1);
  8730. // Browsers with postMessage, skip WebWorkers
  8731. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  8732. } else if (
  8733. global.addEventListener &&
  8734. typeof postMessage == 'function' &&
  8735. !global.importScripts &&
  8736. location && location.protocol !== 'file:' &&
  8737. !fails(post)
  8738. ) {
  8739. defer = post;
  8740. global.addEventListener('message', listener, false);
  8741. // IE8-
  8742. } else if (ONREADYSTATECHANGE in createElement('script')) {
  8743. defer = function (id) {
  8744. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  8745. html.removeChild(this);
  8746. run(id);
  8747. };
  8748. };
  8749. // Rest old browsers
  8750. } else {
  8751. defer = function (id) {
  8752. setTimeout(runner(id), 0);
  8753. };
  8754. }
  8755. }
  8756. module.exports = {
  8757. set: set,
  8758. clear: clear
  8759. };
  8760. /***/ }),
  8761. /***/ "./node_modules/core-js/internals/to-string-tag-support.js":
  8762. /*!*****************************************************************!*\
  8763. !*** ./node_modules/core-js/internals/to-string-tag-support.js ***!
  8764. \*****************************************************************/
  8765. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8766. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8767. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  8768. var test = {};
  8769. test[TO_STRING_TAG] = 'z';
  8770. module.exports = String(test) === '[object z]';
  8771. /***/ }),
  8772. /***/ "./node_modules/core-js/internals/well-known-symbol-wrapped.js":
  8773. /*!*********************************************************************!*\
  8774. !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
  8775. \*********************************************************************/
  8776. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  8777. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8778. exports.f = wellKnownSymbol;
  8779. /***/ }),
  8780. /***/ "./node_modules/core-js/modules/es.array.concat.js":
  8781. /*!*********************************************************!*\
  8782. !*** ./node_modules/core-js/modules/es.array.concat.js ***!
  8783. \*********************************************************/
  8784. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  8785. "use strict";
  8786. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8787. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8788. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  8789. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8790. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  8791. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  8792. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  8793. var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
  8794. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  8795. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8796. var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  8797. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  8798. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  8799. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  8800. // We can't use this feature detection in V8 since it causes
  8801. // deoptimization and serious performance degradation
  8802. // https://github.com/zloirock/core-js/issues/679
  8803. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  8804. var array = [];
  8805. array[IS_CONCAT_SPREADABLE] = false;
  8806. return array.concat()[0] !== array;
  8807. });
  8808. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  8809. var isConcatSpreadable = function (O) {
  8810. if (!isObject(O)) return false;
  8811. var spreadable = O[IS_CONCAT_SPREADABLE];
  8812. return spreadable !== undefined ? !!spreadable : isArray(O);
  8813. };
  8814. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  8815. // `Array.prototype.concat` method
  8816. // https://tc39.es/ecma262/#sec-array.prototype.concat
  8817. // with adding support of @@isConcatSpreadable and @@species
  8818. $({ target: 'Array', proto: true, forced: FORCED }, {
  8819. // eslint-disable-next-line no-unused-vars -- required for `.length`
  8820. concat: function concat(arg) {
  8821. var O = toObject(this);
  8822. var A = arraySpeciesCreate(O, 0);
  8823. var n = 0;
  8824. var i, k, length, len, E;
  8825. for (i = -1, length = arguments.length; i < length; i++) {
  8826. E = i === -1 ? O : arguments[i];
  8827. if (isConcatSpreadable(E)) {
  8828. len = toLength(E.length);
  8829. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  8830. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  8831. } else {
  8832. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  8833. createProperty(A, n++, E);
  8834. }
  8835. }
  8836. A.length = n;
  8837. return A;
  8838. }
  8839. });
  8840. /***/ }),
  8841. /***/ "./node_modules/core-js/modules/es.array.every.js":
  8842. /*!********************************************************!*\
  8843. !*** ./node_modules/core-js/modules/es.array.every.js ***!
  8844. \********************************************************/
  8845. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  8846. "use strict";
  8847. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8848. var $every = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").every;
  8849. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  8850. var STRICT_METHOD = arrayMethodIsStrict('every');
  8851. // `Array.prototype.every` method
  8852. // https://tc39.es/ecma262/#sec-array.prototype.every
  8853. $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  8854. every: function every(callbackfn /* , thisArg */) {
  8855. return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  8856. }
  8857. });
  8858. /***/ }),
  8859. /***/ "./node_modules/core-js/modules/es.array.fill.js":
  8860. /*!*******************************************************!*\
  8861. !*** ./node_modules/core-js/modules/es.array.fill.js ***!
  8862. \*******************************************************/
  8863. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  8864. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8865. var fill = __webpack_require__(/*! ../internals/array-fill */ "./node_modules/core-js/internals/array-fill.js");
  8866. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  8867. // `Array.prototype.fill` method
  8868. // https://tc39.es/ecma262/#sec-array.prototype.fill
  8869. $({ target: 'Array', proto: true }, {
  8870. fill: fill
  8871. });
  8872. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  8873. addToUnscopables('fill');
  8874. /***/ }),
  8875. /***/ "./node_modules/core-js/modules/es.array.from.js":
  8876. /*!*******************************************************!*\
  8877. !*** ./node_modules/core-js/modules/es.array.from.js ***!
  8878. \*******************************************************/
  8879. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  8880. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8881. var from = __webpack_require__(/*! ../internals/array-from */ "./node_modules/core-js/internals/array-from.js");
  8882. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  8883. var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  8884. // eslint-disable-next-line es/no-array-from -- required for testing
  8885. Array.from(iterable);
  8886. });
  8887. // `Array.from` method
  8888. // https://tc39.es/ecma262/#sec-array.from
  8889. $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  8890. from: from
  8891. });
  8892. /***/ }),
  8893. /***/ "./node_modules/core-js/modules/es.array.index-of.js":
  8894. /*!***********************************************************!*\
  8895. !*** ./node_modules/core-js/modules/es.array.index-of.js ***!
  8896. \***********************************************************/
  8897. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  8898. "use strict";
  8899. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  8900. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8901. var $indexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf;
  8902. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  8903. var nativeIndexOf = [].indexOf;
  8904. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
  8905. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  8906. // `Array.prototype.indexOf` method
  8907. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  8908. $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  8909. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  8910. return NEGATIVE_ZERO
  8911. // convert -0 to +0
  8912. ? nativeIndexOf.apply(this, arguments) || 0
  8913. : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  8914. }
  8915. });
  8916. /***/ }),
  8917. /***/ "./node_modules/core-js/modules/es.array.iterator.js":
  8918. /*!***********************************************************!*\
  8919. !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
  8920. \***********************************************************/
  8921. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8922. "use strict";
  8923. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  8924. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  8925. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8926. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  8927. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  8928. var ARRAY_ITERATOR = 'Array Iterator';
  8929. var setInternalState = InternalStateModule.set;
  8930. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  8931. // `Array.prototype.entries` method
  8932. // https://tc39.es/ecma262/#sec-array.prototype.entries
  8933. // `Array.prototype.keys` method
  8934. // https://tc39.es/ecma262/#sec-array.prototype.keys
  8935. // `Array.prototype.values` method
  8936. // https://tc39.es/ecma262/#sec-array.prototype.values
  8937. // `Array.prototype[@@iterator]` method
  8938. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  8939. // `CreateArrayIterator` internal method
  8940. // https://tc39.es/ecma262/#sec-createarrayiterator
  8941. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  8942. setInternalState(this, {
  8943. type: ARRAY_ITERATOR,
  8944. target: toIndexedObject(iterated), // target
  8945. index: 0, // next index
  8946. kind: kind // kind
  8947. });
  8948. // `%ArrayIteratorPrototype%.next` method
  8949. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  8950. }, function () {
  8951. var state = getInternalState(this);
  8952. var target = state.target;
  8953. var kind = state.kind;
  8954. var index = state.index++;
  8955. if (!target || index >= target.length) {
  8956. state.target = undefined;
  8957. return { value: undefined, done: true };
  8958. }
  8959. if (kind == 'keys') return { value: index, done: false };
  8960. if (kind == 'values') return { value: target[index], done: false };
  8961. return { value: [index, target[index]], done: false };
  8962. }, 'values');
  8963. // argumentsList[@@iterator] is %ArrayProto_values%
  8964. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  8965. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  8966. Iterators.Arguments = Iterators.Array;
  8967. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  8968. addToUnscopables('keys');
  8969. addToUnscopables('values');
  8970. addToUnscopables('entries');
  8971. /***/ }),
  8972. /***/ "./node_modules/core-js/modules/es.array.join.js":
  8973. /*!*******************************************************!*\
  8974. !*** ./node_modules/core-js/modules/es.array.join.js ***!
  8975. \*******************************************************/
  8976. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  8977. "use strict";
  8978. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8979. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
  8980. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  8981. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  8982. var nativeJoin = [].join;
  8983. var ES3_STRINGS = IndexedObject != Object;
  8984. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  8985. // `Array.prototype.join` method
  8986. // https://tc39.es/ecma262/#sec-array.prototype.join
  8987. $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  8988. join: function join(separator) {
  8989. return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  8990. }
  8991. });
  8992. /***/ }),
  8993. /***/ "./node_modules/core-js/modules/es.array.map.js":
  8994. /*!******************************************************!*\
  8995. !*** ./node_modules/core-js/modules/es.array.map.js ***!
  8996. \******************************************************/
  8997. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  8998. "use strict";
  8999. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9000. var $map = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").map;
  9001. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9002. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  9003. // `Array.prototype.map` method
  9004. // https://tc39.es/ecma262/#sec-array.prototype.map
  9005. // with adding support of @@species
  9006. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  9007. map: function map(callbackfn /* , thisArg */) {
  9008. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9009. }
  9010. });
  9011. /***/ }),
  9012. /***/ "./node_modules/core-js/modules/es.array.reduce.js":
  9013. /*!*********************************************************!*\
  9014. !*** ./node_modules/core-js/modules/es.array.reduce.js ***!
  9015. \*********************************************************/
  9016. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9017. "use strict";
  9018. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9019. var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "./node_modules/core-js/internals/array-reduce.js").left;
  9020. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9021. var CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9022. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9023. var STRICT_METHOD = arrayMethodIsStrict('reduce');
  9024. // Chrome 80-82 has a critical bug
  9025. // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
  9026. var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
  9027. // `Array.prototype.reduce` method
  9028. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  9029. $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
  9030. reduce: function reduce(callbackfn /* , initialValue */) {
  9031. return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  9032. }
  9033. });
  9034. /***/ }),
  9035. /***/ "./node_modules/core-js/modules/es.array.reverse.js":
  9036. /*!**********************************************************!*\
  9037. !*** ./node_modules/core-js/modules/es.array.reverse.js ***!
  9038. \**********************************************************/
  9039. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9040. "use strict";
  9041. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9042. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9043. var nativeReverse = [].reverse;
  9044. var test = [1, 2];
  9045. // `Array.prototype.reverse` method
  9046. // https://tc39.es/ecma262/#sec-array.prototype.reverse
  9047. // fix for Safari 12.0 bug
  9048. // https://bugs.webkit.org/show_bug.cgi?id=188794
  9049. $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
  9050. reverse: function reverse() {
  9051. // eslint-disable-next-line no-self-assign -- dirty hack
  9052. if (isArray(this)) this.length = this.length;
  9053. return nativeReverse.call(this);
  9054. }
  9055. });
  9056. /***/ }),
  9057. /***/ "./node_modules/core-js/modules/es.array.slice.js":
  9058. /*!********************************************************!*\
  9059. !*** ./node_modules/core-js/modules/es.array.slice.js ***!
  9060. \********************************************************/
  9061. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9062. "use strict";
  9063. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9064. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9065. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9066. var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
  9067. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  9068. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9069. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9070. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9071. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9072. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  9073. var SPECIES = wellKnownSymbol('species');
  9074. var nativeSlice = [].slice;
  9075. var max = Math.max;
  9076. // `Array.prototype.slice` method
  9077. // https://tc39.es/ecma262/#sec-array.prototype.slice
  9078. // fallback for not array-like ES3 strings and DOM objects
  9079. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  9080. slice: function slice(start, end) {
  9081. var O = toIndexedObject(this);
  9082. var length = toLength(O.length);
  9083. var k = toAbsoluteIndex(start, length);
  9084. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  9085. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  9086. var Constructor, result, n;
  9087. if (isArray(O)) {
  9088. Constructor = O.constructor;
  9089. // cross-realm fallback
  9090. if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
  9091. Constructor = undefined;
  9092. } else if (isObject(Constructor)) {
  9093. Constructor = Constructor[SPECIES];
  9094. if (Constructor === null) Constructor = undefined;
  9095. }
  9096. if (Constructor === Array || Constructor === undefined) {
  9097. return nativeSlice.call(O, k, fin);
  9098. }
  9099. }
  9100. result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
  9101. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  9102. result.length = n;
  9103. return result;
  9104. }
  9105. });
  9106. /***/ }),
  9107. /***/ "./node_modules/core-js/modules/es.array.some.js":
  9108. /*!*******************************************************!*\
  9109. !*** ./node_modules/core-js/modules/es.array.some.js ***!
  9110. \*******************************************************/
  9111. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9112. "use strict";
  9113. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9114. var $some = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").some;
  9115. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9116. var STRICT_METHOD = arrayMethodIsStrict('some');
  9117. // `Array.prototype.some` method
  9118. // https://tc39.es/ecma262/#sec-array.prototype.some
  9119. $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  9120. some: function some(callbackfn /* , thisArg */) {
  9121. return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9122. }
  9123. });
  9124. /***/ }),
  9125. /***/ "./node_modules/core-js/modules/es.map.js":
  9126. /*!************************************************!*\
  9127. !*** ./node_modules/core-js/modules/es.map.js ***!
  9128. \************************************************/
  9129. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9130. "use strict";
  9131. var collection = __webpack_require__(/*! ../internals/collection */ "./node_modules/core-js/internals/collection.js");
  9132. var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "./node_modules/core-js/internals/collection-strong.js");
  9133. // `Map` constructor
  9134. // https://tc39.es/ecma262/#sec-map-objects
  9135. module.exports = collection('Map', function (init) {
  9136. return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
  9137. }, collectionStrong);
  9138. /***/ }),
  9139. /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
  9140. /*!*******************************************************************************!*\
  9141. !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
  9142. \*******************************************************************************/
  9143. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9144. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9145. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9146. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9147. var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  9148. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9149. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
  9150. var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
  9151. // `Object.getOwnPropertyDescriptor` method
  9152. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  9153. $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  9154. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
  9155. return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  9156. }
  9157. });
  9158. /***/ }),
  9159. /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
  9160. /*!********************************************************************************!*\
  9161. !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***!
  9162. \********************************************************************************/
  9163. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9164. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9165. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9166. var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
  9167. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9168. var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
  9169. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9170. // `Object.getOwnPropertyDescriptors` method
  9171. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  9172. $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  9173. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  9174. var O = toIndexedObject(object);
  9175. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  9176. var keys = ownKeys(O);
  9177. var result = {};
  9178. var index = 0;
  9179. var key, descriptor;
  9180. while (keys.length > index) {
  9181. descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
  9182. if (descriptor !== undefined) createProperty(result, key, descriptor);
  9183. }
  9184. return result;
  9185. }
  9186. });
  9187. /***/ }),
  9188. /***/ "./node_modules/core-js/modules/es.object.keys.js":
  9189. /*!********************************************************!*\
  9190. !*** ./node_modules/core-js/modules/es.object.keys.js ***!
  9191. \********************************************************/
  9192. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9193. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9194. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  9195. var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  9196. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9197. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  9198. // `Object.keys` method
  9199. // https://tc39.es/ecma262/#sec-object.keys
  9200. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  9201. keys: function keys(it) {
  9202. return nativeKeys(toObject(it));
  9203. }
  9204. });
  9205. /***/ }),
  9206. /***/ "./node_modules/core-js/modules/es.object.to-string.js":
  9207. /*!*************************************************************!*\
  9208. !*** ./node_modules/core-js/modules/es.object.to-string.js ***!
  9209. \*************************************************************/
  9210. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9211. var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
  9212. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9213. var toString = __webpack_require__(/*! ../internals/object-to-string */ "./node_modules/core-js/internals/object-to-string.js");
  9214. // `Object.prototype.toString` method
  9215. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  9216. if (!TO_STRING_TAG_SUPPORT) {
  9217. redefine(Object.prototype, 'toString', toString, { unsafe: true });
  9218. }
  9219. /***/ }),
  9220. /***/ "./node_modules/core-js/modules/es.promise.js":
  9221. /*!****************************************************!*\
  9222. !*** ./node_modules/core-js/modules/es.promise.js ***!
  9223. \****************************************************/
  9224. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9225. "use strict";
  9226. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9227. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  9228. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9229. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9230. var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "./node_modules/core-js/internals/native-promise-constructor.js");
  9231. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9232. var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
  9233. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  9234. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  9235. var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
  9236. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9237. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  9238. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  9239. var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
  9240. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  9241. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  9242. var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js");
  9243. var task = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
  9244. var microtask = __webpack_require__(/*! ../internals/microtask */ "./node_modules/core-js/internals/microtask.js");
  9245. var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "./node_modules/core-js/internals/promise-resolve.js");
  9246. var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "./node_modules/core-js/internals/host-report-errors.js");
  9247. var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
  9248. var perform = __webpack_require__(/*! ../internals/perform */ "./node_modules/core-js/internals/perform.js");
  9249. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  9250. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  9251. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9252. var IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ "./node_modules/core-js/internals/engine-is-browser.js");
  9253. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9254. var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9255. var SPECIES = wellKnownSymbol('species');
  9256. var PROMISE = 'Promise';
  9257. var getInternalState = InternalStateModule.get;
  9258. var setInternalState = InternalStateModule.set;
  9259. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  9260. var NativePromisePrototype = NativePromise && NativePromise.prototype;
  9261. var PromiseConstructor = NativePromise;
  9262. var PromiseConstructorPrototype = NativePromisePrototype;
  9263. var TypeError = global.TypeError;
  9264. var document = global.document;
  9265. var process = global.process;
  9266. var newPromiseCapability = newPromiseCapabilityModule.f;
  9267. var newGenericPromiseCapability = newPromiseCapability;
  9268. var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
  9269. var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
  9270. var UNHANDLED_REJECTION = 'unhandledrejection';
  9271. var REJECTION_HANDLED = 'rejectionhandled';
  9272. var PENDING = 0;
  9273. var FULFILLED = 1;
  9274. var REJECTED = 2;
  9275. var HANDLED = 1;
  9276. var UNHANDLED = 2;
  9277. var SUBCLASSING = false;
  9278. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  9279. var FORCED = isForced(PROMISE, function () {
  9280. var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
  9281. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  9282. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  9283. // We can't detect it synchronously, so just check versions
  9284. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  9285. // We need Promise#finally in the pure version for preventing prototype pollution
  9286. if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;
  9287. // We can't use @@species feature detection in V8 since it causes
  9288. // deoptimization and performance degradation
  9289. // https://github.com/zloirock/core-js/issues/679
  9290. if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
  9291. // Detect correctness of subclassing with @@species support
  9292. var promise = new PromiseConstructor(function (resolve) { resolve(1); });
  9293. var FakePromise = function (exec) {
  9294. exec(function () { /* empty */ }, function () { /* empty */ });
  9295. };
  9296. var constructor = promise.constructor = {};
  9297. constructor[SPECIES] = FakePromise;
  9298. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  9299. if (!SUBCLASSING) return true;
  9300. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  9301. return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
  9302. });
  9303. var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  9304. PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
  9305. });
  9306. // helpers
  9307. var isThenable = function (it) {
  9308. var then;
  9309. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  9310. };
  9311. var notify = function (state, isReject) {
  9312. if (state.notified) return;
  9313. state.notified = true;
  9314. var chain = state.reactions;
  9315. microtask(function () {
  9316. var value = state.value;
  9317. var ok = state.state == FULFILLED;
  9318. var index = 0;
  9319. // variable length - can't use forEach
  9320. while (chain.length > index) {
  9321. var reaction = chain[index++];
  9322. var handler = ok ? reaction.ok : reaction.fail;
  9323. var resolve = reaction.resolve;
  9324. var reject = reaction.reject;
  9325. var domain = reaction.domain;
  9326. var result, then, exited;
  9327. try {
  9328. if (handler) {
  9329. if (!ok) {
  9330. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  9331. state.rejection = HANDLED;
  9332. }
  9333. if (handler === true) result = value;
  9334. else {
  9335. if (domain) domain.enter();
  9336. result = handler(value); // can throw
  9337. if (domain) {
  9338. domain.exit();
  9339. exited = true;
  9340. }
  9341. }
  9342. if (result === reaction.promise) {
  9343. reject(TypeError('Promise-chain cycle'));
  9344. } else if (then = isThenable(result)) {
  9345. then.call(result, resolve, reject);
  9346. } else resolve(result);
  9347. } else reject(value);
  9348. } catch (error) {
  9349. if (domain && !exited) domain.exit();
  9350. reject(error);
  9351. }
  9352. }
  9353. state.reactions = [];
  9354. state.notified = false;
  9355. if (isReject && !state.rejection) onUnhandled(state);
  9356. });
  9357. };
  9358. var dispatchEvent = function (name, promise, reason) {
  9359. var event, handler;
  9360. if (DISPATCH_EVENT) {
  9361. event = document.createEvent('Event');
  9362. event.promise = promise;
  9363. event.reason = reason;
  9364. event.initEvent(name, false, true);
  9365. global.dispatchEvent(event);
  9366. } else event = { promise: promise, reason: reason };
  9367. if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
  9368. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  9369. };
  9370. var onUnhandled = function (state) {
  9371. task.call(global, function () {
  9372. var promise = state.facade;
  9373. var value = state.value;
  9374. var IS_UNHANDLED = isUnhandled(state);
  9375. var result;
  9376. if (IS_UNHANDLED) {
  9377. result = perform(function () {
  9378. if (IS_NODE) {
  9379. process.emit('unhandledRejection', value, promise);
  9380. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  9381. });
  9382. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  9383. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  9384. if (result.error) throw result.value;
  9385. }
  9386. });
  9387. };
  9388. var isUnhandled = function (state) {
  9389. return state.rejection !== HANDLED && !state.parent;
  9390. };
  9391. var onHandleUnhandled = function (state) {
  9392. task.call(global, function () {
  9393. var promise = state.facade;
  9394. if (IS_NODE) {
  9395. process.emit('rejectionHandled', promise);
  9396. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  9397. });
  9398. };
  9399. var bind = function (fn, state, unwrap) {
  9400. return function (value) {
  9401. fn(state, value, unwrap);
  9402. };
  9403. };
  9404. var internalReject = function (state, value, unwrap) {
  9405. if (state.done) return;
  9406. state.done = true;
  9407. if (unwrap) state = unwrap;
  9408. state.value = value;
  9409. state.state = REJECTED;
  9410. notify(state, true);
  9411. };
  9412. var internalResolve = function (state, value, unwrap) {
  9413. if (state.done) return;
  9414. state.done = true;
  9415. if (unwrap) state = unwrap;
  9416. try {
  9417. if (state.facade === value) throw TypeError("Promise can't be resolved itself");
  9418. var then = isThenable(value);
  9419. if (then) {
  9420. microtask(function () {
  9421. var wrapper = { done: false };
  9422. try {
  9423. then.call(value,
  9424. bind(internalResolve, wrapper, state),
  9425. bind(internalReject, wrapper, state)
  9426. );
  9427. } catch (error) {
  9428. internalReject(wrapper, error, state);
  9429. }
  9430. });
  9431. } else {
  9432. state.value = value;
  9433. state.state = FULFILLED;
  9434. notify(state, false);
  9435. }
  9436. } catch (error) {
  9437. internalReject({ done: false }, error, state);
  9438. }
  9439. };
  9440. // constructor polyfill
  9441. if (FORCED) {
  9442. // 25.4.3.1 Promise(executor)
  9443. PromiseConstructor = function Promise(executor) {
  9444. anInstance(this, PromiseConstructor, PROMISE);
  9445. aFunction(executor);
  9446. Internal.call(this);
  9447. var state = getInternalState(this);
  9448. try {
  9449. executor(bind(internalResolve, state), bind(internalReject, state));
  9450. } catch (error) {
  9451. internalReject(state, error);
  9452. }
  9453. };
  9454. PromiseConstructorPrototype = PromiseConstructor.prototype;
  9455. // eslint-disable-next-line no-unused-vars -- required for `.length`
  9456. Internal = function Promise(executor) {
  9457. setInternalState(this, {
  9458. type: PROMISE,
  9459. done: false,
  9460. notified: false,
  9461. parent: false,
  9462. reactions: [],
  9463. rejection: false,
  9464. state: PENDING,
  9465. value: undefined
  9466. });
  9467. };
  9468. Internal.prototype = redefineAll(PromiseConstructorPrototype, {
  9469. // `Promise.prototype.then` method
  9470. // https://tc39.es/ecma262/#sec-promise.prototype.then
  9471. then: function then(onFulfilled, onRejected) {
  9472. var state = getInternalPromiseState(this);
  9473. var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
  9474. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  9475. reaction.fail = typeof onRejected == 'function' && onRejected;
  9476. reaction.domain = IS_NODE ? process.domain : undefined;
  9477. state.parent = true;
  9478. state.reactions.push(reaction);
  9479. if (state.state != PENDING) notify(state, false);
  9480. return reaction.promise;
  9481. },
  9482. // `Promise.prototype.catch` method
  9483. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  9484. 'catch': function (onRejected) {
  9485. return this.then(undefined, onRejected);
  9486. }
  9487. });
  9488. OwnPromiseCapability = function () {
  9489. var promise = new Internal();
  9490. var state = getInternalState(promise);
  9491. this.promise = promise;
  9492. this.resolve = bind(internalResolve, state);
  9493. this.reject = bind(internalReject, state);
  9494. };
  9495. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  9496. return C === PromiseConstructor || C === PromiseWrapper
  9497. ? new OwnPromiseCapability(C)
  9498. : newGenericPromiseCapability(C);
  9499. };
  9500. if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {
  9501. nativeThen = NativePromisePrototype.then;
  9502. if (!SUBCLASSING) {
  9503. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  9504. redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
  9505. var that = this;
  9506. return new PromiseConstructor(function (resolve, reject) {
  9507. nativeThen.call(that, resolve, reject);
  9508. }).then(onFulfilled, onRejected);
  9509. // https://github.com/zloirock/core-js/issues/640
  9510. }, { unsafe: true });
  9511. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  9512. redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
  9513. }
  9514. // make `.constructor === Promise` work for native promise-based APIs
  9515. try {
  9516. delete NativePromisePrototype.constructor;
  9517. } catch (error) { /* empty */ }
  9518. // make `instanceof Promise` work for native promise-based APIs
  9519. if (setPrototypeOf) {
  9520. setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
  9521. }
  9522. }
  9523. }
  9524. $({ global: true, wrap: true, forced: FORCED }, {
  9525. Promise: PromiseConstructor
  9526. });
  9527. setToStringTag(PromiseConstructor, PROMISE, false, true);
  9528. setSpecies(PROMISE);
  9529. PromiseWrapper = getBuiltIn(PROMISE);
  9530. // statics
  9531. $({ target: PROMISE, stat: true, forced: FORCED }, {
  9532. // `Promise.reject` method
  9533. // https://tc39.es/ecma262/#sec-promise.reject
  9534. reject: function reject(r) {
  9535. var capability = newPromiseCapability(this);
  9536. capability.reject.call(undefined, r);
  9537. return capability.promise;
  9538. }
  9539. });
  9540. $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  9541. // `Promise.resolve` method
  9542. // https://tc39.es/ecma262/#sec-promise.resolve
  9543. resolve: function resolve(x) {
  9544. return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  9545. }
  9546. });
  9547. $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  9548. // `Promise.all` method
  9549. // https://tc39.es/ecma262/#sec-promise.all
  9550. all: function all(iterable) {
  9551. var C = this;
  9552. var capability = newPromiseCapability(C);
  9553. var resolve = capability.resolve;
  9554. var reject = capability.reject;
  9555. var result = perform(function () {
  9556. var $promiseResolve = aFunction(C.resolve);
  9557. var values = [];
  9558. var counter = 0;
  9559. var remaining = 1;
  9560. iterate(iterable, function (promise) {
  9561. var index = counter++;
  9562. var alreadyCalled = false;
  9563. values.push(undefined);
  9564. remaining++;
  9565. $promiseResolve.call(C, promise).then(function (value) {
  9566. if (alreadyCalled) return;
  9567. alreadyCalled = true;
  9568. values[index] = value;
  9569. --remaining || resolve(values);
  9570. }, reject);
  9571. });
  9572. --remaining || resolve(values);
  9573. });
  9574. if (result.error) reject(result.value);
  9575. return capability.promise;
  9576. },
  9577. // `Promise.race` method
  9578. // https://tc39.es/ecma262/#sec-promise.race
  9579. race: function race(iterable) {
  9580. var C = this;
  9581. var capability = newPromiseCapability(C);
  9582. var reject = capability.reject;
  9583. var result = perform(function () {
  9584. var $promiseResolve = aFunction(C.resolve);
  9585. iterate(iterable, function (promise) {
  9586. $promiseResolve.call(C, promise).then(capability.resolve, reject);
  9587. });
  9588. });
  9589. if (result.error) reject(result.value);
  9590. return capability.promise;
  9591. }
  9592. });
  9593. /***/ }),
  9594. /***/ "./node_modules/core-js/modules/es.reflect.apply.js":
  9595. /*!**********************************************************!*\
  9596. !*** ./node_modules/core-js/modules/es.reflect.apply.js ***!
  9597. \**********************************************************/
  9598. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9599. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9600. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9601. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  9602. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  9603. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9604. var nativeApply = getBuiltIn('Reflect', 'apply');
  9605. var functionApply = Function.apply;
  9606. // MS Edge argumentsList argument is optional
  9607. var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
  9608. nativeApply(function () { /* empty */ });
  9609. });
  9610. // `Reflect.apply` method
  9611. // https://tc39.es/ecma262/#sec-reflect.apply
  9612. $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
  9613. apply: function apply(target, thisArgument, argumentsList) {
  9614. aFunction(target);
  9615. anObject(argumentsList);
  9616. return nativeApply
  9617. ? nativeApply(target, thisArgument, argumentsList)
  9618. : functionApply.call(target, thisArgument, argumentsList);
  9619. }
  9620. });
  9621. /***/ }),
  9622. /***/ "./node_modules/core-js/modules/es.reflect.construct.js":
  9623. /*!**************************************************************!*\
  9624. !*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
  9625. \**************************************************************/
  9626. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9627. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9628. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9629. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  9630. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  9631. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9632. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  9633. var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
  9634. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9635. var nativeConstruct = getBuiltIn('Reflect', 'construct');
  9636. // `Reflect.construct` method
  9637. // https://tc39.es/ecma262/#sec-reflect.construct
  9638. // MS Edge supports only 2 arguments and argumentsList argument is optional
  9639. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  9640. var NEW_TARGET_BUG = fails(function () {
  9641. function F() { /* empty */ }
  9642. return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
  9643. });
  9644. var ARGS_BUG = !fails(function () {
  9645. nativeConstruct(function () { /* empty */ });
  9646. });
  9647. var FORCED = NEW_TARGET_BUG || ARGS_BUG;
  9648. $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
  9649. construct: function construct(Target, args /* , newTarget */) {
  9650. aFunction(Target);
  9651. anObject(args);
  9652. var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
  9653. if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
  9654. if (Target == newTarget) {
  9655. // w/o altered newTarget, optimization for 0-4 arguments
  9656. switch (args.length) {
  9657. case 0: return new Target();
  9658. case 1: return new Target(args[0]);
  9659. case 2: return new Target(args[0], args[1]);
  9660. case 3: return new Target(args[0], args[1], args[2]);
  9661. case 4: return new Target(args[0], args[1], args[2], args[3]);
  9662. }
  9663. // w/o altered newTarget, lot of arguments case
  9664. var $args = [null];
  9665. $args.push.apply($args, args);
  9666. return new (bind.apply(Target, $args))();
  9667. }
  9668. // with altered newTarget, not support built-in constructors
  9669. var proto = newTarget.prototype;
  9670. var instance = create(isObject(proto) ? proto : Object.prototype);
  9671. var result = Function.apply.call(Target, instance, args);
  9672. return isObject(result) ? result : instance;
  9673. }
  9674. });
  9675. /***/ }),
  9676. /***/ "./node_modules/core-js/modules/es.reflect.delete-property.js":
  9677. /*!********************************************************************!*\
  9678. !*** ./node_modules/core-js/modules/es.reflect.delete-property.js ***!
  9679. \********************************************************************/
  9680. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9681. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9682. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  9683. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  9684. // `Reflect.deleteProperty` method
  9685. // https://tc39.es/ecma262/#sec-reflect.deleteproperty
  9686. $({ target: 'Reflect', stat: true }, {
  9687. deleteProperty: function deleteProperty(target, propertyKey) {
  9688. var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
  9689. return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
  9690. }
  9691. });
  9692. /***/ }),
  9693. /***/ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js":
  9694. /*!*********************************************************************!*\
  9695. !*** ./node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
  9696. \*********************************************************************/
  9697. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9698. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9699. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  9700. var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  9701. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
  9702. // `Reflect.getPrototypeOf` method
  9703. // https://tc39.es/ecma262/#sec-reflect.getprototypeof
  9704. $({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
  9705. getPrototypeOf: function getPrototypeOf(target) {
  9706. return objectGetPrototypeOf(anObject(target));
  9707. }
  9708. });
  9709. /***/ }),
  9710. /***/ "./node_modules/core-js/modules/es.regexp.to-string.js":
  9711. /*!*************************************************************!*\
  9712. !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***!
  9713. \*************************************************************/
  9714. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9715. "use strict";
  9716. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9717. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  9718. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9719. var flags = __webpack_require__(/*! ../internals/regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js");
  9720. var TO_STRING = 'toString';
  9721. var RegExpPrototype = RegExp.prototype;
  9722. var nativeToString = RegExpPrototype[TO_STRING];
  9723. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  9724. // FF44- RegExp#toString has a wrong name
  9725. var INCORRECT_NAME = nativeToString.name != TO_STRING;
  9726. // `RegExp.prototype.toString` method
  9727. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  9728. if (NOT_GENERIC || INCORRECT_NAME) {
  9729. redefine(RegExp.prototype, TO_STRING, function toString() {
  9730. var R = anObject(this);
  9731. var p = String(R.source);
  9732. var rf = R.flags;
  9733. var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
  9734. return '/' + p + '/' + f;
  9735. }, { unsafe: true });
  9736. }
  9737. /***/ }),
  9738. /***/ "./node_modules/core-js/modules/es.string.iterator.js":
  9739. /*!************************************************************!*\
  9740. !*** ./node_modules/core-js/modules/es.string.iterator.js ***!
  9741. \************************************************************/
  9742. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9743. "use strict";
  9744. var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt;
  9745. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  9746. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  9747. var STRING_ITERATOR = 'String Iterator';
  9748. var setInternalState = InternalStateModule.set;
  9749. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  9750. // `String.prototype[@@iterator]` method
  9751. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  9752. defineIterator(String, 'String', function (iterated) {
  9753. setInternalState(this, {
  9754. type: STRING_ITERATOR,
  9755. string: String(iterated),
  9756. index: 0
  9757. });
  9758. // `%StringIteratorPrototype%.next` method
  9759. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  9760. }, function next() {
  9761. var state = getInternalState(this);
  9762. var string = state.string;
  9763. var index = state.index;
  9764. var point;
  9765. if (index >= string.length) return { value: undefined, done: true };
  9766. point = charAt(string, index);
  9767. state.index += point.length;
  9768. return { value: point, done: false };
  9769. });
  9770. /***/ }),
  9771. /***/ "./node_modules/core-js/modules/es.string.match.js":
  9772. /*!*********************************************************!*\
  9773. !*** ./node_modules/core-js/modules/es.string.match.js ***!
  9774. \*********************************************************/
  9775. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9776. "use strict";
  9777. var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
  9778. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  9779. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  9780. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  9781. var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
  9782. var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
  9783. // @@match logic
  9784. fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  9785. return [
  9786. // `String.prototype.match` method
  9787. // https://tc39.es/ecma262/#sec-string.prototype.match
  9788. function match(regexp) {
  9789. var O = requireObjectCoercible(this);
  9790. var matcher = regexp == undefined ? undefined : regexp[MATCH];
  9791. return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  9792. },
  9793. // `RegExp.prototype[@@match]` method
  9794. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  9795. function (regexp) {
  9796. var res = maybeCallNative(nativeMatch, regexp, this);
  9797. if (res.done) return res.value;
  9798. var rx = anObject(regexp);
  9799. var S = String(this);
  9800. if (!rx.global) return regExpExec(rx, S);
  9801. var fullUnicode = rx.unicode;
  9802. rx.lastIndex = 0;
  9803. var A = [];
  9804. var n = 0;
  9805. var result;
  9806. while ((result = regExpExec(rx, S)) !== null) {
  9807. var matchStr = String(result[0]);
  9808. A[n] = matchStr;
  9809. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  9810. n++;
  9811. }
  9812. return n === 0 ? null : A;
  9813. }
  9814. ];
  9815. });
  9816. /***/ }),
  9817. /***/ "./node_modules/core-js/modules/es.string.starts-with.js":
  9818. /*!***************************************************************!*\
  9819. !*** ./node_modules/core-js/modules/es.string.starts-with.js ***!
  9820. \***************************************************************/
  9821. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9822. "use strict";
  9823. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9824. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  9825. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  9826. var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
  9827. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  9828. var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
  9829. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  9830. // eslint-disable-next-line es/no-string-prototype-startswith -- safe
  9831. var $startsWith = ''.startsWith;
  9832. var min = Math.min;
  9833. var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
  9834. // https://github.com/zloirock/core-js/pull/702
  9835. var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
  9836. var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  9837. return descriptor && !descriptor.writable;
  9838. }();
  9839. // `String.prototype.startsWith` method
  9840. // https://tc39.es/ecma262/#sec-string.prototype.startswith
  9841. $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  9842. startsWith: function startsWith(searchString /* , position = 0 */) {
  9843. var that = String(requireObjectCoercible(this));
  9844. notARegExp(searchString);
  9845. var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  9846. var search = String(searchString);
  9847. return $startsWith
  9848. ? $startsWith.call(that, search, index)
  9849. : that.slice(index, index + search.length) === search;
  9850. }
  9851. });
  9852. /***/ }),
  9853. /***/ "./node_modules/core-js/modules/es.string.trim.js":
  9854. /*!********************************************************!*\
  9855. !*** ./node_modules/core-js/modules/es.string.trim.js ***!
  9856. \********************************************************/
  9857. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9858. "use strict";
  9859. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9860. var $trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
  9861. var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "./node_modules/core-js/internals/string-trim-forced.js");
  9862. // `String.prototype.trim` method
  9863. // https://tc39.es/ecma262/#sec-string.prototype.trim
  9864. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  9865. trim: function trim() {
  9866. return $trim(this);
  9867. }
  9868. });
  9869. /***/ }),
  9870. /***/ "./node_modules/core-js/modules/es.symbol.description.js":
  9871. /*!***************************************************************!*\
  9872. !*** ./node_modules/core-js/modules/es.symbol.description.js ***!
  9873. \***************************************************************/
  9874. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9875. "use strict";
  9876. // `Symbol.prototype.description` getter
  9877. // https://tc39.es/ecma262/#sec-symbol.prototype.description
  9878. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9879. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9880. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9881. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  9882. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9883. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  9884. var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
  9885. var NativeSymbol = global.Symbol;
  9886. if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
  9887. // Safari 12 bug
  9888. NativeSymbol().description !== undefined
  9889. )) {
  9890. var EmptyStringDescriptionStore = {};
  9891. // wrap Symbol constructor for correct work with undefined description
  9892. var SymbolWrapper = function Symbol() {
  9893. var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
  9894. var result = this instanceof SymbolWrapper
  9895. ? new NativeSymbol(description)
  9896. // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
  9897. : description === undefined ? NativeSymbol() : NativeSymbol(description);
  9898. if (description === '') EmptyStringDescriptionStore[result] = true;
  9899. return result;
  9900. };
  9901. copyConstructorProperties(SymbolWrapper, NativeSymbol);
  9902. var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
  9903. symbolPrototype.constructor = SymbolWrapper;
  9904. var symbolToString = symbolPrototype.toString;
  9905. var native = String(NativeSymbol('test')) == 'Symbol(test)';
  9906. var regexp = /^Symbol\((.*)\)[^)]+$/;
  9907. defineProperty(symbolPrototype, 'description', {
  9908. configurable: true,
  9909. get: function description() {
  9910. var symbol = isObject(this) ? this.valueOf() : this;
  9911. var string = symbolToString.call(symbol);
  9912. if (has(EmptyStringDescriptionStore, symbol)) return '';
  9913. var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
  9914. return desc === '' ? undefined : desc;
  9915. }
  9916. });
  9917. $({ global: true, forced: true }, {
  9918. Symbol: SymbolWrapper
  9919. });
  9920. }
  9921. /***/ }),
  9922. /***/ "./node_modules/core-js/modules/es.symbol.iterator.js":
  9923. /*!************************************************************!*\
  9924. !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
  9925. \************************************************************/
  9926. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9927. var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
  9928. // `Symbol.iterator` well-known symbol
  9929. // https://tc39.es/ecma262/#sec-symbol.iterator
  9930. defineWellKnownSymbol('iterator');
  9931. /***/ }),
  9932. /***/ "./node_modules/core-js/modules/es.symbol.js":
  9933. /*!***************************************************!*\
  9934. !*** ./node_modules/core-js/modules/es.symbol.js ***!
  9935. \***************************************************/
  9936. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9937. "use strict";
  9938. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9939. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9940. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9941. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  9942. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9943. var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
  9944. var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
  9945. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9946. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  9947. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9948. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9949. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  9950. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  9951. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9952. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  9953. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  9954. var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  9955. var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  9956. var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
  9957. var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "./node_modules/core-js/internals/object-get-own-property-names-external.js");
  9958. var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
  9959. var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
  9960. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  9961. var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
  9962. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  9963. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9964. var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
  9965. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  9966. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  9967. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
  9968. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9969. var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
  9970. var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
  9971. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  9972. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  9973. var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
  9974. var HIDDEN = sharedKey('hidden');
  9975. var SYMBOL = 'Symbol';
  9976. var PROTOTYPE = 'prototype';
  9977. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  9978. var setInternalState = InternalStateModule.set;
  9979. var getInternalState = InternalStateModule.getterFor(SYMBOL);
  9980. var ObjectPrototype = Object[PROTOTYPE];
  9981. var $Symbol = global.Symbol;
  9982. var $stringify = getBuiltIn('JSON', 'stringify');
  9983. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  9984. var nativeDefineProperty = definePropertyModule.f;
  9985. var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
  9986. var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
  9987. var AllSymbols = shared('symbols');
  9988. var ObjectPrototypeSymbols = shared('op-symbols');
  9989. var StringToSymbolRegistry = shared('string-to-symbol-registry');
  9990. var SymbolToStringRegistry = shared('symbol-to-string-registry');
  9991. var WellKnownSymbolsStore = shared('wks');
  9992. var QObject = global.QObject;
  9993. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  9994. var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  9995. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  9996. var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  9997. return nativeObjectCreate(nativeDefineProperty({}, 'a', {
  9998. get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  9999. })).a != 7;
  10000. }) ? function (O, P, Attributes) {
  10001. var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  10002. if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  10003. nativeDefineProperty(O, P, Attributes);
  10004. if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
  10005. nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  10006. }
  10007. } : nativeDefineProperty;
  10008. var wrap = function (tag, description) {
  10009. var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
  10010. setInternalState(symbol, {
  10011. type: SYMBOL,
  10012. tag: tag,
  10013. description: description
  10014. });
  10015. if (!DESCRIPTORS) symbol.description = description;
  10016. return symbol;
  10017. };
  10018. var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  10019. return typeof it == 'symbol';
  10020. } : function (it) {
  10021. return Object(it) instanceof $Symbol;
  10022. };
  10023. var $defineProperty = function defineProperty(O, P, Attributes) {
  10024. if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  10025. anObject(O);
  10026. var key = toPrimitive(P, true);
  10027. anObject(Attributes);
  10028. if (has(AllSymbols, key)) {
  10029. if (!Attributes.enumerable) {
  10030. if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
  10031. O[HIDDEN][key] = true;
  10032. } else {
  10033. if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
  10034. Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
  10035. } return setSymbolDescriptor(O, key, Attributes);
  10036. } return nativeDefineProperty(O, key, Attributes);
  10037. };
  10038. var $defineProperties = function defineProperties(O, Properties) {
  10039. anObject(O);
  10040. var properties = toIndexedObject(Properties);
  10041. var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  10042. $forEach(keys, function (key) {
  10043. if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
  10044. });
  10045. return O;
  10046. };
  10047. var $create = function create(O, Properties) {
  10048. return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
  10049. };
  10050. var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  10051. var P = toPrimitive(V, true);
  10052. var enumerable = nativePropertyIsEnumerable.call(this, P);
  10053. if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
  10054. return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
  10055. };
  10056. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  10057. var it = toIndexedObject(O);
  10058. var key = toPrimitive(P, true);
  10059. if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
  10060. var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  10061. if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
  10062. descriptor.enumerable = true;
  10063. }
  10064. return descriptor;
  10065. };
  10066. var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  10067. var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  10068. var result = [];
  10069. $forEach(names, function (key) {
  10070. if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
  10071. });
  10072. return result;
  10073. };
  10074. var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  10075. var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  10076. var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  10077. var result = [];
  10078. $forEach(names, function (key) {
  10079. if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
  10080. result.push(AllSymbols[key]);
  10081. }
  10082. });
  10083. return result;
  10084. };
  10085. // `Symbol` constructor
  10086. // https://tc39.es/ecma262/#sec-symbol-constructor
  10087. if (!NATIVE_SYMBOL) {
  10088. $Symbol = function Symbol() {
  10089. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
  10090. var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
  10091. var tag = uid(description);
  10092. var setter = function (value) {
  10093. if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
  10094. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  10095. setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
  10096. };
  10097. if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
  10098. return wrap(tag, description);
  10099. };
  10100. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  10101. return getInternalState(this).tag;
  10102. });
  10103. redefine($Symbol, 'withoutSetter', function (description) {
  10104. return wrap(uid(description), description);
  10105. });
  10106. propertyIsEnumerableModule.f = $propertyIsEnumerable;
  10107. definePropertyModule.f = $defineProperty;
  10108. getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  10109. getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  10110. getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
  10111. wrappedWellKnownSymbolModule.f = function (name) {
  10112. return wrap(wellKnownSymbol(name), name);
  10113. };
  10114. if (DESCRIPTORS) {
  10115. // https://github.com/tc39/proposal-Symbol-description
  10116. nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
  10117. configurable: true,
  10118. get: function description() {
  10119. return getInternalState(this).description;
  10120. }
  10121. });
  10122. if (!IS_PURE) {
  10123. redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
  10124. }
  10125. }
  10126. }
  10127. $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  10128. Symbol: $Symbol
  10129. });
  10130. $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  10131. defineWellKnownSymbol(name);
  10132. });
  10133. $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  10134. // `Symbol.for` method
  10135. // https://tc39.es/ecma262/#sec-symbol.for
  10136. 'for': function (key) {
  10137. var string = String(key);
  10138. if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
  10139. var symbol = $Symbol(string);
  10140. StringToSymbolRegistry[string] = symbol;
  10141. SymbolToStringRegistry[symbol] = string;
  10142. return symbol;
  10143. },
  10144. // `Symbol.keyFor` method
  10145. // https://tc39.es/ecma262/#sec-symbol.keyfor
  10146. keyFor: function keyFor(sym) {
  10147. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
  10148. if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  10149. },
  10150. useSetter: function () { USE_SETTER = true; },
  10151. useSimple: function () { USE_SETTER = false; }
  10152. });
  10153. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  10154. // `Object.create` method
  10155. // https://tc39.es/ecma262/#sec-object.create
  10156. create: $create,
  10157. // `Object.defineProperty` method
  10158. // https://tc39.es/ecma262/#sec-object.defineproperty
  10159. defineProperty: $defineProperty,
  10160. // `Object.defineProperties` method
  10161. // https://tc39.es/ecma262/#sec-object.defineproperties
  10162. defineProperties: $defineProperties,
  10163. // `Object.getOwnPropertyDescriptor` method
  10164. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  10165. getOwnPropertyDescriptor: $getOwnPropertyDescriptor
  10166. });
  10167. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  10168. // `Object.getOwnPropertyNames` method
  10169. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  10170. getOwnPropertyNames: $getOwnPropertyNames,
  10171. // `Object.getOwnPropertySymbols` method
  10172. // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  10173. getOwnPropertySymbols: $getOwnPropertySymbols
  10174. });
  10175. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  10176. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  10177. $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  10178. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  10179. return getOwnPropertySymbolsModule.f(toObject(it));
  10180. }
  10181. });
  10182. // `JSON.stringify` method behavior with symbols
  10183. // https://tc39.es/ecma262/#sec-json.stringify
  10184. if ($stringify) {
  10185. var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
  10186. var symbol = $Symbol();
  10187. // MS Edge converts symbol values to JSON as {}
  10188. return $stringify([symbol]) != '[null]'
  10189. // WebKit converts symbol values to JSON as null
  10190. || $stringify({ a: symbol }) != '{}'
  10191. // V8 throws on boxed symbols
  10192. || $stringify(Object(symbol)) != '{}';
  10193. });
  10194. $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
  10195. // eslint-disable-next-line no-unused-vars -- required for `.length`
  10196. stringify: function stringify(it, replacer, space) {
  10197. var args = [it];
  10198. var index = 1;
  10199. var $replacer;
  10200. while (arguments.length > index) args.push(arguments[index++]);
  10201. $replacer = replacer;
  10202. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  10203. if (!isArray(replacer)) replacer = function (key, value) {
  10204. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  10205. if (!isSymbol(value)) return value;
  10206. };
  10207. args[1] = replacer;
  10208. return $stringify.apply(null, args);
  10209. }
  10210. });
  10211. }
  10212. // `Symbol.prototype[@@toPrimitive]` method
  10213. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  10214. if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
  10215. createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  10216. }
  10217. // `Symbol.prototype[@@toStringTag]` property
  10218. // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
  10219. setToStringTag($Symbol, SYMBOL);
  10220. hiddenKeys[HIDDEN] = true;
  10221. /***/ }),
  10222. /***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js":
  10223. /*!**********************************************************************!*\
  10224. !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
  10225. \**********************************************************************/
  10226. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10227. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10228. var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
  10229. var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
  10230. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  10231. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  10232. var ITERATOR = wellKnownSymbol('iterator');
  10233. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  10234. var ArrayValues = ArrayIteratorMethods.values;
  10235. for (var COLLECTION_NAME in DOMIterables) {
  10236. var Collection = global[COLLECTION_NAME];
  10237. var CollectionPrototype = Collection && Collection.prototype;
  10238. if (CollectionPrototype) {
  10239. // some Chrome versions have non-configurable methods on DOMTokenList
  10240. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  10241. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  10242. } catch (error) {
  10243. CollectionPrototype[ITERATOR] = ArrayValues;
  10244. }
  10245. if (!CollectionPrototype[TO_STRING_TAG]) {
  10246. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  10247. }
  10248. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  10249. // some Chrome versions have non-configurable methods on DOMTokenList
  10250. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  10251. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  10252. } catch (error) {
  10253. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  10254. }
  10255. }
  10256. }
  10257. }
  10258. /***/ }),
  10259. /***/ "./node_modules/performance-now/lib/performance-now.js":
  10260. /*!*************************************************************!*\
  10261. !*** ./node_modules/performance-now/lib/performance-now.js ***!
  10262. \*************************************************************/
  10263. /***/ (function(module) {
  10264. // Generated by CoffeeScript 1.12.2
  10265. (function() {
  10266. var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
  10267. if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
  10268. module.exports = function() {
  10269. return performance.now();
  10270. };
  10271. } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
  10272. module.exports = function() {
  10273. return (getNanoSeconds() - nodeLoadTime) / 1e6;
  10274. };
  10275. hrtime = process.hrtime;
  10276. getNanoSeconds = function() {
  10277. var hr;
  10278. hr = hrtime();
  10279. return hr[0] * 1e9 + hr[1];
  10280. };
  10281. moduleLoadTime = getNanoSeconds();
  10282. upTime = process.uptime() * 1e9;
  10283. nodeLoadTime = moduleLoadTime - upTime;
  10284. } else if (Date.now) {
  10285. module.exports = function() {
  10286. return Date.now() - loadTime;
  10287. };
  10288. loadTime = Date.now();
  10289. } else {
  10290. module.exports = function() {
  10291. return new Date().getTime() - loadTime;
  10292. };
  10293. loadTime = new Date().getTime();
  10294. }
  10295. }).call(this);
  10296. //# sourceMappingURL=performance-now.js.map
  10297. /***/ }),
  10298. /***/ "./node_modules/raf/index.js":
  10299. /*!***********************************!*\
  10300. !*** ./node_modules/raf/index.js ***!
  10301. \***********************************/
  10302. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10303. var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js")
  10304. , root = typeof window === 'undefined' ? __webpack_require__.g : window
  10305. , vendors = ['moz', 'webkit']
  10306. , suffix = 'AnimationFrame'
  10307. , raf = root['request' + suffix]
  10308. , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
  10309. for(var i = 0; !raf && i < vendors.length; i++) {
  10310. raf = root[vendors[i] + 'Request' + suffix]
  10311. caf = root[vendors[i] + 'Cancel' + suffix]
  10312. || root[vendors[i] + 'CancelRequest' + suffix]
  10313. }
  10314. // Some versions of FF have rAF but not cAF
  10315. if(!raf || !caf) {
  10316. var last = 0
  10317. , id = 0
  10318. , queue = []
  10319. , frameDuration = 1000 / 60
  10320. raf = function(callback) {
  10321. if(queue.length === 0) {
  10322. var _now = now()
  10323. , next = Math.max(0, frameDuration - (_now - last))
  10324. last = next + _now
  10325. setTimeout(function() {
  10326. var cp = queue.slice(0)
  10327. // Clear queue here to prevent
  10328. // callbacks from appending listeners
  10329. // to the current frame's queue
  10330. queue.length = 0
  10331. for(var i = 0; i < cp.length; i++) {
  10332. if(!cp[i].cancelled) {
  10333. try{
  10334. cp[i].callback(last)
  10335. } catch(e) {
  10336. setTimeout(function() { throw e }, 0)
  10337. }
  10338. }
  10339. }
  10340. }, Math.round(next))
  10341. }
  10342. queue.push({
  10343. handle: ++id,
  10344. callback: callback,
  10345. cancelled: false
  10346. })
  10347. return id
  10348. }
  10349. caf = function(handle) {
  10350. for(var i = 0; i < queue.length; i++) {
  10351. if(queue[i].handle === handle) {
  10352. queue[i].cancelled = true
  10353. }
  10354. }
  10355. }
  10356. }
  10357. module.exports = function(fn) {
  10358. // Wrap in a new function to prevent
  10359. // `cancel` potentially being assigned
  10360. // to the native rAF function
  10361. return raf.call(root, fn)
  10362. }
  10363. module.exports.cancel = function() {
  10364. caf.apply(root, arguments)
  10365. }
  10366. module.exports.polyfill = function(object) {
  10367. if (!object) {
  10368. object = root;
  10369. }
  10370. object.requestAnimationFrame = raf
  10371. object.cancelAnimationFrame = caf
  10372. }
  10373. /***/ }),
  10374. /***/ "./node_modules/regenerator-runtime/runtime.js":
  10375. /*!*****************************************************!*\
  10376. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  10377. \*****************************************************/
  10378. /***/ ((module) => {
  10379. /**
  10380. * Copyright (c) 2014-present, Facebook, Inc.
  10381. *
  10382. * This source code is licensed under the MIT license found in the
  10383. * LICENSE file in the root directory of this source tree.
  10384. */
  10385. var runtime = (function (exports) {
  10386. "use strict";
  10387. var Op = Object.prototype;
  10388. var hasOwn = Op.hasOwnProperty;
  10389. var undefined; // More compressible than void 0.
  10390. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  10391. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  10392. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  10393. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  10394. function define(obj, key, value) {
  10395. Object.defineProperty(obj, key, {
  10396. value: value,
  10397. enumerable: true,
  10398. configurable: true,
  10399. writable: true
  10400. });
  10401. return obj[key];
  10402. }
  10403. try {
  10404. // IE 8 has a broken Object.defineProperty that only works on DOM objects.
  10405. define({}, "");
  10406. } catch (err) {
  10407. define = function(obj, key, value) {
  10408. return obj[key] = value;
  10409. };
  10410. }
  10411. function wrap(innerFn, outerFn, self, tryLocsList) {
  10412. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  10413. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  10414. var generator = Object.create(protoGenerator.prototype);
  10415. var context = new Context(tryLocsList || []);
  10416. // The ._invoke method unifies the implementations of the .next,
  10417. // .throw, and .return methods.
  10418. generator._invoke = makeInvokeMethod(innerFn, self, context);
  10419. return generator;
  10420. }
  10421. exports.wrap = wrap;
  10422. // Try/catch helper to minimize deoptimizations. Returns a completion
  10423. // record like context.tryEntries[i].completion. This interface could
  10424. // have been (and was previously) designed to take a closure to be
  10425. // invoked without arguments, but in all the cases we care about we
  10426. // already have an existing method we want to call, so there's no need
  10427. // to create a new function object. We can even get away with assuming
  10428. // the method takes exactly one argument, since that happens to be true
  10429. // in every case, so we don't have to touch the arguments object. The
  10430. // only additional allocation required is the completion record, which
  10431. // has a stable shape and so hopefully should be cheap to allocate.
  10432. function tryCatch(fn, obj, arg) {
  10433. try {
  10434. return { type: "normal", arg: fn.call(obj, arg) };
  10435. } catch (err) {
  10436. return { type: "throw", arg: err };
  10437. }
  10438. }
  10439. var GenStateSuspendedStart = "suspendedStart";
  10440. var GenStateSuspendedYield = "suspendedYield";
  10441. var GenStateExecuting = "executing";
  10442. var GenStateCompleted = "completed";
  10443. // Returning this object from the innerFn has the same effect as
  10444. // breaking out of the dispatch switch statement.
  10445. var ContinueSentinel = {};
  10446. // Dummy constructor functions that we use as the .constructor and
  10447. // .constructor.prototype properties for functions that return Generator
  10448. // objects. For full spec compliance, you may wish to configure your
  10449. // minifier not to mangle the names of these two functions.
  10450. function Generator() {}
  10451. function GeneratorFunction() {}
  10452. function GeneratorFunctionPrototype() {}
  10453. // This is a polyfill for %IteratorPrototype% for environments that
  10454. // don't natively support it.
  10455. var IteratorPrototype = {};
  10456. IteratorPrototype[iteratorSymbol] = function () {
  10457. return this;
  10458. };
  10459. var getProto = Object.getPrototypeOf;
  10460. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  10461. if (NativeIteratorPrototype &&
  10462. NativeIteratorPrototype !== Op &&
  10463. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  10464. // This environment has a native %IteratorPrototype%; use it instead
  10465. // of the polyfill.
  10466. IteratorPrototype = NativeIteratorPrototype;
  10467. }
  10468. var Gp = GeneratorFunctionPrototype.prototype =
  10469. Generator.prototype = Object.create(IteratorPrototype);
  10470. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  10471. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  10472. GeneratorFunction.displayName = define(
  10473. GeneratorFunctionPrototype,
  10474. toStringTagSymbol,
  10475. "GeneratorFunction"
  10476. );
  10477. // Helper for defining the .next, .throw, and .return methods of the
  10478. // Iterator interface in terms of a single ._invoke method.
  10479. function defineIteratorMethods(prototype) {
  10480. ["next", "throw", "return"].forEach(function(method) {
  10481. define(prototype, method, function(arg) {
  10482. return this._invoke(method, arg);
  10483. });
  10484. });
  10485. }
  10486. exports.isGeneratorFunction = function(genFun) {
  10487. var ctor = typeof genFun === "function" && genFun.constructor;
  10488. return ctor
  10489. ? ctor === GeneratorFunction ||
  10490. // For the native GeneratorFunction constructor, the best we can
  10491. // do is to check its .name property.
  10492. (ctor.displayName || ctor.name) === "GeneratorFunction"
  10493. : false;
  10494. };
  10495. exports.mark = function(genFun) {
  10496. if (Object.setPrototypeOf) {
  10497. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  10498. } else {
  10499. genFun.__proto__ = GeneratorFunctionPrototype;
  10500. define(genFun, toStringTagSymbol, "GeneratorFunction");
  10501. }
  10502. genFun.prototype = Object.create(Gp);
  10503. return genFun;
  10504. };
  10505. // Within the body of any async function, `await x` is transformed to
  10506. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  10507. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  10508. // meant to be awaited.
  10509. exports.awrap = function(arg) {
  10510. return { __await: arg };
  10511. };
  10512. function AsyncIterator(generator, PromiseImpl) {
  10513. function invoke(method, arg, resolve, reject) {
  10514. var record = tryCatch(generator[method], generator, arg);
  10515. if (record.type === "throw") {
  10516. reject(record.arg);
  10517. } else {
  10518. var result = record.arg;
  10519. var value = result.value;
  10520. if (value &&
  10521. typeof value === "object" &&
  10522. hasOwn.call(value, "__await")) {
  10523. return PromiseImpl.resolve(value.__await).then(function(value) {
  10524. invoke("next", value, resolve, reject);
  10525. }, function(err) {
  10526. invoke("throw", err, resolve, reject);
  10527. });
  10528. }
  10529. return PromiseImpl.resolve(value).then(function(unwrapped) {
  10530. // When a yielded Promise is resolved, its final value becomes
  10531. // the .value of the Promise<{value,done}> result for the
  10532. // current iteration.
  10533. result.value = unwrapped;
  10534. resolve(result);
  10535. }, function(error) {
  10536. // If a rejected Promise was yielded, throw the rejection back
  10537. // into the async generator function so it can be handled there.
  10538. return invoke("throw", error, resolve, reject);
  10539. });
  10540. }
  10541. }
  10542. var previousPromise;
  10543. function enqueue(method, arg) {
  10544. function callInvokeWithMethodAndArg() {
  10545. return new PromiseImpl(function(resolve, reject) {
  10546. invoke(method, arg, resolve, reject);
  10547. });
  10548. }
  10549. return previousPromise =
  10550. // If enqueue has been called before, then we want to wait until
  10551. // all previous Promises have been resolved before calling invoke,
  10552. // so that results are always delivered in the correct order. If
  10553. // enqueue has not been called before, then it is important to
  10554. // call invoke immediately, without waiting on a callback to fire,
  10555. // so that the async generator function has the opportunity to do
  10556. // any necessary setup in a predictable way. This predictability
  10557. // is why the Promise constructor synchronously invokes its
  10558. // executor callback, and why async functions synchronously
  10559. // execute code before the first await. Since we implement simple
  10560. // async functions in terms of async generators, it is especially
  10561. // important to get this right, even though it requires care.
  10562. previousPromise ? previousPromise.then(
  10563. callInvokeWithMethodAndArg,
  10564. // Avoid propagating failures to Promises returned by later
  10565. // invocations of the iterator.
  10566. callInvokeWithMethodAndArg
  10567. ) : callInvokeWithMethodAndArg();
  10568. }
  10569. // Define the unified helper method that is used to implement .next,
  10570. // .throw, and .return (see defineIteratorMethods).
  10571. this._invoke = enqueue;
  10572. }
  10573. defineIteratorMethods(AsyncIterator.prototype);
  10574. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  10575. return this;
  10576. };
  10577. exports.AsyncIterator = AsyncIterator;
  10578. // Note that simple async functions are implemented on top of
  10579. // AsyncIterator objects; they just return a Promise for the value of
  10580. // the final result produced by the iterator.
  10581. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  10582. if (PromiseImpl === void 0) PromiseImpl = Promise;
  10583. var iter = new AsyncIterator(
  10584. wrap(innerFn, outerFn, self, tryLocsList),
  10585. PromiseImpl
  10586. );
  10587. return exports.isGeneratorFunction(outerFn)
  10588. ? iter // If outerFn is a generator, return the full iterator.
  10589. : iter.next().then(function(result) {
  10590. return result.done ? result.value : iter.next();
  10591. });
  10592. };
  10593. function makeInvokeMethod(innerFn, self, context) {
  10594. var state = GenStateSuspendedStart;
  10595. return function invoke(method, arg) {
  10596. if (state === GenStateExecuting) {
  10597. throw new Error("Generator is already running");
  10598. }
  10599. if (state === GenStateCompleted) {
  10600. if (method === "throw") {
  10601. throw arg;
  10602. }
  10603. // Be forgiving, per 25.3.3.3.3 of the spec:
  10604. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  10605. return doneResult();
  10606. }
  10607. context.method = method;
  10608. context.arg = arg;
  10609. while (true) {
  10610. var delegate = context.delegate;
  10611. if (delegate) {
  10612. var delegateResult = maybeInvokeDelegate(delegate, context);
  10613. if (delegateResult) {
  10614. if (delegateResult === ContinueSentinel) continue;
  10615. return delegateResult;
  10616. }
  10617. }
  10618. if (context.method === "next") {
  10619. // Setting context._sent for legacy support of Babel's
  10620. // function.sent implementation.
  10621. context.sent = context._sent = context.arg;
  10622. } else if (context.method === "throw") {
  10623. if (state === GenStateSuspendedStart) {
  10624. state = GenStateCompleted;
  10625. throw context.arg;
  10626. }
  10627. context.dispatchException(context.arg);
  10628. } else if (context.method === "return") {
  10629. context.abrupt("return", context.arg);
  10630. }
  10631. state = GenStateExecuting;
  10632. var record = tryCatch(innerFn, self, context);
  10633. if (record.type === "normal") {
  10634. // If an exception is thrown from innerFn, we leave state ===
  10635. // GenStateExecuting and loop back for another invocation.
  10636. state = context.done
  10637. ? GenStateCompleted
  10638. : GenStateSuspendedYield;
  10639. if (record.arg === ContinueSentinel) {
  10640. continue;
  10641. }
  10642. return {
  10643. value: record.arg,
  10644. done: context.done
  10645. };
  10646. } else if (record.type === "throw") {
  10647. state = GenStateCompleted;
  10648. // Dispatch the exception by looping back around to the
  10649. // context.dispatchException(context.arg) call above.
  10650. context.method = "throw";
  10651. context.arg = record.arg;
  10652. }
  10653. }
  10654. };
  10655. }
  10656. // Call delegate.iterator[context.method](context.arg) and handle the
  10657. // result, either by returning a { value, done } result from the
  10658. // delegate iterator, or by modifying context.method and context.arg,
  10659. // setting context.delegate to null, and returning the ContinueSentinel.
  10660. function maybeInvokeDelegate(delegate, context) {
  10661. var method = delegate.iterator[context.method];
  10662. if (method === undefined) {
  10663. // A .throw or .return when the delegate iterator has no .throw
  10664. // method always terminates the yield* loop.
  10665. context.delegate = null;
  10666. if (context.method === "throw") {
  10667. // Note: ["return"] must be used for ES3 parsing compatibility.
  10668. if (delegate.iterator["return"]) {
  10669. // If the delegate iterator has a return method, give it a
  10670. // chance to clean up.
  10671. context.method = "return";
  10672. context.arg = undefined;
  10673. maybeInvokeDelegate(delegate, context);
  10674. if (context.method === "throw") {
  10675. // If maybeInvokeDelegate(context) changed context.method from
  10676. // "return" to "throw", let that override the TypeError below.
  10677. return ContinueSentinel;
  10678. }
  10679. }
  10680. context.method = "throw";
  10681. context.arg = new TypeError(
  10682. "The iterator does not provide a 'throw' method");
  10683. }
  10684. return ContinueSentinel;
  10685. }
  10686. var record = tryCatch(method, delegate.iterator, context.arg);
  10687. if (record.type === "throw") {
  10688. context.method = "throw";
  10689. context.arg = record.arg;
  10690. context.delegate = null;
  10691. return ContinueSentinel;
  10692. }
  10693. var info = record.arg;
  10694. if (! info) {
  10695. context.method = "throw";
  10696. context.arg = new TypeError("iterator result is not an object");
  10697. context.delegate = null;
  10698. return ContinueSentinel;
  10699. }
  10700. if (info.done) {
  10701. // Assign the result of the finished delegate to the temporary
  10702. // variable specified by delegate.resultName (see delegateYield).
  10703. context[delegate.resultName] = info.value;
  10704. // Resume execution at the desired location (see delegateYield).
  10705. context.next = delegate.nextLoc;
  10706. // If context.method was "throw" but the delegate handled the
  10707. // exception, let the outer generator proceed normally. If
  10708. // context.method was "next", forget context.arg since it has been
  10709. // "consumed" by the delegate iterator. If context.method was
  10710. // "return", allow the original .return call to continue in the
  10711. // outer generator.
  10712. if (context.method !== "return") {
  10713. context.method = "next";
  10714. context.arg = undefined;
  10715. }
  10716. } else {
  10717. // Re-yield the result returned by the delegate method.
  10718. return info;
  10719. }
  10720. // The delegate iterator is finished, so forget it and continue with
  10721. // the outer generator.
  10722. context.delegate = null;
  10723. return ContinueSentinel;
  10724. }
  10725. // Define Generator.prototype.{next,throw,return} in terms of the
  10726. // unified ._invoke helper method.
  10727. defineIteratorMethods(Gp);
  10728. define(Gp, toStringTagSymbol, "Generator");
  10729. // A Generator should always return itself as the iterator object when the
  10730. // @@iterator function is called on it. Some browsers' implementations of the
  10731. // iterator prototype chain incorrectly implement this, causing the Generator
  10732. // object to not be returned from this call. This ensures that doesn't happen.
  10733. // See https://github.com/facebook/regenerator/issues/274 for more details.
  10734. Gp[iteratorSymbol] = function() {
  10735. return this;
  10736. };
  10737. Gp.toString = function() {
  10738. return "[object Generator]";
  10739. };
  10740. function pushTryEntry(locs) {
  10741. var entry = { tryLoc: locs[0] };
  10742. if (1 in locs) {
  10743. entry.catchLoc = locs[1];
  10744. }
  10745. if (2 in locs) {
  10746. entry.finallyLoc = locs[2];
  10747. entry.afterLoc = locs[3];
  10748. }
  10749. this.tryEntries.push(entry);
  10750. }
  10751. function resetTryEntry(entry) {
  10752. var record = entry.completion || {};
  10753. record.type = "normal";
  10754. delete record.arg;
  10755. entry.completion = record;
  10756. }
  10757. function Context(tryLocsList) {
  10758. // The root entry object (effectively a try statement without a catch
  10759. // or a finally block) gives us a place to store values thrown from
  10760. // locations where there is no enclosing try statement.
  10761. this.tryEntries = [{ tryLoc: "root" }];
  10762. tryLocsList.forEach(pushTryEntry, this);
  10763. this.reset(true);
  10764. }
  10765. exports.keys = function(object) {
  10766. var keys = [];
  10767. for (var key in object) {
  10768. keys.push(key);
  10769. }
  10770. keys.reverse();
  10771. // Rather than returning an object with a next method, we keep
  10772. // things simple and return the next function itself.
  10773. return function next() {
  10774. while (keys.length) {
  10775. var key = keys.pop();
  10776. if (key in object) {
  10777. next.value = key;
  10778. next.done = false;
  10779. return next;
  10780. }
  10781. }
  10782. // To avoid creating an additional object, we just hang the .value
  10783. // and .done properties off the next function object itself. This
  10784. // also ensures that the minifier will not anonymize the function.
  10785. next.done = true;
  10786. return next;
  10787. };
  10788. };
  10789. function values(iterable) {
  10790. if (iterable) {
  10791. var iteratorMethod = iterable[iteratorSymbol];
  10792. if (iteratorMethod) {
  10793. return iteratorMethod.call(iterable);
  10794. }
  10795. if (typeof iterable.next === "function") {
  10796. return iterable;
  10797. }
  10798. if (!isNaN(iterable.length)) {
  10799. var i = -1, next = function next() {
  10800. while (++i < iterable.length) {
  10801. if (hasOwn.call(iterable, i)) {
  10802. next.value = iterable[i];
  10803. next.done = false;
  10804. return next;
  10805. }
  10806. }
  10807. next.value = undefined;
  10808. next.done = true;
  10809. return next;
  10810. };
  10811. return next.next = next;
  10812. }
  10813. }
  10814. // Return an iterator with no values.
  10815. return { next: doneResult };
  10816. }
  10817. exports.values = values;
  10818. function doneResult() {
  10819. return { value: undefined, done: true };
  10820. }
  10821. Context.prototype = {
  10822. constructor: Context,
  10823. reset: function(skipTempReset) {
  10824. this.prev = 0;
  10825. this.next = 0;
  10826. // Resetting context._sent for legacy support of Babel's
  10827. // function.sent implementation.
  10828. this.sent = this._sent = undefined;
  10829. this.done = false;
  10830. this.delegate = null;
  10831. this.method = "next";
  10832. this.arg = undefined;
  10833. this.tryEntries.forEach(resetTryEntry);
  10834. if (!skipTempReset) {
  10835. for (var name in this) {
  10836. // Not sure about the optimal order of these conditions:
  10837. if (name.charAt(0) === "t" &&
  10838. hasOwn.call(this, name) &&
  10839. !isNaN(+name.slice(1))) {
  10840. this[name] = undefined;
  10841. }
  10842. }
  10843. }
  10844. },
  10845. stop: function() {
  10846. this.done = true;
  10847. var rootEntry = this.tryEntries[0];
  10848. var rootRecord = rootEntry.completion;
  10849. if (rootRecord.type === "throw") {
  10850. throw rootRecord.arg;
  10851. }
  10852. return this.rval;
  10853. },
  10854. dispatchException: function(exception) {
  10855. if (this.done) {
  10856. throw exception;
  10857. }
  10858. var context = this;
  10859. function handle(loc, caught) {
  10860. record.type = "throw";
  10861. record.arg = exception;
  10862. context.next = loc;
  10863. if (caught) {
  10864. // If the dispatched exception was caught by a catch block,
  10865. // then let that catch block handle the exception normally.
  10866. context.method = "next";
  10867. context.arg = undefined;
  10868. }
  10869. return !! caught;
  10870. }
  10871. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10872. var entry = this.tryEntries[i];
  10873. var record = entry.completion;
  10874. if (entry.tryLoc === "root") {
  10875. // Exception thrown outside of any try block that could handle
  10876. // it, so set the completion value of the entire function to
  10877. // throw the exception.
  10878. return handle("end");
  10879. }
  10880. if (entry.tryLoc <= this.prev) {
  10881. var hasCatch = hasOwn.call(entry, "catchLoc");
  10882. var hasFinally = hasOwn.call(entry, "finallyLoc");
  10883. if (hasCatch && hasFinally) {
  10884. if (this.prev < entry.catchLoc) {
  10885. return handle(entry.catchLoc, true);
  10886. } else if (this.prev < entry.finallyLoc) {
  10887. return handle(entry.finallyLoc);
  10888. }
  10889. } else if (hasCatch) {
  10890. if (this.prev < entry.catchLoc) {
  10891. return handle(entry.catchLoc, true);
  10892. }
  10893. } else if (hasFinally) {
  10894. if (this.prev < entry.finallyLoc) {
  10895. return handle(entry.finallyLoc);
  10896. }
  10897. } else {
  10898. throw new Error("try statement without catch or finally");
  10899. }
  10900. }
  10901. }
  10902. },
  10903. abrupt: function(type, arg) {
  10904. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10905. var entry = this.tryEntries[i];
  10906. if (entry.tryLoc <= this.prev &&
  10907. hasOwn.call(entry, "finallyLoc") &&
  10908. this.prev < entry.finallyLoc) {
  10909. var finallyEntry = entry;
  10910. break;
  10911. }
  10912. }
  10913. if (finallyEntry &&
  10914. (type === "break" ||
  10915. type === "continue") &&
  10916. finallyEntry.tryLoc <= arg &&
  10917. arg <= finallyEntry.finallyLoc) {
  10918. // Ignore the finally entry if control is not jumping to a
  10919. // location outside the try/catch block.
  10920. finallyEntry = null;
  10921. }
  10922. var record = finallyEntry ? finallyEntry.completion : {};
  10923. record.type = type;
  10924. record.arg = arg;
  10925. if (finallyEntry) {
  10926. this.method = "next";
  10927. this.next = finallyEntry.finallyLoc;
  10928. return ContinueSentinel;
  10929. }
  10930. return this.complete(record);
  10931. },
  10932. complete: function(record, afterLoc) {
  10933. if (record.type === "throw") {
  10934. throw record.arg;
  10935. }
  10936. if (record.type === "break" ||
  10937. record.type === "continue") {
  10938. this.next = record.arg;
  10939. } else if (record.type === "return") {
  10940. this.rval = this.arg = record.arg;
  10941. this.method = "return";
  10942. this.next = "end";
  10943. } else if (record.type === "normal" && afterLoc) {
  10944. this.next = afterLoc;
  10945. }
  10946. return ContinueSentinel;
  10947. },
  10948. finish: function(finallyLoc) {
  10949. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10950. var entry = this.tryEntries[i];
  10951. if (entry.finallyLoc === finallyLoc) {
  10952. this.complete(entry.completion, entry.afterLoc);
  10953. resetTryEntry(entry);
  10954. return ContinueSentinel;
  10955. }
  10956. }
  10957. },
  10958. "catch": function(tryLoc) {
  10959. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10960. var entry = this.tryEntries[i];
  10961. if (entry.tryLoc === tryLoc) {
  10962. var record = entry.completion;
  10963. if (record.type === "throw") {
  10964. var thrown = record.arg;
  10965. resetTryEntry(entry);
  10966. }
  10967. return thrown;
  10968. }
  10969. }
  10970. // The context.catch method must only be called with a location
  10971. // argument that corresponds to a known catch block.
  10972. throw new Error("illegal catch attempt");
  10973. },
  10974. delegateYield: function(iterable, resultName, nextLoc) {
  10975. this.delegate = {
  10976. iterator: values(iterable),
  10977. resultName: resultName,
  10978. nextLoc: nextLoc
  10979. };
  10980. if (this.method === "next") {
  10981. // Deliberately forget the last sent value so that we don't
  10982. // accidentally pass it on to the delegate.
  10983. this.arg = undefined;
  10984. }
  10985. return ContinueSentinel;
  10986. }
  10987. };
  10988. // Regardless of whether this script is executing as a CommonJS module
  10989. // or not, return the runtime object so that we can declare the variable
  10990. // regeneratorRuntime in the outer scope, which allows this module to be
  10991. // injected easily by `bin/regenerator --include-runtime script.js`.
  10992. return exports;
  10993. }(
  10994. // If this script is executing as a CommonJS module, use module.exports
  10995. // as the regeneratorRuntime namespace. Otherwise create a new empty
  10996. // object. Either way, the resulting object will be used to initialize
  10997. // the regeneratorRuntime variable at the top of this file.
  10998. true ? module.exports : 0
  10999. ));
  11000. try {
  11001. regeneratorRuntime = runtime;
  11002. } catch (accidentalStrictMode) {
  11003. // This module should not be running in strict mode, so the above
  11004. // assignment should always work unless something is misconfigured. Just
  11005. // in case runtime.js accidentally runs in strict mode, we can escape
  11006. // strict mode using a global Function call. This could conceivably fail
  11007. // if a Content Security Policy forbids using Function, but in that case
  11008. // the proper solution is to fix the accidental strict mode problem. If
  11009. // you've misconfigured your bundler to force strict mode and applied a
  11010. // CSP to forbid Function, and you're not willing to fix either of those
  11011. // problems, please detail your unique predicament in a GitHub issue.
  11012. Function("r", "regeneratorRuntime = r")(runtime);
  11013. }
  11014. /***/ }),
  11015. /***/ "./node_modules/rgbcolor/index.js":
  11016. /*!****************************************!*\
  11017. !*** ./node_modules/rgbcolor/index.js ***!
  11018. \****************************************/
  11019. /***/ ((module) => {
  11020. /*
  11021. Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
  11022. http://www.phpied.com/rgb-color-parser-in-javascript/
  11023. */
  11024. module.exports = function(color_string) {
  11025. this.ok = false;
  11026. this.alpha = 1.0;
  11027. // strip any leading #
  11028. if (color_string.charAt(0) == '#') { // remove # if any
  11029. color_string = color_string.substr(1,6);
  11030. }
  11031. color_string = color_string.replace(/ /g,'');
  11032. color_string = color_string.toLowerCase();
  11033. // before getting into regexps, try simple matches
  11034. // and overwrite the input
  11035. var simple_colors = {
  11036. aliceblue: 'f0f8ff',
  11037. antiquewhite: 'faebd7',
  11038. aqua: '00ffff',
  11039. aquamarine: '7fffd4',
  11040. azure: 'f0ffff',
  11041. beige: 'f5f5dc',
  11042. bisque: 'ffe4c4',
  11043. black: '000000',
  11044. blanchedalmond: 'ffebcd',
  11045. blue: '0000ff',
  11046. blueviolet: '8a2be2',
  11047. brown: 'a52a2a',
  11048. burlywood: 'deb887',
  11049. cadetblue: '5f9ea0',
  11050. chartreuse: '7fff00',
  11051. chocolate: 'd2691e',
  11052. coral: 'ff7f50',
  11053. cornflowerblue: '6495ed',
  11054. cornsilk: 'fff8dc',
  11055. crimson: 'dc143c',
  11056. cyan: '00ffff',
  11057. darkblue: '00008b',
  11058. darkcyan: '008b8b',
  11059. darkgoldenrod: 'b8860b',
  11060. darkgray: 'a9a9a9',
  11061. darkgreen: '006400',
  11062. darkkhaki: 'bdb76b',
  11063. darkmagenta: '8b008b',
  11064. darkolivegreen: '556b2f',
  11065. darkorange: 'ff8c00',
  11066. darkorchid: '9932cc',
  11067. darkred: '8b0000',
  11068. darksalmon: 'e9967a',
  11069. darkseagreen: '8fbc8f',
  11070. darkslateblue: '483d8b',
  11071. darkslategray: '2f4f4f',
  11072. darkturquoise: '00ced1',
  11073. darkviolet: '9400d3',
  11074. deeppink: 'ff1493',
  11075. deepskyblue: '00bfff',
  11076. dimgray: '696969',
  11077. dodgerblue: '1e90ff',
  11078. feldspar: 'd19275',
  11079. firebrick: 'b22222',
  11080. floralwhite: 'fffaf0',
  11081. forestgreen: '228b22',
  11082. fuchsia: 'ff00ff',
  11083. gainsboro: 'dcdcdc',
  11084. ghostwhite: 'f8f8ff',
  11085. gold: 'ffd700',
  11086. goldenrod: 'daa520',
  11087. gray: '808080',
  11088. green: '008000',
  11089. greenyellow: 'adff2f',
  11090. honeydew: 'f0fff0',
  11091. hotpink: 'ff69b4',
  11092. indianred : 'cd5c5c',
  11093. indigo : '4b0082',
  11094. ivory: 'fffff0',
  11095. khaki: 'f0e68c',
  11096. lavender: 'e6e6fa',
  11097. lavenderblush: 'fff0f5',
  11098. lawngreen: '7cfc00',
  11099. lemonchiffon: 'fffacd',
  11100. lightblue: 'add8e6',
  11101. lightcoral: 'f08080',
  11102. lightcyan: 'e0ffff',
  11103. lightgoldenrodyellow: 'fafad2',
  11104. lightgrey: 'd3d3d3',
  11105. lightgreen: '90ee90',
  11106. lightpink: 'ffb6c1',
  11107. lightsalmon: 'ffa07a',
  11108. lightseagreen: '20b2aa',
  11109. lightskyblue: '87cefa',
  11110. lightslateblue: '8470ff',
  11111. lightslategray: '778899',
  11112. lightsteelblue: 'b0c4de',
  11113. lightyellow: 'ffffe0',
  11114. lime: '00ff00',
  11115. limegreen: '32cd32',
  11116. linen: 'faf0e6',
  11117. magenta: 'ff00ff',
  11118. maroon: '800000',
  11119. mediumaquamarine: '66cdaa',
  11120. mediumblue: '0000cd',
  11121. mediumorchid: 'ba55d3',
  11122. mediumpurple: '9370d8',
  11123. mediumseagreen: '3cb371',
  11124. mediumslateblue: '7b68ee',
  11125. mediumspringgreen: '00fa9a',
  11126. mediumturquoise: '48d1cc',
  11127. mediumvioletred: 'c71585',
  11128. midnightblue: '191970',
  11129. mintcream: 'f5fffa',
  11130. mistyrose: 'ffe4e1',
  11131. moccasin: 'ffe4b5',
  11132. navajowhite: 'ffdead',
  11133. navy: '000080',
  11134. oldlace: 'fdf5e6',
  11135. olive: '808000',
  11136. olivedrab: '6b8e23',
  11137. orange: 'ffa500',
  11138. orangered: 'ff4500',
  11139. orchid: 'da70d6',
  11140. palegoldenrod: 'eee8aa',
  11141. palegreen: '98fb98',
  11142. paleturquoise: 'afeeee',
  11143. palevioletred: 'd87093',
  11144. papayawhip: 'ffefd5',
  11145. peachpuff: 'ffdab9',
  11146. peru: 'cd853f',
  11147. pink: 'ffc0cb',
  11148. plum: 'dda0dd',
  11149. powderblue: 'b0e0e6',
  11150. purple: '800080',
  11151. rebeccapurple: '663399',
  11152. red: 'ff0000',
  11153. rosybrown: 'bc8f8f',
  11154. royalblue: '4169e1',
  11155. saddlebrown: '8b4513',
  11156. salmon: 'fa8072',
  11157. sandybrown: 'f4a460',
  11158. seagreen: '2e8b57',
  11159. seashell: 'fff5ee',
  11160. sienna: 'a0522d',
  11161. silver: 'c0c0c0',
  11162. skyblue: '87ceeb',
  11163. slateblue: '6a5acd',
  11164. slategray: '708090',
  11165. snow: 'fffafa',
  11166. springgreen: '00ff7f',
  11167. steelblue: '4682b4',
  11168. tan: 'd2b48c',
  11169. teal: '008080',
  11170. thistle: 'd8bfd8',
  11171. tomato: 'ff6347',
  11172. turquoise: '40e0d0',
  11173. violet: 'ee82ee',
  11174. violetred: 'd02090',
  11175. wheat: 'f5deb3',
  11176. white: 'ffffff',
  11177. whitesmoke: 'f5f5f5',
  11178. yellow: 'ffff00',
  11179. yellowgreen: '9acd32'
  11180. };
  11181. color_string = simple_colors[color_string] || color_string;
  11182. // emd of simple type-in colors
  11183. // array of color definition objects
  11184. var color_defs = [
  11185. {
  11186. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
  11187. example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
  11188. process: function (bits){
  11189. return [
  11190. parseInt(bits[1]),
  11191. parseInt(bits[2]),
  11192. parseInt(bits[3]),
  11193. parseFloat(bits[4])
  11194. ];
  11195. }
  11196. },
  11197. {
  11198. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  11199. example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
  11200. process: function (bits){
  11201. return [
  11202. parseInt(bits[1]),
  11203. parseInt(bits[2]),
  11204. parseInt(bits[3])
  11205. ];
  11206. }
  11207. },
  11208. {
  11209. re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  11210. example: ['#00ff00', '336699'],
  11211. process: function (bits){
  11212. return [
  11213. parseInt(bits[1], 16),
  11214. parseInt(bits[2], 16),
  11215. parseInt(bits[3], 16)
  11216. ];
  11217. }
  11218. },
  11219. {
  11220. re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  11221. example: ['#fb0', 'f0f'],
  11222. process: function (bits){
  11223. return [
  11224. parseInt(bits[1] + bits[1], 16),
  11225. parseInt(bits[2] + bits[2], 16),
  11226. parseInt(bits[3] + bits[3], 16)
  11227. ];
  11228. }
  11229. }
  11230. ];
  11231. // search through the definitions to find a match
  11232. for (var i = 0; i < color_defs.length; i++) {
  11233. var re = color_defs[i].re;
  11234. var processor = color_defs[i].process;
  11235. var bits = re.exec(color_string);
  11236. if (bits) {
  11237. var channels = processor(bits);
  11238. this.r = channels[0];
  11239. this.g = channels[1];
  11240. this.b = channels[2];
  11241. if (channels.length > 3) {
  11242. this.alpha = channels[3];
  11243. }
  11244. this.ok = true;
  11245. }
  11246. }
  11247. // validate/cleanup values
  11248. this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
  11249. this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
  11250. this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
  11251. this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
  11252. // some getters
  11253. this.toRGB = function () {
  11254. return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
  11255. }
  11256. this.toRGBA = function () {
  11257. return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
  11258. }
  11259. this.toHex = function () {
  11260. var r = this.r.toString(16);
  11261. var g = this.g.toString(16);
  11262. var b = this.b.toString(16);
  11263. if (r.length == 1) r = '0' + r;
  11264. if (g.length == 1) g = '0' + g;
  11265. if (b.length == 1) b = '0' + b;
  11266. return '#' + r + g + b;
  11267. }
  11268. // help
  11269. this.getHelpXML = function () {
  11270. var examples = new Array();
  11271. // add regexps
  11272. for (var i = 0; i < color_defs.length; i++) {
  11273. var example = color_defs[i].example;
  11274. for (var j = 0; j < example.length; j++) {
  11275. examples[examples.length] = example[j];
  11276. }
  11277. }
  11278. // add type-in colors
  11279. for (var sc in simple_colors) {
  11280. examples[examples.length] = sc;
  11281. }
  11282. var xml = document.createElement('ul');
  11283. xml.setAttribute('id', 'rgbcolor-examples');
  11284. for (var i = 0; i < examples.length; i++) {
  11285. try {
  11286. var list_item = document.createElement('li');
  11287. var list_color = new RGBColor(examples[i]);
  11288. var example_div = document.createElement('div');
  11289. example_div.style.cssText =
  11290. 'margin: 3px; '
  11291. + 'border: 1px solid black; '
  11292. + 'background:' + list_color.toHex() + '; '
  11293. + 'color:' + list_color.toHex()
  11294. ;
  11295. example_div.appendChild(document.createTextNode('test'));
  11296. var list_item_value = document.createTextNode(
  11297. ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
  11298. );
  11299. list_item.appendChild(example_div);
  11300. list_item.appendChild(list_item_value);
  11301. xml.appendChild(list_item);
  11302. } catch(e){}
  11303. }
  11304. return xml;
  11305. }
  11306. }
  11307. /***/ }),
  11308. /***/ "./node_modules/stackblur-canvas/dist/stackblur-es.js":
  11309. /*!************************************************************!*\
  11310. !*** ./node_modules/stackblur-canvas/dist/stackblur-es.js ***!
  11311. \************************************************************/
  11312. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11313. "use strict";
  11314. __webpack_require__.r(__webpack_exports__);
  11315. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11316. /* harmony export */ "BlurStack": () => (/* binding */ BlurStack),
  11317. /* harmony export */ "canvasRGB": () => (/* binding */ processCanvasRGB),
  11318. /* harmony export */ "canvasRGBA": () => (/* binding */ processCanvasRGBA),
  11319. /* harmony export */ "image": () => (/* binding */ processImage),
  11320. /* harmony export */ "imageDataRGB": () => (/* binding */ processImageDataRGB),
  11321. /* harmony export */ "imageDataRGBA": () => (/* binding */ processImageDataRGBA)
  11322. /* harmony export */ });
  11323. function _typeof(obj) {
  11324. "@babel/helpers - typeof";
  11325. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  11326. _typeof = function (obj) {
  11327. return typeof obj;
  11328. };
  11329. } else {
  11330. _typeof = function (obj) {
  11331. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  11332. };
  11333. }
  11334. return _typeof(obj);
  11335. }
  11336. function _classCallCheck(instance, Constructor) {
  11337. if (!(instance instanceof Constructor)) {
  11338. throw new TypeError("Cannot call a class as a function");
  11339. }
  11340. }
  11341. /* eslint-disable no-bitwise -- used for calculations */
  11342. /* eslint-disable unicorn/prefer-query-selector -- aiming at
  11343. backward-compatibility */
  11344. /**
  11345. * StackBlur - a fast almost Gaussian Blur For Canvas
  11346. *
  11347. * In case you find this class useful - especially in commercial projects -
  11348. * I am not totally unhappy for a small donation to my PayPal account
  11349. * mario@quasimondo.de
  11350. *
  11351. * Or support me on flattr:
  11352. * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
  11353. *
  11354. * @module StackBlur
  11355. * @author Mario Klingemann
  11356. * Contact: mario@quasimondo.com
  11357. * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
  11358. * Twitter: @quasimondo
  11359. *
  11360. * @copyright (c) 2010 Mario Klingemann
  11361. *
  11362. * Permission is hereby granted, free of charge, to any person
  11363. * obtaining a copy of this software and associated documentation
  11364. * files (the "Software"), to deal in the Software without
  11365. * restriction, including without limitation the rights to use,
  11366. * copy, modify, merge, publish, distribute, sublicense, and/or sell
  11367. * copies of the Software, and to permit persons to whom the
  11368. * Software is furnished to do so, subject to the following
  11369. * conditions:
  11370. *
  11371. * The above copyright notice and this permission notice shall be
  11372. * included in all copies or substantial portions of the Software.
  11373. *
  11374. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  11375. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  11376. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  11377. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  11378. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  11379. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  11380. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  11381. * OTHER DEALINGS IN THE SOFTWARE.
  11382. */
  11383. 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];
  11384. 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];
  11385. /**
  11386. * @param {string|HTMLImageElement} img
  11387. * @param {string|HTMLCanvasElement} canvas
  11388. * @param {Float} radius
  11389. * @param {boolean} blurAlphaChannel
  11390. * @param {boolean} useOffset
  11391. * @param {boolean} skipStyles
  11392. * @returns {undefined}
  11393. */
  11394. function processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {
  11395. if (typeof img === 'string') {
  11396. img = document.getElementById(img);
  11397. }
  11398. if (!img || !('naturalWidth' in img)) {
  11399. return;
  11400. }
  11401. var dimensionType = useOffset ? 'offset' : 'natural';
  11402. var w = img[dimensionType + 'Width'];
  11403. var h = img[dimensionType + 'Height'];
  11404. if (typeof canvas === 'string') {
  11405. canvas = document.getElementById(canvas);
  11406. }
  11407. if (!canvas || !('getContext' in canvas)) {
  11408. return;
  11409. }
  11410. if (!skipStyles) {
  11411. canvas.style.width = w + 'px';
  11412. canvas.style.height = h + 'px';
  11413. }
  11414. canvas.width = w;
  11415. canvas.height = h;
  11416. var context = canvas.getContext('2d');
  11417. context.clearRect(0, 0, w, h);
  11418. context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);
  11419. if (isNaN(radius) || radius < 1) {
  11420. return;
  11421. }
  11422. if (blurAlphaChannel) {
  11423. processCanvasRGBA(canvas, 0, 0, w, h, radius);
  11424. } else {
  11425. processCanvasRGB(canvas, 0, 0, w, h, radius);
  11426. }
  11427. }
  11428. /**
  11429. * @param {string|HTMLCanvasElement} canvas
  11430. * @param {Integer} topX
  11431. * @param {Integer} topY
  11432. * @param {Integer} width
  11433. * @param {Integer} height
  11434. * @throws {Error|TypeError}
  11435. * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}
  11436. */
  11437. function getImageDataFromCanvas(canvas, topX, topY, width, height) {
  11438. if (typeof canvas === 'string') {
  11439. canvas = document.getElementById(canvas);
  11440. }
  11441. if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {
  11442. throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');
  11443. }
  11444. var context = canvas.getContext('2d');
  11445. try {
  11446. return context.getImageData(topX, topY, width, height);
  11447. } catch (e) {
  11448. throw new Error('unable to access image data: ' + e);
  11449. }
  11450. }
  11451. /**
  11452. * @param {HTMLCanvasElement} canvas
  11453. * @param {Integer} topX
  11454. * @param {Integer} topY
  11455. * @param {Integer} width
  11456. * @param {Integer} height
  11457. * @param {Float} radius
  11458. * @returns {undefined}
  11459. */
  11460. function processCanvasRGBA(canvas, topX, topY, width, height, radius) {
  11461. if (isNaN(radius) || radius < 1) {
  11462. return;
  11463. }
  11464. radius |= 0;
  11465. var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
  11466. imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);
  11467. canvas.getContext('2d').putImageData(imageData, topX, topY);
  11468. }
  11469. /**
  11470. * @param {ImageData} imageData
  11471. * @param {Integer} topX
  11472. * @param {Integer} topY
  11473. * @param {Integer} width
  11474. * @param {Integer} height
  11475. * @param {Float} radius
  11476. * @returns {ImageData}
  11477. */
  11478. function processImageDataRGBA(imageData, topX, topY, width, height, radius) {
  11479. var pixels = imageData.data;
  11480. var div = 2 * radius + 1; // const w4 = width << 2;
  11481. var widthMinus1 = width - 1;
  11482. var heightMinus1 = height - 1;
  11483. var radiusPlus1 = radius + 1;
  11484. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  11485. var stackStart = new BlurStack();
  11486. var stack = stackStart;
  11487. var stackEnd;
  11488. for (var i = 1; i < div; i++) {
  11489. stack = stack.next = new BlurStack();
  11490. if (i === radiusPlus1) {
  11491. stackEnd = stack;
  11492. }
  11493. }
  11494. stack.next = stackStart;
  11495. var stackIn = null,
  11496. stackOut = null,
  11497. yw = 0,
  11498. yi = 0;
  11499. var mulSum = mulTable[radius];
  11500. var shgSum = shgTable[radius];
  11501. for (var y = 0; y < height; y++) {
  11502. stack = stackStart;
  11503. var pr = pixels[yi],
  11504. pg = pixels[yi + 1],
  11505. pb = pixels[yi + 2],
  11506. pa = pixels[yi + 3];
  11507. for (var _i = 0; _i < radiusPlus1; _i++) {
  11508. stack.r = pr;
  11509. stack.g = pg;
  11510. stack.b = pb;
  11511. stack.a = pa;
  11512. stack = stack.next;
  11513. }
  11514. var rInSum = 0,
  11515. gInSum = 0,
  11516. bInSum = 0,
  11517. aInSum = 0,
  11518. rOutSum = radiusPlus1 * pr,
  11519. gOutSum = radiusPlus1 * pg,
  11520. bOutSum = radiusPlus1 * pb,
  11521. aOutSum = radiusPlus1 * pa,
  11522. rSum = sumFactor * pr,
  11523. gSum = sumFactor * pg,
  11524. bSum = sumFactor * pb,
  11525. aSum = sumFactor * pa;
  11526. for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {
  11527. var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);
  11528. var r = pixels[p],
  11529. g = pixels[p + 1],
  11530. b = pixels[p + 2],
  11531. a = pixels[p + 3];
  11532. var rbs = radiusPlus1 - _i2;
  11533. rSum += (stack.r = r) * rbs;
  11534. gSum += (stack.g = g) * rbs;
  11535. bSum += (stack.b = b) * rbs;
  11536. aSum += (stack.a = a) * rbs;
  11537. rInSum += r;
  11538. gInSum += g;
  11539. bInSum += b;
  11540. aInSum += a;
  11541. stack = stack.next;
  11542. }
  11543. stackIn = stackStart;
  11544. stackOut = stackEnd;
  11545. for (var x = 0; x < width; x++) {
  11546. var paInitial = aSum * mulSum >> shgSum;
  11547. pixels[yi + 3] = paInitial;
  11548. if (paInitial !== 0) {
  11549. var _a2 = 255 / paInitial;
  11550. pixels[yi] = (rSum * mulSum >> shgSum) * _a2;
  11551. pixels[yi + 1] = (gSum * mulSum >> shgSum) * _a2;
  11552. pixels[yi + 2] = (bSum * mulSum >> shgSum) * _a2;
  11553. } else {
  11554. pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;
  11555. }
  11556. rSum -= rOutSum;
  11557. gSum -= gOutSum;
  11558. bSum -= bOutSum;
  11559. aSum -= aOutSum;
  11560. rOutSum -= stackIn.r;
  11561. gOutSum -= stackIn.g;
  11562. bOutSum -= stackIn.b;
  11563. aOutSum -= stackIn.a;
  11564. var _p = x + radius + 1;
  11565. _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;
  11566. rInSum += stackIn.r = pixels[_p];
  11567. gInSum += stackIn.g = pixels[_p + 1];
  11568. bInSum += stackIn.b = pixels[_p + 2];
  11569. aInSum += stackIn.a = pixels[_p + 3];
  11570. rSum += rInSum;
  11571. gSum += gInSum;
  11572. bSum += bInSum;
  11573. aSum += aInSum;
  11574. stackIn = stackIn.next;
  11575. var _stackOut = stackOut,
  11576. _r = _stackOut.r,
  11577. _g = _stackOut.g,
  11578. _b = _stackOut.b,
  11579. _a = _stackOut.a;
  11580. rOutSum += _r;
  11581. gOutSum += _g;
  11582. bOutSum += _b;
  11583. aOutSum += _a;
  11584. rInSum -= _r;
  11585. gInSum -= _g;
  11586. bInSum -= _b;
  11587. aInSum -= _a;
  11588. stackOut = stackOut.next;
  11589. yi += 4;
  11590. }
  11591. yw += width;
  11592. }
  11593. for (var _x = 0; _x < width; _x++) {
  11594. yi = _x << 2;
  11595. var _pr = pixels[yi],
  11596. _pg = pixels[yi + 1],
  11597. _pb = pixels[yi + 2],
  11598. _pa = pixels[yi + 3],
  11599. _rOutSum = radiusPlus1 * _pr,
  11600. _gOutSum = radiusPlus1 * _pg,
  11601. _bOutSum = radiusPlus1 * _pb,
  11602. _aOutSum = radiusPlus1 * _pa,
  11603. _rSum = sumFactor * _pr,
  11604. _gSum = sumFactor * _pg,
  11605. _bSum = sumFactor * _pb,
  11606. _aSum = sumFactor * _pa;
  11607. stack = stackStart;
  11608. for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {
  11609. stack.r = _pr;
  11610. stack.g = _pg;
  11611. stack.b = _pb;
  11612. stack.a = _pa;
  11613. stack = stack.next;
  11614. }
  11615. var yp = width;
  11616. var _gInSum = 0,
  11617. _bInSum = 0,
  11618. _aInSum = 0,
  11619. _rInSum = 0;
  11620. for (var _i4 = 1; _i4 <= radius; _i4++) {
  11621. yi = yp + _x << 2;
  11622. var _rbs = radiusPlus1 - _i4;
  11623. _rSum += (stack.r = _pr = pixels[yi]) * _rbs;
  11624. _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;
  11625. _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;
  11626. _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;
  11627. _rInSum += _pr;
  11628. _gInSum += _pg;
  11629. _bInSum += _pb;
  11630. _aInSum += _pa;
  11631. stack = stack.next;
  11632. if (_i4 < heightMinus1) {
  11633. yp += width;
  11634. }
  11635. }
  11636. yi = _x;
  11637. stackIn = stackStart;
  11638. stackOut = stackEnd;
  11639. for (var _y = 0; _y < height; _y++) {
  11640. var _p2 = yi << 2;
  11641. pixels[_p2 + 3] = _pa = _aSum * mulSum >> shgSum;
  11642. if (_pa > 0) {
  11643. _pa = 255 / _pa;
  11644. pixels[_p2] = (_rSum * mulSum >> shgSum) * _pa;
  11645. pixels[_p2 + 1] = (_gSum * mulSum >> shgSum) * _pa;
  11646. pixels[_p2 + 2] = (_bSum * mulSum >> shgSum) * _pa;
  11647. } else {
  11648. pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;
  11649. }
  11650. _rSum -= _rOutSum;
  11651. _gSum -= _gOutSum;
  11652. _bSum -= _bOutSum;
  11653. _aSum -= _aOutSum;
  11654. _rOutSum -= stackIn.r;
  11655. _gOutSum -= stackIn.g;
  11656. _bOutSum -= stackIn.b;
  11657. _aOutSum -= stackIn.a;
  11658. _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;
  11659. _rSum += _rInSum += stackIn.r = pixels[_p2];
  11660. _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];
  11661. _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];
  11662. _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];
  11663. stackIn = stackIn.next;
  11664. _rOutSum += _pr = stackOut.r;
  11665. _gOutSum += _pg = stackOut.g;
  11666. _bOutSum += _pb = stackOut.b;
  11667. _aOutSum += _pa = stackOut.a;
  11668. _rInSum -= _pr;
  11669. _gInSum -= _pg;
  11670. _bInSum -= _pb;
  11671. _aInSum -= _pa;
  11672. stackOut = stackOut.next;
  11673. yi += width;
  11674. }
  11675. }
  11676. return imageData;
  11677. }
  11678. /**
  11679. * @param {HTMLCanvasElement} canvas
  11680. * @param {Integer} topX
  11681. * @param {Integer} topY
  11682. * @param {Integer} width
  11683. * @param {Integer} height
  11684. * @param {Float} radius
  11685. * @returns {undefined}
  11686. */
  11687. function processCanvasRGB(canvas, topX, topY, width, height, radius) {
  11688. if (isNaN(radius) || radius < 1) {
  11689. return;
  11690. }
  11691. radius |= 0;
  11692. var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
  11693. imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);
  11694. canvas.getContext('2d').putImageData(imageData, topX, topY);
  11695. }
  11696. /**
  11697. * @param {ImageData} imageData
  11698. * @param {Integer} topX
  11699. * @param {Integer} topY
  11700. * @param {Integer} width
  11701. * @param {Integer} height
  11702. * @param {Float} radius
  11703. * @returns {ImageData}
  11704. */
  11705. function processImageDataRGB(imageData, topX, topY, width, height, radius) {
  11706. var pixels = imageData.data;
  11707. var div = 2 * radius + 1; // const w4 = width << 2;
  11708. var widthMinus1 = width - 1;
  11709. var heightMinus1 = height - 1;
  11710. var radiusPlus1 = radius + 1;
  11711. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  11712. var stackStart = new BlurStack();
  11713. var stack = stackStart;
  11714. var stackEnd;
  11715. for (var i = 1; i < div; i++) {
  11716. stack = stack.next = new BlurStack();
  11717. if (i === radiusPlus1) {
  11718. stackEnd = stack;
  11719. }
  11720. }
  11721. stack.next = stackStart;
  11722. var stackIn = null;
  11723. var stackOut = null;
  11724. var mulSum = mulTable[radius];
  11725. var shgSum = shgTable[radius];
  11726. var p, rbs;
  11727. var yw = 0,
  11728. yi = 0;
  11729. for (var y = 0; y < height; y++) {
  11730. var pr = pixels[yi],
  11731. pg = pixels[yi + 1],
  11732. pb = pixels[yi + 2],
  11733. rOutSum = radiusPlus1 * pr,
  11734. gOutSum = radiusPlus1 * pg,
  11735. bOutSum = radiusPlus1 * pb,
  11736. rSum = sumFactor * pr,
  11737. gSum = sumFactor * pg,
  11738. bSum = sumFactor * pb;
  11739. stack = stackStart;
  11740. for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {
  11741. stack.r = pr;
  11742. stack.g = pg;
  11743. stack.b = pb;
  11744. stack = stack.next;
  11745. }
  11746. var rInSum = 0,
  11747. gInSum = 0,
  11748. bInSum = 0;
  11749. for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {
  11750. p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);
  11751. rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);
  11752. gSum += (stack.g = pg = pixels[p + 1]) * rbs;
  11753. bSum += (stack.b = pb = pixels[p + 2]) * rbs;
  11754. rInSum += pr;
  11755. gInSum += pg;
  11756. bInSum += pb;
  11757. stack = stack.next;
  11758. }
  11759. stackIn = stackStart;
  11760. stackOut = stackEnd;
  11761. for (var x = 0; x < width; x++) {
  11762. pixels[yi] = rSum * mulSum >> shgSum;
  11763. pixels[yi + 1] = gSum * mulSum >> shgSum;
  11764. pixels[yi + 2] = bSum * mulSum >> shgSum;
  11765. rSum -= rOutSum;
  11766. gSum -= gOutSum;
  11767. bSum -= bOutSum;
  11768. rOutSum -= stackIn.r;
  11769. gOutSum -= stackIn.g;
  11770. bOutSum -= stackIn.b;
  11771. p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;
  11772. rInSum += stackIn.r = pixels[p];
  11773. gInSum += stackIn.g = pixels[p + 1];
  11774. bInSum += stackIn.b = pixels[p + 2];
  11775. rSum += rInSum;
  11776. gSum += gInSum;
  11777. bSum += bInSum;
  11778. stackIn = stackIn.next;
  11779. rOutSum += pr = stackOut.r;
  11780. gOutSum += pg = stackOut.g;
  11781. bOutSum += pb = stackOut.b;
  11782. rInSum -= pr;
  11783. gInSum -= pg;
  11784. bInSum -= pb;
  11785. stackOut = stackOut.next;
  11786. yi += 4;
  11787. }
  11788. yw += width;
  11789. }
  11790. for (var _x2 = 0; _x2 < width; _x2++) {
  11791. yi = _x2 << 2;
  11792. var _pr2 = pixels[yi],
  11793. _pg2 = pixels[yi + 1],
  11794. _pb2 = pixels[yi + 2],
  11795. _rOutSum2 = radiusPlus1 * _pr2,
  11796. _gOutSum2 = radiusPlus1 * _pg2,
  11797. _bOutSum2 = radiusPlus1 * _pb2,
  11798. _rSum2 = sumFactor * _pr2,
  11799. _gSum2 = sumFactor * _pg2,
  11800. _bSum2 = sumFactor * _pb2;
  11801. stack = stackStart;
  11802. for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {
  11803. stack.r = _pr2;
  11804. stack.g = _pg2;
  11805. stack.b = _pb2;
  11806. stack = stack.next;
  11807. }
  11808. var _rInSum2 = 0,
  11809. _gInSum2 = 0,
  11810. _bInSum2 = 0;
  11811. for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {
  11812. yi = yp + _x2 << 2;
  11813. _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);
  11814. _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;
  11815. _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;
  11816. _rInSum2 += _pr2;
  11817. _gInSum2 += _pg2;
  11818. _bInSum2 += _pb2;
  11819. stack = stack.next;
  11820. if (_i8 < heightMinus1) {
  11821. yp += width;
  11822. }
  11823. }
  11824. yi = _x2;
  11825. stackIn = stackStart;
  11826. stackOut = stackEnd;
  11827. for (var _y2 = 0; _y2 < height; _y2++) {
  11828. p = yi << 2;
  11829. pixels[p] = _rSum2 * mulSum >> shgSum;
  11830. pixels[p + 1] = _gSum2 * mulSum >> shgSum;
  11831. pixels[p + 2] = _bSum2 * mulSum >> shgSum;
  11832. _rSum2 -= _rOutSum2;
  11833. _gSum2 -= _gOutSum2;
  11834. _bSum2 -= _bOutSum2;
  11835. _rOutSum2 -= stackIn.r;
  11836. _gOutSum2 -= stackIn.g;
  11837. _bOutSum2 -= stackIn.b;
  11838. p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;
  11839. _rSum2 += _rInSum2 += stackIn.r = pixels[p];
  11840. _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];
  11841. _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];
  11842. stackIn = stackIn.next;
  11843. _rOutSum2 += _pr2 = stackOut.r;
  11844. _gOutSum2 += _pg2 = stackOut.g;
  11845. _bOutSum2 += _pb2 = stackOut.b;
  11846. _rInSum2 -= _pr2;
  11847. _gInSum2 -= _pg2;
  11848. _bInSum2 -= _pb2;
  11849. stackOut = stackOut.next;
  11850. yi += width;
  11851. }
  11852. }
  11853. return imageData;
  11854. }
  11855. /**
  11856. *
  11857. */
  11858. var BlurStack =
  11859. /**
  11860. * Set properties.
  11861. */
  11862. function BlurStack() {
  11863. _classCallCheck(this, BlurStack);
  11864. this.r = 0;
  11865. this.g = 0;
  11866. this.b = 0;
  11867. this.a = 0;
  11868. this.next = null;
  11869. };
  11870. /***/ })
  11871. }]);
  11872. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGFtY2hhcnRzL2FtY2hhc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EZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZVJlc3VsdCkge1xuICAgICAgICAgICAgICBpZiAoZGVsZWdhdGVSZXN1bHQgPT09IENvbnRpbnVlU2VudGluZWwpIGNvbnRpbnVlO1xuICAgICAgICAgICAgICByZXR1cm4gZGVsZWdhdGVSZXN1bHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgICAgLy8gU2V0dGluZyBjb250ZXh0Ll9zZW50IGZvciBsZWdhY3kgc3VwcG9ydCBvZiBCYWJlbCdzXG4gICAgICAgICAgICAvLyBmdW5jdGlvbi5zZW50IGltcGxlbWVudGF0aW9uLlxuICAgICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgaWYgKHN0YXRlID09PSBHZW5TdGF0ZVN1c3BlbmRlZFN0YXJ0KSB7XG4gICAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcbiAgICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi5cbiAgICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lID8gR2VuU3RhdGVDb21wbGV0ZWQgOiBHZW5TdGF0ZVN1c3BlbmRlZFlpZWxkO1xuXG4gICAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICAgIGRvbmU6IGNvbnRleHQuZG9uZVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7IC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAgIC8vIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpIGNhbGwgYWJvdmUuXG5cbiAgICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9IC8vIENhb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ciBoYXMgYSByZXR1cm4gbWV0aG9kLCBnaXZlIGl0IGFcbiAgICAgICAgICAgIC8vIGNoYW5jZSB0byBjbGVhbiB1cC5cbiAgICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJyZXR1cm5cIjtcbiAgICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkJDE7XG4gICAgICAgICAgICBtYXliZUludm9rZURlbGVnYXRlKGRlbGVnYXRlLCBjb250ZXh0KTtcblxuICAgICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgICAgLy8gXCJyZXR1cm5cIiB0byBcInRocm93XCIsIGxldCB0aGF0IG92ZXJyaWRlIHRoZSBUeXBlRXJyb3IgYmVsb3cuXG4gICAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKG1ldGhvZCwgZGVsZWdhdGUuaXRlcmF0b3IsIGNvbnRleHQuYXJnKTtcblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgIC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lb2YgaXRlcmFibGUubmV4dCA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgcmV0dXJuIGl0ZXJhYmxlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFpc05hTihpdGVyYWJsZS5sZW5ndGgpKSB7XG4gICAgICAgICAgdmFyIGkgPSAtMSxcbiAgICAgICAgICAgICAgbmV4dCA9IGZ1bmN0aW9uIG5leHQoKSB7XG4gICAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgIGlmIChoYXNPd24uY2FsbChpdGVyYWJsZSwgaSkpIHtcbiAgICAgICAgICAgICAgICBuZXh0LnZhbHVlID0gaXRlcmFibGVbaV07XG4gICAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5leHQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbmV4dC52YWx1ZSA9IHVuZGVmaW5lZCQxO1xuICAgICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcbiAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgIH07XG5cbiAgICAgICAgICByZXR1cm4gbmV4dC5uZXh0ID0gbmV4dDtcbiAgICAgICAgfVxuICAgICAgfSAvLyBSZXR1cm4gYW4gaXRlcmF0b3Igd2l0aCBubyB2YWx1ZXMuXG5cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgbmV4dDogZG9uZVJlc3VsdFxuICAgICAgfTtcbiAgICB9XG5cbiAgICBleHBvcnRzLnZhbHVlcyA9IHZhbHVlcztcblxuICAgIGZ1bmN0aW9uIGRvbmVSZXN1bHQoKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB2YWx1ZTogdW5kZWZpbmVkJDEsXG4gICAgICAgIGRvbmU6IHRydWVcbiAgICAgIH07XG4gICAgfVxuXG4gICAgQ29udGV4dC5wcm90b3R5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HJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgICAgdmFyIHJvb3RSZWNvcmQgPSByb290RW50cnkuY29tcGxldGlvbjtcblxuICAgICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICB0aHJvdyByb290UmVjb3JkLmFyZztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgICB9LFxuICAgICAgZGlzcGF0Y2hFeGNlcHRpb246IGZ1bmN0aW9uIChleGNlcHRpb24pIHtcbiAgICAgICAgaWYgKHRoaXMuZG9uZSkge1xuICAgICAgICAgIHRocm93IGV4Y2VwdGlvbjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcblxuICAgICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgICByZWNvcmQudHlwZSA9IFwidGhyb3dcIjtcbiAgICAgICAgICByZWNvcmQuYXJnID0gZXhjZXB0aW9uO1xuICAgICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcblxuICAgICAgICAgIGlmIChjYXVnaHQpIHtcbiAgICAgICAgICAgIC8vIElmIHRoZSBkaXNwYXRjaGVkIGV4Y2VwdGlvbiB3YXMgY2F1Z2h0IGJ5IGEgY2F0Y2ggYmxvY2ssXG4gICAgICAgICAgICAvLyB0aGVuIGxldCB0aGF0IGNhdGNoIGJsb2NrIGhhbmRsZSB0aGUgZXhjZXB0aW9uIG5vcm1hbGx5LlxuICAgICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkJDE7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuICEhY2F1Z2h0O1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcblxuICAgICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgICAvLyBFeGNlcHRpb24gdGhyb3duIG91dHNpZGUgb2YgYW55IHRyeSBibG9jayB0aGF0IGNvdWxkIGhhbmRsZVxuICAgICAgICAgICAgLy8gaXQsIHNvIHNldCB0aGUgY29tcGxldGlvbiB2YWx1ZSBvZiB0aGUgZW50aXJlIGZ1bmN0aW9uIHRvXG4gICAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShcImVuZFwiKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgICAgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBhYnJ1cHQ6IGZ1bmN0aW9uICh0eXBlLCBhcmcpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcblxuICAgICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiYgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJiAodHlwZSA9PT0gXCJicmVha1wiIHx8IHR5cGUgPT09IFwiY29udGludWVcIikgJiYgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiYgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgICB9LFxuICAgICAgY29tcGxldGU6IGZ1bmN0aW9uIChyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJicmVha1wiIHx8IHJlY29yZC50eXBlID09PSBcImNvbnRpbnVlXCIpIHtcbiAgICAgICAgICB0aGlzLm5leHQgPSByZWNvcmQuYXJnO1xuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgdGhpcy5ydmFsID0gdGhpcy5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICAgIHRoaXMubWV0aG9kID0gXCJyZXR1cm5cIjtcbiAgICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gYWZ0ZXJMb2M7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH0sXG4gICAgICBmaW5pc2g6IGZ1bmN0aW9uIChmaW5hbGx5TG9jKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG5cbiAgICAgICAgICBpZiAoZW50cnkuZmluYWxseUxvYyA9PT0gZmluYWxseUxvYykge1xuICAgICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFwiY2F0Y2hcIjogZnVuY3Rpb24gKHRyeUxvYykge1xuICAgICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuXG4gICAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA9PT0gdHJ5TG9jKSB7XG4gICAgICAgICAgICB2YX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IHZhciBuID0gdGhpcy5nZXROdW1iZXIoKTtcblxuICAgICAgICAgICAgaWYgKHByb2Nlc3NQZXJjZW50ICYmIG4gPCAxLjApIHtcbiAgICAgICAgICAgICAgcmV0dXJuIG4gKiB2aWV3UG9ydC5jb21wdXRlU2l6ZShheGlzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG47XG4gICAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJnZXRNaWxsaXNlY29uZHNcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0TWlsbGlzZWNvbmRzKCkge1xuICAgICAgaWYgKCF0aGlzLmhhc1ZhbHVlKCkpIHtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLmlzU3RyaW5nKC9tcyQvKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5nZXROdW1iZXIoKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMuZ2V0TnVtYmVyKCkgKiAxMDAwO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJnZXRSYWRpYW5zXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGdldFJhZGlhbnMoKSB7XG4gICAgICBpZiAoIXRoaXMuaGFzVmFsdWUoKSkge1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgc3dpdGNoICh0cnVlKSB7XG4gICAgICAgIGNhc2UgdGhpcy5pc1N0cmluZygvZGVnJC8pOlxuICAgICAgICAgIHJldHVybiB0aGlzLmdldE51bWJlcigpICogKE1hdGguUEkgLyAxODAuMCk7XG5cbiAgICAgICAgY2FzZSB0aGlzLmlzU3RyaW5nKC9ncmFkJC8pOlxuICAgICAgICAgIHJldHVybiB0aGlzLmdldE51bWJlcigpICogKE1hdGguUEkgLyAyMDAuMCk7XG5cbiAgICAgICAgY2FzZSB0aGlzLmlzU3RyaW5nKC9yYWQkLyk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uICAgICAgdmFyIGRvY3VtZW50ID0gdGhpcy5zY3JlZW4sXG4gICAgICAgICAgZXZlbnRzID0gdGhpcy5ldmVudHMsXG4gICAgICAgICAgZXZlbnRFbGVtZW50cyA9IHRoaXMuZXZlbnRFbGVtZW50cztcbiAgICAgIHZhciBzdHlsZSA9IGRvY3VtZW50LmN0eC5jYW52YXMuc3R5bGU7XG5cbiAgICAgIGlmIChzdHlsZSkge1xuICAgICAgICBzdHlsZS5jdXJzb3IgPSAnJztcbiAgICAgIH1cblxuICAgICAgZXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKF9yZWYsIGkpIHtcbiAgICAgICAgdmFyIHJ1biA9IF9yZWYucnVuO1xuICAgICAgICB2YXIgZWxlbWVudCA9IGV2ZW50RWxlbWVudHNbaV07XG5cbiAgICAgICAgd2hpbGUgKGVsZW1lbnQpIHtcbiAgICAgICAgICBydW4oZWxlbWVudCk7XG4gICAgICAgICAgZWxlbWVudCA9IGVsZW1lbnQucGFyZW50O1xuICAgICAgICB9XG4gICAgICB9KTsgLy8gZG9uZSBydW5uaW5nLCBjbGVhclxuXG4gICAgICB0aGlzLmV2ZW50cyA9IFtdO1xuICAgICAgdGhpcy5ldmVudEVsZW1lbnRzID0gW107XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImNoZWNrUGF0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBjaGVja1BhdGgoZWxlbWVudCwgY3R4KSB7XG4gICAgICBpZiAoIXRoaXMud29ya2luZyB8fCAhY3R4KSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIGV2ZW50cyA9IHRoaXMuZXZlbnRzLFxuICAgICAgICAgIGV2ZW50RWxlbWVudHMgPSB0aGlzLmV2ZW50RWxlbWVudHM7XG4gICAgICBldmVudHMuZm9yRWFjaChmdW5jdGlvbiAoX3JlZjIsIGkpIHtcbiAgICAgICAgdmFyIHggPSBfcmVmMi54LFxuICAgICAgICAgICAgeSA9IF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QgPSBuZXcgUG9pbnQoeCwgeSk7XG4gICAgICB2YXIgZWxlbWVudCA9IGN0eC5jYW52YXM7XG5cbiAgICAgIHdoaWxlIChlbGVtZW50KSB7XG4gICAgICAgIHBvaW50LnggLT0gZWxlbWVudC5vZmZzZXRMZWZ0O1xuICAgICAgICBwb2ludC55IC09IGVsZW1lbnQub2Zmc2V0VG9wO1xuICAgICAgICBlbGVtZW50ID0gZWxlbWVudC5vZmZzZXRQYXJlbnQ7XG4gICAgICB9XG5cbiAgICAgIGlmICh3aW5kb3cuc2Nyb2xsWCkge1xuICAgICAgICBwb2ludC54ICs9IHdpbmRvdy5zY3JvbGxYO1xuICAgICAgfVxuXG4gICAgICBpZiAod2luZG93LnNjcm9sbFkpIHtcbiAgICAgICAgcG9pbnQueSArPSB3aW5kb3cuc2Nyb2xsWTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHBvaW50O1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJvbkNsaWNrXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIG9uQ2xpY2soZXZ0KSB7XG4gICAgICB2YXIgX3RoaXMkbWFwWFkgPSB0aGlzLm1hcFhZKChldnQgfHwgZXZlbnQpLmNsaWVudFgsIChldnQgfHwgZXZlbnQpLmNsaWVudFkpLFxuICAgICAgICAgIHggPSBfdGhpcyRtYXBYWS54LFxuICAgICAgICAgIHkgPSBfdGhpcyRtYXBYWS55O1xuXG4gICAgICB0aGlzLmV2ZW50cy5wdXNoKHtcbiAgICAgICAgdHlwZTogJ29uY2xpY2snLFxuICAgICAgICB4OiB4LFxuICAgICAgICB5OiB5LFxuICAgICAgICBydW46IGZ1bmN0aW9uIHJ1bihldmVudCkge1xuICAgICAgICAgIGlmIChldmVudC5vbkNsaWNrKSB7XG4gICAgICAgICAgICBldmVudC5vbkNsaWNrKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwib25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RlQ2xhc3MoUGFyc2VyLCBbe1xuICAgIGtleTogXCJwYXJzZVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiAoKSB7XG4gICAgICB2YXIgX3BhcnNlID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZShyZXNvdXJjZSkge1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUkKF9jb250ZXh0KSB7XG4gICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoX2NvbnRleHQucHJldiA9IF9jb250ZXh0Lm5leHQpIHtcbiAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgIGlmICghL148Ly50ZXN0KHJlc291cmNlKSkge1xuICAgICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDI7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIHRoaXMucGFyc2VGcm9tU3RyaW5nKHJlc291cmNlKSk7XG5cbiAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgdGhpcy5sb2FkKHJlc291cmNlKSk7XG5cbiAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LnN0b3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sIF9jYWxsZWUsIHRoaXMpO1xuICAgICAgfSkpO1xuXG4gICAgICBmdW5jdGlvbiBwYXJzZShfeCkge1xuICAgICAgIC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gX2NhbGxlZTIodXJsKSB7XG4gICAgICAgIHZhciByZXNwb25zZSwgeG1sO1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUyJChfY29udGV4dDIpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDI7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmV0Y2godXJsKTtcblxuICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBfY29udGV4dDIuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcblxuICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgeG1sID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5hYnJ1cHQoXCJyZXR1cm5cIiwgdGhpcy5wYXJzZUZyb21TdHJpbmcoeG1sKSk7XG5cbiAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlMiwgdGhpcyk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWQoX3gyKSB7XG4gICAgICAgIHJldHVybiBfbG9hZC5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbG9hZDtcbi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tleTogXCJwYXJzZVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXJzZSgpIHtcbiAgICAgIHZhciBmb250ID0gYXJndW1lbnRzLmxlbmd0aCA+IDAgJiYgYXJndW1lbnRzWzBdICE9PSB1bmRlZmluZWQgPyBhcmd1bWVudHNbMF0gOiAnJztcbiAgICAgIHZhciBpbmhlcml0ID0gYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQ7XG4gICAgICB2YXIgZm9udFN0eWxlID0gJyc7XG4gICAgICB2YXIgZm9udFZhcmlhbnQgPSAnJztcbiAgICAgIHZhciBmb250V2VpZ2h0ID0gJyc7XG4gICAgICB2YXIgZm9udFNpemUgPSAnJztcbiAgICAgIHZhciBmb250RmFtaWx5ID0gJyc7XG4gICAgICB2YXIgcGFydHMgPSBjb21wcmVzc1NwYWNlcyhmb250KS50cmltKCkuc3BsaXQoJyAnKTtcbiAgICAgIHZhciBzZXQgPSB7XG4gICAgICAgIGZvbnRTaXplOiBmYWxzZSxcbiAgICAgICAgZm9udFN0eWxlOiBmYWxzZSxcbiAgICAgICAgZm9udFdlaWdodDogZmFsc2UsXG4gICAgICAgIGZvbnRWYXJpYW50OiBmYWxzZVxuICAgICAgfTtcbiAgICAgIHBhcnRzLmZvckVhY2goZnVuY3Rpb24gKHBhcnQpIHtcbiAgICAgICAgc3dpdGNoICh0cnVlKSB7XG4gICAgICAgICAgY2FzZSAhc2V0LmZvbnRTdHlsZSAmJiBGb250LnN0eWxlcy5pbmNsdWRlcyhwYXJ0KTpcbiAgICAgICAgICAgIGlmIChwYXJ0ICE9PSAnaW5oZXJpdCcpIHtcbiAgICAgICAgICAgICAgZm9udFN0eWxlID0gcGFydDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2V0LmZvbnRTdHlsZSA9IHRydWU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgIXNldC5mb250VmFyaWFudCAmJiBGb250LnZhcmlhbnRzLmluY2x1ZGVzKHBhcnQpOlxuICAgICAgICAgICAgaWYgKHBhcnQgIT09ICdpbmhlcml0Jykge1xuICAgICAgICAgICAgICBmb250VmFyaWFudCA9IHBhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldC5mb250U3R5bGUgPSB0cnVlO1xuICAgICAgICAgICAgc2V0LmZvbnRWYXJpYW50ID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAhc2V0LmZvbnRXZWlnaHQgJiYgRm9udC53ZWlnaHRzLmluY2x1ZGVzKHBhcnQpOlxuICAgICAgICAgICAgaWYgKHBhcnQgIT09ICdpbmhlcml0Jykge1xuICAgICAgICAgICAgICBmb250V2VpZ2h0ID0gcGFydDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2V0LmZvbnRTdHlsZSA9IHRydWU7XG4gICAgICAgICAgICBzZXQuZm9udFZhcmlhbnQgPSB0cnVlO1xuICAgICAgICAgICAgc2V0LmZvbnRXZWlnaHQgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICFzZXQuZm9udFNpemU6XG4gICAgICAgICAgICBpZiAocGFydCAhPT0gJ2luaGVyaXQnKSB7XG4gICAgICAgICAgICAgIHZhciBfcGFydCRzcGxpdCA9IHBhcnQuc3BsaXQoJy8nKTtcblxuICAgICAgICAgICAgICB2YXIgX3BhcnQkc3BsaXQyID0gX3NsaWNlZFRvQXJyYXkoX3BhcnQkc3BsaXQsIDEpO1xuXG4gICAgICAgICAgICAgIGZvbnRTaXplID0gX3BhcnQkc3BsaXQyWzBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzZXQuZm9udFN0eWxlID0gdHJ1ZTtcbiAgICAgICAgICAgIHNldC5mb250VmFyaWFudCA9IHRydWU7XG4gICAgICAgICAgICBzZXQuZm9udFdlaWdodCA9IHRydWU7XG4gICAg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ZW50c1syXSA6IE51bWJlci5OYU47XG4gICAgdmFyIHkyID0gYXJndW1lbnRzLmxlbmd0aCA+IDMgJiYgYXJndW1lbnRzWzNdICE9PSB1bmRlZmluZWQgPyBhcmd1bWVudHNbM10gOiBOdW1iZXIuTmFOO1xuXG4gICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIEJvdW5kaW5nQm94KTtcblxuICAgIHRoaXMueDEgPSB4MTtcbiAgICB0aGlzLnkxID0geTE7XG4gICAgdGhpcy54MiA9IHgyO1xuICAgIHRoaXMueTIgPSB5MjtcbiAgICB0aGlzLmFkZFBvaW50KHgxLCB5MSk7XG4gICAgdGhpcy5hZGRQb2ludCh4MiwgeTIpO1xuICB9XG5cbiAgX2NyZWF0ZUNsYXNzKEJvdW5kaW5nQm94LCBbe1xuICAgIGtleTogXCJhZGRQb2ludFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRQb2ludCh4LCB5KSB7XG4gICAgICBpZiAodHlwZW9mIHggIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGlmIChpc05hTih0aGlzLngxKSB8fCBpc05hTih0aGlzLngyKSkge1xuICAgICAgICAgIHRoaXMueDEgPSB4O1xuICAgICAgICAgIHRoaXMueDIgPSB4O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHggPCB0aGlzLngxKSB7XG4gICAgICAgICAgdGhpcy54MSA9IHg7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoeCA+IHRoaXMueDIpIHtcbiAgICAgICAgICB0aGlzLngyID0geDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIHkgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGlmIChpc05hTih0aGlzLnkxKSB8fCBpc05hTih0aGlzLnkyKSkge1xuICAgICAgICAgIHRoaXMueTEgPSB5O1xuICAgICAgICAgIHRoaXMueTIgPSB5O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHkgPCB0aGlzLn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ogZnVuY3Rpb24gZ2V0UmVmbGVjdGVkQ29udHJvbFBvaW50KCkge1xuICAgICAgdmFyIHByZXZpb3VzQ29tbWFuZCA9IHRoaXMucHJldmlvdXNDb21tYW5kLnRvTG93ZXJDYXNlKCk7XG5cbiAgICAgIGlmIChwcmV2aW91c0NvbW1hbmQgIT09ICdjJyAmJiBwcmV2aW91c0NvbW1hbmQgIT09ICdzJyAmJiBwcmV2aW91c0NvbW1hbmQgIT09ICdxJyAmJiBwcmV2aW91c0NvbW1hbmQgIT09ICd0Jykge1xuICAgICAgICByZXR1cm4gdGhpcy5jdXJyZW50O1xuICAgICAgfSAvLyByZWZsZWN0IHBvaW50XG5cblxuICAgICAgdmFyIF90aGlzJGN1cnJlbnQgPSB0aGlzLmN1cnJlbnQsXG4gICAgICAgICAgY3ggPSBfdGhpcyRjdXJyZW50LngsXG4gICAgICAgICAgY3kgPSBfdGhpcyRjdXJyZW50LnksXG4gICAgICAgICAgX3RoaXMkY29udHJvbCA9IHRoaXMuY29udHJvbCxcbiAgICAgICAgICBveCA9IF90aGlzJGNvbnRyb2wueCxcbiAgICAgICAgICBveSA9IF90aGlzJGNvbnRyb2wueTtcbiAgICAgIHZhciBwb2ludCA9IG5ldyBQb2ludCgyICogY3ggLSBveCwgMiAqIGN5IC0gb3kpO1xuICAgICAgcmV0dXJuIHBvaW50O1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJtYWtlQWJzb2x1dGVcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gbWFrZUFic29sdXRlKHBvaW50KSB7XG4gICAgICBpZiAodGhpcy5pc1JlbGF0aXZlQ29tbWFuZCgpKSB7XG4gICAgICAgIHZhciBfdGhpcyRjdXJyZW50MiA9IHRoaXMuY3VycmVudCxcbiAgICAgICAgICAgIHggPSBfdGhpcyRjdXJyZW50Mi54LFxuICAgICAgICAgICAgeSA9IF90aGlzJGN1cnJlbnQyLnk7XG4gICAgICAgIHBvaW50LnggKz0geDtcbiAgICAgICAgcG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5nKCkpO1xuICAgIHJldHVybiBfdGhpcztcbiAgfVxuXG4gIF9jcmVhdGVDbGFzcyhQYXRoRWxlbWVudCwgW3tcbiAgICBrZXk6IFwicGF0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXRoKGN0eCkge1xuICAgICAgdmFyIHBhdGhQYXJzZXIgPSB0aGlzLnBhdGhQYXJzZXI7XG4gICAgICB2YXIgYm91bmRpbmdCb3ggPSBuZXcgQm91bmRpbmdCb3goKTtcbiAgICAgIHBhdGhQYXJzZXIucmVzZXQoKTtcblxuICAgICAgaWYgKGN0eCkge1xuICAgICAgICBjdHguYmVnaW5QYXRoKCk7XG4gICAgICB9XG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0VuZCgpKSB7XG4gICAgICAgIHBhdGhQYXJzZXIubmV4dENvbW1hbmQoKTtcblxuICAgICAgICBzd2l0Y2ggKHBhdGhQYXJzZXIuY29tbWFuZCkge1xuICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgIGNhc2UgJ20nOlxuICAgICAgICAgICAgdGhpcy5wYXRoTShjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgY2FzZSAnbCc6XG4gICAgICAgICAgICB0aGlzLnBhdGhMKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdIJzpcbiAgICAgICAgICBjYXNlICdoJzpcbiAgICAgICAgICAgIHRoaXMucGF0aEgoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1YnOlxuICAgICAgICAgIGNhc2UgJ3YnOlxuICAgICAgICAgICAgdGhpcy5wYXRoVihjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgY2FzZSAnYyc6XG4gICAgICAgICAgICB0aGlzLnBhdGhDKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdTJzpcbiAgICAgICAgICBjYXNlICdzJzpcbiAgICAgICAgICAgIHRoaXMucGF0aFMoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1EnOlxuICAgICAgICAgIGNhc2UgJ3EnOlxuICAgICAgICAgICAgdGhpcy5wYXRoUShjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnVCc6XG4gICAgICAgICAgY2FzZSAndCc6XG4gICAgICAgICAgICB0aGlzLnBhdGhUKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICBjYXNlICdhJzpcbiAgICAgICAgICAgIHRoaXMucGF0aEEoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1onOlxuICAgICAgICAgIGNhc2UgJ3onOlxuICAgICAgICAgICAgdGhpcy5wYXRoWihjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBib3VuZGluZ0JveDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0Qm91bmRpbmdCb3hcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0Qm91bmRpbmdCb3goXykge1xuICAgICAgcmV0dXJuIHRoaXMucGF0aCgpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJnZXRNYXJrZXJzXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGdldE1hcmtlcnMoKSB7XG4g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KTtcbiAgICAgIH1cblxuICAgICAgcGF0aFBhcnNlci5zdGFydCA9IHBhdGhQYXJzZXIuY3VycmVudDtcblxuICAgICAgd2hpbGUgKCFwYXRoUGFyc2VyLmlzQ29tbWFuZE9yRW5kKCkpIHtcbiAgICAgICAgdmFyIF9wb2ludDMgPSBwYXRoUGFyc2VyLmdldEFzQ3VycmVudFBvaW50KCk7XG5cbiAgICAgICAgdmFyIF94ID0gX3BvaW50My54LFxuICAgICAgICAgICAgX3kgPSBfcG9pbnQzLnk7XG4gICAgICAgIHBhdGhQYXJzZXIuYWRkTWFya2VyKF9wb2ludDMsIHBhdGhQYXJzZXIuc3RhcnQpO1xuICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludChfeCwgX3kpO1xuXG4gICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICBjdHgubGluZVRvKF94LCBfeSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGF0aExcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gcGF0aEwoY3R4LCBib3VuZGluZ0JveCkge1xuICAgICAgdmFyIHBhdGhQYXJzZXIgPSB0aGlzLnBhdGhQYXJzZXI7XG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0NvbW1hbmRPckVuZCgpKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gcGF0aFBhcnNlci5jdXJyZW50O1xuICAgICAgICB2YXIgcG9pbnQgPSBwYXRoUGFyc2VyLmdldEFzQ3VycmVudFBvaW50KCk7XG4gICAgICAgIHZhciB4ID0gcG9pbnQueCxcbiAgICAgICAgICAgIHkgPSBwb2ludC55O1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihwb2ludCwgY3VycmVudCk7XG4gICAgICAgIGJvdW5kaW5nQm94LmFkZFBvaW50KHgsIHkpO1xuXG4gICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICBjdHgubGluZVRvKHgsIHkpO1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50UG9pbnQueCwgY3VycmVudFBvaW50LnkpO1xuXG4gICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICBjdHguYmV6aWVyQ3VydmVUbyhwb2ludC54LCBwb2ludC55LCBjb250cm9sUG9pbnQueCwgY29udHJvbFBvaW50LnksIGN1cnJlbnRQb2ludC54LCBjdXJyZW50UG9pbnQueSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGF0aFNcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gcGF0aFMoY3R4LCBib3VuZGluZ0JveCkge1xuICAgICAgdmFyIHBhdGhQYXJzZXIgPSB0aGlzLnBhdGhQYXJzZXI7XG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0NvbW1hbmRPckVuZCgpKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gcGF0aFBhcnNlci5jdXJyZW50O1xuICAgICAgICB2YXIgcG9pbnQgPSBwYXRoUGFyc2VyLmdldFJlZmxlY3RlZENvbnRyb2xQb2ludCgpO1xuICAgICAgICB2YXIgY29udHJvbFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0NvbnRyb2xQb2ludCgpO1xuICAgICAgICB2YXIgY3VycmVudFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0N1cnJlbnRQb2ludCgpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihjdXJyZW50UG9pbnQsIGNvbnRyb2xQb2ludCwgcG9pbnQpO1xuICAgICAgICBib3VuZGluZ0JveC5hZGRCZXppZXJDdXJ2ZShjdXJyZW50LngsIGN1cnJlbnQueSwgcG9pbnQueCwgcG9pbnQueSwgY29udHJvbFBvaW50LngsIGNvbnRyb2xQb2ludC55LCBjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnkpO1xuXG4gICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICBjdHguYmV6aWVyQ3VydmVUbyhwb2ludC54LCBwb2ludC55LCBjb250cm9sUG9pbnQueCwgY29udHJvbFBvaW50LnksIGN1cnJlbnRQb2ludC54LCBjdXJyZW50UG9pbnQueSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGF0aFFcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gcGF0aFEoY3R4LCBib3VuZGluZ0JveCkge1xuICAgICAgdmFyIHBhdGhQYXJzZXIgPSB0aGlzLnBhdGhQYXJzZXI7XG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0NvbW1hbmRPckVuZCgpKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gcGF0aFBhcnNlci5jdXJyZW50O1xuICAgICAgICB2YXIgY29udHJvbFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0NvbnRyb2xQb2ludCgpO1xuICAgICAgICB2YXIgY3VycmVudFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0N1cnJlbnRQb2ludCgpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihjdXJyZW50UG9pbnQsIGNvbnRyb2xQb2ludCwgY29udHJvbFBvaW50KTtcbiAgICAgICAgYm91bmRpbmdCb3guYWRkUXVhZHJhdGljQ3VydmUoY3VycmVudC54LCBjdXJyZW50LnksIGNvbnRyb2xQb2ludC54LCBjb250cm9sUG9pbnQueSwgY3VycmVudFBvaW50LngsIGN1cnJlbnRQb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LnF1YWRyYXRpY0N1cnZlVG8oY29udHJvbFBvaW50LngsIGNvbnRyb2xQb2ludC55LCBjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnkpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInBhdGhUXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhdGhUKGN0eCwgYm91bmRpbmdCb3gpIHtcbiAgICAgIHZh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dGgucG93KHJ4LCAyKSArIE1hdGgucG93KGN1cnJwLnksIDIpIC8gTWF0aC5wb3cocnksIDIpO1xuXG4gICAgICAgIGlmIChsID4gMSkge1xuICAgICAgICAgIHJ4ICo9IE1hdGguc3FydChsKTtcbiAgICAgICAgICByeSAqPSBNYXRoLnNxcnQobCk7XG4gICAgICAgIH0gLy8gY3gnLCBjeSdcblxuXG4gICAgICAgIHZhciBzID0gKGxhcmdlQXJjRmxhZyA9PT0gc3dlZXBGbGFnID8gLTEgOiAxKSAqIE1hdGguc3FydCgoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3cocnksIDIpIC0gTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgLSBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkgLyAoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgKyBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkpO1xuXG4gICAgICAgIGlmIChpc05hTihzKSkge1xuICAgICAgICAgIHMgPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNwcCA9IG5ldyBQb2ludChzICogcnggKiBjdXJycC55IC8gcnksIHMgKiAtcnkgKiBjdXJycC54IC8gcngpOyAvLyBjeCwgY3lcblxuICAgICAgICB2YXIgY2VudHAgPSBuZXcgUG9pbnQoKGN1cnJlbnQueCArIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnggLSBNYXRoLnNpbih4QXhpc1JvdGF0aW9uKSAqIGNwcC55LCAoY3VycmVudC55ICsgY3VycmVudFBvaW50LnkpIC8gMi4wICsgTWF0aC5zaW4oeEF4aXNSb3RhdGlvbikgKiBjcHAueCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnkpOyAvLyBpbml0aWFsIGFuZ2xlXG5cbiAgICAgICAgdmFyIG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B2aWV3Qm94ID0gdmlld0JveEF0dHIuaGFzVmFsdWUoKSA/IHRvTnVtYmVycyh2aWV3Qm94QXR0ci5nZXRTdHJpbmcoKSkgOiBudWxsO1xuICAgICAgdmFyIGNsaXAgPSAhdGhpcy5yb290ICYmIHRoaXMuZ2V0QXR0cmlidXRlKCdvdmVyZmxvdycpLmdldFZhbHVlKCdoaWRkZW4nKSAhPT0gJ3Zpc2libGUnO1xuICAgICAgdmFyIG1pblggPSAwO1xuICAgICAgdmFyIG1pblkgPSAwO1xuICAgICAgdmFyIGNsaXBYID0gMDtcbiAgICAgIHZhciBjbGlwWSA9IDA7XG5cbiAgICAgIGlmICh2aWV3Qm94KSB7XG4gICAgICAgIG1pblggPSB2aWV3Qm94WzBdO1xuICAgICAgICBtaW5ZID0gdmlld0JveFsxXTtcbiAgICAgIH1cblxuICAgICAgaWYgKCF0aGlzLnJvb3QpIHtcbiAgICAgICAgd2lkdGggPSB0aGlzLmdldFN0eWxlKCd3aWR0aCcpLmdldFBpeGVscygneCcpO1xuICAgICAgICBoZWlnaHQgPSB0aGlzLmdldFN0eWxlKCdoZWlnaHQnKS5nZXRQaXhlbHMoJ3knKTtcblxuICAgICAgICBpZiAodGhpcy50eXBlID09PSAnbWFya2VyJykge1xuICAgICAgICAgIGNsaXBYID0gbWluWDtcbiAgICAgICAgICBjbGlwWSA9IG1pblk7XG4gICAgICAgICAgbWluWCA9IDA7XG4gICAgICAgICAgbWluWSA9IDA7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgc2NyZWVuLnZpZXdQb3J0LnNldEN1cnJlbnQod2lkdGgsIGhlaWdodCk7XG5cbiAgICAgIGlmICh2aWV3Qm94KSB7XG4gICAgICAgIHdpZHRoID0gdmlld0JveFsyXTtcbiAgICAgICAgaGVpZ2h0ID0gdmlld0JveFszXTtcbiAgICAgIH1cblxuICAgICAgZG9jdW1lbnQuc2V0Vmlld0JveCh7XG4gICAgICAgIGN0eDogY3R4LFxuICAgICAgICBhc3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0eWxlLmhhc1ZhbHVlKCkpIHtcbiAgICAgICAgICAgICAgICBkZWZpbml0aW9uc1tmb250RmFtaWx5U3R5bGUuZ2V0U3RyaW5nKCldID0gX2Fzc2VydFRoaXNJbml0aWFsaXplZChfdGhpcyk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGNhc2UgJ21pc3NpbmctZ2x5cGgnOlxuICAgICAgICAgICAgX3RoaXMubWlzc2luZ0dseXBoID0gY2hpbGQ7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ2dseXBoJzpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdmFyIGdseXBoID0gY2hpbGQ7XG5cbiAgICAgICAgICAgICAgaWYgKGdseXBoLmFyYWJpY0Zvcm0pIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5pc1JUTCA9IHRydWU7XG4gICAgICAgICAgICAgICAgX3RoaXMuaXNBcmFiaWMgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV0gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV0gPSB7fTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV1bZ2x5cGguYXJhYmljRm9ybV0gPSBnbHlwaDtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV0gPSBnbHlwaDtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gY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biAgICBrZXk6IFwiZ2V0VGV4dFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRUZXh0KCkge1xuICAgICAgcmV0dXJuIHRoaXMudGV4dDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGF0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXRoKGN0eCkge1xuICAgICAgdmFyIGRhdGFBcnJheSA9IHRoaXMuZGF0YUFycmF5O1xuXG4gICAgICBpZiAoY3R4KSB7XG4gICAgICAgIGN0eC5iZWdpblBhdGgoKTtcbiAgICAgIH1cblxuICAgICAgZGF0YUFycmF5LmZvckVhY2goZnVuY3Rpb24gKF9yZWYpIHtcbiAgICAgICAgdmFyIGNvbW1hbmQgPSBfcmVmLmNvbW1hbmQsXG4gICAgICAgICAgICBwb2ludHMgPSBfcmVmLnBvaW50cztcblxuICAgICAgICBzd2l0Y2ggKGNvbW1hbmQpIHtcbiAgICAgICAgICBjYXNlICdMJzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LmxpbmVUbyhwb2ludHNbMF0sIHBvaW50c1sxXSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5tb3ZlVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgICAgaWYgKGN0eCkge1xuICAgICAgICAgICAgICBjdHguYmV6aWVyQ3VydmVUbyhwb2ludHNbMF0sIHBvaW50c1sxXSwgcG9pbnRzWzJdLCBwb2ludHNbM10sIHBvaW50c1s0XSwgcG9pbnRzWzVdKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LnF1YWRyYXRpY0N1cnZlVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0sIHBvaW50c1syXSwgcG9pbnRzWzNdKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdmFyIGN4ID0gcG9pbnRzWzBdO1xuICAgICAgICAgICAgICB2YXIgY3kgPSBwb2ludHNbMV07XG4gICAgICAgICAgICAgIHZhciByeCA9IHBvaW50c1syXTtcbiAgICAgICAgICAgICAgdmFyIHJ5ID0gcG9pbnRzWzNdO1xuICAgICAgICAgICAgICB2YXIgdGhldGEgPSBwb2ludHNbNF07XG4gICAgICAgICAgICAgIHZhciBkVGhldGEgPSBwb2ludHNbNV07XG4gICAgICAgICAgICAgIHZhciBwc2kgPSBwb2ludHNbNl07XG4gICAgICAgICAgICAgIHZhciBmcyA9IHBvaW50c1s3XTtcbiAgICAgICAgICAgICAgdmFyIHIgPSByeCA+IHJ5ID8gcnggOiByeTtcbiAgICAgICAgICAgICAgdmFyIHNjYWxlWCA9IHJ4ID4gcnkgPyAxIDogcnggLyByeTtcbiAgICAgICAgICAgICAgdmFyIHNjYWxlWSA9IHJ4ID4gcnkgPyByeSAvIHJ4IDogMTtcblxuICAgICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgICAgY3R4LnRyYW5zbGF0ZShjeCwgY3kpO1xuICAgICAgICAgICAgICAgIGN0eC5yb3RhdGUocHNpKTtcbiAgICAgICAgICAgICAgICBjdHguc2NhbGUoc2NhbGVYLCBzY2FsZVkpO1xuICAgICAgICAgICAgICAgIGN0eC5hcmMoMCwgMCwgciwgdGhldGEsIHRoZXRhICsgZFRoZXRhLCBCb29sZWFuKDEgLSBmcykpO1xuICAgICAgICAgICAgICAgIGN0eC5zY2FsZSgxIC8gc2NhbGVYLCAxIC8gc2NhbGVZKTtcbiAgICAgICAgICAgICAgICBjdHgucm90YXRlKC1wc2kpO1xuICAgICAgICAgICAgICAgIGN0eC50cmFuc2xhdGUoLWN4LCAtY3kpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICd6JzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LmNsb3NlUGF0aCgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInJlbmRlckNoaWxkcmVuXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHJlbmRlckNoaWxkcmVuKGN0eCkge1xuICAgICAgdGhpcy5zZXRUZXh0RGF0YShjdHgpO1xuICAgICAgY3R4LnNhdmUoKTtcbiAgICAgIHZhciB0ZXh0RGVjb3JhdGlvbiA9IHRoaXMucGFyZW50LmdldFN0eWxlKCd0ZXh0LWRlY29yYXRpb24nKS5nZXRTdHJpbmcoKTtcbiAgICAgIHZhciBmb250U2l6ZSA9IHRoaXMuZ2V0Rm9udFNpemUoKTtcbiAgICAgIHZhciBnbHlwaEluZm8gPSB0aGlzLmdseXBoSW5mbztcbiAgICAgIHZhciBmaWxsID0gY3R4LmZpbGxTdHlsZTtcblxuICAgICAgaWYgKHRleHREZWNvcmF0aW9uID09PSAndW5kZXJsaW5lJykge1xuICAgICAgICBjdHguYmVnaW5QYXRoKCk7XG4gICAgICB9XG5cbiAgICAgIGdseXBoSW5mby5mb3JFYWNoKGZ1bmN0aW9uIChnbHlwaCwgaSkge1xuICAgICAgICB2YXIgcDAgPSBnbHlwaC5wMCxcbiAgICAgICAgICAgIHAxID0gZ2x5cGgucDEsXG4gICAgICAgICAgICBwYXJ0aWFsVGV4dCA9IGdseXBoLnRleHQ7XG4gICAgICAgIGN0eC5zYXZlKCk7XG4gICAgICAgIGN0eC50cmFuc2xhdGUocDAueCwgcDAueSk7XG4gICAgICAgIGN0eC5yb3RhdGUoZ2x5cGhJbmZvW2ldLnJvdGF0aW9uKTtcblxuICAgICAgICBpZiAoY3R4LmZpbGxTdHlsZSkge1xuICAgICAgICAgIGN0eC5maWxsVGV4dChwYXJ0aWFsVGV4dCwgMCwgMCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY3R4LnN0cm9rZVN0eWxlKSB7XG4gICAgICAgICAgY3R4LnN0cm9rZVRleHQocGFydGlhbFRleHQsIDAsIDApO1xuICAgICAgICB9XG5cbiAgICAgICAgY3R4LnJlc3RvcmUoKTtcblxuICAgICAgICBpZiAodGV4dERlY29yYXRpb24gPT09ICd1bmRlcmxpbmUnKSB7XG4gICAgICAgICAgaWYgKGkgPT09IDApIHtcbiAgICAgICAgICAgIGN0eC5tb3ZlVG8ocDAueCwgcDAueSArIGZvbnRTaXplIC8gOCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY3R4LmxpbmVUbyhwMS54LCBwMS55ICsgZm9udFNpemUgLyA1KTtcbiAgICAgICAgfSAvLy8vIFRvIGFzc2lzdCB3aXRoIGRlYnVnZ2luZyB2aXN1YWxseSwgdW5jb21tZW50IGZvbGxvd2luZ1xuICAgICAgICAvL1xuICAgICAgICAvLyBjdHguYmVnaW5QYXRoKCk7XG4gICAgICAgIC8vIGlmIChpICUgMilcbiAgICAgICAgLy8gXHRjdHguc3Ryb2tlU3R5bGUgPSAncmVkJztcbiAgICAgICAgLy8gZWxzZVxuICAgICAgICAvLyBcdGN0eC5zdHJva2VTdHlsZSA9ICdncmVlbic7XG4gICAgICAgIC8vIGN0eC5tb3ZlVG8ocDAueCwgcDAueSk7XG4gICAgICAgIC8vIGN0eC5saW5lVG8ocDEueCwgcDEueSk7XG4gICAgICAgIC8vIGN0eC5zdHJva2UoKTtcbiAgICAgICAgLy8gY3R4LmN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gICAgdmFyIHN0YXJ0WSA9IGN1cnJlbnQgPyBjdXJyZW50LnkgOiAwO1xuICAgICAgICB2YXIgY21kID0gJyc7XG4gICAgICAgIHZhciBwb2ludHMgPSBbXTtcbiAgICAgICAgcGF0aFBhcnNlci5uZXh0Q29tbWFuZCgpO1xuICAgICAgICB2YXIgdXBwZXJDb21tYW5kID0gcGF0aFBhcnNlci5jb21tYW5kLnRvVXBwZXJDYXNlKCk7XG5cbiAgICAgICAgc3dpdGNoIChwYXRoUGFyc2VyLmNvbW1hbmQpIHtcbiAgICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICBjYXNlICdtJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aE0ocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgY2FzZSAnbCc6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhMKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0gnOlxuICAgICAgICAgIGNhc2UgJ2gnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoSChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdWJzpcbiAgICAgICAgICBjYXNlICd2JzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aFYocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgY2FzZSAnYyc6XG4gICAgICAgICAgICB0aGlzLnBhdGhDKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1MnOlxuICAgICAgICAgIGNhc2UgJ3MnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoUyhwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICBjYXNlICdxJzpcbiAgICAgICAgICAgIHRoaXMucGF0aFEocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnVCc6XG4gICAgICAgICAgY2FzZSAndCc6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhUKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0EnOlxuICAgICAgICAgIGNhc2UgJ2EnOlxuICAgICAgICAgICAgcG9pbnRzID0gdGhpcy5wYXRoQShwYXRoUGFyc2VyKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnWic6XG4gICAgICAgICAgY2FzZSAneic6XG4gICAgICAgICAgICBwYXRoUGFyc2VyLmN1cnJlbnQgPSBwYXRoUGFyc2VyLnN0YXJ0O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXBwZXJDb21tYW5kICE9PSAnWicpIHtcbiAgICAgICAgICBwYXRoQ29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICBjb21tYW5kOiBjbWQgfHwgdXBwZXJDb21tYW5kLFxuICAgICAgICAgICAgcG9pbnRzOiBwb2ludHMsXG4gICAgICAgICAgICBzdGFydDoge1xuICAgICAgICAgICAgICB4OiBzdGFydFgsXG4gICAgICAgICAgICAgIHk6IHN0YXJ0WVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhdGhMZW5ndGg6IHRoaXMuY2FsY0xlbmd0aChzdGFydFgsIHN0YXJ0WSwgY21kIHx8IHVwcGVyQ29tbWFuZCwgcG9pbnRzKVxuICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2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Ly8gQXBwcm94aW1hdGVzIGJ5IGJyZWFraW5nIGN1cnZlIGludG8gMTAwIGxpbmUgc2VnbWVudHNcbiAgICAgICAgICBsZW4gPSAwLjA7XG4gICAgICAgICAgcDEgPSB0aGlzLmdldFBvaW50T25RdWFkcmF0aWNCZXppZXIoMCwgeCwgeSwgcG9pbnRzWzBdLCBwb2ludHNbMV0sIHBvaW50c1syXSwgcG9pbnRzWzNdKTtcblxuICAgICAgICAgIGZvciAodCA9IDAuMDE7IHQgPD0gMTsgdCArPSAwLjAxKSB7XG4gICAgICAgICAgICBwMiA9IHRoaXMuZ2V0UG9pbnRPblF1YWRyYXRpY0Jlemllcih0LCB4LCB5LCBwb2ludHNbMF0sIHBvaW50c1sxXSwgcG9pbnRzWzJdLCBwb2ludHNbM10pO1xuICAgICAgICAgICAgbGVuICs9IHRoaXMuZ2V0TGluZUxlbmd0aChwMS54LCBwMS55LCBwMi54LCBwMi55KTtcbiAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGxlbjtcblxuICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICAvLyBBcHByb3hpbWF0ZXMgYnkgYnJlYWtpbmcgY3VydmUgaW50byBsaW5lIHNlZ21lbnRzXG4gICAgICAgICAgbGVuID0gMC4wO1xuICAgICAgICAgIHZhciBzdGFydCA9IHBvaW50c1s0XTsgLy8gNCA9IHRoZXRhXG5cbiAgICAgICAgICB2YXIgZFRoZXRhID0gcG9pbnRzWzVdOyAvLyA1ID0gZFRoZXRhXG5cbiAgICAgICAgICB2YXIgZW5kID0gcG9pbnRzWzRdICsgZFRoZXRhO1xuICAgICAgICAgIHZhciBpbmMgPSBNYXRoLlBJIC8gMTgwLjA7IC8vIDEgZGVncmVlIHJlc29sdXRpb25cblxuICAgICAgICAgIGlmIChNYXRoLmFicyhzdGFydCAtIGVuZCkgPCBpbmMpIHtcbiAgICAgICAgICAgIGluYyA9IE1hdGguYWJzKHN0YXJ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AgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIGRlbHRhID0gZGlzdGFuY2UgLSBjdW11bGF0aXZlUGF0aExlbmd0aDtcbiAgICAgICAgICB2YXIgY3VycmVudFQgPSAwO1xuXG4gICAgICAgICAgc3dpdGNoIChwYXRoQ21kLmNvbW1hbmQpIHtcbiAgICAgICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgICAgICBwID0gdGhpcy5nZXRQb2ludE9uTGluZShkZWx0YSwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnksIHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnkpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQSc6XG4gICAgICAgICAgICAgIHZhciBzdGFydCA9IHBhdGhDbWQucG9pbnRzWzRdOyAvLyA0ID0gdGhldGFcblxuICAgICAgICAgICAgICB2YXIgZFRoZXRhID0gcGF0aENtZC5wb2ludHNbNV07IC8vIDUgPSBkVGhldGFcblxuICAgICAgICAgICAgICB2YXIgZW5kID0gcGF0aENtZC5wb2ludHNbNF0gKyBkVGhldGE7XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gc3RhcnQgKyBkZWx0YSAvIHBhdGhDbWQucGF0aExlbmd0aCAqIGRUaGV0YTtcblxuICAgICAgICAgICAgICBpZiAoZFRoZXRhIDwgMCAmJiBjdXJyZW50VCA8IGVuZCB8fCBkVGhldGEgPj0gMCAmJiBjdXJyZW50VCA+IGVuZCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcCA9IHRoaXMuZ2V0UG9pbnRPbkVsbGlwdGljYWxBcmMocGF0aENtZC5wb2ludHNbMF0sIHBhdGhDbWQucG9pbnRzWzFdLCBwYXRoQ21kLnBvaW50c1syXSwgcGF0aENtZC5wb2ludHNbM10sIGN1cnJlbnRULCBwYXRoQ21kLnBvaW50c1s2XSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdDJzpcbiAgICAgICAgICAgICAgY3VycmVudFQgPSBkZWx0YSAvIHBhdGhDbWQucGF0aExlbmd0aDtcblxuICAgICAgICAgICAgICBpZiAoY3VycmVudFQgPiAxKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudFQgPSAxO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcCA9IHRoaXMuZ2V0UG9pbnRPbkN1YmljQmV6aWVyKGN1cnJlbnRULCBwYXRoQ21kLnN0YXJ0LngsIHBhdGhDbWQuc3RhcnQueSwgcGF0aENtZC5wb2ludHNbMF0sIHBhdGhDbWQucG9pbnRzWzFdLCBwYXRoQ21kLnBvaW50c1syXSwgcGF0aENtZC5wb2ludHNbM10sIHBhdGhDbWQucG9pbnRzWzRdLCBwYXRoQ21kLnBvaW50c1s1XSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICAgICAgY3VycmVudFQgPSBkZWx0YSAvIHBhdGhDbWQucGF0aExlbmd0aDtcblxuICAgICAgICAgICAgICBpZiAoY3VycmVudFQgPiAxKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudFQgPSAxO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcCA9IHRoaXMuZ2V0UG9pbnRPblF1YWRyYXRpY0JlemllcihjdXJyZW50VCwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnksIHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5wb2ludHNbMl0sIHBhdGhDbWQucG9pbnRzWzNdKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAg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HBvaW50c1xuXG4gICAgICAgIHZhciBzID0gMDtcblxuICAgICAgICBmb3IgKHZhciBsID0gMDsgbCA8PSBmdWxsTGVuOyBsICs9IHByZWNpc2lvbikge1xuICAgICAgICAgIHZhciBwMCA9IHRoaXMuZ2V0UG9pbnRPblBhdGgobCk7XG4gICAgICAgICAgdmFyIHAxID0gdGhpcy5nZXRQb2ludE9uUGF0aChsICsgcHJlY2lzaW9uKTtcblxuICAgICAgICAgIGlmICghcDAgfHwgIXAxKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBzICs9IHRoaXMuZ2V0TGluZUxlbmd0aChwMC54LCBwMC55LCBwMS54LCBwMS55KTtcblxuICAgICAgICAgIGlmIChzID49IHN0ZXApIHtcbiAgICAgICAgICAgIHRoaXMuZXF1aWRpc3RhbnRDYWNoZS5wb2ludHMucHVzaCh7XG4gICAgICAgICAgICAgIHg6IHAwLngsXG4gICAgICAgICAgICAgIHk6IHAwLnksXG4gICAgICAgICAgICAgIGRpc3RhbmNlOiBsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHMgLT0gc3RlcDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0RXF1aWRpc3RhbnRQb2ludE9uUGF0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRFcXVpZGlzdGFudFBvaW50T25QYXRoKHRhcmdldERpc3RhbmNlLCBzdGVwLCBwcmVjaXNpb24pIHtcbiAgICAgIHRoaXMuYnVpbGRFcXVpZGlzdGFudENhY2hlKHN0ZXAsIHByZWNpc2lvbik7XG5cbiAgICAgIGlmICh0YXJnZXREaXN0YW5jZSA8IDAgfHwgdGFyZ2V0RGlzdGFuY2UgLSB0aGlzLmdldFBhdGhMZW5ndGgoKSA+IDAuMDAwMDUpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9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1xuICAgIH0gZWxzZSB7XG4gICAgICBfdGhpcy5sb2FkU3ZnKGhyZWYpO1xuICAgIH1cblxuICAgIF90aGlzLmlzU3ZnID0gaXNTdmc7XG4gICAgcmV0dXJuIF90aGlzO1xuICB9XG5cbiAgX2NyZWF0ZUNsYXNzKEltYWdlRWxlbWVudCwgW3tcbiAgICBrZXk6IFwibG9hZEltYWdlXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uICgpIHtcbiAgICAgIHZhciBfbG9hZEltYWdlID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZShocmVmKSB7XG4gICAgICAgIHZhciBpbWFnZTtcbiAgICAgICAgcmV0dXJuIF9yZWdlbmVyYXRvclJ1bnRpbWUud3JhcChmdW5jdGlvbiBfY2FsbGVlJChfY29udGV4dCkge1xuICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKF9jb250ZXh0LnByZXYgPSBfY29udGV4dC5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dC5wcmV2ID0gMDtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kb2N1bWVudC5jcmVhdGVJbWFnZShocmVmKTtcblxuICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgaW1hZ2UgPSBfY29udGV4dC5zZW50O1xuICAgICAgICAgICAgICAgIHRoaXMuaW1hZ2UgPSBpbWFnZTtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTA7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgIF9jb250ZXh0LnByZXYgPSA3O1xuICAgICAgICAgICAgICAgIF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lsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dDIucHJldiA9IDA7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLm5leHQgPSAzO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRvY3VtZW50LmZldGNoKGhyZWYpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICByZXNwb25zZSA9IF9jb250ZXh0Mi5zZW50O1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gNjtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UudGV4dCgpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICBzdmcgPSBfY29udGV4dDIuc2VudDtcbiAgICAgICAgICAgICAgICB0aGlzLmltYWdlID0gc3ZnO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMTM7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dDIucHJldiA9IDEwO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi50MCA9IF9jb250ZXh0MltcImNhdGNoXCJdKDApO1xuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTogbm8tY29uc29sZVxuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJFcnJvciB3aGlsZSBsb2FkaW5nIGltYWdlIFxcXCJcIi5jb25jYXQoaHJlZiwgXCJcXFwiOlwiKSwgX2NvbnRleHQyLnQwKTtcblxuICAgICAgICAgICAgICBjYXNlIDEzOlxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGVkID0gdHJ1ZTtcblxuICAgICAgICAg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AgICAgICAgIHJldHVybiBkb2N1bWVudC5jYW52Zy5wYXJzZXIubG9hZCh1cmwpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBzdmdEb2N1bWVudCA9IF9jb250ZXh0LnNlbnQ7XG4gICAgICAgICAgICAgICAgZm9udHMgPSBzdmdEb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnZm9udCcpO1xuICAgICAgICAgICAgICAgIEFycmF5LmZyb20oZm9udHMpLmZvckVhY2goZnVuY3Rpb24gKGZvbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgZm9udCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoZm9udE5vZGUpO1xuICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZGVmaW5pdGlvbnNbZm9udEZhbWlseV0gPSBmb250O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxMjtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQucHJldiA9IDk7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQudDAgPSBfY29udGV4dFtcImNhdGNoXCJdKDApO1xuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTogbm8tY29uc29sZVxuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJFcnJvciB3aGlsZSBsb2FkaW5nIGZvbnQgXFxcIlwiLmNvbmNhdCh1cmwsIFwiXFxcIjpcIiksIF9jb250ZXh0LnQwKTtcblxuICAgICAgICAgICAgICBjYXNlIDEyOlxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgICBjYXNlIDEzOlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF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gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBvcHRpb25zID0gX2FyZ3MubGVuZ3RoID4gMCAmJiBfYXJnc1swXSAhPT0gdW5kZWZpbmVkID8gX2FyZ3NbMF0gOiB7fTtcbiAgICAgICAgICAgICAgICB0aGlzLnN0YXJ0KF9vYmplY3RTcHJlYWQkMSh7XG4gICAgICAgICAgICAgICAgICBlbmFibGVSZWRyYXc6IHRydWUsXG4gICAgICAgICAgICAgICAgICBpZ25vcmVBbmltYXRpb246IHRydWUsXG4gICAgICAgICAgICAgICAgICBpZ25vcmVNb3VzZTogdHJ1ZVxuICAgICAgICAgICAgICAgIH0sIG9wdGlvbnMpKTtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gNDtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZWFkeSgpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICB0aGlzLnN0b3AoKTtcblxuICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgIGNhc2UgXCJlbmRcIjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZSwgdGhpcyk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIF9yZW5kZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHJlbmRlcjtcbiAgICB9KClcbiAgICAvKipcbiAgICAgKiBTdGFydCByZW5kZXJpbmcuXG4gICAgICogQHBhcmFtIG9wdGlvbnMgLSBSZW5kZXIgb3B0aW9ucy5cbiAgICAgKi9cblxuICB9LCB7XG4gICAga2V5OiBcInN0YXJ0XCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHN0YXJ0KC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VuY3Rpb24gX2NhbGxlZSgpIHtcbiAgICAgICAgdmFyIHJlc3BvbnNlLCBibG9iLCBpbWc7XG4gICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDI7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZldGNoKHVybCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gX2NvbnRleHQuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gNTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuYmxvYigpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICBibG9iID0gX2NvbnRleHQuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gODtcbiAgICAgICAgICAgICAgICByZXR1cm4gY3JlYXRlSW1hZ2VCaXRtYXAoYmxvYik7XG5cbiAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgIGltZyA9IF9jb250ZXh0LnNlbnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdChcInJldHVyblwiLCBpbWcpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgIGNhc2UgXCJlbmRcIjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZSk7XG4gICAgICB9KSkoKTtcbiAgIC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TmxkQ0lzSW10bGVYTWlMQ0p2WW1wbFkzUWlMQ0pyWlhraUxDSnlaWFpsY25ObElpd2liR1Z1WjNSb0lpd2ljRzl3SWl3aWFYUmxjbUZpYkdVaUxDSnBkR1Z5WVhSdmNrMWxkR2h2WkNJc0ltbHpUbUZPSWl3aWFTSXNJbk5yYVhCVVpXMXdVbVZ6WlhRaUxDSndjbVYySWl3aVkyaGhja0YwSWl3aWMyeHBZMlVpTENKemRHOXdJaXdpY205dmRFVnVkSEo1SWl3aWNtOXZkRkpsWTI5eVpDSXNJbkoyWVd3aUxDSmxlR05sY0hScGIyNGlMQ0pvWVc1a2JHVWlMQ0pzYjJNaUxDSmpZWFZuYUhRaUxDSm9ZWE5EWVhSamFDSXNJbWhoYzBacGJtRnNiSGtpTENKbWFXNWhiR3g1Ulc1MGNua2lMQ0pqYjIxd2JHVjBaU0lzSW1acGJtbHphQ0lzSW5Sb2NtOTNiaUlzSW1SbGJHVm5ZWFJsV1dsbGJHUWlMQ0p0YjJSMWJHVWlMQ0p5WldkbGJtVnlZWFJ2Y2xKMWJuUnBiV1VpTENKaFkyTnBaR1Z1ZEdGc1UzUnlhV04wVFc5a1pTSXNJa1oxYm1OMGFXOXVJbDBzSW0xaGNIQnBibWR6SWpvaU96czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN08wRkJRVUU3T3pz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m5RaXhOUVVGd1FpeEZRVUUwUWpzN08wRkJSekZDTEdWQlFVdHlRaXhIUVVGTUxFZEJRVmQ2UWl4WFFVRllPMEZCUTBRN08wRkJSVVFzWlVGQlQybERMR2RDUVVGUU8wRkJRMFE3UVVGeVRXbENMRXRCUVhCQ0xFTkJPV1ZuUXpzN096czdRVUV3Y2tKb1F5eFhRVUZQZGtNc1QwRkJVRHRCUVVWRUxFZEJOWEpDWXpzN096dEJRV2x6UW1Jc1IwRkJOa0o1U1N4TlFVRk5MRU5CUVVONlNTeFBRVUZ3UXl4RFFXcHpRbUVzUTBGQlpqczdRVUZ2YzBKQkxFMUJRVWs3UVVGRFJqQkpMRWxCUVVGQkxHdENRVUZyUWl4SFFVRkhNMGtzVDBGQmNrSTdRVUZEUkN4SFFVWkVMRU5CUlVVc1QwRkJUelJKTEc5Q1FVRlFMRVZCUVRaQ096czdPenM3T3pzN08wRkJWVGRDUXl4SlFVRkJRU3hSUVVGUkxFTkJRVU1zUjBGQlJDeEZRVUZOTEhkQ1FVRk9MRU5CUVZJc1EwRkJkME0zU1N4UFFVRjRRenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN095SjlcbiIsImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIF9hcnJheUxpa2VUb0FycmF5KGFyciwgbGVuKSB7XG4gIGlmIChsZW4gPT0gbnVsbCB8fCBsZW4gPiBhcnIubGVuZ3RoKSBsZW4gPSBhcnIubGVuZ3RoO1xuXG4gIGZvciAodmFyIGkgPSAwLCBhcnIyID0gbmV3IEFycmF5KGxlbik7IGkgPCBsZW47IGkrKykge1xuICAgIGFycjJbaV0gPSBhcnJbaV07XG4gIH1cblxuICByZXR1cm4gYXJyMjtcbn0iLCJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBfYXJyYXlXaXRoSG9sZXMoYXJyKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFycikpIHJldHVybiBhcnI7XG59IiwiaW1wb3J0IGFycmF5TGlrZVRvQXJyYXkgZnJvbSBcIi4vYXJyYXlMaWtlVG9BcnJheS5qc1wiO1xuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gX2FycmF5V2l0aG91dEhvbGVzKGFycikge1xuICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSByZXR1cm4gYXJyYXlMaWtlVG9BcnJheShhcnIpO1xufSIsImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIF9hc3NlcnRUaGlzSW5pdGlhbGl6ZWQoc2VsZikge1xuICBpZiAoc2VsZiA9PT0gdm9pZCAwKSB7XG4gICAgdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIH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2FuIHRocm93XG4gICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgICAgIGV4aXRlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgaWYgKGRvbWFpbiAmJiAhZXhpdGVkKSBkb21haW4uZXhpdCgpO1xuICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgfVxuICAgIH1cbiAgICBzdGF0ZS5yZWFjdGlvbnMgPSBbXTtcbiAgICBzdGF0ZS5ub3RpZmllZCA9IGZhbHNlO1xuICAgIGlmIChpc1JlamVjdCAmJiAhc3RhdGUucmVqZWN0aW9uKSBvblVuaGFuZGxlZChzdGF0ZSk7XG4gIH0pO1xufTtcblxudmFyIGRpc3BhdGNoRXZlbnQgPSBmdW5jdGlvbiAobmFtZSwgcHJvbWlzZSwgcmVhc29uKSB7XG4gIHZhciBldmVudCwgaGFuZGxlcjtcbiAgaWYgKERJU1BBVENIX0VWRU5UKSB7XG4gICAgZXZlbnQgPSBkb2N1bWVudC5jcmVhdGVFdmVudCgnRXZlbnQnKTtcbiAgICBldmVudC5wcm9taXNlID0gcHJvbWlzZTtcbiAgICBldmVudC5yZWFzb24gPSByZWFzb247XG4gICAgZXZlbn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lIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgaWYgKHN0YXRlID09PSBHZW5TdGF0ZVN1c3BlbmRlZFN0YXJ0KSB7XG4gICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgdGhyb3cgY29udGV4dC5hcmc7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG5cbiAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIGNvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIGNvbnRleHQuYXJnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgIC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uICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuICEhIGNhdWdodDtcbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByZWNvcmQuYXJnO1xuICAgICAgfVxuXG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgIHJlY29yZC50eXBlID09PSBcImNvbnRpbnVl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iamVjdHNcbiAgICB2YXIgY29sb3JfZGVmcyA9IFtcbiAgICAgICAge1xuICAgICAgICAgICAgcmU6IC9ecmdiYVxcKChcXGR7MSwzfSksXFxzKihcXGR7MSwzfSksXFxzKihcXGR7MSwzfSksXFxzKigoPzpcXGQ/XFwuKT9cXGQpXFwpJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJ3JnYmEoMTIzLCAyMzQsIDQ1LCAwLjgpJywgJ3JnYmEoMjU1LDIzNCwyNDUsMS4wKSddLFxuICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKGJpdHMpe1xuICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMV0pLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzJdKSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1szXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlRmxvYXQoYml0c1s0XSlcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICByZTogL15yZ2JcXCgoXFxkezEsM30pLFxccyooXFxkezEsM30pLFxccyooXFxkezEsM30pXFwpJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJ3JnYigxMjMsIDIzNCwgNDUpJywgJ3JnYigyNTUsMjM0LDI0NSknXSxcbiAgICAgICAgICAgIHByb2Nlc3M6IGZ1bmN0aW9uIChiaXRzKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzFdKSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1syXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10pXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgcmU6IC9eKFswLTlhLWZBLUZdezJ9KShbMC05YS1mQS1GXXsyfSkoWzAtOWEtZkEtRl17Mn0pJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJyMwMGZmMDAnLCAnMzM2Njk5J10sXG4gICAgICAgICAgICBwcm9jZXNzOiBmdW5jdGlvbiAoYml0cyl7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1sxXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzJdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10sIDE2KVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlOiAvXihbMC05YS1mQS1GXXsxfSkoWzAtOWEtZkEtRl17MX0pKFswLTlhLWZBLUZdezF9KSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWycjZmIwJywgJ2YwZiddLFxuICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKGJpdHMpe1xuICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMV0gKyBiaXRzWzFdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMl0gKyBiaXRzWzJdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10gKyBiaXRzWzNdLCAxNilcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgXTtcblxuICAgIC8vIHNlYXJjaCB0aHJvdWdoIHRoZSBkZWZpbml0aW9ucyB0byBmaW5kIGEgbWF0Y2hcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbG9yX2RlZnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgdm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gZ2V0dGVyc1xuICAgIHRoaXMudG9SR0IgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiAncmdiKCcgKyB0aGlzLnIgKyAnLCAnICsgdGhpcy5nICsgJywgJyArIHRoaXMuYiArICcpJztcbiAgICB9XG4gICAgdGhpcy50b1JHQkEgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiAncmdiYSgnICsgdGhpcy5yICsgJywgJyArIHRoaXMuZyArICcsICcgKyB0aGlzLmIgKyAnLCAnICsgdGhpcy5hbHBoYSArICcpJztcbiAgICB9XG4gICAgdGhpcy50b0hleCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIHIgPSB0aGlzLnIudG9TdHJpbmcoMTYpO1xuICAgICAgICB2YXIgZyA9IHRoaXMuZy50b1N0cmluZygxNik7XG4gICAgICAgIHZhciBiID0gdGhpcy5iLnRvU3RyaW5nKDE2KTtcbiAgICAgICAgaWYgKHIubGVuZ3RoID09IDEpIHIgPSAnMCcgKyByO1xuICAgICAgICBpZiAoZy5sZW5ndGggPT0gMSkgZyA9ICcwJyArIGc7XG4gICAgICAgIGlmIChiLmxlbmd0aCA9PSAxKSBiID0gJzAnICsgYjtcbiAgICAgICAgcmV0dXJuICcjJyArIHIgKyBnICsgYjtcbiAgICB9XG5cbiAgICAvLyBoZWxwXG4gICAgdGhpcy5nZXRIZWxwWE1MID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgIHZhciBleGFtcGxlcyA9IG5ldyBBcnJheSgpO1xuICAgICAgICAvLyBhZGQgcmVnZXhwc1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbG9yX2RlZnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBleGFtcGxlID0gY29sb3JfZGVmc1tpXS5leGFtcGxlO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBleGFtcGxlLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgZXhhbXBsZXNbZXhhbXBsZXMubGVuZ3RoXSA9IGV4YW1wbGVbal07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gYWRkIHR5cGUtaW4gY29sb3JzXG4gICAgICAgIGZvciAodmFyIHNjIGluIHNpbXBsZV9jb2xvcnMpIHtcbiAgICAgICAgICAgIGV4YW1wbGVzW2V4YW1wbGVzLmxlbmd0aF0gPSBzYztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB4bWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCd1bCcpO1xuICAgICAgICB4bWwuc2V0QXR0cmlidXRlKCdpZCcsICdyZ2Jjb2xvci1leGFtcGxlcycpO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGV4YW1wbGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2l0ZW0gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaScpO1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2NvbG9yID0gbmV3IFJHQkNvbG9yKGV4YW1wbGVzW2ldKTtcbiAgICAgICAgICAgICAgICB2YXIgZXhhbXBsZV9kaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgICAgICAgICAgICBleGFtcGxlX2Rpdi5zdHlsZS5jc3NUZXh0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICdtYXJnaW46IDNweDsgJ1xuICAgICAgICAgICAgICAgICAgICAgICAgKyAnYm9yZGVyOiAxcHggc29saWQgYmxhY2s7ICdcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2JhY2tncm91bmQ6JyArIGxpc3RfY29sb3IudG9IZXgoKSArICc7ICdcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2NvbG9yOicgKyBsaXN0X2NvbG9yLnRvSGV4KClcbiAgICAgICAgICAgICAgICA7XG4gICAgICAg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NrU3RhcnQ7XG5cbiAgICBmb3IgKHZhciBfaTMgPSAwOyBfaTMgPCByYWRpdXNQbHVzMTsgX2kzKyspIHtcbiAgICAgIHN0YWNrLnIgPSBfcHI7XG4gICAgICBzdGFjay5nID0gX3BnO1xuICAgICAgc3RhY2suYiA9IF9wYjtcbiAgICAgIHN0YWNrLmEgPSBfcGE7XG4gICAgICBzdGFjayA9IHN0YWNrLm5leHQ7XG4gICAgfVxuXG4gICAgdmFyIHlwID0gd2lkdGg7XG4gICAgdmFyIF9nSW5TdW0gPSAwLFxuICAgICAgICBfYkluU3VtID0gMCxcbiAgICAgICAgX2FJblN1bSA9IDAsXG4gICAgICAgIF9ySW5TdW0gPSAwO1xuXG4gICAgZm9yICh2YXIgX2k0ID0gMTsgX2k0IDw9IHJhZGl1czsgX2k0KyspIHtcbiAgICAgIHlpID0geXAgKyBfeCA8PCAyO1xuXG4gICAgICB2YXIgX3JicyA9IHJhZGl1c1BsdXMxIC0gX2k0O1xuXG4gICAgICBfclN1bSArPSAoc3RhY2suciA9IF9wciA9IHBpeGVsc1t5aV0pICogX3JicztcbiAgICAgIF9nU3VtICs9IChzdGFjay5nID0gX3BnID0gcGl4ZWxzW3lpICsgMV0pICogX3JicztcbiAgICAgIF9iU3VtICs9IChzdGFjay5iID0gX3BiID0gcGl4ZWxzW3lpICsgMl0pICogX3JicztcbiAgICAgIF9hU3VtICs9IChzdGFjay5hID0gX3BhID0gcGl4ZWxzW3lpICsgM10pICogX3JicztcbiAgICAgIF9ySW5TdW0gKz0gX3ByO1xuICAgICAgX2dJblN1bSArPSBfcGc7XG4gICAgICBfYkluU3VtICs9IF9wYjtcbiAgICAgIF9hSW5TdW0gKz0gX3BhO1xuICAgICAgc3RhY2sgPSBzdGFjay5uZXh0O1xuXG4gICAgICBpZiAoX2k0IDwgaGVpZ2h0TWludXMxKSB7XG4gICAgICAgIHlwICs9IHdpZHRoO1xuICAgICAgfVxuICAgIH1cblxuICAgIHlpID0gX3g7XG4gICAgc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