ps-toolkit-ui 0.0.207 → 0.0.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1350) hide show
  1. package/karma.conf.js +32 -0
  2. package/ng-package.json +16 -0
  3. package/package.json +19 -22
  4. package/src/assets/plugins/highcharts/code/css/annotations/popup.css +276 -0
  5. package/src/assets/plugins/highcharts/code/css/annotations/popup.scss +289 -0
  6. package/src/assets/plugins/highcharts/code/css/highcharts.css +1013 -0
  7. package/src/assets/plugins/highcharts/code/css/highcharts.scss +896 -0
  8. package/src/assets/plugins/highcharts/code/css/stocktools/gui.css +271 -0
  9. package/src/assets/plugins/highcharts/code/css/stocktools/gui.scss +271 -0
  10. package/src/assets/plugins/highcharts/code/css/themes/dark-unica.css +1074 -0
  11. package/src/assets/plugins/highcharts/code/css/themes/dark-unica.scss +122 -0
  12. package/src/assets/plugins/highcharts/code/css/themes/grid-light.css +1027 -0
  13. package/src/assets/plugins/highcharts/code/css/themes/grid-light.scss +33 -0
  14. package/src/assets/plugins/highcharts/code/css/themes/sand-signika.css +1043 -0
  15. package/src/assets/plugins/highcharts/code/css/themes/sand-signika.scss +74 -0
  16. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/A11yI18n.js +299 -0
  17. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Accessibility.js +401 -0
  18. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/AccessibilityComponent.js +153 -0
  19. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/AnnotationsA11y.js +160 -0
  20. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/ContainerComponent.js +159 -0
  21. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/InfoRegionsComponent.js +543 -0
  22. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/LegendComponent.js +478 -0
  23. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/MenuComponent.js +451 -0
  24. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/RangeSelectorComponent.js +506 -0
  25. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +217 -0
  26. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +324 -0
  27. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +148 -0
  28. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +390 -0
  29. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +650 -0
  30. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/ZoomComponent.js +375 -0
  31. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/FocusBorder.js +302 -0
  32. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/HighContrastMode.js +96 -0
  33. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/HighContrastTheme.js +221 -0
  34. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/KeyboardNavigation.js +449 -0
  35. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/KeyboardNavigationHandler.js +128 -0
  36. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Options/DeprecatedOptions.js +250 -0
  37. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Options/LangOptions.js +339 -0
  38. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Options/Options.js +831 -0
  39. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/ProxyElement.js +218 -0
  40. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/ProxyProvider.js +302 -0
  41. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/Announcer.js +91 -0
  42. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/ChartUtilities.js +294 -0
  43. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/DOMElementProvider.js +62 -0
  44. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/EventProvider.js +58 -0
  45. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/HTMLUtilities.js +305 -0
  46. package/src/assets/plugins/highcharts/code/es-modules/Core/Animation/AnimationUtilities.js +200 -0
  47. package/src/assets/plugins/highcharts/code/es-modules/Core/Animation/Fx.js +387 -0
  48. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Axis.js +3225 -0
  49. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Axis3D.js +612 -0
  50. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/AxisDefaults.js +2935 -0
  51. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/BrokenAxis.js +601 -0
  52. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Color/ColorAxis.js +668 -0
  53. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Color/ColorAxisComposition.js +287 -0
  54. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Color/ColorAxisDefaults.js +434 -0
  55. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/DateTimeAxis.js +196 -0
  56. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/GridAxis.js +1046 -0
  57. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/LogarithmicAxis.js +202 -0
  58. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/NavigatorAxis.js +159 -0
  59. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/OrdinalAxis.js +992 -0
  60. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +873 -0
  61. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js +287 -0
  62. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/RadialAxis.js +954 -0
  63. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/ScrollbarAxis.js +182 -0
  64. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/SolidGaugeAxis.js +127 -0
  65. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/StackingAxis.js +216 -0
  66. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Tick.js +723 -0
  67. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Tick3D.js +68 -0
  68. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/TreeGridAxis.js +720 -0
  69. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/TreeGridTick.js +306 -0
  70. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/WaterfallAxis.js +149 -0
  71. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/ZAxis.js +156 -0
  72. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/Chart.js +2909 -0
  73. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/Chart3D.js +1695 -0
  74. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/ChartDefaults.js +1053 -0
  75. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/ChartNavigationComposition.js +92 -0
  76. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/GanttChart.js +177 -0
  77. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/MapChart.js +179 -0
  78. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/StockChart.js +644 -0
  79. package/src/assets/plugins/highcharts/code/es-modules/Core/Color/Color.js +419 -0
  80. package/src/assets/plugins/highcharts/code/es-modules/Core/Color/Palettes.js +22 -0
  81. package/src/assets/plugins/highcharts/code/es-modules/Core/DefaultOptions.js +2743 -0
  82. package/src/assets/plugins/highcharts/code/es-modules/Core/FormatUtilities.js +246 -0
  83. package/src/assets/plugins/highcharts/code/es-modules/Core/Foundation.js +61 -0
  84. package/src/assets/plugins/highcharts/code/es-modules/Core/Geometry/CircleUtilities.js +386 -0
  85. package/src/assets/plugins/highcharts/code/es-modules/Core/Geometry/GeometryUtilities.js +83 -0
  86. package/src/assets/plugins/highcharts/code/es-modules/Core/Globals.js +131 -0
  87. package/src/assets/plugins/highcharts/code/es-modules/Core/HttpUtilities.js +195 -0
  88. package/src/assets/plugins/highcharts/code/es-modules/Core/Legend/Legend.js +1284 -0
  89. package/src/assets/plugins/highcharts/code/es-modules/Core/Legend/LegendSymbol.js +109 -0
  90. package/src/assets/plugins/highcharts/code/es-modules/Core/MSPointer.js +170 -0
  91. package/src/assets/plugins/highcharts/code/es-modules/Core/Navigator.js +1958 -0
  92. package/src/assets/plugins/highcharts/code/es-modules/Core/Pointer.js +1518 -0
  93. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/HTML/AST.js +475 -0
  94. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/HTML/HTMLElement.js +261 -0
  95. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/HTML/HTMLRenderer.js +272 -0
  96. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/RendererRegistry.js +77 -0
  97. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/RendererUtilities.js +159 -0
  98. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGElement.js +2176 -0
  99. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGElement3D.js +160 -0
  100. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGLabel.js +408 -0
  101. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGRenderer.js +1900 -0
  102. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +842 -0
  103. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/Symbols.js +197 -0
  104. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/TextBuilder.js +452 -0
  105. package/src/assets/plugins/highcharts/code/es-modules/Core/Responsive.js +334 -0
  106. package/src/assets/plugins/highcharts/code/es-modules/Core/Scrollbar.js +658 -0
  107. package/src/assets/plugins/highcharts/code/es-modules/Core/ScrollbarDefaults.js +218 -0
  108. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/DataLabel.js +568 -0
  109. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/Point.js +1307 -0
  110. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/Series.js +3718 -0
  111. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/Series3D.js +126 -0
  112. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/SeriesDefaults.js +2293 -0
  113. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/SeriesRegistry.js +127 -0
  114. package/src/assets/plugins/highcharts/code/es-modules/Core/Time.js +741 -0
  115. package/src/assets/plugins/highcharts/code/es-modules/Core/Tooltip.js +1378 -0
  116. package/src/assets/plugins/highcharts/code/es-modules/Core/Utilities.js +1967 -0
  117. package/src/assets/plugins/highcharts/code/es-modules/Data/DataConverter.js +483 -0
  118. package/src/assets/plugins/highcharts/code/es-modules/Data/DataPromise.js +252 -0
  119. package/src/assets/plugins/highcharts/code/es-modules/Data/DataSeriesConverter.js +207 -0
  120. package/src/assets/plugins/highcharts/code/es-modules/Data/DataTable.js +1205 -0
  121. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/ChainModifier.js +299 -0
  122. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/DataModifier.js +303 -0
  123. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/GroupModifier.js +144 -0
  124. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/InvertModifier.js +254 -0
  125. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/RangeModifier.js +143 -0
  126. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/SeriesPointsModifier.js +110 -0
  127. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/SortModifier.js +249 -0
  128. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/CSVParser.js +400 -0
  129. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/DataParser.js +101 -0
  130. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/GoogleSheetsParser.js +223 -0
  131. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/HTMLTableParser.js +213 -0
  132. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/CSVStore.js +317 -0
  133. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/DataStore.js +276 -0
  134. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/GoogleSheetsStore.js +169 -0
  135. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/HTMLTableStore.js +353 -0
  136. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Annotations.js +1442 -0
  137. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/ControlPoint.js +141 -0
  138. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +117 -0
  139. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +199 -0
  140. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +111 -0
  141. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +387 -0
  142. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +181 -0
  143. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +121 -0
  144. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +378 -0
  145. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Mixins/EventEmitterMixin.js +221 -0
  146. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Mixins/MarkerMixin.js +179 -0
  147. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/MockPoint.js +428 -0
  148. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/NavigationBindings.js +1212 -0
  149. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Popup.js +1123 -0
  150. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +237 -0
  151. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/CrookedLine.js +185 -0
  152. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/ElliottWave.js +95 -0
  153. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Fibonacci.js +205 -0
  154. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +219 -0
  155. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/InfinityLine.js +161 -0
  156. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Measure.js +791 -0
  157. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Pitchfork.js +194 -0
  158. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/TimeCycles.js +211 -0
  159. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Tunnel.js +211 -0
  160. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/VerticalLine.js +156 -0
  161. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ArrowSymbols.js +166 -0
  162. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/Boost.js +34 -0
  163. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostAttach.js +150 -0
  164. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostInit.js +318 -0
  165. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostOptions.js +219 -0
  166. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostOverrides.js +386 -0
  167. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostUtils.js +255 -0
  168. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostableMap.js +18 -0
  169. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/Boostables.js +25 -0
  170. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/NamedColors.js +162 -0
  171. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/WGLRenderer.js +1188 -0
  172. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/WGLShader.js +470 -0
  173. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/WGLVBuffer.js +153 -0
  174. package/src/assets/plugins/highcharts/code/es-modules/Extensions/BoostCanvas.js +509 -0
  175. package/src/assets/plugins/highcharts/code/es-modules/Extensions/CurrentDateIndication.js +100 -0
  176. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Data.js +2037 -0
  177. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DataGrouping.js +1134 -0
  178. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Debugger/Debugger.js +101 -0
  179. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Debugger/ErrorMessages.js +106 -0
  180. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DownloadURL.js +106 -0
  181. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DragPanes.js +512 -0
  182. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DraggablePoints.js +2259 -0
  183. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Drilldown.js +1170 -0
  184. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ExportData.js +997 -0
  185. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Exporting/Exporting.js +1260 -0
  186. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Exporting/ExportingDefaults.js +796 -0
  187. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Exporting/ExportingSymbols.js +73 -0
  188. package/src/assets/plugins/highcharts/code/es-modules/Extensions/FullScreen.js +240 -0
  189. package/src/assets/plugins/highcharts/code/es-modules/Extensions/GeoJSON.js +436 -0
  190. package/src/assets/plugins/highcharts/code/es-modules/Extensions/MarkerClusters.js +1436 -0
  191. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Math3D.js +245 -0
  192. package/src/assets/plugins/highcharts/code/es-modules/Extensions/NoDataToDisplay.js +189 -0
  193. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OfflineExporting/OfflineExporting.js +617 -0
  194. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +58 -0
  195. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Oldie/Oldie.js +1182 -0
  196. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Oldie/VMLAxis3D.js +101 -0
  197. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Oldie/VMLRenderer3D.js +47 -0
  198. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OldiePolyfills.js +167 -0
  199. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OverlappingDataLabels.js +226 -0
  200. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Pane.js +404 -0
  201. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ParallelCoordinates.js +464 -0
  202. package/src/assets/plugins/highcharts/code/es-modules/Extensions/PatternFill.js +580 -0
  203. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Polar.js +740 -0
  204. package/src/assets/plugins/highcharts/code/es-modules/Extensions/PriceIndication.js +292 -0
  205. package/src/assets/plugins/highcharts/code/es-modules/Extensions/RangeSelector.js +2175 -0
  206. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ScrollablePlotArea.js +387 -0
  207. package/src/assets/plugins/highcharts/code/es-modules/Extensions/SeriesLabel.js +765 -0
  208. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/ChartSonify.js +724 -0
  209. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Earcon.js +197 -0
  210. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Instrument.js +606 -0
  211. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/MusicalFrequencies.js +122 -0
  212. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Options.js +44 -0
  213. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/PointSonify.js +391 -0
  214. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/SeriesSonify.js +474 -0
  215. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/SignalHandler.js +122 -0
  216. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Sonification.js +97 -0
  217. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/SonificationUtilities.js +150 -0
  218. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Timeline.js +308 -0
  219. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/TimelineEvent.js +157 -0
  220. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/TimelinePath.js +311 -0
  221. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Stacking.js +516 -0
  222. package/src/assets/plugins/highcharts/code/es-modules/Extensions/StaticScale.js +76 -0
  223. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Avocado.js +67 -0
  224. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/BrandDark.js +293 -0
  225. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/BrandLight.js +259 -0
  226. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/DarkBlue.js +279 -0
  227. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/DarkGreen.js +279 -0
  228. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/DarkUnica.js +249 -0
  229. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Gray.js +287 -0
  230. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Grid.js +140 -0
  231. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/GridLight.js +111 -0
  232. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/HighContrastDark.js +239 -0
  233. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/HighContrastLight.js +69 -0
  234. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/SandSignika.js +144 -0
  235. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Skies.js +131 -0
  236. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Sunset.js +66 -0
  237. package/src/assets/plugins/highcharts/code/es-modules/Gantt/Connection.js +838 -0
  238. package/src/assets/plugins/highcharts/code/es-modules/Gantt/Pathfinder.js +818 -0
  239. package/src/assets/plugins/highcharts/code/es-modules/Gantt/PathfinderAlgorithms.js +657 -0
  240. package/src/assets/plugins/highcharts/code/es-modules/Gantt/Tree.js +110 -0
  241. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapNavigation.js +278 -0
  242. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapNavigationOptionsDefault.js +264 -0
  243. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapPointer.js +83 -0
  244. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapSymbols.js +80 -0
  245. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapView.js +450 -0
  246. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapViewOptionsDefault.js +97 -0
  247. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projection.js +436 -0
  248. package/src/assets/plugins/highcharts/code/es-modules/Maps/ProjectionDefinition.js +9 -0
  249. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/EqualEarth.js +42 -0
  250. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/LambertConformalConic.js +52 -0
  251. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/Miller.js +16 -0
  252. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/Orthographic.js +26 -0
  253. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/ProjectionRegistry.js +19 -0
  254. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/WebMercator.js +24 -0
  255. package/src/assets/plugins/highcharts/code/es-modules/Series/Area/AreaSeries.js +563 -0
  256. package/src/assets/plugins/highcharts/code/es-modules/Series/Area3DSeries.js +70 -0
  257. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaRange/AreaRangePoint.js +129 -0
  258. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaRange/AreaRangeSeries.js +650 -0
  259. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaSpline/AreaSplineSeries.js +203 -0
  260. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +199 -0
  261. package/src/assets/plugins/highcharts/code/es-modules/Series/Bar/BarSeries.js +171 -0
  262. package/src/assets/plugins/highcharts/code/es-modules/Series/Bellcurve/BellcurveSeries.js +241 -0
  263. package/src/assets/plugins/highcharts/code/es-modules/Series/BoxPlot/BoxPlotSeries.js +681 -0
  264. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleLegendComposition.js +279 -0
  265. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleLegendDefaults.js +266 -0
  266. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleLegendItem.js +462 -0
  267. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubblePoint.js +77 -0
  268. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleSeries.js +676 -0
  269. package/src/assets/plugins/highcharts/code/es-modules/Series/Bullet/BulletPoint.js +62 -0
  270. package/src/assets/plugins/highcharts/code/es-modules/Series/Bullet/BulletSeries.js +365 -0
  271. package/src/assets/plugins/highcharts/code/es-modules/Series/Candlestick/CandlestickSeries.js +333 -0
  272. package/src/assets/plugins/highcharts/code/es-modules/Series/CenteredUtilities.js +128 -0
  273. package/src/assets/plugins/highcharts/code/es-modules/Series/ColorMapMixin.js +84 -0
  274. package/src/assets/plugins/highcharts/code/es-modules/Series/Column/ColumnDataLabel.js +109 -0
  275. package/src/assets/plugins/highcharts/code/es-modules/Series/Column/ColumnSeries.js +1171 -0
  276. package/src/assets/plugins/highcharts/code/es-modules/Series/Column3D/Column3DComposition.js +508 -0
  277. package/src/assets/plugins/highcharts/code/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +308 -0
  278. package/src/assets/plugins/highcharts/code/es-modules/Series/ColumnRange/ColumnRangePoint.js +62 -0
  279. package/src/assets/plugins/highcharts/code/es-modules/Series/ColumnRange/ColumnRangeSeries.js +308 -0
  280. package/src/assets/plugins/highcharts/code/es-modules/Series/Cylinder/CylinderComposition.js +274 -0
  281. package/src/assets/plugins/highcharts/code/es-modules/Series/Cylinder/CylinderPoint.js +60 -0
  282. package/src/assets/plugins/highcharts/code/es-modules/Series/Cylinder/CylinderSeries.js +175 -0
  283. package/src/assets/plugins/highcharts/code/es-modules/Series/DataModifyComposition.js +539 -0
  284. package/src/assets/plugins/highcharts/code/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +100 -0
  285. package/src/assets/plugins/highcharts/code/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +368 -0
  286. package/src/assets/plugins/highcharts/code/es-modules/Series/DerivedComposition.js +137 -0
  287. package/src/assets/plugins/highcharts/code/es-modules/Series/DotPlot/DotPlotSeries.js +158 -0
  288. package/src/assets/plugins/highcharts/code/es-modules/Series/DrawPointComposition.js +111 -0
  289. package/src/assets/plugins/highcharts/code/es-modules/Series/Dumbbell/DumbbellPoint.js +104 -0
  290. package/src/assets/plugins/highcharts/code/es-modules/Series/Dumbbell/DumbbellSeries.js +464 -0
  291. package/src/assets/plugins/highcharts/code/es-modules/Series/ErrorBar/ErrorBarSeries.js +228 -0
  292. package/src/assets/plugins/highcharts/code/es-modules/Series/Flags/FlagsPoint.js +74 -0
  293. package/src/assets/plugins/highcharts/code/es-modules/Series/Flags/FlagsSeries.js +614 -0
  294. package/src/assets/plugins/highcharts/code/es-modules/Series/Flags/FlagsSymbols.js +90 -0
  295. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel/FunnelSeries.js +517 -0
  296. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel3D/Funnel3DComposition.js +383 -0
  297. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel3D/Funnel3DPoint.js +62 -0
  298. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel3D/Funnel3DSeries.js +447 -0
  299. package/src/assets/plugins/highcharts/code/es-modules/Series/Gantt/GanttPoint.js +109 -0
  300. package/src/assets/plugins/highcharts/code/es-modules/Series/Gantt/GanttSeries.js +352 -0
  301. package/src/assets/plugins/highcharts/code/es-modules/Series/Gauge/GaugePoint.js +66 -0
  302. package/src/assets/plugins/highcharts/code/es-modules/Series/Gauge/GaugeSeries.js +568 -0
  303. package/src/assets/plugins/highcharts/code/es-modules/Series/HLC/HLCPoint.js +55 -0
  304. package/src/assets/plugins/highcharts/code/es-modules/Series/HLC/HLCSeries.js +378 -0
  305. package/src/assets/plugins/highcharts/code/es-modules/Series/Heatmap/HeatmapPoint.js +144 -0
  306. package/src/assets/plugins/highcharts/code/es-modules/Series/Heatmap/HeatmapSeries.js +946 -0
  307. package/src/assets/plugins/highcharts/code/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +60 -0
  308. package/src/assets/plugins/highcharts/code/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +278 -0
  309. package/src/assets/plugins/highcharts/code/es-modules/Series/Histogram/HistogramSeries.js +253 -0
  310. package/src/assets/plugins/highcharts/code/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +80 -0
  311. package/src/assets/plugins/highcharts/code/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +368 -0
  312. package/src/assets/plugins/highcharts/code/es-modules/Series/Item/ItemPoint.js +59 -0
  313. package/src/assets/plugins/highcharts/code/es-modules/Series/Item/ItemSeries.js +505 -0
  314. package/src/assets/plugins/highcharts/code/es-modules/Series/Line/LineSeries.js +541 -0
  315. package/src/assets/plugins/highcharts/code/es-modules/Series/Lollipop/LollipopPoint.js +60 -0
  316. package/src/assets/plugins/highcharts/code/es-modules/Series/Lollipop/LollipopSeries.js +209 -0
  317. package/src/assets/plugins/highcharts/code/es-modules/Series/Map/MapPoint.js +136 -0
  318. package/src/assets/plugins/highcharts/code/es-modules/Series/Map/MapSeries.js +1100 -0
  319. package/src/assets/plugins/highcharts/code/es-modules/Series/MapBubble/MapBubblePoint.js +73 -0
  320. package/src/assets/plugins/highcharts/code/es-modules/Series/MapBubble/MapBubbleSeries.js +283 -0
  321. package/src/assets/plugins/highcharts/code/es-modules/Series/MapLine/MapLineSeries.js +181 -0
  322. package/src/assets/plugins/highcharts/code/es-modules/Series/MapPoint/MapPointPoint.js +71 -0
  323. package/src/assets/plugins/highcharts/code/es-modules/Series/MapPoint/MapPointSeries.js +309 -0
  324. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/DraggableNodes.js +132 -0
  325. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/Integrations.js +348 -0
  326. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/Layouts.js +555 -0
  327. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/Networkgraph.js +1178 -0
  328. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/QuadTree.js +352 -0
  329. package/src/assets/plugins/highcharts/code/es-modules/Series/NodesComposition.js +229 -0
  330. package/src/assets/plugins/highcharts/code/es-modules/Series/OHLC/OHLCPoint.js +116 -0
  331. package/src/assets/plugins/highcharts/code/es-modules/Series/OHLC/OHLCSeries.js +254 -0
  332. package/src/assets/plugins/highcharts/code/es-modules/Series/OnSeriesComposition.js +168 -0
  333. package/src/assets/plugins/highcharts/code/es-modules/Series/Organization/OrganizationPoint.js +71 -0
  334. package/src/assets/plugins/highcharts/code/es-modules/Series/Organization/OrganizationSeries.js +594 -0
  335. package/src/assets/plugins/highcharts/code/es-modules/Series/PackedBubble/PackedBubbleComposition.js +172 -0
  336. package/src/assets/plugins/highcharts/code/es-modules/Series/PackedBubble/PackedBubblePoint.js +98 -0
  337. package/src/assets/plugins/highcharts/code/es-modules/Series/PackedBubble/PackedBubbleSeries.js +1284 -0
  338. package/src/assets/plugins/highcharts/code/es-modules/Series/ParetoSeries/ParetoSeries.js +195 -0
  339. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie/PieDataLabel.js +447 -0
  340. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie/PiePoint.js +270 -0
  341. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie/PieSeries.js +1074 -0
  342. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie3D/Pie3DComposition.js +27 -0
  343. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie3D/Pie3DPoint.js +72 -0
  344. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie3D/Pie3DSeries.js +200 -0
  345. package/src/assets/plugins/highcharts/code/es-modules/Series/Polygon/PolygonSeries.js +195 -0
  346. package/src/assets/plugins/highcharts/code/es-modules/Series/Pyramid/PyramidSeries.js +161 -0
  347. package/src/assets/plugins/highcharts/code/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +172 -0
  348. package/src/assets/plugins/highcharts/code/es-modules/Series/Sankey/SankeyPoint.js +97 -0
  349. package/src/assets/plugins/highcharts/code/es-modules/Series/Sankey/SankeySeries.js +1195 -0
  350. package/src/assets/plugins/highcharts/code/es-modules/Series/Scatter/ScatterSeries.js +306 -0
  351. package/src/assets/plugins/highcharts/code/es-modules/Series/Scatter3D/Scatter3DPoint.js +66 -0
  352. package/src/assets/plugins/highcharts/code/es-modules/Series/Scatter3D/Scatter3DSeries.js +194 -0
  353. package/src/assets/plugins/highcharts/code/es-modules/Series/SolidGauge/SolidGaugeComposition.js +62 -0
  354. package/src/assets/plugins/highcharts/code/es-modules/Series/SolidGauge/SolidGaugeSeries.js +358 -0
  355. package/src/assets/plugins/highcharts/code/es-modules/Series/Spline/SplineSeries.js +279 -0
  356. package/src/assets/plugins/highcharts/code/es-modules/Series/Streamgraph/StreamgraphSeries.js +213 -0
  357. package/src/assets/plugins/highcharts/code/es-modules/Series/Sunburst/SunburstPoint.js +115 -0
  358. package/src/assets/plugins/highcharts/code/es-modules/Series/Sunburst/SunburstSeries.js +907 -0
  359. package/src/assets/plugins/highcharts/code/es-modules/Series/Sunburst/SunburstUtilities.js +138 -0
  360. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapComposition.js +61 -0
  361. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapPoint.js +77 -0
  362. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapSeries.js +368 -0
  363. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapShapes.js +275 -0
  364. package/src/assets/plugins/highcharts/code/es-modules/Series/Timeline/TimelinePoint.js +168 -0
  365. package/src/assets/plugins/highcharts/code/es-modules/Series/Timeline/TimelineSeries.js +552 -0
  366. package/src/assets/plugins/highcharts/code/es-modules/Series/TreeUtilities.js +192 -0
  367. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapAlgorithmGroup.js +93 -0
  368. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapComposition.js +58 -0
  369. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapPoint.js +107 -0
  370. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapSeries.js +1473 -0
  371. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapUtilities.js +65 -0
  372. package/src/assets/plugins/highcharts/code/es-modules/Series/VariablePie/VariablePieSeries.js +446 -0
  373. package/src/assets/plugins/highcharts/code/es-modules/Series/Variwide/VariwideComposition.js +78 -0
  374. package/src/assets/plugins/highcharts/code/es-modules/Series/Variwide/VariwidePoint.js +63 -0
  375. package/src/assets/plugins/highcharts/code/es-modules/Series/Variwide/VariwideSeries.js +317 -0
  376. package/src/assets/plugins/highcharts/code/es-modules/Series/Vector/VectorSeries.js +362 -0
  377. package/src/assets/plugins/highcharts/code/es-modules/Series/Venn/VennPoint.js +76 -0
  378. package/src/assets/plugins/highcharts/code/es-modules/Series/Venn/VennSeries.js +633 -0
  379. package/src/assets/plugins/highcharts/code/es-modules/Series/Venn/VennUtils.js +607 -0
  380. package/src/assets/plugins/highcharts/code/es-modules/Series/Waterfall/WaterfallPoint.js +68 -0
  381. package/src/assets/plugins/highcharts/code/es-modules/Series/Waterfall/WaterfallSeries.js +743 -0
  382. package/src/assets/plugins/highcharts/code/es-modules/Series/Windbarb/WindbarbPoint.js +64 -0
  383. package/src/assets/plugins/highcharts/code/es-modules/Series/Windbarb/WindbarbSeries.js +462 -0
  384. package/src/assets/plugins/highcharts/code/es-modules/Series/Wordcloud/WordcloudPoint.js +66 -0
  385. package/src/assets/plugins/highcharts/code/es-modules/Series/Wordcloud/WordcloudSeries.js +503 -0
  386. package/src/assets/plugins/highcharts/code/es-modules/Series/Wordcloud/WordcloudUtils.js +718 -0
  387. package/src/assets/plugins/highcharts/code/es-modules/Series/XRange/XRangeComposition.js +49 -0
  388. package/src/assets/plugins/highcharts/code/es-modules/Series/XRange/XRangePoint.js +168 -0
  389. package/src/assets/plugins/highcharts/code/es-modules/Series/XRange/XRangeSeries.js +608 -0
  390. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +243 -0
  391. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/AD/ADIndicator.js +160 -0
  392. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/AO/AOIndicator.js +212 -0
  393. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/APO/APOIndicator.js +167 -0
  394. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ATR/ATRIndicator.js +162 -0
  395. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +197 -0
  396. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +141 -0
  397. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ArrayUtilities.js +47 -0
  398. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/BB/BBIndicator.js +241 -0
  399. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/CCI/CCIIndicator.js +154 -0
  400. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/CMF/CMFIndicator.js +243 -0
  401. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/CMO/CMOIndicator.js +166 -0
  402. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +187 -0
  403. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +149 -0
  404. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DMI/DMIIndicator.js +276 -0
  405. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DPO/DPOIndicator.js +163 -0
  406. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +179 -0
  407. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/EMA/EMAIndicator.js +154 -0
  408. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/IKH/IKHIndicator.js +682 -0
  409. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +217 -0
  410. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +270 -0
  411. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +282 -0
  412. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +119 -0
  413. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +104 -0
  414. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +104 -0
  415. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/MACD/MACDIndicator.js +402 -0
  416. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/MFI/MFIIndicator.js +198 -0
  417. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +121 -0
  418. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/MultipleLinesComposition.js +294 -0
  419. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/NATR/NATRIndicator.js +111 -0
  420. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/OBV/OBVIndicator.js +170 -0
  421. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PC/PCIndicator.js +197 -0
  422. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PPO/PPOIndicator.js +164 -0
  423. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +280 -0
  424. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +310 -0
  425. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PivotPoints/PivotPointsPoint.js +78 -0
  426. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +240 -0
  427. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ROC/ROCIndicator.js +176 -0
  428. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/RSI/RSIIndicator.js +171 -0
  429. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/SMA/SMAComposition.js +12 -0
  430. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/SMA/SMAIndicator.js +367 -0
  431. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +134 -0
  432. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +208 -0
  433. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +485 -0
  434. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +208 -0
  435. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +98 -0
  436. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +148 -0
  437. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/VBP/VBPIndicator.js +556 -0
  438. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/VBP/VBPPoint.js +49 -0
  439. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +193 -0
  440. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/WMA/WMAIndicator.js +153 -0
  441. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +135 -0
  442. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +228 -0
  443. package/src/assets/plugins/highcharts/code/es-modules/Stock/StockToolsBindings.js +2009 -0
  444. package/src/assets/plugins/highcharts/code/es-modules/Stock/StockToolsGui.js +1816 -0
  445. package/src/assets/plugins/highcharts/code/es-modules/masters/highcharts-3d.src.js +28 -0
  446. package/src/assets/plugins/highcharts/code/es-modules/masters/highcharts-more.src.js +28 -0
  447. package/src/assets/plugins/highcharts/code/es-modules/masters/highcharts.src.js +147 -0
  448. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/accessibility.src.js +28 -0
  449. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/annotations-advanced.src.js +26 -0
  450. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/annotations.src.js +15 -0
  451. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/arrow-symbols.src.js +13 -0
  452. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/boost-canvas.src.js +14 -0
  453. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/boost.src.js +15 -0
  454. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/broken-axis.src.js +15 -0
  455. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/bullet.src.js +13 -0
  456. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/coloraxis.src.js +17 -0
  457. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/current-date-indicator.src.js +13 -0
  458. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/cylinder.src.js +14 -0
  459. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/data.src.js +23 -0
  460. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/datagrouping.src.js +14 -0
  461. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/debugger.src.js +16 -0
  462. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/dependency-wheel.src.js +14 -0
  463. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/dotplot.src.js +13 -0
  464. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/drag-panes.src.js +15 -0
  465. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/draggable-points.src.js +11 -0
  466. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/drilldown.src.js +13 -0
  467. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/dumbbell.src.js +11 -0
  468. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/export-data.src.js +14 -0
  469. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/exporting.src.js +22 -0
  470. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/full-screen.src.js +14 -0
  471. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/funnel.src.js +14 -0
  472. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/funnel3d.src.js +18 -0
  473. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/gantt.src.js +26 -0
  474. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/grid-axis.src.js +17 -0
  475. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/heatmap.src.js +16 -0
  476. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/heikinashi.src.js +14 -0
  477. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/histogram-bellcurve.src.js +13 -0
  478. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/hollowcandlestick.src.js +14 -0
  479. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/item-series.src.js +13 -0
  480. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/lollipop.src.js +11 -0
  481. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/marker-clusters.src.js +13 -0
  482. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/networkgraph.src.js +13 -0
  483. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/no-data-to-display.src.js +14 -0
  484. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/offline-exporting.src.js +20 -0
  485. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/oldie-polyfills.src.js +14 -0
  486. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/oldie.src.js +14 -0
  487. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/organization.src.js +13 -0
  488. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/overlapping-datalabels.src.js +11 -0
  489. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/parallel-coordinates.src.js +13 -0
  490. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pareto.src.js +13 -0
  491. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pathfinder.src.js +13 -0
  492. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pattern-fill.src.js +14 -0
  493. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/price-indicator.src.js +15 -0
  494. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pyramid3d.src.js +16 -0
  495. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/sankey.src.js +13 -0
  496. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/series-label.src.js +11 -0
  497. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/solid-gauge.src.js +14 -0
  498. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/sonification.src.js +44 -0
  499. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/static-scale.src.js +13 -0
  500. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/stock-tools.src.js +16 -0
  501. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/stock.src.js +33 -0
  502. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/streamgraph.src.js +13 -0
  503. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/sunburst.src.js +13 -0
  504. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/tilemap.src.js +14 -0
  505. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/timeline.src.js +14 -0
  506. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/treegrid.src.js +17 -0
  507. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/treemap.src.js +12 -0
  508. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/variable-pie.src.js +13 -0
  509. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/variwide.src.js +13 -0
  510. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/vector.src.js +13 -0
  511. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/venn.src.js +12 -0
  512. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/windbarb.src.js +13 -0
  513. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/wordcloud.src.js +12 -0
  514. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/xrange.src.js +13 -0
  515. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/avocado.src.js +14 -0
  516. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/brand-dark.src.js +14 -0
  517. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/brand-light.src.js +14 -0
  518. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/dark-blue.src.js +14 -0
  519. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/dark-green.src.js +14 -0
  520. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/dark-unica.src.js +14 -0
  521. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/gray.src.js +14 -0
  522. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/grid-light.src.js +14 -0
  523. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/grid.src.js +14 -0
  524. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/high-contrast-dark.src.js +14 -0
  525. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/high-contrast-light.src.js +14 -0
  526. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/sand-signika.src.js +14 -0
  527. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/skies.src.js +14 -0
  528. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/sunset.src.js +14 -0
  529. package/src/assets/plugins/highcharts/code/highcharts-3d.js +105 -0
  530. package/src/assets/plugins/highcharts/code/highcharts-3d.js.map +1 -0
  531. package/src/assets/plugins/highcharts/code/highcharts-3d.src.js +5439 -0
  532. package/src/assets/plugins/highcharts/code/highcharts-more.js +201 -0
  533. package/src/assets/plugins/highcharts/code/highcharts-more.js.map +1 -0
  534. package/src/assets/plugins/highcharts/code/highcharts-more.src.js +12004 -0
  535. package/src/assets/plugins/highcharts/code/highcharts.js +593 -0
  536. package/src/assets/plugins/highcharts/code/highcharts.js.map +1 -0
  537. package/src/assets/plugins/highcharts/code/highcharts.src.js +47519 -0
  538. package/src/assets/plugins/highcharts/code/lib/canvg.js +8 -0
  539. package/src/assets/plugins/highcharts/code/lib/jspdf.js +283 -0
  540. package/src/assets/plugins/highcharts/code/lib/jspdf.src.js +21627 -0
  541. package/src/assets/plugins/highcharts/code/lib/svg2pdf.js +38 -0
  542. package/src/assets/plugins/highcharts/code/lib/svg2pdf.src.js +4390 -0
  543. package/src/assets/plugins/highcharts/code/modules/accessibility.js +256 -0
  544. package/src/assets/plugins/highcharts/code/modules/accessibility.js.map +1 -0
  545. package/src/assets/plugins/highcharts/code/modules/accessibility.src.js +11868 -0
  546. package/src/assets/plugins/highcharts/code/modules/annotations-advanced.js +201 -0
  547. package/src/assets/plugins/highcharts/code/modules/annotations-advanced.js.map +1 -0
  548. package/src/assets/plugins/highcharts/code/modules/annotations-advanced.src.js +9616 -0
  549. package/src/assets/plugins/highcharts/code/modules/annotations.js +135 -0
  550. package/src/assets/plugins/highcharts/code/modules/annotations.js.map +1 -0
  551. package/src/assets/plugins/highcharts/code/modules/annotations.src.js +6712 -0
  552. package/src/assets/plugins/highcharts/code/modules/arrow-symbols.js +12 -0
  553. package/src/assets/plugins/highcharts/code/modules/arrow-symbols.js.map +1 -0
  554. package/src/assets/plugins/highcharts/code/modules/arrow-symbols.src.js +202 -0
  555. package/src/assets/plugins/highcharts/code/modules/boost-canvas.js +25 -0
  556. package/src/assets/plugins/highcharts/code/modules/boost-canvas.js.map +1 -0
  557. package/src/assets/plugins/highcharts/code/modules/boost-canvas.src.js +593 -0
  558. package/src/assets/plugins/highcharts/code/modules/boost.js +90 -0
  559. package/src/assets/plugins/highcharts/code/modules/boost.js.map +1 -0
  560. package/src/assets/plugins/highcharts/code/modules/boost.src.js +3834 -0
  561. package/src/assets/plugins/highcharts/code/modules/broken-axis.js +20 -0
  562. package/src/assets/plugins/highcharts/code/modules/broken-axis.js.map +1 -0
  563. package/src/assets/plugins/highcharts/code/modules/broken-axis.src.js +682 -0
  564. package/src/assets/plugins/highcharts/code/modules/bullet.js +18 -0
  565. package/src/assets/plugins/highcharts/code/modules/bullet.js.map +1 -0
  566. package/src/assets/plugins/highcharts/code/modules/bullet.src.js +489 -0
  567. package/src/assets/plugins/highcharts/code/modules/coloraxis.js +33 -0
  568. package/src/assets/plugins/highcharts/code/modules/coloraxis.js.map +1 -0
  569. package/src/assets/plugins/highcharts/code/modules/coloraxis.src.js +1484 -0
  570. package/src/assets/plugins/highcharts/code/modules/current-date-indicator.js +13 -0
  571. package/src/assets/plugins/highcharts/code/modules/current-date-indicator.js.map +1 -0
  572. package/src/assets/plugins/highcharts/code/modules/current-date-indicator.src.js +138 -0
  573. package/src/assets/plugins/highcharts/code/modules/cylinder.js +20 -0
  574. package/src/assets/plugins/highcharts/code/modules/cylinder.js.map +1 -0
  575. package/src/assets/plugins/highcharts/code/modules/cylinder.src.js +585 -0
  576. package/src/assets/plugins/highcharts/code/modules/data.js +42 -0
  577. package/src/assets/plugins/highcharts/code/modules/data.js.map +1 -0
  578. package/src/assets/plugins/highcharts/code/modules/data.src.js +2383 -0
  579. package/src/assets/plugins/highcharts/code/modules/datagrouping.js +29 -0
  580. package/src/assets/plugins/highcharts/code/modules/datagrouping.js.map +1 -0
  581. package/src/assets/plugins/highcharts/code/modules/datagrouping.src.js +1275 -0
  582. package/src/assets/plugins/highcharts/code/modules/debugger.js +30 -0
  583. package/src/assets/plugins/highcharts/code/modules/debugger.js.map +1 -0
  584. package/src/assets/plugins/highcharts/code/modules/debugger.src.js +250 -0
  585. package/src/assets/plugins/highcharts/code/modules/dependency-wheel.js +20 -0
  586. package/src/assets/plugins/highcharts/code/modules/dependency-wheel.js.map +1 -0
  587. package/src/assets/plugins/highcharts/code/modules/dependency-wheel.src.js +533 -0
  588. package/src/assets/plugins/highcharts/code/modules/dotplot.js +15 -0
  589. package/src/assets/plugins/highcharts/code/modules/dotplot.js.map +1 -0
  590. package/src/assets/plugins/highcharts/code/modules/dotplot.src.js +216 -0
  591. package/src/assets/plugins/highcharts/code/modules/drag-panes.js +20 -0
  592. package/src/assets/plugins/highcharts/code/modules/drag-panes.js.map +1 -0
  593. package/src/assets/plugins/highcharts/code/modules/drag-panes.src.js +586 -0
  594. package/src/assets/plugins/highcharts/code/modules/draggable-points.js +41 -0
  595. package/src/assets/plugins/highcharts/code/modules/draggable-points.js.map +1 -0
  596. package/src/assets/plugins/highcharts/code/modules/draggable-points.src.js +2405 -0
  597. package/src/assets/plugins/highcharts/code/modules/drilldown.js +34 -0
  598. package/src/assets/plugins/highcharts/code/modules/drilldown.js.map +1 -0
  599. package/src/assets/plugins/highcharts/code/modules/drilldown.src.js +1266 -0
  600. package/src/assets/plugins/highcharts/code/modules/dumbbell.js +24 -0
  601. package/src/assets/plugins/highcharts/code/modules/dumbbell.js.map +1 -0
  602. package/src/assets/plugins/highcharts/code/modules/dumbbell.src.js +798 -0
  603. package/src/assets/plugins/highcharts/code/modules/export-data.js +30 -0
  604. package/src/assets/plugins/highcharts/code/modules/export-data.js.map +1 -0
  605. package/src/assets/plugins/highcharts/code/modules/export-data.src.js +1203 -0
  606. package/src/assets/plugins/highcharts/code/modules/exporting.js +48 -0
  607. package/src/assets/plugins/highcharts/code/modules/exporting.js.map +1 -0
  608. package/src/assets/plugins/highcharts/code/modules/exporting.src.js +2789 -0
  609. package/src/assets/plugins/highcharts/code/modules/full-screen.js +17 -0
  610. package/src/assets/plugins/highcharts/code/modules/full-screen.js.map +1 -0
  611. package/src/assets/plugins/highcharts/code/modules/full-screen.src.js +284 -0
  612. package/src/assets/plugins/highcharts/code/modules/funnel.js +21 -0
  613. package/src/assets/plugins/highcharts/code/modules/funnel.js.map +1 -0
  614. package/src/assets/plugins/highcharts/code/modules/funnel.src.js +777 -0
  615. package/src/assets/plugins/highcharts/code/modules/funnel3d.js +30 -0
  616. package/src/assets/plugins/highcharts/code/modules/funnel3d.js.map +1 -0
  617. package/src/assets/plugins/highcharts/code/modules/funnel3d.src.js +1004 -0
  618. package/src/assets/plugins/highcharts/code/modules/gantt.js +226 -0
  619. package/src/assets/plugins/highcharts/code/modules/gantt.js.map +1 -0
  620. package/src/assets/plugins/highcharts/code/modules/gantt.src.js +13485 -0
  621. package/src/assets/plugins/highcharts/code/modules/grid-axis.js +32 -0
  622. package/src/assets/plugins/highcharts/code/modules/grid-axis.js.map +1 -0
  623. package/src/assets/plugins/highcharts/code/modules/grid-axis.src.js +1160 -0
  624. package/src/assets/plugins/highcharts/code/modules/heatmap.js +46 -0
  625. package/src/assets/plugins/highcharts/code/modules/heatmap.js.map +1 -0
  626. package/src/assets/plugins/highcharts/code/modules/heatmap.src.js +2726 -0
  627. package/src/assets/plugins/highcharts/code/modules/heikinashi.js +17 -0
  628. package/src/assets/plugins/highcharts/code/modules/heikinashi.js.map +1 -0
  629. package/src/assets/plugins/highcharts/code/modules/heikinashi.src.js +396 -0
  630. package/src/assets/plugins/highcharts/code/modules/histogram-bellcurve.js +21 -0
  631. package/src/assets/plugins/highcharts/code/modules/histogram-bellcurve.js.map +1 -0
  632. package/src/assets/plugins/highcharts/code/modules/histogram-bellcurve.src.js +699 -0
  633. package/src/assets/plugins/highcharts/code/modules/hollowcandlestick.js +18 -0
  634. package/src/assets/plugins/highcharts/code/modules/hollowcandlestick.js.map +1 -0
  635. package/src/assets/plugins/highcharts/code/modules/hollowcandlestick.src.js +500 -0
  636. package/src/assets/plugins/highcharts/code/modules/item-series.js +21 -0
  637. package/src/assets/plugins/highcharts/code/modules/item-series.js.map +1 -0
  638. package/src/assets/plugins/highcharts/code/modules/item-series.src.js +660 -0
  639. package/src/assets/plugins/highcharts/code/modules/lollipop.js +14 -0
  640. package/src/assets/plugins/highcharts/code/modules/lollipop.js.map +1 -0
  641. package/src/assets/plugins/highcharts/code/modules/lollipop.src.js +318 -0
  642. package/src/assets/plugins/highcharts/code/modules/marker-clusters.js +45 -0
  643. package/src/assets/plugins/highcharts/code/modules/marker-clusters.js.map +1 -0
  644. package/src/assets/plugins/highcharts/code/modules/marker-clusters.src.js +1713 -0
  645. package/src/assets/plugins/highcharts/code/modules/networkgraph.js +58 -0
  646. package/src/assets/plugins/highcharts/code/modules/networkgraph.js.map +1 -0
  647. package/src/assets/plugins/highcharts/code/modules/networkgraph.src.js +2926 -0
  648. package/src/assets/plugins/highcharts/code/modules/no-data-to-display.js +15 -0
  649. package/src/assets/plugins/highcharts/code/modules/no-data-to-display.js.map +1 -0
  650. package/src/assets/plugins/highcharts/code/modules/no-data-to-display.src.js +231 -0
  651. package/src/assets/plugins/highcharts/code/modules/offline-exporting.js +27 -0
  652. package/src/assets/plugins/highcharts/code/modules/offline-exporting.js.map +1 -0
  653. package/src/assets/plugins/highcharts/code/modules/offline-exporting.src.js +847 -0
  654. package/src/assets/plugins/highcharts/code/modules/oldie-polyfills.js +17 -0
  655. package/src/assets/plugins/highcharts/code/modules/oldie-polyfills.js.map +1 -0
  656. package/src/assets/plugins/highcharts/code/modules/oldie-polyfills.src.js +220 -0
  657. package/src/assets/plugins/highcharts/code/modules/oldie.js +40 -0
  658. package/src/assets/plugins/highcharts/code/modules/oldie.js.map +1 -0
  659. package/src/assets/plugins/highcharts/code/modules/oldie.src.js +1443 -0
  660. package/src/assets/plugins/highcharts/code/modules/organization.js +22 -0
  661. package/src/assets/plugins/highcharts/code/modules/organization.js.map +1 -0
  662. package/src/assets/plugins/highcharts/code/modules/organization.src.js +736 -0
  663. package/src/assets/plugins/highcharts/code/modules/overlapping-datalabels.js +9 -0
  664. package/src/assets/plugins/highcharts/code/modules/overlapping-datalabels.js.map +1 -0
  665. package/src/assets/plugins/highcharts/code/modules/overlapping-datalabels.src.js +33 -0
  666. package/src/assets/plugins/highcharts/code/modules/parallel-coordinates.js +20 -0
  667. package/src/assets/plugins/highcharts/code/modules/parallel-coordinates.js.map +1 -0
  668. package/src/assets/plugins/highcharts/code/modules/parallel-coordinates.src.js +555 -0
  669. package/src/assets/plugins/highcharts/code/modules/pareto.js +16 -0
  670. package/src/assets/plugins/highcharts/code/modules/pareto.js.map +1 -0
  671. package/src/assets/plugins/highcharts/code/modules/pareto.src.js +382 -0
  672. package/src/assets/plugins/highcharts/code/modules/pathfinder.js +40 -0
  673. package/src/assets/plugins/highcharts/code/modules/pathfinder.js.map +1 -0
  674. package/src/assets/plugins/highcharts/code/modules/pathfinder.src.js +2693 -0
  675. package/src/assets/plugins/highcharts/code/modules/pattern-fill.js +24 -0
  676. package/src/assets/plugins/highcharts/code/modules/pattern-fill.js.map +1 -0
  677. package/src/assets/plugins/highcharts/code/modules/pattern-fill.src.js +640 -0
  678. package/src/assets/plugins/highcharts/code/modules/price-indicator.js +15 -0
  679. package/src/assets/plugins/highcharts/code/modules/price-indicator.js.map +1 -0
  680. package/src/assets/plugins/highcharts/code/modules/price-indicator.src.js +346 -0
  681. package/src/assets/plugins/highcharts/code/modules/pyramid3d.js +13 -0
  682. package/src/assets/plugins/highcharts/code/modules/pyramid3d.js.map +1 -0
  683. package/src/assets/plugins/highcharts/code/modules/pyramid3d.src.js +211 -0
  684. package/src/assets/plugins/highcharts/code/modules/sankey.js +38 -0
  685. package/src/assets/plugins/highcharts/code/modules/sankey.js.map +1 -0
  686. package/src/assets/plugins/highcharts/code/modules/sankey.src.js +1868 -0
  687. package/src/assets/plugins/highcharts/code/modules/series-label.js +24 -0
  688. package/src/assets/plugins/highcharts/code/modules/series-label.js.map +1 -0
  689. package/src/assets/plugins/highcharts/code/modules/series-label.src.js +852 -0
  690. package/src/assets/plugins/highcharts/code/modules/solid-gauge.js +19 -0
  691. package/src/assets/plugins/highcharts/code/modules/solid-gauge.js.map +1 -0
  692. package/src/assets/plugins/highcharts/code/modules/solid-gauge.src.js +650 -0
  693. package/src/assets/plugins/highcharts/code/modules/sonification.js +68 -0
  694. package/src/assets/plugins/highcharts/code/modules/sonification.js.map +1 -0
  695. package/src/assets/plugins/highcharts/code/modules/sonification.src.js +3869 -0
  696. package/src/assets/plugins/highcharts/code/modules/static-scale.js +13 -0
  697. package/src/assets/plugins/highcharts/code/modules/static-scale.js.map +1 -0
  698. package/src/assets/plugins/highcharts/code/modules/static-scale.src.js +117 -0
  699. package/src/assets/plugins/highcharts/code/modules/stock-tools.js +189 -0
  700. package/src/assets/plugins/highcharts/code/modules/stock-tools.js.map +1 -0
  701. package/src/assets/plugins/highcharts/code/modules/stock-tools.src.js +9592 -0
  702. package/src/assets/plugins/highcharts/code/modules/stock.js +213 -0
  703. package/src/assets/plugins/highcharts/code/modules/stock.js.map +1 -0
  704. package/src/assets/plugins/highcharts/code/modules/stock.src.js +12237 -0
  705. package/src/assets/plugins/highcharts/code/modules/streamgraph.js +13 -0
  706. package/src/assets/plugins/highcharts/code/modules/streamgraph.js.map +1 -0
  707. package/src/assets/plugins/highcharts/code/modules/streamgraph.src.js +253 -0
  708. package/src/assets/plugins/highcharts/code/modules/sunburst.js +68 -0
  709. package/src/assets/plugins/highcharts/code/modules/sunburst.js.map +1 -0
  710. package/src/assets/plugins/highcharts/code/modules/sunburst.src.js +3721 -0
  711. package/src/assets/plugins/highcharts/code/modules/tilemap.js +26 -0
  712. package/src/assets/plugins/highcharts/code/modules/tilemap.js.map +1 -0
  713. package/src/assets/plugins/highcharts/code/modules/tilemap.src.js +878 -0
  714. package/src/assets/plugins/highcharts/code/modules/timeline.js +28 -0
  715. package/src/assets/plugins/highcharts/code/modules/timeline.js.map +1 -0
  716. package/src/assets/plugins/highcharts/code/modules/timeline.src.js +815 -0
  717. package/src/assets/plugins/highcharts/code/modules/treegrid.js +65 -0
  718. package/src/assets/plugins/highcharts/code/modules/treegrid.js.map +1 -0
  719. package/src/assets/plugins/highcharts/code/modules/treegrid.src.js +3294 -0
  720. package/src/assets/plugins/highcharts/code/modules/treemap.js +49 -0
  721. package/src/assets/plugins/highcharts/code/modules/treemap.js.map +1 -0
  722. package/src/assets/plugins/highcharts/code/modules/treemap.src.js +2416 -0
  723. package/src/assets/plugins/highcharts/code/modules/variable-pie.js +18 -0
  724. package/src/assets/plugins/highcharts/code/modules/variable-pie.js.map +1 -0
  725. package/src/assets/plugins/highcharts/code/modules/variable-pie.src.js +533 -0
  726. package/src/assets/plugins/highcharts/code/modules/variwide.js +21 -0
  727. package/src/assets/plugins/highcharts/code/modules/variwide.js.map +1 -0
  728. package/src/assets/plugins/highcharts/code/modules/variwide.src.js +529 -0
  729. package/src/assets/plugins/highcharts/code/modules/vector.js +16 -0
  730. package/src/assets/plugins/highcharts/code/modules/vector.js.map +1 -0
  731. package/src/assets/plugins/highcharts/code/modules/vector.src.js +409 -0
  732. package/src/assets/plugins/highcharts/code/modules/venn.js +39 -0
  733. package/src/assets/plugins/highcharts/code/modules/venn.js.map +1 -0
  734. package/src/assets/plugins/highcharts/code/modules/venn.src.js +2095 -0
  735. package/src/assets/plugins/highcharts/code/modules/windbarb.js +24 -0
  736. package/src/assets/plugins/highcharts/code/modules/windbarb.js.map +1 -0
  737. package/src/assets/plugins/highcharts/code/modules/windbarb.src.js +772 -0
  738. package/src/assets/plugins/highcharts/code/modules/wordcloud.js +31 -0
  739. package/src/assets/plugins/highcharts/code/modules/wordcloud.js.map +1 -0
  740. package/src/assets/plugins/highcharts/code/modules/wordcloud.src.js +1584 -0
  741. package/src/assets/plugins/highcharts/code/modules/xrange.js +26 -0
  742. package/src/assets/plugins/highcharts/code/modules/xrange.js.map +1 -0
  743. package/src/assets/plugins/highcharts/code/modules/xrange.src.js +940 -0
  744. package/src/assets/plugins/highcharts/code/themes/avocado.js +10 -0
  745. package/src/assets/plugins/highcharts/code/themes/avocado.js.map +1 -0
  746. package/src/assets/plugins/highcharts/code/themes/avocado.src.js +103 -0
  747. package/src/assets/plugins/highcharts/code/themes/brand-dark.js +15 -0
  748. package/src/assets/plugins/highcharts/code/themes/brand-dark.js.map +1 -0
  749. package/src/assets/plugins/highcharts/code/themes/brand-dark.src.js +328 -0
  750. package/src/assets/plugins/highcharts/code/themes/brand-light.js +15 -0
  751. package/src/assets/plugins/highcharts/code/themes/brand-light.js.map +1 -0
  752. package/src/assets/plugins/highcharts/code/themes/brand-light.src.js +294 -0
  753. package/src/assets/plugins/highcharts/code/themes/dark-blue.js +15 -0
  754. package/src/assets/plugins/highcharts/code/themes/dark-blue.js.map +1 -0
  755. package/src/assets/plugins/highcharts/code/themes/dark-blue.src.js +315 -0
  756. package/src/assets/plugins/highcharts/code/themes/dark-green.js +15 -0
  757. package/src/assets/plugins/highcharts/code/themes/dark-green.js.map +1 -0
  758. package/src/assets/plugins/highcharts/code/themes/dark-green.src.js +315 -0
  759. package/src/assets/plugins/highcharts/code/themes/dark-unica.js +14 -0
  760. package/src/assets/plugins/highcharts/code/themes/dark-unica.js.map +1 -0
  761. package/src/assets/plugins/highcharts/code/themes/dark-unica.src.js +284 -0
  762. package/src/assets/plugins/highcharts/code/themes/gray.js +15 -0
  763. package/src/assets/plugins/highcharts/code/themes/gray.js.map +1 -0
  764. package/src/assets/plugins/highcharts/code/themes/gray.src.js +323 -0
  765. package/src/assets/plugins/highcharts/code/themes/grid-light.js +11 -0
  766. package/src/assets/plugins/highcharts/code/themes/grid-light.js.map +1 -0
  767. package/src/assets/plugins/highcharts/code/themes/grid-light.src.js +146 -0
  768. package/src/assets/plugins/highcharts/code/themes/grid.js +12 -0
  769. package/src/assets/plugins/highcharts/code/themes/grid.js.map +1 -0
  770. package/src/assets/plugins/highcharts/code/themes/grid.src.js +176 -0
  771. package/src/assets/plugins/highcharts/code/themes/high-contrast-dark.js +14 -0
  772. package/src/assets/plugins/highcharts/code/themes/high-contrast-dark.js.map +1 -0
  773. package/src/assets/plugins/highcharts/code/themes/high-contrast-dark.src.js +275 -0
  774. package/src/assets/plugins/highcharts/code/themes/high-contrast-light.js +10 -0
  775. package/src/assets/plugins/highcharts/code/themes/high-contrast-light.js.map +1 -0
  776. package/src/assets/plugins/highcharts/code/themes/high-contrast-light.src.js +105 -0
  777. package/src/assets/plugins/highcharts/code/themes/sand-signika.js +12 -0
  778. package/src/assets/plugins/highcharts/code/themes/sand-signika.js.map +1 -0
  779. package/src/assets/plugins/highcharts/code/themes/sand-signika.src.js +179 -0
  780. package/src/assets/plugins/highcharts/code/themes/skies.js +12 -0
  781. package/src/assets/plugins/highcharts/code/themes/skies.js.map +1 -0
  782. package/src/assets/plugins/highcharts/code/themes/skies.src.js +167 -0
  783. package/src/assets/plugins/highcharts/code/themes/sunset.js +10 -0
  784. package/src/assets/plugins/highcharts/code/themes/sunset.js.map +1 -0
  785. package/src/assets/plugins/highcharts/code/themes/sunset.src.js +102 -0
  786. package/src/assets/plugins/highcharts/examples/3d-area-multiple/index.html +192 -0
  787. package/src/assets/plugins/highcharts/examples/3d-column-interactive/index.html +111 -0
  788. package/src/assets/plugins/highcharts/examples/3d-column-null-values/index.html +118 -0
  789. package/src/assets/plugins/highcharts/examples/3d-column-stacking-grouping/index.html +144 -0
  790. package/src/assets/plugins/highcharts/examples/3d-pie/index.html +130 -0
  791. package/src/assets/plugins/highcharts/examples/3d-pie-donut/index.html +112 -0
  792. package/src/assets/plugins/highcharts/examples/3d-scatter-draggable/index.html +221 -0
  793. package/src/assets/plugins/highcharts/examples/accessible-line/index.html +198 -0
  794. package/src/assets/plugins/highcharts/examples/accessible-pie/index.html +213 -0
  795. package/src/assets/plugins/highcharts/examples/advanced-accessible/index.html +271 -0
  796. package/src/assets/plugins/highcharts/examples/annotations/index.html +2170 -0
  797. package/src/assets/plugins/highcharts/examples/area-basic/index.html +157 -0
  798. package/src/assets/plugins/highcharts/examples/area-inverted/index.html +135 -0
  799. package/src/assets/plugins/highcharts/examples/area-missing/index.html +125 -0
  800. package/src/assets/plugins/highcharts/examples/area-negative/index.html +101 -0
  801. package/src/assets/plugins/highcharts/examples/area-stacked/index.html +136 -0
  802. package/src/assets/plugins/highcharts/examples/area-stacked-percent/index.html +141 -0
  803. package/src/assets/plugins/highcharts/examples/arearange/index.html +132 -0
  804. package/src/assets/plugins/highcharts/examples/arearange-line/index.html +195 -0
  805. package/src/assets/plugins/highcharts/examples/areaspline/index.html +137 -0
  806. package/src/assets/plugins/highcharts/examples/bar-basic/index.html +143 -0
  807. package/src/assets/plugins/highcharts/examples/bar-negative-stack/index.html +173 -0
  808. package/src/assets/plugins/highcharts/examples/bar-stacked/index.html +112 -0
  809. package/src/assets/plugins/highcharts/examples/bellcurve/index.html +133 -0
  810. package/src/assets/plugins/highcharts/examples/box-plot/index.html +149 -0
  811. package/src/assets/plugins/highcharts/examples/bubble/index.html +209 -0
  812. package/src/assets/plugins/highcharts/examples/bubble-3d/index.html +159 -0
  813. package/src/assets/plugins/highcharts/examples/bullet-graph/index.html +233 -0
  814. package/src/assets/plugins/highcharts/examples/chart-update/index.html +137 -0
  815. package/src/assets/plugins/highcharts/examples/column-basic/index.html +144 -0
  816. package/src/assets/plugins/highcharts/examples/column-comparison/index.html +350 -0
  817. package/src/assets/plugins/highcharts/examples/column-drilldown/index.html +387 -0
  818. package/src/assets/plugins/highcharts/examples/column-negative/index.html +101 -0
  819. package/src/assets/plugins/highcharts/examples/column-parsed/index.html +138 -0
  820. package/src/assets/plugins/highcharts/examples/column-placement/index.html +160 -0
  821. package/src/assets/plugins/highcharts/examples/column-pyramid/index.html +117 -0
  822. package/src/assets/plugins/highcharts/examples/column-rotated-labels/index.html +147 -0
  823. package/src/assets/plugins/highcharts/examples/column-stacked/index.html +138 -0
  824. package/src/assets/plugins/highcharts/examples/column-stacked-and-grouped/index.html +133 -0
  825. package/src/assets/plugins/highcharts/examples/column-stacked-percent/index.html +113 -0
  826. package/src/assets/plugins/highcharts/examples/columnrange/index.html +145 -0
  827. package/src/assets/plugins/highcharts/examples/combo/index.html +146 -0
  828. package/src/assets/plugins/highcharts/examples/combo-dual-axes/index.html +153 -0
  829. package/src/assets/plugins/highcharts/examples/combo-meteogram/index.html +768 -0
  830. package/src/assets/plugins/highcharts/examples/combo-multi-axes/index.html +222 -0
  831. package/src/assets/plugins/highcharts/examples/combo-regression/index.html +110 -0
  832. package/src/assets/plugins/highcharts/examples/combo-timeline/index.html +592 -0
  833. package/src/assets/plugins/highcharts/examples/cylinder/index.html +104 -0
  834. package/src/assets/plugins/highcharts/examples/dependency-wheel/index.html +165 -0
  835. package/src/assets/plugins/highcharts/examples/dumbbell/index.html +230 -0
  836. package/src/assets/plugins/highcharts/examples/dynamic-click-to-add/index.html +147 -0
  837. package/src/assets/plugins/highcharts/examples/dynamic-master-detail/index.html +316 -0
  838. package/src/assets/plugins/highcharts/examples/dynamic-update/index.html +163 -0
  839. package/src/assets/plugins/highcharts/examples/error-bar/index.html +154 -0
  840. package/src/assets/plugins/highcharts/examples/euler-diagram/index.html +119 -0
  841. package/src/assets/plugins/highcharts/examples/flame/index.html +1324 -0
  842. package/src/assets/plugins/highcharts/examples/funnel/index.html +131 -0
  843. package/src/assets/plugins/highcharts/examples/funnel3d/index.html +117 -0
  844. package/src/assets/plugins/highcharts/examples/gauge-activity/index.html +272 -0
  845. package/src/assets/plugins/highcharts/examples/gauge-clock/index.html +261 -0
  846. package/src/assets/plugins/highcharts/examples/gauge-dual/index.html +181 -0
  847. package/src/assets/plugins/highcharts/examples/gauge-solid/index.html +248 -0
  848. package/src/assets/plugins/highcharts/examples/gauge-speedometer/index.html +189 -0
  849. package/src/assets/plugins/highcharts/examples/gauge-vu-meter/index.html +210 -0
  850. package/src/assets/plugins/highcharts/examples/heatmap/index.html +168 -0
  851. package/src/assets/plugins/highcharts/examples/heatmap-canvas/index.html +8928 -0
  852. package/src/assets/plugins/highcharts/examples/histogram/index.html +133 -0
  853. package/src/assets/plugins/highcharts/examples/honeycomb-usa/index.html +518 -0
  854. package/src/assets/plugins/highcharts/examples/line-ajax/index.html +206 -0
  855. package/src/assets/plugins/highcharts/examples/line-basic/index.html +147 -0
  856. package/src/assets/plugins/highcharts/examples/line-boost/index.html +144 -0
  857. package/src/assets/plugins/highcharts/examples/line-labels/index.html +108 -0
  858. package/src/assets/plugins/highcharts/examples/line-log-axis/index.html +106 -0
  859. package/src/assets/plugins/highcharts/examples/line-time-series/index.html +136 -0
  860. package/src/assets/plugins/highcharts/examples/live-data/index.html +155 -0
  861. package/src/assets/plugins/highcharts/examples/lollipop/index.html +161 -0
  862. package/src/assets/plugins/highcharts/examples/network-graph/index.html +277 -0
  863. package/src/assets/plugins/highcharts/examples/organization-chart/index.html +224 -0
  864. package/src/assets/plugins/highcharts/examples/packed-bubble/index.html +588 -0
  865. package/src/assets/plugins/highcharts/examples/packed-bubble-split/index.html +589 -0
  866. package/src/assets/plugins/highcharts/examples/parallel-coordinates/index.html +176 -0
  867. package/src/assets/plugins/highcharts/examples/pareto/index.html +133 -0
  868. package/src/assets/plugins/highcharts/examples/parliament-chart/index.html +138 -0
  869. package/src/assets/plugins/highcharts/examples/pie-basic/index.html +141 -0
  870. package/src/assets/plugins/highcharts/examples/pie-donut/index.html +347 -0
  871. package/src/assets/plugins/highcharts/examples/pie-drilldown/index.html +418 -0
  872. package/src/assets/plugins/highcharts/examples/pie-gradient/index.html +133 -0
  873. package/src/assets/plugins/highcharts/examples/pie-legend/index.html +128 -0
  874. package/src/assets/plugins/highcharts/examples/pie-monochrome/index.html +139 -0
  875. package/src/assets/plugins/highcharts/examples/pie-semi-circle/index.html +133 -0
  876. package/src/assets/plugins/highcharts/examples/polar/index.html +136 -0
  877. package/src/assets/plugins/highcharts/examples/polar-radial-bar/index.html +169 -0
  878. package/src/assets/plugins/highcharts/examples/polar-spider/index.html +148 -0
  879. package/src/assets/plugins/highcharts/examples/polar-wind-rose/index.html +351 -0
  880. package/src/assets/plugins/highcharts/examples/polygon/index.html +190 -0
  881. package/src/assets/plugins/highcharts/examples/pyramid/index.html +126 -0
  882. package/src/assets/plugins/highcharts/examples/pyramid3d/index.html +117 -0
  883. package/src/assets/plugins/highcharts/examples/renderer/index.html +334 -0
  884. package/src/assets/plugins/highcharts/examples/responsive/index.html +176 -0
  885. package/src/assets/plugins/highcharts/examples/sankey-diagram/index.html +145 -0
  886. package/src/assets/plugins/highcharts/examples/scatter/index.html +246 -0
  887. package/src/assets/plugins/highcharts/examples/scatter-boost/index.html +142 -0
  888. package/src/assets/plugins/highcharts/examples/sonification/index.html +331 -0
  889. package/src/assets/plugins/highcharts/examples/sparkline/index.html +676 -0
  890. package/src/assets/plugins/highcharts/examples/spline-inverted/index.html +135 -0
  891. package/src/assets/plugins/highcharts/examples/spline-irregular-time/index.html +255 -0
  892. package/src/assets/plugins/highcharts/examples/spline-plot-bands/index.html +223 -0
  893. package/src/assets/plugins/highcharts/examples/spline-symbols/index.html +139 -0
  894. package/src/assets/plugins/highcharts/examples/streamgraph/index.html +447 -0
  895. package/src/assets/plugins/highcharts/examples/styled-mode-column/index.html +146 -0
  896. package/src/assets/plugins/highcharts/examples/styled-mode-pie/index.html +119 -0
  897. package/src/assets/plugins/highcharts/examples/sunburst/index.html +1520 -0
  898. package/src/assets/plugins/highcharts/examples/synchronized-charts/index.html +238 -0
  899. package/src/assets/plugins/highcharts/examples/timeline/index.html +142 -0
  900. package/src/assets/plugins/highcharts/examples/treemap-coloraxis/index.html +119 -0
  901. package/src/assets/plugins/highcharts/examples/treemap-large-dataset/index.html +172 -0
  902. package/src/assets/plugins/highcharts/examples/treemap-with-levels/index.html +151 -0
  903. package/src/assets/plugins/highcharts/examples/variable-radius-pie/index.html +131 -0
  904. package/src/assets/plugins/highcharts/examples/variwide/index.html +146 -0
  905. package/src/assets/plugins/highcharts/examples/vector-plot/index.html +494 -0
  906. package/src/assets/plugins/highcharts/examples/venn-diagram/index.html +124 -0
  907. package/src/assets/plugins/highcharts/examples/waterfall/index.html +143 -0
  908. package/src/assets/plugins/highcharts/examples/windbarb-series/index.html +189 -0
  909. package/src/assets/plugins/highcharts/examples/wordcloud/index.html +110 -0
  910. package/src/assets/plugins/highcharts/examples/x-range/index.html +142 -0
  911. package/src/assets/plugins/highcharts/gfx/stock-icons/annotations-hidden.svg +19 -0
  912. package/src/assets/plugins/highcharts/gfx/stock-icons/annotations-visible.svg +20 -0
  913. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-bottom.svg +9 -0
  914. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-left.svg +9 -0
  915. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-line.svg +11 -0
  916. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-ray.svg +10 -0
  917. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-right.svg +9 -0
  918. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-segment.svg +11 -0
  919. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow.svg +13 -0
  920. package/src/assets/plugins/highcharts/gfx/stock-icons/circle.svg +13 -0
  921. package/src/assets/plugins/highcharts/gfx/stock-icons/close.svg +8 -0
  922. package/src/assets/plugins/highcharts/gfx/stock-icons/crooked-3.svg +13 -0
  923. package/src/assets/plugins/highcharts/gfx/stock-icons/crooked-5.svg +11 -0
  924. package/src/assets/plugins/highcharts/gfx/stock-icons/current-price-hide.svg +40 -0
  925. package/src/assets/plugins/highcharts/gfx/stock-icons/current-price-show.svg +41 -0
  926. package/src/assets/plugins/highcharts/gfx/stock-icons/destroy.svg +14 -0
  927. package/src/assets/plugins/highcharts/gfx/stock-icons/drawing.svg +18 -0
  928. package/src/assets/plugins/highcharts/gfx/stock-icons/edit.svg +10 -0
  929. package/src/assets/plugins/highcharts/gfx/stock-icons/elliott-3.svg +59 -0
  930. package/src/assets/plugins/highcharts/gfx/stock-icons/elliott-5.svg +41 -0
  931. package/src/assets/plugins/highcharts/gfx/stock-icons/ellipse.svg +11 -0
  932. package/src/assets/plugins/highcharts/gfx/stock-icons/fibonacci-timezone.svg +16 -0
  933. package/src/assets/plugins/highcharts/gfx/stock-icons/fibonacci.svg +25 -0
  934. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-basic.svg +10 -0
  935. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-diamond.svg +12 -0
  936. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-elipse.svg +13 -0
  937. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-trapeze.svg +14 -0
  938. package/src/assets/plugins/highcharts/gfx/stock-icons/fullscreen.svg +15 -0
  939. package/src/assets/plugins/highcharts/gfx/stock-icons/horizontal-line.svg +8 -0
  940. package/src/assets/plugins/highcharts/gfx/stock-icons/indicators.svg +27 -0
  941. package/src/assets/plugins/highcharts/gfx/stock-icons/label.svg +16 -0
  942. package/src/assets/plugins/highcharts/gfx/stock-icons/line.svg +11 -0
  943. package/src/assets/plugins/highcharts/gfx/stock-icons/linear.svg +11 -0
  944. package/src/assets/plugins/highcharts/gfx/stock-icons/logarithmic.svg +1 -0
  945. package/src/assets/plugins/highcharts/gfx/stock-icons/measure-x.svg +23 -0
  946. package/src/assets/plugins/highcharts/gfx/stock-icons/measure-xy.svg +28 -0
  947. package/src/assets/plugins/highcharts/gfx/stock-icons/measure-y.svg +24 -0
  948. package/src/assets/plugins/highcharts/gfx/stock-icons/panning.svg +17 -0
  949. package/src/assets/plugins/highcharts/gfx/stock-icons/parallel-channel.svg +15 -0
  950. package/src/assets/plugins/highcharts/gfx/stock-icons/pitchfork.svg +13 -0
  951. package/src/assets/plugins/highcharts/gfx/stock-icons/ray.svg +10 -0
  952. package/src/assets/plugins/highcharts/gfx/stock-icons/rectangle.svg +8 -0
  953. package/src/assets/plugins/highcharts/gfx/stock-icons/remove-annotations.svg +15 -0
  954. package/src/assets/plugins/highcharts/gfx/stock-icons/save-chart.svg +12 -0
  955. package/src/assets/plugins/highcharts/gfx/stock-icons/segment.svg +10 -0
  956. package/src/assets/plugins/highcharts/gfx/stock-icons/separator.svg +10 -0
  957. package/src/assets/plugins/highcharts/gfx/stock-icons/series-candlestick.svg +12 -0
  958. package/src/assets/plugins/highcharts/gfx/stock-icons/series-heikin-ashi.svg +1 -0
  959. package/src/assets/plugins/highcharts/gfx/stock-icons/series-hlc.svg +1 -0
  960. package/src/assets/plugins/highcharts/gfx/stock-icons/series-hollow-candlestick.svg +1 -0
  961. package/src/assets/plugins/highcharts/gfx/stock-icons/series-line.svg +11 -0
  962. package/src/assets/plugins/highcharts/gfx/stock-icons/series-ohlc.svg +14 -0
  963. package/src/assets/plugins/highcharts/gfx/stock-icons/text.svg +13 -0
  964. package/src/assets/plugins/highcharts/gfx/stock-icons/time-cycles.svg +35 -0
  965. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-arrow.svg +7 -0
  966. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-counter.svg +23 -0
  967. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-double-arrow.svg +10 -0
  968. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-label.svg +14 -0
  969. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-line.svg +8 -0
  970. package/src/assets/plugins/highcharts/gfx/stock-icons/zoom-x.svg +17 -0
  971. package/src/assets/plugins/highcharts/gfx/stock-icons/zoom-xy.svg +13 -0
  972. package/src/assets/plugins/highcharts/gfx/stock-icons/zoom-y.svg +17 -0
  973. package/src/assets/plugins/highcharts/gfx/vml-radial-gradient.png +0 -0
  974. package/src/assets/plugins/highcharts/graphics/color-picker.svg +12 -0
  975. package/src/assets/plugins/highcharts/graphics/cursor.svg +11 -0
  976. package/src/assets/plugins/highcharts/graphics/earth.svg +432 -0
  977. package/src/assets/plugins/highcharts/graphics/feature.svg +13 -0
  978. package/src/assets/plugins/highcharts/graphics/flag-circle.svg +17 -0
  979. package/src/assets/plugins/highcharts/graphics/flag-circlepin.svg +15 -0
  980. package/src/assets/plugins/highcharts/graphics/flag-diamondpin.svg +15 -0
  981. package/src/assets/plugins/highcharts/graphics/flag-flag.svg +14 -0
  982. package/src/assets/plugins/highcharts/graphics/flag-rectangle.svg +18 -0
  983. package/src/assets/plugins/highcharts/graphics/flag-squarepin.svg +16 -0
  984. package/src/assets/plugins/highcharts/graphics/flag.svg +15 -0
  985. package/src/assets/plugins/highcharts/graphics/homepage/apple.svg +55 -0
  986. package/src/assets/plugins/highcharts/graphics/homepage/award.png +0 -0
  987. package/src/assets/plugins/highcharts/graphics/homepage/cloud.png +0 -0
  988. package/src/assets/plugins/highcharts/graphics/homepage/earth.png +0 -0
  989. package/src/assets/plugins/highcharts/graphics/homepage/jupiter.png +0 -0
  990. package/src/assets/plugins/highcharts/graphics/homepage/mars.png +0 -0
  991. package/src/assets/plugins/highcharts/graphics/homepage/mercury.png +0 -0
  992. package/src/assets/plugins/highcharts/graphics/homepage/moon.png +0 -0
  993. package/src/assets/plugins/highcharts/graphics/homepage/neptune.png +0 -0
  994. package/src/assets/plugins/highcharts/graphics/homepage/p1.png +0 -0
  995. package/src/assets/plugins/highcharts/graphics/homepage/p1.svg +9 -0
  996. package/src/assets/plugins/highcharts/graphics/homepage/p2.png +0 -0
  997. package/src/assets/plugins/highcharts/graphics/homepage/p2.svg +9 -0
  998. package/src/assets/plugins/highcharts/graphics/homepage/p3.png +0 -0
  999. package/src/assets/plugins/highcharts/graphics/homepage/p3.svg +9 -0
  1000. package/src/assets/plugins/highcharts/graphics/homepage/p4.png +0 -0
  1001. package/src/assets/plugins/highcharts/graphics/homepage/p4.svg +9 -0
  1002. package/src/assets/plugins/highcharts/graphics/homepage/p5.png +0 -0
  1003. package/src/assets/plugins/highcharts/graphics/homepage/p5.svg +9 -0
  1004. package/src/assets/plugins/highcharts/graphics/homepage/p6.png +0 -0
  1005. package/src/assets/plugins/highcharts/graphics/homepage/p6.svg +9 -0
  1006. package/src/assets/plugins/highcharts/graphics/homepage/product.png +0 -0
  1007. package/src/assets/plugins/highcharts/graphics/homepage/saturn.png +0 -0
  1008. package/src/assets/plugins/highcharts/graphics/homepage/sun.png +0 -0
  1009. package/src/assets/plugins/highcharts/graphics/homepage/uranus.png +0 -0
  1010. package/src/assets/plugins/highcharts/graphics/homepage/venus.png +0 -0
  1011. package/src/assets/plugins/highcharts/graphics/homepage/version.png +0 -0
  1012. package/src/assets/plugins/highcharts/graphics/rect.svg +12 -0
  1013. package/src/assets/plugins/highcharts/graphics/reset.svg +16 -0
  1014. package/src/assets/plugins/highcharts/graphics/sand.png +0 -0
  1015. package/src/assets/plugins/highcharts/graphics/save-chart-cloud.svg +14 -0
  1016. package/src/assets/plugins/highcharts/graphics/save.svg +14 -0
  1017. package/src/assets/plugins/highcharts/graphics/search.png +0 -0
  1018. package/src/assets/plugins/highcharts/graphics/skies.jpg +0 -0
  1019. package/src/assets/plugins/highcharts/graphics/snow.png +0 -0
  1020. package/src/assets/plugins/highcharts/graphics/sun.png +0 -0
  1021. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/blue-flake-big.svg +32 -0
  1022. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/blue-star-big.svg +16 -0
  1023. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/car-tree.svg +429 -0
  1024. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/green-flake-big.svg +119 -0
  1025. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/green-star.svg +20 -0
  1026. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/hill.svg +193 -0
  1027. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/hill2.svg +164 -0
  1028. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/horse.svg +1 -0
  1029. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/people.svg +2336 -0
  1030. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/pines.svg +777 -0
  1031. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/pond-skate.svg +1 -0
  1032. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-flake.svg +30 -0
  1033. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-house.svg +85 -0
  1034. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-star-big.svg +36 -0
  1035. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-star.svg +20 -0
  1036. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/santa-b.svg +91 -0
  1037. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/santa.svg +91 -0
  1038. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/snow-mound.svg +146 -0
  1039. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/snow.svg +20788 -0
  1040. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/sun-disk.svg +597 -0
  1041. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/tree-cluster.svg +2735 -0
  1042. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/white-flake-big.svg +99 -0
  1043. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/white-flake.big.svg +96 -0
  1044. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/white-star-big.svg +36 -0
  1045. package/src/assets/plugins/highcharts/index.html +133 -0
  1046. package/src/lib/classes/chart.class.ts +140 -0
  1047. package/src/lib/classes/enum.class.ts +193 -0
  1048. package/src/lib/classes/excel.class.ts +46 -0
  1049. package/src/lib/classes/form.class.ts +528 -0
  1050. package/src/lib/classes/helper.class.ts +283 -0
  1051. package/src/lib/classes/lang.class.ts +32 -0
  1052. package/src/lib/classes/login.class.ts +27 -0
  1053. package/src/lib/classes/modal.class.ts +59 -0
  1054. package/src/lib/classes/permission.class.ts +55 -0
  1055. package/src/lib/classes/request.class.ts +255 -0
  1056. package/src/lib/classes/safestyle.class.ts +4 -0
  1057. package/src/lib/classes/sidebar.class.ts +20 -0
  1058. package/src/lib/classes/steps.class.ts +19 -0
  1059. package/src/lib/classes/string.class.ts +219 -0
  1060. package/src/lib/classes/table.class.ts +228 -0
  1061. package/src/lib/components/accordion/accordion.component.css +116 -0
  1062. package/src/lib/components/accordion/accordion.component.html +19 -0
  1063. package/src/lib/components/accordion/accordion.component.ts +41 -0
  1064. package/src/lib/components/alert/alert.component.css +112 -0
  1065. package/src/lib/components/alert/alert.component.html +1 -0
  1066. package/src/lib/components/alert/alert.component.ts +35 -0
  1067. package/src/lib/components/base.component.ts +38 -0
  1068. package/src/lib/components/calendar/calendar.component.css +206 -0
  1069. package/src/lib/components/calendar/calendar.component.html +36 -0
  1070. package/src/lib/components/calendar/calendar.component.ts +99 -0
  1071. package/src/lib/components/chart/chart.component.css +24 -0
  1072. package/src/lib/components/chart/chart.component.html +6 -0
  1073. package/src/lib/components/chart/chart.component.ts +14 -0
  1074. package/src/lib/components/clock/clock.component.css +141 -0
  1075. package/src/lib/components/clock/clock.component.html +10 -0
  1076. package/src/lib/components/clock/clock.component.ts +37 -0
  1077. package/src/lib/components/confirm/confirm.component.css +112 -0
  1078. package/src/lib/components/confirm/confirm.component.html +1 -0
  1079. package/src/lib/components/confirm/confirm.component.ts +47 -0
  1080. package/src/lib/components/footer/footer.component.css +46 -0
  1081. package/src/lib/components/footer/footer.component.html +9 -0
  1082. package/src/lib/components/footer/footer.component.ts +18 -0
  1083. package/src/lib/components/form/bank-card/form.bank-card.component.css +115 -0
  1084. package/src/lib/components/form/bank-card/form.bank-card.component.html +13 -0
  1085. package/src/lib/components/form/bank-card/form.bank-card.component.ts +144 -0
  1086. package/src/lib/components/form/button/form.button.component.css +222 -0
  1087. package/src/lib/components/form/button/form.button.component.html +16 -0
  1088. package/src/lib/components/form/button/form.button.component.ts +65 -0
  1089. package/src/lib/components/form/car/form.car.component.css +287 -0
  1090. package/src/lib/components/form/car/form.car.component.html +11 -0
  1091. package/src/lib/components/form/car/form.car.component.ts +82 -0
  1092. package/src/lib/components/form/car/search/form.car.search.component.css +287 -0
  1093. package/src/lib/components/form/car/search/form.car.search.component.html +15 -0
  1094. package/src/lib/components/form/car/search/form.car.search.component.ts +170 -0
  1095. package/src/lib/components/form/checkbox/form.checkbox.component.css +128 -0
  1096. package/src/lib/components/form/checkbox/form.checkbox.component.html +8 -0
  1097. package/src/lib/components/form/checkbox/form.checkbox.component.ts +64 -0
  1098. package/src/lib/components/form/date/form.date.component.css +310 -0
  1099. package/src/lib/components/form/date/form.date.component.html +46 -0
  1100. package/src/lib/components/form/date/form.date.component.ts +247 -0
  1101. package/src/lib/components/form/datetime/form.datetime.component.css +157 -0
  1102. package/src/lib/components/form/datetime/form.datetime.component.html +11 -0
  1103. package/src/lib/components/form/datetime/form.datetime.component.ts +98 -0
  1104. package/src/lib/components/form/file/form.file.component.css +151 -0
  1105. package/src/lib/components/form/file/form.file.component.html +12 -0
  1106. package/src/lib/components/form/file/form.file.component.ts +130 -0
  1107. package/src/lib/components/form/finger/form.finger.component.css +215 -0
  1108. package/src/lib/components/form/finger/form.finger.component.html +59 -0
  1109. package/src/lib/components/form/finger/form.finger.component.ts +131 -0
  1110. package/src/lib/components/form/hidden/form.hidden.component.css +0 -0
  1111. package/src/lib/components/form/hidden/form.hidden.component.html +0 -0
  1112. package/src/lib/components/form/hidden/form.hidden.component.ts +29 -0
  1113. package/src/lib/components/form/icon/form.icon.component.css +108 -0
  1114. package/src/lib/components/form/icon/form.icon.component.html +14 -0
  1115. package/src/lib/components/form/icon/form.icon.component.ts +73 -0
  1116. package/src/lib/components/form/index/form.component.css +89 -0
  1117. package/src/lib/components/form/index/form.component.html +35 -0
  1118. package/src/lib/components/form/index/form.component.ts +45 -0
  1119. package/src/lib/components/form/label/form.label.component.css +45 -0
  1120. package/src/lib/components/form/label/form.label.component.html +2 -0
  1121. package/src/lib/components/form/label/form.label.component.ts +30 -0
  1122. package/src/lib/components/form/plaque/form.plaque.component.css +76 -0
  1123. package/src/lib/components/form/plaque/form.plaque.component.html +10 -0
  1124. package/src/lib/components/form/plaque/form.plaque.component.ts +178 -0
  1125. package/src/lib/components/form/plaque/select/form.plaque.select.component.css +167 -0
  1126. package/src/lib/components/form/plaque/select/form.plaque.select.component.html +19 -0
  1127. package/src/lib/components/form/plaque/select/form.plaque.select.component.ts +385 -0
  1128. package/src/lib/components/form/radio/form.radio.component.css +158 -0
  1129. package/src/lib/components/form/radio/form.radio.component.html +16 -0
  1130. package/src/lib/components/form/radio/form.radio.component.ts +78 -0
  1131. package/src/lib/components/form/select/form.select.component.css +326 -0
  1132. package/src/lib/components/form/select/form.select.component.html +16 -0
  1133. package/src/lib/components/form/select/form.select.component.ts +358 -0
  1134. package/src/lib/components/form/select/item/form.select.item.component.css +59 -0
  1135. package/src/lib/components/form/select/item/form.select.item.component.html +10 -0
  1136. package/src/lib/components/form/select/item/form.select.item.component.ts +40 -0
  1137. package/src/lib/components/form/table/form.table.component.css +50 -0
  1138. package/src/lib/components/form/table/form.table.component.html +8 -0
  1139. package/src/lib/components/form/table/form.table.component.ts +94 -0
  1140. package/src/lib/components/form/textarea/form.textarea.component.css +109 -0
  1141. package/src/lib/components/form/textarea/form.textarea.component.html +10 -0
  1142. package/src/lib/components/form/textarea/form.textarea.component.ts +76 -0
  1143. package/src/lib/components/form/textbox/form.textbox.component.css +296 -0
  1144. package/src/lib/components/form/textbox/form.textbox.component.html +13 -0
  1145. package/src/lib/components/form/textbox/form.textbox.component.ts +185 -0
  1146. package/src/lib/components/form/time/form.time.component.css +205 -0
  1147. package/src/lib/components/form/time/form.time.component.html +22 -0
  1148. package/src/lib/components/form/time/form.time.component.ts +139 -0
  1149. package/src/lib/components/form/tree/form.tree.component.css +109 -0
  1150. package/src/lib/components/form/tree/form.tree.component.html +11 -0
  1151. package/src/lib/components/form/tree/form.tree.component.ts +98 -0
  1152. package/src/lib/components/form/tree/item/form.tree.item.component.css +142 -0
  1153. package/src/lib/components/form/tree/item/form.tree.item.component.html +9 -0
  1154. package/src/lib/components/form/tree/item/form.tree.item.component.ts +49 -0
  1155. package/src/lib/components/header/header.component.css +57 -0
  1156. package/src/lib/components/header/header.component.html +5 -0
  1157. package/src/lib/components/header/header.component.ts +28 -0
  1158. package/src/lib/components/header/sub/sub.header.component.css +62 -0
  1159. package/src/lib/components/header/sub/sub.header.component.html +8 -0
  1160. package/src/lib/components/header/sub/sub.header.component.ts +11 -0
  1161. package/src/lib/components/layout/layout.component.css +300 -0
  1162. package/src/lib/components/layout/layout.component.html +20 -0
  1163. package/src/lib/components/layout/layout.component.ts +21 -0
  1164. package/src/lib/components/loading/loading.component.css +39 -0
  1165. package/src/lib/components/loading/loading.component.html +8 -0
  1166. package/src/lib/components/loading/loading.component.ts +18 -0
  1167. package/src/lib/components/login/login.component.css +389 -0
  1168. package/src/lib/components/login/login.component.html +27 -0
  1169. package/src/lib/components/login/login.component.ts +145 -0
  1170. package/src/lib/components/modal/modal.component.css +60 -0
  1171. package/src/lib/components/modal/modal.component.html +12 -0
  1172. package/src/lib/components/modal/modal.component.ts +23 -0
  1173. package/src/lib/components/notfound/notfound.component.css +134 -0
  1174. package/src/lib/components/notfound/notfound.component.html +10 -0
  1175. package/src/lib/components/notfound/notfound.component.ts +25 -0
  1176. package/src/lib/components/notification/notification.component.css +45 -0
  1177. package/src/lib/components/notification/notification.component.html +2 -0
  1178. package/src/lib/components/notification/notification.component.ts +11 -0
  1179. package/src/lib/components/sidebar/item/sidebar.item.component.css +236 -0
  1180. package/src/lib/components/sidebar/item/sidebar.item.component.html +16 -0
  1181. package/src/lib/components/sidebar/item/sidebar.item.component.ts +54 -0
  1182. package/src/lib/components/sidebar/sidebar.component.css +42 -0
  1183. package/src/lib/components/sidebar/sidebar.component.html +10 -0
  1184. package/src/lib/components/sidebar/sidebar.component.ts +60 -0
  1185. package/src/lib/components/steps/steps.component.css +320 -0
  1186. package/src/lib/components/steps/steps.component.html +18 -0
  1187. package/src/lib/components/steps/steps.component.ts +44 -0
  1188. package/src/lib/components/table/loading/table.loading.component.css +29 -0
  1189. package/src/lib/components/table/loading/table.loading.component.html +9 -0
  1190. package/src/lib/components/table/loading/table.loading.component.ts +14 -0
  1191. package/src/lib/components/table/pagination/table.pagination.component.css +138 -0
  1192. package/src/lib/components/table/pagination/table.pagination.component.html +9 -0
  1193. package/src/lib/components/table/pagination/table.pagination.component.ts +89 -0
  1194. package/src/lib/components/table/report/table.report.component.css +125 -0
  1195. package/src/lib/components/table/report/table.report.component.html +19 -0
  1196. package/src/lib/components/table/report/table.report.component.ts +238 -0
  1197. package/src/lib/components/table/row/table.row.component.css +170 -0
  1198. package/src/lib/components/table/row/table.row.component.html +21 -0
  1199. package/src/lib/components/table/row/table.row.component.ts +373 -0
  1200. package/src/lib/components/table/table.component.css +116 -0
  1201. package/src/lib/components/table/table.component.html +62 -0
  1202. package/src/lib/components/table/table.component.ts +180 -0
  1203. package/src/lib/components/tooltip/tooltip.component.css +159 -0
  1204. package/src/lib/components/tooltip/tooltip.component.html +1 -0
  1205. package/src/lib/components/tooltip/tooltip.component.ts +15 -0
  1206. package/src/lib/ps-toolkit-ui.module.ts +94 -0
  1207. package/src/lib/services/config.service.ts +8 -0
  1208. package/src/public-api.ts +53 -0
  1209. package/src/test.ts +26 -0
  1210. package/tsconfig.lib.json +25 -0
  1211. package/tsconfig.lib.prod.json +10 -0
  1212. package/tsconfig.spec.json +17 -0
  1213. package/tslint.json +17 -0
  1214. package/bundles/ps-toolkit-ui.umd.js +0 -7628
  1215. package/bundles/ps-toolkit-ui.umd.js.map +0 -1
  1216. package/bundles/ps-toolkit-ui.umd.min.js +0 -2
  1217. package/bundles/ps-toolkit-ui.umd.min.js.map +0 -1
  1218. package/esm2015/lib/classes/enum.class.js +0 -187
  1219. package/esm2015/lib/classes/form.class.js +0 -481
  1220. package/esm2015/lib/classes/helper.class.js +0 -284
  1221. package/esm2015/lib/classes/lang.class.js +0 -32
  1222. package/esm2015/lib/classes/login.class.js +0 -22
  1223. package/esm2015/lib/classes/modal.class.js +0 -52
  1224. package/esm2015/lib/classes/permission.class.js +0 -61
  1225. package/esm2015/lib/classes/request.class.js +0 -256
  1226. package/esm2015/lib/classes/safestyle.class.js +0 -15
  1227. package/esm2015/lib/classes/sidebar.class.js +0 -14
  1228. package/esm2015/lib/classes/steps.class.js +0 -20
  1229. package/esm2015/lib/classes/string.class.js +0 -220
  1230. package/esm2015/lib/classes/table.class.js +0 -215
  1231. package/esm2015/lib/components/accordion/accordion.component.js +0 -45
  1232. package/esm2015/lib/components/alert/alert.component.js +0 -39
  1233. package/esm2015/lib/components/base.component.js +0 -45
  1234. package/esm2015/lib/components/calendar/calendar.component.js +0 -97
  1235. package/esm2015/lib/components/clock/clock.component.js +0 -33
  1236. package/esm2015/lib/components/confirm/confirm.component.js +0 -50
  1237. package/esm2015/lib/components/footer/footer.component.js +0 -23
  1238. package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +0 -148
  1239. package/esm2015/lib/components/form/button/form.button.component.js +0 -68
  1240. package/esm2015/lib/components/form/car/form.car.component.js +0 -84
  1241. package/esm2015/lib/components/form/car/search/form.car.search.component.js +0 -172
  1242. package/esm2015/lib/components/form/checkbox/form.checkbox.component.js +0 -66
  1243. package/esm2015/lib/components/form/date/form.date.component.js +0 -254
  1244. package/esm2015/lib/components/form/datetime/form.datetime.component.js +0 -104
  1245. package/esm2015/lib/components/form/file/form.file.component.js +0 -133
  1246. package/esm2015/lib/components/form/finger/form.finger.component.js +0 -138
  1247. package/esm2015/lib/components/form/hidden/form.hidden.component.js +0 -31
  1248. package/esm2015/lib/components/form/icon/form.icon.component.js +0 -76
  1249. package/esm2015/lib/components/form/index/form.component.js +0 -48
  1250. package/esm2015/lib/components/form/label/form.label.component.js +0 -32
  1251. package/esm2015/lib/components/form/plaque/form.plaque.component.js +0 -176
  1252. package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +0 -390
  1253. package/esm2015/lib/components/form/radio/form.radio.component.js +0 -79
  1254. package/esm2015/lib/components/form/select/form.select.component.js +0 -374
  1255. package/esm2015/lib/components/form/select/item/form.select.item.component.js +0 -43
  1256. package/esm2015/lib/components/form/table/form.table.component.js +0 -98
  1257. package/esm2015/lib/components/form/textarea/form.textarea.component.js +0 -78
  1258. package/esm2015/lib/components/form/textbox/form.textbox.component.js +0 -186
  1259. package/esm2015/lib/components/form/time/form.time.component.js +0 -145
  1260. package/esm2015/lib/components/form/tree/form.tree.component.js +0 -99
  1261. package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +0 -48
  1262. package/esm2015/lib/components/header/header.component.js +0 -33
  1263. package/esm2015/lib/components/header/sub/sub.header.component.js +0 -14
  1264. package/esm2015/lib/components/layout/layout.component.js +0 -25
  1265. package/esm2015/lib/components/loading/loading.component.js +0 -22
  1266. package/esm2015/lib/components/login/login.component.js +0 -148
  1267. package/esm2015/lib/components/modal/modal.component.js +0 -25
  1268. package/esm2015/lib/components/notfound/notfound.component.js +0 -29
  1269. package/esm2015/lib/components/notification/notification.component.js +0 -14
  1270. package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +0 -53
  1271. package/esm2015/lib/components/sidebar/sidebar.component.js +0 -67
  1272. package/esm2015/lib/components/steps/steps.component.js +0 -51
  1273. package/esm2015/lib/components/table/loading/table.loading.component.js +0 -17
  1274. package/esm2015/lib/components/table/pagination/table.pagination.component.js +0 -84
  1275. package/esm2015/lib/components/table/report/table.report.component.js +0 -246
  1276. package/esm2015/lib/components/table/row/table.row.component.js +0 -379
  1277. package/esm2015/lib/components/table/table.component.js +0 -179
  1278. package/esm2015/lib/components/tooltip/tooltip.component.js +0 -19
  1279. package/esm2015/lib/ps-toolkit-ui.module.js +0 -94
  1280. package/esm2015/lib/services/config.service.js +0 -14
  1281. package/esm2015/ps-toolkit-ui.js +0 -19
  1282. package/esm2015/public-api.js +0 -52
  1283. package/fesm2015/ps-toolkit-ui.js +0 -6550
  1284. package/fesm2015/ps-toolkit-ui.js.map +0 -1
  1285. package/lib/classes/enum.class.d.ts +0 -158
  1286. package/lib/classes/form.class.d.ts +0 -173
  1287. package/lib/classes/helper.class.d.ts +0 -28
  1288. package/lib/classes/lang.class.d.ts +0 -5
  1289. package/lib/classes/login.class.d.ts +0 -17
  1290. package/lib/classes/modal.class.d.ts +0 -19
  1291. package/lib/classes/permission.class.d.ts +0 -31
  1292. package/lib/classes/request.class.d.ts +0 -12
  1293. package/lib/classes/safestyle.class.d.ts +0 -7
  1294. package/lib/classes/sidebar.class.d.ts +0 -11
  1295. package/lib/classes/steps.class.d.ts +0 -17
  1296. package/lib/classes/string.class.d.ts +0 -218
  1297. package/lib/classes/table.class.d.ts +0 -69
  1298. package/lib/components/accordion/accordion.component.d.ts +0 -7
  1299. package/lib/components/alert/alert.component.d.ts +0 -10
  1300. package/lib/components/base.component.d.ts +0 -14
  1301. package/lib/components/calendar/calendar.component.d.ts +0 -26
  1302. package/lib/components/clock/clock.component.d.ts +0 -11
  1303. package/lib/components/confirm/confirm.component.d.ts +0 -14
  1304. package/lib/components/footer/footer.component.d.ts +0 -6
  1305. package/lib/components/form/bank-card/form.bank-card.component.d.ts +0 -22
  1306. package/lib/components/form/button/form.button.component.d.ts +0 -15
  1307. package/lib/components/form/car/form.car.component.d.ts +0 -16
  1308. package/lib/components/form/car/search/form.car.search.component.d.ts +0 -17
  1309. package/lib/components/form/checkbox/form.checkbox.component.d.ts +0 -14
  1310. package/lib/components/form/date/form.date.component.d.ts +0 -42
  1311. package/lib/components/form/datetime/form.datetime.component.d.ts +0 -13
  1312. package/lib/components/form/file/form.file.component.d.ts +0 -17
  1313. package/lib/components/form/finger/form.finger.component.d.ts +0 -15
  1314. package/lib/components/form/hidden/form.hidden.component.d.ts +0 -7
  1315. package/lib/components/form/icon/form.icon.component.d.ts +0 -15
  1316. package/lib/components/form/index/form.component.d.ts +0 -10
  1317. package/lib/components/form/label/form.label.component.d.ts +0 -8
  1318. package/lib/components/form/plaque/form.plaque.component.d.ts +0 -22
  1319. package/lib/components/form/plaque/select/form.plaque.select.component.d.ts +0 -36
  1320. package/lib/components/form/radio/form.radio.component.d.ts +0 -13
  1321. package/lib/components/form/select/form.select.component.d.ts +0 -39
  1322. package/lib/components/form/select/item/form.select.item.component.d.ts +0 -12
  1323. package/lib/components/form/table/form.table.component.d.ts +0 -9
  1324. package/lib/components/form/textarea/form.textarea.component.d.ts +0 -13
  1325. package/lib/components/form/textbox/form.textbox.component.d.ts +0 -20
  1326. package/lib/components/form/time/form.time.component.d.ts +0 -25
  1327. package/lib/components/form/tree/form.tree.component.d.ts +0 -16
  1328. package/lib/components/form/tree/item/form.tree.item.component.d.ts +0 -17
  1329. package/lib/components/header/header.component.d.ts +0 -9
  1330. package/lib/components/header/sub/sub.header.component.d.ts +0 -3
  1331. package/lib/components/layout/layout.component.d.ts +0 -8
  1332. package/lib/components/loading/loading.component.d.ts +0 -5
  1333. package/lib/components/login/login.component.d.ts +0 -13
  1334. package/lib/components/modal/modal.component.d.ts +0 -9
  1335. package/lib/components/notfound/notfound.component.d.ts +0 -8
  1336. package/lib/components/notification/notification.component.d.ts +0 -3
  1337. package/lib/components/sidebar/item/sidebar.item.component.d.ts +0 -14
  1338. package/lib/components/sidebar/sidebar.component.d.ts +0 -19
  1339. package/lib/components/steps/steps.component.d.ts +0 -10
  1340. package/lib/components/table/loading/table.loading.component.d.ts +0 -5
  1341. package/lib/components/table/pagination/table.pagination.component.d.ts +0 -15
  1342. package/lib/components/table/report/table.report.component.d.ts +0 -34
  1343. package/lib/components/table/row/table.row.component.d.ts +0 -34
  1344. package/lib/components/table/table.component.d.ts +0 -40
  1345. package/lib/components/tooltip/tooltip.component.d.ts +0 -5
  1346. package/lib/ps-toolkit-ui.module.d.ts +0 -4
  1347. package/lib/services/config.service.d.ts +0 -6
  1348. package/ps-toolkit-ui.d.ts +0 -18
  1349. package/ps-toolkit-ui.metadata.json +0 -1
  1350. package/public-api.d.ts +0 -48
@@ -0,0 +1,4390 @@
1
+ /**
2
+ * Modules in this bundle
3
+ * @license
4
+ *
5
+ * svg2pdf.js:
6
+ * license: MIT (http://opensource.org/licenses/MIT)
7
+ * author: yFiles for HTML Support Team <yfileshtml@yworks.com>
8
+ * homepage: https://github.com/yWorks/svg2pdf.js#readme
9
+ * version: 1.3.1
10
+ *
11
+ * cssesc:
12
+ * license: MIT (http://opensource.org/licenses/MIT)
13
+ * author: Mathias Bynens
14
+ * homepage: https://mths.be/cssesc
15
+ * version: 2.0.0
16
+ *
17
+ * font-family:
18
+ * license: MIT (http://opensource.org/licenses/MIT)
19
+ * author: Taro Hanamura <m@hanamurataro.com>
20
+ * homepage: https://github.com/hanamura/font-family
21
+ * version: 0.2.0
22
+ *
23
+ * svgpath:
24
+ * license: MIT (http://opensource.org/licenses/MIT)
25
+ * homepage: https://github.com/fontello/svgpath#readme
26
+ * version: 2.2.1
27
+ *
28
+ * This header is generated by licensify (https://github.com/twada/licensify)
29
+ */
30
+ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.svg2pdf = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
31
+ 'use strict';
32
+
33
+ module.exports = require('./lib/svgpath');
34
+
35
+ },{"./lib/svgpath":6}],2:[function(require,module,exports){
36
+ // Convert an arc to a sequence of cubic bézier curves
37
+ //
38
+ 'use strict';
39
+
40
+
41
+ var TAU = Math.PI * 2;
42
+
43
+
44
+ /* eslint-disable space-infix-ops */
45
+
46
+ // Calculate an angle between two vectors
47
+ //
48
+ function vector_angle(ux, uy, vx, vy) {
49
+ var sign = (ux * vy - uy * vx < 0) ? -1 : 1;
50
+ var umag = Math.sqrt(ux * ux + uy * uy);
51
+ var vmag = Math.sqrt(ux * ux + uy * uy);
52
+ var dot = ux * vx + uy * vy;
53
+ var div = dot / (umag * vmag);
54
+
55
+ // rounding errors, e.g. -1.0000000000000002 can screw up this
56
+ if (div > 1.0) { div = 1.0; }
57
+ if (div < -1.0) { div = -1.0; }
58
+
59
+ return sign * Math.acos(div);
60
+ }
61
+
62
+
63
+ // Convert from endpoint to center parameterization,
64
+ // see http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
65
+ //
66
+ // Return [cx, cy, theta1, delta_theta]
67
+ //
68
+ function get_arc_center(x1, y1, x2, y2, fa, fs, rx, ry, sin_phi, cos_phi) {
69
+ // Step 1.
70
+ //
71
+ // Moving an ellipse so origin will be the middlepoint between our two
72
+ // points. After that, rotate it to line up ellipse axes with coordinate
73
+ // axes.
74
+ //
75
+ var x1p = cos_phi*(x1-x2)/2 + sin_phi*(y1-y2)/2;
76
+ var y1p = -sin_phi*(x1-x2)/2 + cos_phi*(y1-y2)/2;
77
+
78
+ var rx_sq = rx * rx;
79
+ var ry_sq = ry * ry;
80
+ var x1p_sq = x1p * x1p;
81
+ var y1p_sq = y1p * y1p;
82
+
83
+ // Step 2.
84
+ //
85
+ // Compute coordinates of the centre of this ellipse (cx', cy')
86
+ // in the new coordinate system.
87
+ //
88
+ var radicant = (rx_sq * ry_sq) - (rx_sq * y1p_sq) - (ry_sq * x1p_sq);
89
+
90
+ if (radicant < 0) {
91
+ // due to rounding errors it might be e.g. -1.3877787807814457e-17
92
+ radicant = 0;
93
+ }
94
+
95
+ radicant /= (rx_sq * y1p_sq) + (ry_sq * x1p_sq);
96
+ radicant = Math.sqrt(radicant) * (fa === fs ? -1 : 1);
97
+
98
+ var cxp = radicant * rx/ry * y1p;
99
+ var cyp = radicant * -ry/rx * x1p;
100
+
101
+ // Step 3.
102
+ //
103
+ // Transform back to get centre coordinates (cx, cy) in the original
104
+ // coordinate system.
105
+ //
106
+ var cx = cos_phi*cxp - sin_phi*cyp + (x1+x2)/2;
107
+ var cy = sin_phi*cxp + cos_phi*cyp + (y1+y2)/2;
108
+
109
+ // Step 4.
110
+ //
111
+ // Compute angles (theta1, delta_theta).
112
+ //
113
+ var v1x = (x1p - cxp) / rx;
114
+ var v1y = (y1p - cyp) / ry;
115
+ var v2x = (-x1p - cxp) / rx;
116
+ var v2y = (-y1p - cyp) / ry;
117
+
118
+ var theta1 = vector_angle(1, 0, v1x, v1y);
119
+ var delta_theta = vector_angle(v1x, v1y, v2x, v2y);
120
+
121
+ if (fs === 0 && delta_theta > 0) {
122
+ delta_theta -= TAU;
123
+ }
124
+ if (fs === 1 && delta_theta < 0) {
125
+ delta_theta += TAU;
126
+ }
127
+
128
+ return [ cx, cy, theta1, delta_theta ];
129
+ }
130
+
131
+ //
132
+ // Approximate one unit arc segment with bézier curves,
133
+ // see http://math.stackexchange.com/questions/873224
134
+ //
135
+ function approximate_unit_arc(theta1, delta_theta) {
136
+ var alpha = 4/3 * Math.tan(delta_theta/4);
137
+
138
+ var x1 = Math.cos(theta1);
139
+ var y1 = Math.sin(theta1);
140
+ var x2 = Math.cos(theta1 + delta_theta);
141
+ var y2 = Math.sin(theta1 + delta_theta);
142
+
143
+ return [ x1, y1, x1 - y1*alpha, y1 + x1*alpha, x2 + y2*alpha, y2 - x2*alpha, x2, y2 ];
144
+ }
145
+
146
+ module.exports = function a2c(x1, y1, x2, y2, fa, fs, rx, ry, phi) {
147
+ var sin_phi = Math.sin(phi * TAU / 360);
148
+ var cos_phi = Math.cos(phi * TAU / 360);
149
+
150
+ // Make sure radii are valid
151
+ //
152
+ var x1p = cos_phi*(x1-x2)/2 + sin_phi*(y1-y2)/2;
153
+ var y1p = -sin_phi*(x1-x2)/2 + cos_phi*(y1-y2)/2;
154
+
155
+ if (x1p === 0 && y1p === 0) {
156
+ // we're asked to draw line to itself
157
+ return [];
158
+ }
159
+
160
+ if (rx === 0 || ry === 0) {
161
+ // one of the radii is zero
162
+ return [];
163
+ }
164
+
165
+
166
+ // Compensate out-of-range radii
167
+ //
168
+ rx = Math.abs(rx);
169
+ ry = Math.abs(ry);
170
+
171
+ var lambda = (x1p * x1p) / (rx * rx) + (y1p * y1p) / (ry * ry);
172
+ if (lambda > 1) {
173
+ rx *= Math.sqrt(lambda);
174
+ ry *= Math.sqrt(lambda);
175
+ }
176
+
177
+
178
+ // Get center parameters (cx, cy, theta1, delta_theta)
179
+ //
180
+ var cc = get_arc_center(x1, y1, x2, y2, fa, fs, rx, ry, sin_phi, cos_phi);
181
+
182
+ var result = [];
183
+ var theta1 = cc[2];
184
+ var delta_theta = cc[3];
185
+
186
+ // Split an arc to multiple segments, so each segment
187
+ // will be less than τ/4 (= 90°)
188
+ //
189
+ var segments = Math.max(Math.ceil(Math.abs(delta_theta) / (TAU / 4)), 1);
190
+ delta_theta /= segments;
191
+
192
+ for (var i = 0; i < segments; i++) {
193
+ result.push(approximate_unit_arc(theta1, delta_theta));
194
+ theta1 += delta_theta;
195
+ }
196
+
197
+ // We have a bezier approximation of a unit circle,
198
+ // now need to transform back to the original ellipse
199
+ //
200
+ return result.map(function (curve) {
201
+ for (var i = 0; i < curve.length; i += 2) {
202
+ var x = curve[i + 0];
203
+ var y = curve[i + 1];
204
+
205
+ // scale
206
+ x *= rx;
207
+ y *= ry;
208
+
209
+ // rotate
210
+ var xp = cos_phi*x - sin_phi*y;
211
+ var yp = sin_phi*x + cos_phi*y;
212
+
213
+ // translate
214
+ curve[i + 0] = xp + cc[0];
215
+ curve[i + 1] = yp + cc[1];
216
+ }
217
+
218
+ return curve;
219
+ });
220
+ };
221
+
222
+ },{}],3:[function(require,module,exports){
223
+ 'use strict';
224
+
225
+ /* eslint-disable space-infix-ops */
226
+
227
+ // The precision used to consider an ellipse as a circle
228
+ //
229
+ var epsilon = 0.0000000001;
230
+
231
+ // To convert degree in radians
232
+ //
233
+ var torad = Math.PI / 180;
234
+
235
+ // Class constructor :
236
+ // an ellipse centred at 0 with radii rx,ry and x - axis - angle ax.
237
+ //
238
+ function Ellipse(rx, ry, ax) {
239
+ if (!(this instanceof Ellipse)) { return new Ellipse(rx, ry, ax); }
240
+ this.rx = rx;
241
+ this.ry = ry;
242
+ this.ax = ax;
243
+ }
244
+
245
+ // Apply a linear transform m to the ellipse
246
+ // m is an array representing a matrix :
247
+ // - -
248
+ // | m[0] m[2] |
249
+ // | m[1] m[3] |
250
+ // - -
251
+ //
252
+ Ellipse.prototype.transform = function (m) {
253
+ // We consider the current ellipse as image of the unit circle
254
+ // by first scale(rx,ry) and then rotate(ax) ...
255
+ // So we apply ma = m x rotate(ax) x scale(rx,ry) to the unit circle.
256
+ var c = Math.cos(this.ax * torad), s = Math.sin(this.ax * torad);
257
+ var ma = [
258
+ this.rx * (m[0]*c + m[2]*s),
259
+ this.rx * (m[1]*c + m[3]*s),
260
+ this.ry * (-m[0]*s + m[2]*c),
261
+ this.ry * (-m[1]*s + m[3]*c)
262
+ ];
263
+
264
+ // ma * transpose(ma) = [ J L ]
265
+ // [ L K ]
266
+ // L is calculated later (if the image is not a circle)
267
+ var J = ma[0]*ma[0] + ma[2]*ma[2],
268
+ K = ma[1]*ma[1] + ma[3]*ma[3];
269
+
270
+ // the discriminant of the characteristic polynomial of ma * transpose(ma)
271
+ var D = ((ma[0]-ma[3])*(ma[0]-ma[3]) + (ma[2]+ma[1])*(ma[2]+ma[1])) *
272
+ ((ma[0]+ma[3])*(ma[0]+ma[3]) + (ma[2]-ma[1])*(ma[2]-ma[1]));
273
+
274
+ // the "mean eigenvalue"
275
+ var JK = (J + K) / 2;
276
+
277
+ // check if the image is (almost) a circle
278
+ if (D < epsilon * JK) {
279
+ // if it is
280
+ this.rx = this.ry = Math.sqrt(JK);
281
+ this.ax = 0;
282
+ return this;
283
+ }
284
+
285
+ // if it is not a circle
286
+ var L = ma[0]*ma[1] + ma[2]*ma[3];
287
+
288
+ D = Math.sqrt(D);
289
+
290
+ // {l1,l2} = the two eigen values of ma * transpose(ma)
291
+ var l1 = JK + D/2,
292
+ l2 = JK - D/2;
293
+ // the x - axis - rotation angle is the argument of the l1 - eigenvector
294
+ this.ax = (Math.abs(L) < epsilon && Math.abs(l1 - K) < epsilon) ?
295
+ 90
296
+ :
297
+ Math.atan(Math.abs(L) > Math.abs(l1 - K) ?
298
+ (l1 - J) / L
299
+ :
300
+ L / (l1 - K)
301
+ ) * 180 / Math.PI;
302
+
303
+ // if ax > 0 => rx = sqrt(l1), ry = sqrt(l2), else exchange axes and ax += 90
304
+ if (this.ax >= 0) {
305
+ // if ax in [0,90]
306
+ this.rx = Math.sqrt(l1);
307
+ this.ry = Math.sqrt(l2);
308
+ } else {
309
+ // if ax in ]-90,0[ => exchange axes
310
+ this.ax += 90;
311
+ this.rx = Math.sqrt(l2);
312
+ this.ry = Math.sqrt(l1);
313
+ }
314
+
315
+ return this;
316
+ };
317
+
318
+ // Check if the ellipse is (almost) degenerate, i.e. rx = 0 or ry = 0
319
+ //
320
+ Ellipse.prototype.isDegenerate = function () {
321
+ return (this.rx < epsilon * this.ry || this.ry < epsilon * this.rx);
322
+ };
323
+
324
+ module.exports = Ellipse;
325
+
326
+ },{}],4:[function(require,module,exports){
327
+ 'use strict';
328
+
329
+ // combine 2 matrixes
330
+ // m1, m2 - [a, b, c, d, e, g]
331
+ //
332
+ function combine(m1, m2) {
333
+ return [
334
+ m1[0] * m2[0] + m1[2] * m2[1],
335
+ m1[1] * m2[0] + m1[3] * m2[1],
336
+ m1[0] * m2[2] + m1[2] * m2[3],
337
+ m1[1] * m2[2] + m1[3] * m2[3],
338
+ m1[0] * m2[4] + m1[2] * m2[5] + m1[4],
339
+ m1[1] * m2[4] + m1[3] * m2[5] + m1[5]
340
+ ];
341
+ }
342
+
343
+
344
+ function Matrix() {
345
+ if (!(this instanceof Matrix)) { return new Matrix(); }
346
+ this.queue = []; // list of matrixes to apply
347
+ this.cache = null; // combined matrix cache
348
+ }
349
+
350
+
351
+ Matrix.prototype.matrix = function (m) {
352
+ if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0) {
353
+ return this;
354
+ }
355
+ this.cache = null;
356
+ this.queue.push(m);
357
+ return this;
358
+ };
359
+
360
+
361
+ Matrix.prototype.translate = function (tx, ty) {
362
+ if (tx !== 0 || ty !== 0) {
363
+ this.cache = null;
364
+ this.queue.push([ 1, 0, 0, 1, tx, ty ]);
365
+ }
366
+ return this;
367
+ };
368
+
369
+
370
+ Matrix.prototype.scale = function (sx, sy) {
371
+ if (sx !== 1 || sy !== 1) {
372
+ this.cache = null;
373
+ this.queue.push([ sx, 0, 0, sy, 0, 0 ]);
374
+ }
375
+ return this;
376
+ };
377
+
378
+
379
+ Matrix.prototype.rotate = function (angle, rx, ry) {
380
+ var rad, cos, sin;
381
+
382
+ if (angle !== 0) {
383
+ this.translate(rx, ry);
384
+
385
+ rad = angle * Math.PI / 180;
386
+ cos = Math.cos(rad);
387
+ sin = Math.sin(rad);
388
+
389
+ this.queue.push([ cos, sin, -sin, cos, 0, 0 ]);
390
+ this.cache = null;
391
+
392
+ this.translate(-rx, -ry);
393
+ }
394
+ return this;
395
+ };
396
+
397
+
398
+ Matrix.prototype.skewX = function (angle) {
399
+ if (angle !== 0) {
400
+ this.cache = null;
401
+ this.queue.push([ 1, 0, Math.tan(angle * Math.PI / 180), 1, 0, 0 ]);
402
+ }
403
+ return this;
404
+ };
405
+
406
+
407
+ Matrix.prototype.skewY = function (angle) {
408
+ if (angle !== 0) {
409
+ this.cache = null;
410
+ this.queue.push([ 1, Math.tan(angle * Math.PI / 180), 0, 1, 0, 0 ]);
411
+ }
412
+ return this;
413
+ };
414
+
415
+
416
+ // Flatten queue
417
+ //
418
+ Matrix.prototype.toArray = function () {
419
+ if (this.cache) {
420
+ return this.cache;
421
+ }
422
+
423
+ if (!this.queue.length) {
424
+ this.cache = [ 1, 0, 0, 1, 0, 0 ];
425
+ return this.cache;
426
+ }
427
+
428
+ this.cache = this.queue[0];
429
+
430
+ if (this.queue.length === 1) {
431
+ return this.cache;
432
+ }
433
+
434
+ for (var i = 1; i < this.queue.length; i++) {
435
+ this.cache = combine(this.cache, this.queue[i]);
436
+ }
437
+
438
+ return this.cache;
439
+ };
440
+
441
+
442
+ // Apply list of matrixes to (x,y) point.
443
+ // If `isRelative` set, `translate` component of matrix will be skipped
444
+ //
445
+ Matrix.prototype.calc = function (x, y, isRelative) {
446
+ var m;
447
+
448
+ // Don't change point on empty transforms queue
449
+ if (!this.queue.length) { return [ x, y ]; }
450
+
451
+ // Calculate final matrix, if not exists
452
+ //
453
+ // NB. if you deside to apply transforms to point one-by-one,
454
+ // they should be taken in reverse order
455
+
456
+ if (!this.cache) {
457
+ this.cache = this.toArray();
458
+ }
459
+
460
+ m = this.cache;
461
+
462
+ // Apply matrix to point
463
+ return [
464
+ x * m[0] + y * m[2] + (isRelative ? 0 : m[4]),
465
+ x * m[1] + y * m[3] + (isRelative ? 0 : m[5])
466
+ ];
467
+ };
468
+
469
+
470
+ module.exports = Matrix;
471
+
472
+ },{}],5:[function(require,module,exports){
473
+ 'use strict';
474
+
475
+
476
+ var paramCounts = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 };
477
+
478
+ var SPECIAL_SPACES = [
479
+ 0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006,
480
+ 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF
481
+ ];
482
+
483
+ function isSpace(ch) {
484
+ return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029) || // Line terminators
485
+ // White spaces
486
+ (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) ||
487
+ (ch >= 0x1680 && SPECIAL_SPACES.indexOf(ch) >= 0);
488
+ }
489
+
490
+ function isCommand(code) {
491
+ /*eslint-disable no-bitwise*/
492
+ switch (code | 0x20) {
493
+ case 0x6D/* m */:
494
+ case 0x7A/* z */:
495
+ case 0x6C/* l */:
496
+ case 0x68/* h */:
497
+ case 0x76/* v */:
498
+ case 0x63/* c */:
499
+ case 0x73/* s */:
500
+ case 0x71/* q */:
501
+ case 0x74/* t */:
502
+ case 0x61/* a */:
503
+ case 0x72/* r */:
504
+ return true;
505
+ }
506
+ return false;
507
+ }
508
+
509
+ function isDigit(code) {
510
+ return (code >= 48 && code <= 57); // 0..9
511
+ }
512
+
513
+ function isDigitStart(code) {
514
+ return (code >= 48 && code <= 57) || /* 0..9 */
515
+ code === 0x2B || /* + */
516
+ code === 0x2D || /* - */
517
+ code === 0x2E; /* . */
518
+ }
519
+
520
+
521
+ function State(path) {
522
+ this.index = 0;
523
+ this.path = path;
524
+ this.max = path.length;
525
+ this.result = [];
526
+ this.param = 0.0;
527
+ this.err = '';
528
+ this.segmentStart = 0;
529
+ this.data = [];
530
+ }
531
+
532
+ function skipSpaces(state) {
533
+ while (state.index < state.max && isSpace(state.path.charCodeAt(state.index))) {
534
+ state.index++;
535
+ }
536
+ }
537
+
538
+
539
+ function scanParam(state) {
540
+ var start = state.index,
541
+ index = start,
542
+ max = state.max,
543
+ zeroFirst = false,
544
+ hasCeiling = false,
545
+ hasDecimal = false,
546
+ hasDot = false,
547
+ ch;
548
+
549
+ if (index >= max) {
550
+ state.err = 'SvgPath: missed param (at pos ' + index + ')';
551
+ return;
552
+ }
553
+ ch = state.path.charCodeAt(index);
554
+
555
+ if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
556
+ index++;
557
+ ch = (index < max) ? state.path.charCodeAt(index) : 0;
558
+ }
559
+
560
+ // This logic is shamelessly borrowed from Esprima
561
+ // https://github.com/ariya/esprimas
562
+ //
563
+ if (!isDigit(ch) && ch !== 0x2E/* . */) {
564
+ state.err = 'SvgPath: param should start with 0..9 or `.` (at pos ' + index + ')';
565
+ return;
566
+ }
567
+
568
+ if (ch !== 0x2E/* . */) {
569
+ zeroFirst = (ch === 0x30/* 0 */);
570
+ index++;
571
+
572
+ ch = (index < max) ? state.path.charCodeAt(index) : 0;
573
+
574
+ if (zeroFirst && index < max) {
575
+ // decimal number starts with '0' such as '09' is illegal.
576
+ if (ch && isDigit(ch)) {
577
+ state.err = 'SvgPath: numbers started with `0` such as `09` are ilegal (at pos ' + start + ')';
578
+ return;
579
+ }
580
+ }
581
+
582
+ while (index < max && isDigit(state.path.charCodeAt(index))) {
583
+ index++;
584
+ hasCeiling = true;
585
+ }
586
+ ch = (index < max) ? state.path.charCodeAt(index) : 0;
587
+ }
588
+
589
+ if (ch === 0x2E/* . */) {
590
+ hasDot = true;
591
+ index++;
592
+ while (isDigit(state.path.charCodeAt(index))) {
593
+ index++;
594
+ hasDecimal = true;
595
+ }
596
+ ch = (index < max) ? state.path.charCodeAt(index) : 0;
597
+ }
598
+
599
+ if (ch === 0x65/* e */ || ch === 0x45/* E */) {
600
+ if (hasDot && !hasCeiling && !hasDecimal) {
601
+ state.err = 'SvgPath: invalid float exponent (at pos ' + index + ')';
602
+ return;
603
+ }
604
+
605
+ index++;
606
+
607
+ ch = (index < max) ? state.path.charCodeAt(index) : 0;
608
+ if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
609
+ index++;
610
+ }
611
+ if (index < max && isDigit(state.path.charCodeAt(index))) {
612
+ while (index < max && isDigit(state.path.charCodeAt(index))) {
613
+ index++;
614
+ }
615
+ } else {
616
+ state.err = 'SvgPath: invalid float exponent (at pos ' + index + ')';
617
+ return;
618
+ }
619
+ }
620
+
621
+ state.index = index;
622
+ state.param = parseFloat(state.path.slice(start, index)) + 0.0;
623
+ }
624
+
625
+
626
+ function finalizeSegment(state) {
627
+ var cmd, cmdLC;
628
+
629
+ // Process duplicated commands (without comand name)
630
+
631
+ // This logic is shamelessly borrowed from Raphael
632
+ // https://github.com/DmitryBaranovskiy/raphael/
633
+ //
634
+ cmd = state.path[state.segmentStart];
635
+ cmdLC = cmd.toLowerCase();
636
+
637
+ var params = state.data;
638
+
639
+ if (cmdLC === 'm' && params.length > 2) {
640
+ state.result.push([ cmd, params[0], params[1] ]);
641
+ params = params.slice(2);
642
+ cmdLC = 'l';
643
+ cmd = (cmd === 'm') ? 'l' : 'L';
644
+ }
645
+
646
+ if (cmdLC === 'r') {
647
+ state.result.push([ cmd ].concat(params));
648
+ } else {
649
+
650
+ while (params.length >= paramCounts[cmdLC]) {
651
+ state.result.push([ cmd ].concat(params.splice(0, paramCounts[cmdLC])));
652
+ if (!paramCounts[cmdLC]) {
653
+ break;
654
+ }
655
+ }
656
+ }
657
+ }
658
+
659
+
660
+ function scanSegment(state) {
661
+ var max = state.max,
662
+ cmdCode, comma_found, need_params, i;
663
+
664
+ state.segmentStart = state.index;
665
+ cmdCode = state.path.charCodeAt(state.index);
666
+
667
+ if (!isCommand(cmdCode)) {
668
+ state.err = 'SvgPath: bad command ' + state.path[state.index] + ' (at pos ' + state.index + ')';
669
+ return;
670
+ }
671
+
672
+ need_params = paramCounts[state.path[state.index].toLowerCase()];
673
+
674
+ state.index++;
675
+ skipSpaces(state);
676
+
677
+ state.data = [];
678
+
679
+ if (!need_params) {
680
+ // Z
681
+ finalizeSegment(state);
682
+ return;
683
+ }
684
+
685
+ comma_found = false;
686
+
687
+ for (;;) {
688
+ for (i = need_params; i > 0; i--) {
689
+ scanParam(state);
690
+ if (state.err.length) {
691
+ return;
692
+ }
693
+ state.data.push(state.param);
694
+
695
+ skipSpaces(state);
696
+ comma_found = false;
697
+
698
+ if (state.index < max && state.path.charCodeAt(state.index) === 0x2C/* , */) {
699
+ state.index++;
700
+ skipSpaces(state);
701
+ comma_found = true;
702
+ }
703
+ }
704
+
705
+ // after ',' param is mandatory
706
+ if (comma_found) {
707
+ continue;
708
+ }
709
+
710
+ if (state.index >= state.max) {
711
+ break;
712
+ }
713
+
714
+ // Stop on next segment
715
+ if (!isDigitStart(state.path.charCodeAt(state.index))) {
716
+ break;
717
+ }
718
+ }
719
+
720
+ finalizeSegment(state);
721
+ }
722
+
723
+
724
+ /* Returns array of segments:
725
+ *
726
+ * [
727
+ * [ command, coord1, coord2, ... ]
728
+ * ]
729
+ */
730
+ module.exports = function pathParse(svgPath) {
731
+ var state = new State(svgPath);
732
+ var max = state.max;
733
+
734
+ skipSpaces(state);
735
+
736
+ while (state.index < max && !state.err.length) {
737
+ scanSegment(state);
738
+ }
739
+
740
+ if (state.err.length) {
741
+ state.result = [];
742
+
743
+ } else if (state.result.length) {
744
+
745
+ if ('mM'.indexOf(state.result[0][0]) < 0) {
746
+ state.err = 'SvgPath: string should start with `M` or `m`';
747
+ state.result = [];
748
+ } else {
749
+ state.result[0][0] = 'M';
750
+ }
751
+ }
752
+
753
+ return {
754
+ err: state.err,
755
+ segments: state.result
756
+ };
757
+ };
758
+
759
+ },{}],6:[function(require,module,exports){
760
+ // SVG Path transformations library
761
+ //
762
+ // Usage:
763
+ //
764
+ // SvgPath('...')
765
+ // .translate(-150, -100)
766
+ // .scale(0.5)
767
+ // .translate(-150, -100)
768
+ // .toFixed(1)
769
+ // .toString()
770
+ //
771
+
772
+ 'use strict';
773
+
774
+
775
+ var pathParse = require('./path_parse');
776
+ var transformParse = require('./transform_parse');
777
+ var matrix = require('./matrix');
778
+ var a2c = require('./a2c');
779
+ var ellipse = require('./ellipse');
780
+
781
+
782
+ // Class constructor
783
+ //
784
+ function SvgPath(path) {
785
+ if (!(this instanceof SvgPath)) { return new SvgPath(path); }
786
+
787
+ var pstate = pathParse(path);
788
+
789
+ // Array of path segments.
790
+ // Each segment is array [command, param1, param2, ...]
791
+ this.segments = pstate.segments;
792
+
793
+ // Error message on parse error.
794
+ this.err = pstate.err;
795
+
796
+ // Transforms stack for lazy evaluation
797
+ this.__stack = [];
798
+ }
799
+
800
+
801
+ SvgPath.prototype.__matrix = function (m) {
802
+ var self = this, i;
803
+
804
+ // Quick leave for empty matrix
805
+ if (!m.queue.length) { return; }
806
+
807
+ this.iterate(function (s, index, x, y) {
808
+ var p, result, name, isRelative;
809
+
810
+ switch (s[0]) {
811
+
812
+ // Process 'assymetric' commands separately
813
+ case 'v':
814
+ p = m.calc(0, s[1], true);
815
+ result = (p[0] === 0) ? [ 'v', p[1] ] : [ 'l', p[0], p[1] ];
816
+ break;
817
+
818
+ case 'V':
819
+ p = m.calc(x, s[1], false);
820
+ result = (p[0] === m.calc(x, y, false)[0]) ? [ 'V', p[1] ] : [ 'L', p[0], p[1] ];
821
+ break;
822
+
823
+ case 'h':
824
+ p = m.calc(s[1], 0, true);
825
+ result = (p[1] === 0) ? [ 'h', p[0] ] : [ 'l', p[0], p[1] ];
826
+ break;
827
+
828
+ case 'H':
829
+ p = m.calc(s[1], y, false);
830
+ result = (p[1] === m.calc(x, y, false)[1]) ? [ 'H', p[0] ] : [ 'L', p[0], p[1] ];
831
+ break;
832
+
833
+ case 'a':
834
+ case 'A':
835
+ // ARC is: ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]
836
+
837
+ // Drop segment if arc is empty (end point === start point)
838
+ /*if ((s[0] === 'A' && s[6] === x && s[7] === y) ||
839
+ (s[0] === 'a' && s[6] === 0 && s[7] === 0)) {
840
+ return [];
841
+ }*/
842
+
843
+ // Transform rx, ry and the x-axis-rotation
844
+ var ma = m.toArray();
845
+ var e = ellipse(s[1], s[2], s[3]).transform(ma);
846
+
847
+ // flip sweep-flag if matrix is not orientation-preserving
848
+ if (ma[0] * ma[3] - ma[1] * ma[2] < 0) {
849
+ s[5] = s[5] ? '0' : '1';
850
+ }
851
+
852
+ // Transform end point as usual (without translation for relative notation)
853
+ p = m.calc(s[6], s[7], s[0] === 'a');
854
+
855
+ // Empty arcs can be ignored by renderer, but should not be dropped
856
+ // to avoid collisions with `S A S` and so on. Replace with empty line.
857
+ if ((s[0] === 'A' && s[6] === x && s[7] === y) ||
858
+ (s[0] === 'a' && s[6] === 0 && s[7] === 0)) {
859
+ result = [ s[0] === 'a' ? 'l' : 'L', p[0], p[1] ];
860
+ break;
861
+ }
862
+
863
+ // if the resulting ellipse is (almost) a segment ...
864
+ if (e.isDegenerate()) {
865
+ // replace the arc by a line
866
+ result = [ s[0] === 'a' ? 'l' : 'L', p[0], p[1] ];
867
+ } else {
868
+ // if it is a real ellipse
869
+ // s[0], s[4] and s[5] are not modified
870
+ result = [ s[0], e.rx, e.ry, e.ax, s[4], s[5], p[0], p[1] ];
871
+ }
872
+
873
+ break;
874
+
875
+ case 'm':
876
+ // Edge case. The very first `m` should be processed as absolute, if happens.
877
+ // Make sense for coord shift transforms.
878
+ isRelative = index > 0;
879
+
880
+ p = m.calc(s[1], s[2], isRelative);
881
+ result = [ 'm', p[0], p[1] ];
882
+ break;
883
+
884
+ default:
885
+ name = s[0];
886
+ result = [ name ];
887
+ isRelative = (name.toLowerCase() === name);
888
+
889
+ // Apply transformations to the segment
890
+ for (i = 1; i < s.length; i += 2) {
891
+ p = m.calc(s[i], s[i + 1], isRelative);
892
+ result.push(p[0], p[1]);
893
+ }
894
+ }
895
+
896
+ self.segments[index] = result;
897
+ }, true);
898
+ };
899
+
900
+
901
+ // Apply stacked commands
902
+ //
903
+ SvgPath.prototype.__evaluateStack = function () {
904
+ var m, i;
905
+
906
+ if (!this.__stack.length) { return; }
907
+
908
+ if (this.__stack.length === 1) {
909
+ this.__matrix(this.__stack[0]);
910
+ this.__stack = [];
911
+ return;
912
+ }
913
+
914
+ m = matrix();
915
+ i = this.__stack.length;
916
+
917
+ while (--i >= 0) {
918
+ m.matrix(this.__stack[i].toArray());
919
+ }
920
+
921
+ this.__matrix(m);
922
+ this.__stack = [];
923
+ };
924
+
925
+
926
+ // Convert processed SVG Path back to string
927
+ //
928
+ SvgPath.prototype.toString = function () {
929
+ var elements = [], skipCmd, cmd;
930
+
931
+ this.__evaluateStack();
932
+
933
+ for (var i = 0; i < this.segments.length; i++) {
934
+ // remove repeating commands names
935
+ cmd = this.segments[i][0];
936
+ skipCmd = i > 0 && cmd !== 'm' && cmd !== 'M' && cmd === this.segments[i - 1][0];
937
+ elements = elements.concat(skipCmd ? this.segments[i].slice(1) : this.segments[i]);
938
+ }
939
+
940
+ return elements.join(' ')
941
+ // Optimizations: remove spaces around commands & before `-`
942
+ //
943
+ // We could also remove leading zeros for `0.5`-like values,
944
+ // but their count is too small to spend time for.
945
+ .replace(/ ?([achlmqrstvz]) ?/gi, '$1')
946
+ .replace(/ \-/g, '-')
947
+ // workaround for FontForge SVG importing bug
948
+ .replace(/zm/g, 'z m');
949
+ };
950
+
951
+
952
+ // Translate path to (x [, y])
953
+ //
954
+ SvgPath.prototype.translate = function (x, y) {
955
+ this.__stack.push(matrix().translate(x, y || 0));
956
+ return this;
957
+ };
958
+
959
+
960
+ // Scale path to (sx [, sy])
961
+ // sy = sx if not defined
962
+ //
963
+ SvgPath.prototype.scale = function (sx, sy) {
964
+ this.__stack.push(matrix().scale(sx, (!sy && (sy !== 0)) ? sx : sy));
965
+ return this;
966
+ };
967
+
968
+
969
+ // Rotate path around point (sx [, sy])
970
+ // sy = sx if not defined
971
+ //
972
+ SvgPath.prototype.rotate = function (angle, rx, ry) {
973
+ this.__stack.push(matrix().rotate(angle, rx || 0, ry || 0));
974
+ return this;
975
+ };
976
+
977
+
978
+ // Skew path along the X axis by `degrees` angle
979
+ //
980
+ SvgPath.prototype.skewX = function (degrees) {
981
+ this.__stack.push(matrix().skewX(degrees));
982
+ return this;
983
+ };
984
+
985
+
986
+ // Skew path along the Y axis by `degrees` angle
987
+ //
988
+ SvgPath.prototype.skewY = function (degrees) {
989
+ this.__stack.push(matrix().skewY(degrees));
990
+ return this;
991
+ };
992
+
993
+
994
+ // Apply matrix transform (array of 6 elements)
995
+ //
996
+ SvgPath.prototype.matrix = function (m) {
997
+ this.__stack.push(matrix().matrix(m));
998
+ return this;
999
+ };
1000
+
1001
+
1002
+ // Transform path according to "transform" attr of SVG spec
1003
+ //
1004
+ SvgPath.prototype.transform = function (transformString) {
1005
+ if (!transformString.trim()) {
1006
+ return this;
1007
+ }
1008
+ this.__stack.push(transformParse(transformString));
1009
+ return this;
1010
+ };
1011
+
1012
+
1013
+ // Round coords with given decimal precition.
1014
+ // 0 by default (to integers)
1015
+ //
1016
+ SvgPath.prototype.round = function (d) {
1017
+ var contourStartDeltaX = 0, contourStartDeltaY = 0, deltaX = 0, deltaY = 0, l;
1018
+
1019
+ d = d || 0;
1020
+
1021
+ this.__evaluateStack();
1022
+
1023
+ this.segments.forEach(function (s) {
1024
+ var isRelative = (s[0].toLowerCase() === s[0]);
1025
+
1026
+ switch (s[0]) {
1027
+ case 'H':
1028
+ case 'h':
1029
+ if (isRelative) { s[1] += deltaX; }
1030
+ deltaX = s[1] - s[1].toFixed(d);
1031
+ s[1] = +s[1].toFixed(d);
1032
+ return;
1033
+
1034
+ case 'V':
1035
+ case 'v':
1036
+ if (isRelative) { s[1] += deltaY; }
1037
+ deltaY = s[1] - s[1].toFixed(d);
1038
+ s[1] = +s[1].toFixed(d);
1039
+ return;
1040
+
1041
+ case 'Z':
1042
+ case 'z':
1043
+ deltaX = contourStartDeltaX;
1044
+ deltaY = contourStartDeltaY;
1045
+ return;
1046
+
1047
+ case 'M':
1048
+ case 'm':
1049
+ if (isRelative) {
1050
+ s[1] += deltaX;
1051
+ s[2] += deltaY;
1052
+ }
1053
+
1054
+ deltaX = s[1] - s[1].toFixed(d);
1055
+ deltaY = s[2] - s[2].toFixed(d);
1056
+
1057
+ contourStartDeltaX = deltaX;
1058
+ contourStartDeltaY = deltaY;
1059
+
1060
+ s[1] = +s[1].toFixed(d);
1061
+ s[2] = +s[2].toFixed(d);
1062
+ return;
1063
+
1064
+ case 'A':
1065
+ case 'a':
1066
+ // [cmd, rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]
1067
+ if (isRelative) {
1068
+ s[6] += deltaX;
1069
+ s[7] += deltaY;
1070
+ }
1071
+
1072
+ deltaX = s[6] - s[6].toFixed(d);
1073
+ deltaY = s[7] - s[7].toFixed(d);
1074
+
1075
+ s[1] = +s[1].toFixed(d);
1076
+ s[2] = +s[2].toFixed(d);
1077
+ s[3] = +s[3].toFixed(d + 2); // better precision for rotation
1078
+ s[6] = +s[6].toFixed(d);
1079
+ s[7] = +s[7].toFixed(d);
1080
+ return;
1081
+
1082
+ default:
1083
+ // a c l q s t
1084
+ l = s.length;
1085
+
1086
+ if (isRelative) {
1087
+ s[l - 2] += deltaX;
1088
+ s[l - 1] += deltaY;
1089
+ }
1090
+
1091
+ deltaX = s[l - 2] - s[l - 2].toFixed(d);
1092
+ deltaY = s[l - 1] - s[l - 1].toFixed(d);
1093
+
1094
+ s.forEach(function (val, i) {
1095
+ if (!i) { return; }
1096
+ s[i] = +s[i].toFixed(d);
1097
+ });
1098
+ return;
1099
+ }
1100
+ });
1101
+
1102
+ return this;
1103
+ };
1104
+
1105
+
1106
+ // Apply iterator function to all segments. If function returns result,
1107
+ // current segment will be replaced to array of returned segments.
1108
+ // If empty array is returned, current regment will be deleted.
1109
+ //
1110
+ SvgPath.prototype.iterate = function (iterator, keepLazyStack) {
1111
+ var segments = this.segments,
1112
+ replacements = {},
1113
+ needReplace = false,
1114
+ lastX = 0,
1115
+ lastY = 0,
1116
+ countourStartX = 0,
1117
+ countourStartY = 0;
1118
+ var i, j, newSegments;
1119
+
1120
+ if (!keepLazyStack) {
1121
+ this.__evaluateStack();
1122
+ }
1123
+
1124
+ segments.forEach(function (s, index) {
1125
+
1126
+ var res = iterator(s, index, lastX, lastY);
1127
+
1128
+ if (Array.isArray(res)) {
1129
+ replacements[index] = res;
1130
+ needReplace = true;
1131
+ }
1132
+
1133
+ var isRelative = (s[0] === s[0].toLowerCase());
1134
+
1135
+ // calculate absolute X and Y
1136
+ switch (s[0]) {
1137
+ case 'm':
1138
+ case 'M':
1139
+ lastX = s[1] + (isRelative ? lastX : 0);
1140
+ lastY = s[2] + (isRelative ? lastY : 0);
1141
+ countourStartX = lastX;
1142
+ countourStartY = lastY;
1143
+ return;
1144
+
1145
+ case 'h':
1146
+ case 'H':
1147
+ lastX = s[1] + (isRelative ? lastX : 0);
1148
+ return;
1149
+
1150
+ case 'v':
1151
+ case 'V':
1152
+ lastY = s[1] + (isRelative ? lastY : 0);
1153
+ return;
1154
+
1155
+ case 'z':
1156
+ case 'Z':
1157
+ // That make sence for multiple contours
1158
+ lastX = countourStartX;
1159
+ lastY = countourStartY;
1160
+ return;
1161
+
1162
+ default:
1163
+ lastX = s[s.length - 2] + (isRelative ? lastX : 0);
1164
+ lastY = s[s.length - 1] + (isRelative ? lastY : 0);
1165
+ }
1166
+ });
1167
+
1168
+ // Replace segments if iterator return results
1169
+
1170
+ if (!needReplace) { return this; }
1171
+
1172
+ newSegments = [];
1173
+
1174
+ for (i = 0; i < segments.length; i++) {
1175
+ if (typeof replacements[i] !== 'undefined') {
1176
+ for (j = 0; j < replacements[i].length; j++) {
1177
+ newSegments.push(replacements[i][j]);
1178
+ }
1179
+ } else {
1180
+ newSegments.push(segments[i]);
1181
+ }
1182
+ }
1183
+
1184
+ this.segments = newSegments;
1185
+
1186
+ return this;
1187
+ };
1188
+
1189
+
1190
+ // Converts segments from relative to absolute
1191
+ //
1192
+ SvgPath.prototype.abs = function () {
1193
+
1194
+ this.iterate(function (s, index, x, y) {
1195
+ var name = s[0],
1196
+ nameUC = name.toUpperCase(),
1197
+ i;
1198
+
1199
+ // Skip absolute commands
1200
+ if (name === nameUC) { return; }
1201
+
1202
+ s[0] = nameUC;
1203
+
1204
+ switch (name) {
1205
+ case 'v':
1206
+ // v has shifted coords parity
1207
+ s[1] += y;
1208
+ return;
1209
+
1210
+ case 'a':
1211
+ // ARC is: ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]
1212
+ // touch x, y only
1213
+ s[6] += x;
1214
+ s[7] += y;
1215
+ return;
1216
+
1217
+ default:
1218
+ for (i = 1; i < s.length; i++) {
1219
+ s[i] += i % 2 ? x : y; // odd values are X, even - Y
1220
+ }
1221
+ }
1222
+ }, true);
1223
+
1224
+ return this;
1225
+ };
1226
+
1227
+
1228
+ // Converts segments from absolute to relative
1229
+ //
1230
+ SvgPath.prototype.rel = function () {
1231
+
1232
+ this.iterate(function (s, index, x, y) {
1233
+ var name = s[0],
1234
+ nameLC = name.toLowerCase(),
1235
+ i;
1236
+
1237
+ // Skip relative commands
1238
+ if (name === nameLC) { return; }
1239
+
1240
+ // Don't touch the first M to avoid potential confusions.
1241
+ if (index === 0 && name === 'M') { return; }
1242
+
1243
+ s[0] = nameLC;
1244
+
1245
+ switch (name) {
1246
+ case 'V':
1247
+ // V has shifted coords parity
1248
+ s[1] -= y;
1249
+ return;
1250
+
1251
+ case 'A':
1252
+ // ARC is: ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]
1253
+ // touch x, y only
1254
+ s[6] -= x;
1255
+ s[7] -= y;
1256
+ return;
1257
+
1258
+ default:
1259
+ for (i = 1; i < s.length; i++) {
1260
+ s[i] -= i % 2 ? x : y; // odd values are X, even - Y
1261
+ }
1262
+ }
1263
+ }, true);
1264
+
1265
+ return this;
1266
+ };
1267
+
1268
+
1269
+ // Converts arcs to cubic bézier curves
1270
+ //
1271
+ SvgPath.prototype.unarc = function () {
1272
+ this.iterate(function (s, index, x, y) {
1273
+ var new_segments, nextX, nextY, result = [], name = s[0];
1274
+
1275
+ // Skip anything except arcs
1276
+ if (name !== 'A' && name !== 'a') { return null; }
1277
+
1278
+ if (name === 'a') {
1279
+ // convert relative arc coordinates to absolute
1280
+ nextX = x + s[6];
1281
+ nextY = y + s[7];
1282
+ } else {
1283
+ nextX = s[6];
1284
+ nextY = s[7];
1285
+ }
1286
+
1287
+ new_segments = a2c(x, y, nextX, nextY, s[4], s[5], s[1], s[2], s[3]);
1288
+
1289
+ // Degenerated arcs can be ignored by renderer, but should not be dropped
1290
+ // to avoid collisions with `S A S` and so on. Replace with empty line.
1291
+ if (new_segments.length === 0) {
1292
+ return [ [ s[0] === 'a' ? 'l' : 'L', s[6], s[7] ] ];
1293
+ }
1294
+
1295
+ new_segments.forEach(function (s) {
1296
+ result.push([ 'C', s[2], s[3], s[4], s[5], s[6], s[7] ]);
1297
+ });
1298
+
1299
+ return result;
1300
+ });
1301
+
1302
+ return this;
1303
+ };
1304
+
1305
+
1306
+ // Converts smooth curves (with missed control point) to generic curves
1307
+ //
1308
+ SvgPath.prototype.unshort = function () {
1309
+ var segments = this.segments;
1310
+ var prevControlX, prevControlY, prevSegment;
1311
+ var curControlX, curControlY;
1312
+
1313
+ // TODO: add lazy evaluation flag when relative commands supported
1314
+
1315
+ this.iterate(function (s, idx, x, y) {
1316
+ var name = s[0], nameUC = name.toUpperCase(), isRelative;
1317
+
1318
+ // First command MUST be M|m, it's safe to skip.
1319
+ // Protect from access to [-1] for sure.
1320
+ if (!idx) { return; }
1321
+
1322
+ if (nameUC === 'T') { // quadratic curve
1323
+ isRelative = (name === 't');
1324
+
1325
+ prevSegment = segments[idx - 1];
1326
+
1327
+ if (prevSegment[0] === 'Q') {
1328
+ prevControlX = prevSegment[1] - x;
1329
+ prevControlY = prevSegment[2] - y;
1330
+ } else if (prevSegment[0] === 'q') {
1331
+ prevControlX = prevSegment[1] - prevSegment[3];
1332
+ prevControlY = prevSegment[2] - prevSegment[4];
1333
+ } else {
1334
+ prevControlX = 0;
1335
+ prevControlY = 0;
1336
+ }
1337
+
1338
+ curControlX = -prevControlX;
1339
+ curControlY = -prevControlY;
1340
+
1341
+ if (!isRelative) {
1342
+ curControlX += x;
1343
+ curControlY += y;
1344
+ }
1345
+
1346
+ segments[idx] = [
1347
+ isRelative ? 'q' : 'Q',
1348
+ curControlX, curControlY,
1349
+ s[1], s[2]
1350
+ ];
1351
+
1352
+ } else if (nameUC === 'S') { // cubic curve
1353
+ isRelative = (name === 's');
1354
+
1355
+ prevSegment = segments[idx - 1];
1356
+
1357
+ if (prevSegment[0] === 'C') {
1358
+ prevControlX = prevSegment[3] - x;
1359
+ prevControlY = prevSegment[4] - y;
1360
+ } else if (prevSegment[0] === 'c') {
1361
+ prevControlX = prevSegment[3] - prevSegment[5];
1362
+ prevControlY = prevSegment[4] - prevSegment[6];
1363
+ } else {
1364
+ prevControlX = 0;
1365
+ prevControlY = 0;
1366
+ }
1367
+
1368
+ curControlX = -prevControlX;
1369
+ curControlY = -prevControlY;
1370
+
1371
+ if (!isRelative) {
1372
+ curControlX += x;
1373
+ curControlY += y;
1374
+ }
1375
+
1376
+ segments[idx] = [
1377
+ isRelative ? 'c' : 'C',
1378
+ curControlX, curControlY,
1379
+ s[1], s[2], s[3], s[4]
1380
+ ];
1381
+ }
1382
+ });
1383
+
1384
+ return this;
1385
+ };
1386
+
1387
+
1388
+ module.exports = SvgPath;
1389
+
1390
+ },{"./a2c":2,"./ellipse":3,"./matrix":4,"./path_parse":5,"./transform_parse":7}],7:[function(require,module,exports){
1391
+ 'use strict';
1392
+
1393
+
1394
+ var Matrix = require('./matrix');
1395
+
1396
+ var operations = {
1397
+ matrix: true,
1398
+ scale: true,
1399
+ rotate: true,
1400
+ translate: true,
1401
+ skewX: true,
1402
+ skewY: true
1403
+ };
1404
+
1405
+ var CMD_SPLIT_RE = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/;
1406
+ var PARAMS_SPLIT_RE = /[\s,]+/;
1407
+
1408
+
1409
+ module.exports = function transformParse(transformString) {
1410
+ var matrix = new Matrix();
1411
+ var cmd, params;
1412
+
1413
+ // Split value into ['', 'translate', '10 50', '', 'scale', '2', '', 'rotate', '-45', '']
1414
+ transformString.split(CMD_SPLIT_RE).forEach(function (item) {
1415
+
1416
+ // Skip empty elements
1417
+ if (!item.length) { return; }
1418
+
1419
+ // remember operation
1420
+ if (typeof operations[item] !== 'undefined') {
1421
+ cmd = item;
1422
+ return;
1423
+ }
1424
+
1425
+ // extract params & att operation to matrix
1426
+ params = item.split(PARAMS_SPLIT_RE).map(function (i) {
1427
+ return +i || 0;
1428
+ });
1429
+
1430
+ // If params count is not correct - ignore command
1431
+ switch (cmd) {
1432
+ case 'matrix':
1433
+ if (params.length === 6) {
1434
+ matrix.matrix(params);
1435
+ }
1436
+ return;
1437
+
1438
+ case 'scale':
1439
+ if (params.length === 1) {
1440
+ matrix.scale(params[0], params[0]);
1441
+ } else if (params.length === 2) {
1442
+ matrix.scale(params[0], params[1]);
1443
+ }
1444
+ return;
1445
+
1446
+ case 'rotate':
1447
+ if (params.length === 1) {
1448
+ matrix.rotate(params[0], 0, 0);
1449
+ } else if (params.length === 3) {
1450
+ matrix.rotate(params[0], params[1], params[2]);
1451
+ }
1452
+ return;
1453
+
1454
+ case 'translate':
1455
+ if (params.length === 1) {
1456
+ matrix.translate(params[0], 0);
1457
+ } else if (params.length === 2) {
1458
+ matrix.translate(params[0], params[1]);
1459
+ }
1460
+ return;
1461
+
1462
+ case 'skewX':
1463
+ if (params.length === 1) {
1464
+ matrix.skewX(params[0]);
1465
+ }
1466
+ return;
1467
+
1468
+ case 'skewY':
1469
+ if (params.length === 1) {
1470
+ matrix.skewY(params[0]);
1471
+ }
1472
+ return;
1473
+ }
1474
+ });
1475
+
1476
+ return matrix;
1477
+ };
1478
+
1479
+ },{"./matrix":4}],8:[function(require,module,exports){
1480
+ /*! https://mths.be/cssesc v1.0.1 by @mathias */
1481
+ 'use strict';
1482
+
1483
+ var object = {};
1484
+ var hasOwnProperty = object.hasOwnProperty;
1485
+ var merge = function merge(options, defaults) {
1486
+ if (!options) {
1487
+ return defaults;
1488
+ }
1489
+ var result = {};
1490
+ for (var key in defaults) {
1491
+ // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since
1492
+ // only recognized option names are used.
1493
+ result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
1494
+ }
1495
+ return result;
1496
+ };
1497
+
1498
+ var regexAnySingleEscape = /[ -,\.\/;-@\[-\^`\{-~]/;
1499
+ var regexSingleEscape = /[ -,\.\/;-@\[\]\^`\{-~]/;
1500
+ var regexAlwaysEscape = /['"\\]/;
1501
+ var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
1502
+
1503
+ // https://mathiasbynens.be/notes/css-escapes#css
1504
+ var cssesc = function cssesc(string, options) {
1505
+ options = merge(options, cssesc.options);
1506
+ if (options.quotes != 'single' && options.quotes != 'double') {
1507
+ options.quotes = 'single';
1508
+ }
1509
+ var quote = options.quotes == 'double' ? '"' : '\'';
1510
+ var isIdentifier = options.isIdentifier;
1511
+
1512
+ var firstChar = string.charAt(0);
1513
+ var output = '';
1514
+ var counter = 0;
1515
+ var length = string.length;
1516
+ while (counter < length) {
1517
+ var character = string.charAt(counter++);
1518
+ var codePoint = character.charCodeAt();
1519
+ var value = void 0;
1520
+ // If it’s not a printable ASCII character…
1521
+ if (codePoint < 0x20 || codePoint > 0x7E) {
1522
+ if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {
1523
+ // It’s a high surrogate, and there is a next character.
1524
+ var extra = string.charCodeAt(counter++);
1525
+ if ((extra & 0xFC00) == 0xDC00) {
1526
+ // next character is low surrogate
1527
+ codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;
1528
+ } else {
1529
+ // It’s an unmatched surrogate; only append this code unit, in case
1530
+ // the next code unit is the high surrogate of a surrogate pair.
1531
+ counter--;
1532
+ }
1533
+ }
1534
+ value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
1535
+ } else {
1536
+ if (options.escapeEverything) {
1537
+ if (regexAnySingleEscape.test(character)) {
1538
+ value = '\\' + character;
1539
+ } else {
1540
+ value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
1541
+ }
1542
+ // Note: `:` could be escaped as `\:`, but that fails in IE < 8.
1543
+ } else if (/[\t\n\f\r\x0B:]/.test(character)) {
1544
+ if (!isIdentifier && character == ':') {
1545
+ value = character;
1546
+ } else {
1547
+ value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
1548
+ }
1549
+ } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
1550
+ value = '\\' + character;
1551
+ } else {
1552
+ value = character;
1553
+ }
1554
+ }
1555
+ output += value;
1556
+ }
1557
+
1558
+ if (isIdentifier) {
1559
+ if (/^_/.test(output)) {
1560
+ // Prevent IE6 from ignoring the rule altogether (in case this is for an
1561
+ // identifier used as a selector)
1562
+ output = '\\_' + output.slice(1);
1563
+ } else if (/^-[-\d]/.test(output)) {
1564
+ output = '\\-' + output.slice(1);
1565
+ } else if (/\d/.test(firstChar)) {
1566
+ output = '\\3' + firstChar + ' ' + output.slice(1);
1567
+ }
1568
+ }
1569
+
1570
+ // Remove spaces after `\HEX` escapes that are not followed by a hex digit,
1571
+ // since they’re redundant. Note that this is only possible if the escape
1572
+ // sequence isn’t preceded by an odd number of backslashes.
1573
+ output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {
1574
+ if ($1 && $1.length % 2) {
1575
+ // It’s not safe to remove the space, so don’t.
1576
+ return $0;
1577
+ }
1578
+ // Strip the space.
1579
+ return ($1 || '') + $2;
1580
+ });
1581
+
1582
+ if (!isIdentifier && options.wrap) {
1583
+ return quote + output + quote;
1584
+ }
1585
+ return output;
1586
+ };
1587
+
1588
+ // Expose default options (so they can be overridden globally).
1589
+ cssesc.options = {
1590
+ 'escapeEverything': false,
1591
+ 'isIdentifier': false,
1592
+ 'quotes': 'single',
1593
+ 'wrap': false
1594
+ };
1595
+
1596
+ cssesc.version = '1.0.1';
1597
+
1598
+ module.exports = cssesc;
1599
+
1600
+ },{}],9:[function(require,module,exports){
1601
+ // parse
1602
+ // =====
1603
+
1604
+ // states
1605
+ // ------
1606
+
1607
+ var PLAIN = 0;
1608
+ var STRINGS = 1;
1609
+ var ESCAPING = 2;
1610
+ var IDENTIFIER = 3;
1611
+ var SEPARATING = 4;
1612
+
1613
+ // patterns
1614
+ // --------
1615
+
1616
+ var identifierPattern = /[a-z0-9_-]/i;
1617
+ var spacePattern = /[\s\t]/;
1618
+
1619
+ // ---
1620
+
1621
+ var parse = function(str) {
1622
+
1623
+ // vars
1624
+ // ----
1625
+
1626
+ var starting = true;
1627
+ var state = PLAIN;
1628
+ var buffer = '';
1629
+ var i = 0;
1630
+ var quote;
1631
+ var c;
1632
+
1633
+ // result
1634
+ // ------
1635
+
1636
+ var names = [];
1637
+
1638
+ // parse
1639
+ // -----
1640
+
1641
+ while (true) {
1642
+
1643
+ c = str[i];
1644
+
1645
+ if (state === PLAIN) {
1646
+
1647
+ if (!c && starting) {
1648
+
1649
+ break;
1650
+
1651
+ } else if (!c && !starting) {
1652
+
1653
+ throw new Error('Parse error');
1654
+
1655
+ } else if (c === '"' || c === "'") {
1656
+
1657
+ quote = c;
1658
+ state = STRINGS;
1659
+ starting = false;
1660
+
1661
+ } else if (spacePattern.test(c)) {
1662
+ } else if (identifierPattern.test(c)) {
1663
+
1664
+ state = IDENTIFIER;
1665
+ starting = false;
1666
+ i--;
1667
+
1668
+ } else {
1669
+
1670
+ throw new Error('Parse error');
1671
+
1672
+ }
1673
+
1674
+ } else if (state === STRINGS) {
1675
+
1676
+ if (!c) {
1677
+
1678
+ throw new Error('Parse Error');
1679
+
1680
+ } else if (c === "\\") {
1681
+
1682
+ state = ESCAPING;
1683
+
1684
+ } else if (c === quote) {
1685
+
1686
+ names.push(buffer);
1687
+ buffer = '';
1688
+ state = SEPARATING;
1689
+
1690
+ } else {
1691
+
1692
+ buffer += c;
1693
+
1694
+ }
1695
+
1696
+ } else if (state === ESCAPING) {
1697
+
1698
+ if (c === quote || c === "\\") {
1699
+
1700
+ buffer += c;
1701
+ state = STRINGS;
1702
+
1703
+ } else {
1704
+
1705
+ throw new Error('Parse error');
1706
+
1707
+ }
1708
+
1709
+ } else if (state === IDENTIFIER) {
1710
+
1711
+ if (!c) {
1712
+
1713
+ names.push(buffer);
1714
+ break;
1715
+
1716
+ } else if (identifierPattern.test(c)) {
1717
+
1718
+ buffer += c;
1719
+
1720
+ } else if (c === ',') {
1721
+
1722
+ names.push(buffer);
1723
+ buffer = '';
1724
+ state = PLAIN;
1725
+
1726
+ } else if (spacePattern.test(c)) {
1727
+
1728
+ names.push(buffer);
1729
+ buffer = '';
1730
+ state = SEPARATING;
1731
+
1732
+ } else {
1733
+
1734
+ throw new Error('Parse error');
1735
+
1736
+ }
1737
+
1738
+ } else if (state === SEPARATING) {
1739
+
1740
+ if (!c) {
1741
+
1742
+ break;
1743
+
1744
+ } else if (c === ',') {
1745
+
1746
+ state = PLAIN;
1747
+
1748
+ } else if (spacePattern.test(c)) {
1749
+ } else {
1750
+
1751
+ throw new Error('Parse error');
1752
+
1753
+ }
1754
+
1755
+ }
1756
+
1757
+ i++;
1758
+
1759
+ }
1760
+
1761
+ // result
1762
+ // ------
1763
+
1764
+ return names;
1765
+
1766
+ };
1767
+
1768
+ // stringify
1769
+ // =========
1770
+
1771
+ // pattern
1772
+ // -------
1773
+
1774
+ var stringsPattern = /[^a-z0-9_-]/i;
1775
+
1776
+ // ---
1777
+
1778
+ var stringify = function(names, options) {
1779
+
1780
+ // quote
1781
+ // -----
1782
+
1783
+ var quote = options && options.quote || '"';
1784
+ if (quote !== '"' && quote !== "'") {
1785
+ throw new Error('Quote must be `\'` or `"`');
1786
+ }
1787
+ var quotePattern = new RegExp(quote, 'g');
1788
+
1789
+ // stringify
1790
+ // ---------
1791
+
1792
+ var safeNames = [];
1793
+
1794
+ for (var i = 0; i < names.length; ++i) {
1795
+ var name = names[i];
1796
+
1797
+ if (stringsPattern.test(name)) {
1798
+ name = name
1799
+ .replace(/\\/g, "\\\\")
1800
+ .replace(quotePattern, "\\" + quote);
1801
+ name = quote + name + quote;
1802
+ }
1803
+ safeNames.push(name);
1804
+ }
1805
+
1806
+ // result
1807
+ // ------
1808
+
1809
+ return safeNames.join(', ');
1810
+ };
1811
+
1812
+ // export
1813
+ // ======
1814
+
1815
+ module.exports = {
1816
+ parse: parse,
1817
+ stringify: stringify,
1818
+ };
1819
+
1820
+ },{}],10:[function(require,module,exports){
1821
+ /**
1822
+ * A class to parse color values
1823
+ * @author Stoyan Stefanov <sstoo@gmail.com>
1824
+ * @link http://www.phpied.com/rgb-color-parser-in-javascript/
1825
+ * @license Use it if you like it
1826
+ */
1827
+ (function (global) {
1828
+ function RGBColor(color_string)
1829
+ {
1830
+ this.ok = false;
1831
+
1832
+ // strip any leading #
1833
+ if (color_string.charAt(0) == '#') { // remove # if any
1834
+ color_string = color_string.substr(1,6);
1835
+ }
1836
+
1837
+ color_string = color_string.replace(/ /g,'');
1838
+ color_string = color_string.toLowerCase();
1839
+
1840
+ // before getting into regexps, try simple matches
1841
+ // and overwrite the input
1842
+ var simple_colors = {
1843
+ aliceblue: 'f0f8ff',
1844
+ antiquewhite: 'faebd7',
1845
+ aqua: '00ffff',
1846
+ aquamarine: '7fffd4',
1847
+ azure: 'f0ffff',
1848
+ beige: 'f5f5dc',
1849
+ bisque: 'ffe4c4',
1850
+ black: '000000',
1851
+ blanchedalmond: 'ffebcd',
1852
+ blue: '0000ff',
1853
+ blueviolet: '8a2be2',
1854
+ brown: 'a52a2a',
1855
+ burlywood: 'deb887',
1856
+ cadetblue: '5f9ea0',
1857
+ chartreuse: '7fff00',
1858
+ chocolate: 'd2691e',
1859
+ coral: 'ff7f50',
1860
+ cornflowerblue: '6495ed',
1861
+ cornsilk: 'fff8dc',
1862
+ crimson: 'dc143c',
1863
+ cyan: '00ffff',
1864
+ darkblue: '00008b',
1865
+ darkcyan: '008b8b',
1866
+ darkgoldenrod: 'b8860b',
1867
+ darkgray: 'a9a9a9',
1868
+ darkgreen: '006400',
1869
+ darkkhaki: 'bdb76b',
1870
+ darkmagenta: '8b008b',
1871
+ darkolivegreen: '556b2f',
1872
+ darkorange: 'ff8c00',
1873
+ darkorchid: '9932cc',
1874
+ darkred: '8b0000',
1875
+ darksalmon: 'e9967a',
1876
+ darkseagreen: '8fbc8f',
1877
+ darkslateblue: '483d8b',
1878
+ darkslategray: '2f4f4f',
1879
+ darkturquoise: '00ced1',
1880
+ darkviolet: '9400d3',
1881
+ deeppink: 'ff1493',
1882
+ deepskyblue: '00bfff',
1883
+ dimgray: '696969',
1884
+ dodgerblue: '1e90ff',
1885
+ feldspar: 'd19275',
1886
+ firebrick: 'b22222',
1887
+ floralwhite: 'fffaf0',
1888
+ forestgreen: '228b22',
1889
+ fuchsia: 'ff00ff',
1890
+ gainsboro: 'dcdcdc',
1891
+ ghostwhite: 'f8f8ff',
1892
+ gold: 'ffd700',
1893
+ goldenrod: 'daa520',
1894
+ gray: '808080',
1895
+ green: '008000',
1896
+ greenyellow: 'adff2f',
1897
+ honeydew: 'f0fff0',
1898
+ hotpink: 'ff69b4',
1899
+ indianred : 'cd5c5c',
1900
+ indigo : '4b0082',
1901
+ ivory: 'fffff0',
1902
+ khaki: 'f0e68c',
1903
+ lavender: 'e6e6fa',
1904
+ lavenderblush: 'fff0f5',
1905
+ lawngreen: '7cfc00',
1906
+ lemonchiffon: 'fffacd',
1907
+ lightblue: 'add8e6',
1908
+ lightcoral: 'f08080',
1909
+ lightcyan: 'e0ffff',
1910
+ lightgoldenrodyellow: 'fafad2',
1911
+ lightgrey: 'd3d3d3',
1912
+ lightgreen: '90ee90',
1913
+ lightpink: 'ffb6c1',
1914
+ lightsalmon: 'ffa07a',
1915
+ lightseagreen: '20b2aa',
1916
+ lightskyblue: '87cefa',
1917
+ lightslateblue: '8470ff',
1918
+ lightslategray: '778899',
1919
+ lightsteelblue: 'b0c4de',
1920
+ lightyellow: 'ffffe0',
1921
+ lime: '00ff00',
1922
+ limegreen: '32cd32',
1923
+ linen: 'faf0e6',
1924
+ magenta: 'ff00ff',
1925
+ maroon: '800000',
1926
+ mediumaquamarine: '66cdaa',
1927
+ mediumblue: '0000cd',
1928
+ mediumorchid: 'ba55d3',
1929
+ mediumpurple: '9370d8',
1930
+ mediumseagreen: '3cb371',
1931
+ mediumslateblue: '7b68ee',
1932
+ mediumspringgreen: '00fa9a',
1933
+ mediumturquoise: '48d1cc',
1934
+ mediumvioletred: 'c71585',
1935
+ midnightblue: '191970',
1936
+ mintcream: 'f5fffa',
1937
+ mistyrose: 'ffe4e1',
1938
+ moccasin: 'ffe4b5',
1939
+ navajowhite: 'ffdead',
1940
+ navy: '000080',
1941
+ oldlace: 'fdf5e6',
1942
+ olive: '808000',
1943
+ olivedrab: '6b8e23',
1944
+ orange: 'ffa500',
1945
+ orangered: 'ff4500',
1946
+ orchid: 'da70d6',
1947
+ palegoldenrod: 'eee8aa',
1948
+ palegreen: '98fb98',
1949
+ paleturquoise: 'afeeee',
1950
+ palevioletred: 'd87093',
1951
+ papayawhip: 'ffefd5',
1952
+ peachpuff: 'ffdab9',
1953
+ peru: 'cd853f',
1954
+ pink: 'ffc0cb',
1955
+ plum: 'dda0dd',
1956
+ powderblue: 'b0e0e6',
1957
+ purple: '800080',
1958
+ red: 'ff0000',
1959
+ rosybrown: 'bc8f8f',
1960
+ royalblue: '4169e1',
1961
+ saddlebrown: '8b4513',
1962
+ salmon: 'fa8072',
1963
+ sandybrown: 'f4a460',
1964
+ seagreen: '2e8b57',
1965
+ seashell: 'fff5ee',
1966
+ sienna: 'a0522d',
1967
+ silver: 'c0c0c0',
1968
+ skyblue: '87ceeb',
1969
+ slateblue: '6a5acd',
1970
+ slategray: '708090',
1971
+ snow: 'fffafa',
1972
+ springgreen: '00ff7f',
1973
+ steelblue: '4682b4',
1974
+ tan: 'd2b48c',
1975
+ teal: '008080',
1976
+ thistle: 'd8bfd8',
1977
+ tomato: 'ff6347',
1978
+ turquoise: '40e0d0',
1979
+ violet: 'ee82ee',
1980
+ violetred: 'd02090',
1981
+ wheat: 'f5deb3',
1982
+ white: 'ffffff',
1983
+ whitesmoke: 'f5f5f5',
1984
+ yellow: 'ffff00',
1985
+ yellowgreen: '9acd32'
1986
+ };
1987
+ for (var key in simple_colors) {
1988
+ if (color_string == key) {
1989
+ color_string = simple_colors[key];
1990
+ }
1991
+ }
1992
+ // emd of simple type-in colors
1993
+
1994
+ // array of color definition objects
1995
+ var color_defs = [
1996
+ {
1997
+ re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
1998
+ example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
1999
+ process: function (bits){
2000
+ return [
2001
+ parseInt(bits[1]),
2002
+ parseInt(bits[2]),
2003
+ parseInt(bits[3])
2004
+ ];
2005
+ }
2006
+ },
2007
+ {
2008
+ re: /^(\w{2})(\w{2})(\w{2})$/,
2009
+ example: ['#00ff00', '336699'],
2010
+ process: function (bits){
2011
+ return [
2012
+ parseInt(bits[1], 16),
2013
+ parseInt(bits[2], 16),
2014
+ parseInt(bits[3], 16)
2015
+ ];
2016
+ }
2017
+ },
2018
+ {
2019
+ re: /^(\w{1})(\w{1})(\w{1})$/,
2020
+ example: ['#fb0', 'f0f'],
2021
+ process: function (bits){
2022
+ return [
2023
+ parseInt(bits[1] + bits[1], 16),
2024
+ parseInt(bits[2] + bits[2], 16),
2025
+ parseInt(bits[3] + bits[3], 16)
2026
+ ];
2027
+ }
2028
+ }
2029
+ ];
2030
+
2031
+ // search through the definitions to find a match
2032
+ for (var i = 0; i < color_defs.length; i++) {
2033
+ var re = color_defs[i].re;
2034
+ var processor = color_defs[i].process;
2035
+ var bits = re.exec(color_string);
2036
+ if (bits) {
2037
+ var channels = processor(bits);
2038
+ this.r = channels[0];
2039
+ this.g = channels[1];
2040
+ this.b = channels[2];
2041
+ this.ok = true;
2042
+ }
2043
+
2044
+ }
2045
+
2046
+ // validate/cleanup values
2047
+ this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
2048
+ this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
2049
+ this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
2050
+
2051
+ // some getters
2052
+ this.toRGB = function () {
2053
+ return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
2054
+ }
2055
+ this.toHex = function () {
2056
+ var r = this.r.toString(16);
2057
+ var g = this.g.toString(16);
2058
+ var b = this.b.toString(16);
2059
+ if (r.length == 1) r = '0' + r;
2060
+ if (g.length == 1) g = '0' + g;
2061
+ if (b.length == 1) b = '0' + b;
2062
+ return '#' + r + g + b;
2063
+ }
2064
+
2065
+ // help
2066
+ this.getHelpXML = function () {
2067
+
2068
+ var examples = new Array();
2069
+ // add regexps
2070
+ for (var i = 0; i < color_defs.length; i++) {
2071
+ var example = color_defs[i].example;
2072
+ for (var j = 0; j < example.length; j++) {
2073
+ examples[examples.length] = example[j];
2074
+ }
2075
+ }
2076
+ // add type-in colors
2077
+ for (var sc in simple_colors) {
2078
+ examples[examples.length] = sc;
2079
+ }
2080
+
2081
+ var xml = document.createElement('ul');
2082
+ xml.setAttribute('id', 'rgbcolor-examples');
2083
+ for (var i = 0; i < examples.length; i++) {
2084
+ try {
2085
+ var list_item = document.createElement('li');
2086
+ var list_color = new RGBColor(examples[i]);
2087
+ var example_div = document.createElement('div');
2088
+ example_div.style.cssText =
2089
+ 'margin: 3px; '
2090
+ + 'border: 1px solid black; '
2091
+ + 'background:' + list_color.toHex() + '; '
2092
+ + 'color:' + list_color.toHex()
2093
+ ;
2094
+ example_div.appendChild(document.createTextNode('test'));
2095
+ var list_item_value = document.createTextNode(
2096
+ ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
2097
+ );
2098
+ list_item.appendChild(example_div);
2099
+ list_item.appendChild(list_item_value);
2100
+ xml.appendChild(list_item);
2101
+
2102
+ } catch(e){}
2103
+ }
2104
+ return xml;
2105
+
2106
+ }
2107
+
2108
+ }
2109
+ if (typeof define === "function" && define.amd) {
2110
+ define(function () {
2111
+ return RGBColor;
2112
+ });
2113
+ } else if (typeof module !== "undefined" && module.exports) {
2114
+ module.exports = RGBColor;
2115
+ } else {
2116
+ global.RGBColor = RGBColor;
2117
+ }
2118
+ return RGBColor;
2119
+ })(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this);
2120
+
2121
+ },{}],11:[function(require,module,exports){
2122
+ /*
2123
+ The MIT License (MIT)
2124
+
2125
+ Copyright (c) 2015-2017 yWorks GmbH
2126
+
2127
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2128
+ of this software and associated documentation files (the "Software"), to deal
2129
+ in the Software without restriction, including without limitation the rights
2130
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2131
+ copies of the Software, and to permit persons to whom the Software is
2132
+ furnished to do so, subject to the following conditions:
2133
+
2134
+ The above copyright notice and this permission notice shall be included in all
2135
+ copies or substantial portions of the Software.
2136
+
2137
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2138
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2139
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2140
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2141
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2142
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2143
+ SOFTWARE.
2144
+ */
2145
+
2146
+ /**
2147
+ * Renders an svg element to a jsPDF document.
2148
+ * For accurate results a DOM document is required (mainly used for text size measurement and image format conversion)
2149
+ * @param element {HTMLElement} The svg element, which will be cloned, so the original stays unchanged.
2150
+ * @param pdf {jsPDF} The jsPDF object.
2151
+ * @param options {object} An object that may contain render options. Currently supported are:
2152
+ * scale: The global factor by which everything is scaled.
2153
+ * xOffset, yOffset: Offsets that are added to every coordinate AFTER scaling (They are not
2154
+ * influenced by the scale attribute).
2155
+ */
2156
+ (function (global) {
2157
+ var RGBColor;
2158
+ var SvgPath;
2159
+ var FontFamily;
2160
+ var cssEsc;
2161
+
2162
+ var _pdf; // jsPDF pdf-document
2163
+
2164
+ var cToQ = 2 / 3; // ratio to convert quadratic bezier curves to cubic ones
2165
+
2166
+ var iriReference = /url\(["']?#([^"']+)["']?\)/;
2167
+
2168
+ // groups: 1: mime-type (+ charset), 2: mime-type (w/o charset), 3: charset, 4: base64?, 5: body
2169
+ var dataUrlRegex = /^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*\s*)$/i;
2170
+
2171
+ var svgNamespaceURI = "http://www.w3.org/2000/svg";
2172
+
2173
+
2174
+ // pathSegList is marked deprecated in chrome, so parse the d attribute manually if necessary
2175
+ var getPathSegList = function (node) {
2176
+ var d = node.getAttribute("d");
2177
+
2178
+ // Replace arcs before path segment list is handled
2179
+ if (SvgPath) {
2180
+ d = SvgPath(d).unshort().unarc().abs().toString();
2181
+ node.setAttribute('d', d);
2182
+ }
2183
+
2184
+ var pathSegList = node.pathSegList;
2185
+
2186
+ if (pathSegList) {
2187
+ return pathSegList;
2188
+ }
2189
+
2190
+ pathSegList = [];
2191
+
2192
+ var regex = /([a-df-zA-DF-Z])([^a-df-zA-DF-Z]*)/g,
2193
+ match;
2194
+ while (match = regex.exec(d)) {
2195
+ var coords = parseFloats(match[2]);
2196
+
2197
+ var type = match[1];
2198
+ var length = "zZ".indexOf(type) >= 0 ? 0 :
2199
+ "hHvV".indexOf(type) >= 0 ? 1 :
2200
+ "mMlLtT".indexOf(type) >= 0 ? 2 :
2201
+ "sSqQ".indexOf(type) >= 0 ? 4 :
2202
+ "aA".indexOf(type) >= 0 ? 7 :
2203
+ "cC".indexOf(type) >= 0 ? 6 : -1;
2204
+
2205
+ var i = 0;
2206
+ do {
2207
+ var pathSeg = {pathSegTypeAsLetter: type};
2208
+ switch (type) {
2209
+ case "h":
2210
+ case "H":
2211
+ pathSeg.x = coords[i];
2212
+ break;
2213
+
2214
+ case "v":
2215
+ case "V":
2216
+ pathSeg.y = coords[i];
2217
+ break;
2218
+
2219
+ case "c":
2220
+ case "C":
2221
+ pathSeg.x1 = coords[i + length - 6];
2222
+ pathSeg.y1 = coords[i + length - 5];
2223
+ case "s":
2224
+ case "S":
2225
+ pathSeg.x2 = coords[i + length - 4];
2226
+ pathSeg.y2 = coords[i + length - 3];
2227
+ case "t":
2228
+ case "T":
2229
+ case "l":
2230
+ case "L":
2231
+ case "m":
2232
+ case "M":
2233
+ pathSeg.x = coords[i + length - 2];
2234
+ pathSeg.y = coords[i + length - 1];
2235
+ break;
2236
+
2237
+ case "q":
2238
+ case "Q":
2239
+ pathSeg.x1 = coords[i];
2240
+ pathSeg.y1 = coords[i + 1];
2241
+ pathSeg.x = coords[i + 2];
2242
+ pathSeg.y = coords[i + 3];
2243
+ break;
2244
+ case "a":
2245
+ case "A":
2246
+ throw new Error("Cannot convert Arcs without SvgPath package");
2247
+ }
2248
+
2249
+ pathSegList.push(pathSeg);
2250
+
2251
+ // "If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit
2252
+ // lineto commands"
2253
+ if (type === "m") {
2254
+ type = "l";
2255
+ } else if (type === "M") {
2256
+ type = "L";
2257
+ }
2258
+
2259
+ i += length;
2260
+ } while(i < coords.length);
2261
+ }
2262
+
2263
+ pathSegList.getItem = function (i) {
2264
+ return this[i]
2265
+ };
2266
+ pathSegList.numberOfItems = pathSegList.length;
2267
+
2268
+ return pathSegList;
2269
+ };
2270
+
2271
+ // returns an attribute of a node, either from the node directly or from css
2272
+ var getAttribute = function (node, propertyNode, propertyCss) {
2273
+ propertyCss = propertyCss || propertyNode;
2274
+ return node.getAttribute(propertyNode) || node.style && node.style[propertyCss];
2275
+ };
2276
+
2277
+ /**
2278
+ * @param {Element} node
2279
+ * @param {string} tagsString
2280
+ * @return {boolean}
2281
+ */
2282
+ var nodeIs = function (node, tagsString) {
2283
+ return tagsString.split(",").indexOf(node.tagName.toLowerCase()) >= 0;
2284
+ };
2285
+
2286
+ var forEachChild = function (node, fn) {
2287
+ // copy list of children, as the original might be modified
2288
+ var children = [];
2289
+ for (var i = 0; i < node.childNodes.length; i++) {
2290
+ var childNode = node.childNodes[i];
2291
+ if (childNode.nodeName.charAt(0) !== "#")
2292
+ children.push(childNode);
2293
+ }
2294
+ for (i = 0; i < children.length; i++) {
2295
+ fn(i, children[i]);
2296
+ }
2297
+ };
2298
+
2299
+ var getAngle = function (from, to) {
2300
+ return Math.atan2(to[1] - from[1], to[0] - from[0]);
2301
+ };
2302
+
2303
+ function normalize(v) {
2304
+ var length = Math.sqrt(v[0] * v[0] + v[1] * v[1]);
2305
+ return [v[0] / length, v[1] / length];
2306
+ }
2307
+
2308
+ function getDirectionVector(from, to) {
2309
+ var v = [to[0] - from[0], to[1] - from[1]];
2310
+ return normalize(v);
2311
+ }
2312
+
2313
+ function addVectors(v1, v2) {
2314
+ return [v1[0] + v2[0], v1[1] + v2[1]];
2315
+ }
2316
+
2317
+ // mirrors p1 at p2
2318
+ var mirrorPoint = function (p1, p2) {
2319
+ var dx = p2[0] - p1[0];
2320
+ var dy = p2[1] - p1[1];
2321
+
2322
+ return [p1[0] + 2 * dx, p1[1] + 2 * dy];
2323
+ };
2324
+
2325
+ // transforms a cubic bezier control point to a quadratic one: returns from + (2/3) * (to - from)
2326
+ var toCubic = function (from, to) {
2327
+ return [cToQ * (to[0] - from[0]) + from[0], cToQ * (to[1] - from[1]) + from[1]];
2328
+ };
2329
+
2330
+ // extracts a control point from a previous path segment (for t,T,s,S segments)
2331
+ var getControlPointFromPrevious = function (i, from, list, prevX, prevY) {
2332
+ var prev = list.getItem(i - 1);
2333
+ var p2;
2334
+ if (i > 0 && (prev.pathSegTypeAsLetter === "C" || prev.pathSegTypeAsLetter === "S")) {
2335
+ p2 = mirrorPoint([prev.x2, prev.y2], from);
2336
+ } else if (i > 0 && (prev.pathSegTypeAsLetter === "c" || prev.pathSegTypeAsLetter === "s")) {
2337
+ p2 = mirrorPoint([prev.x2 + prevX, prev.y2 + prevY], from);
2338
+ } else {
2339
+ p2 = [from[0], from[1]];
2340
+ }
2341
+ return p2;
2342
+ };
2343
+
2344
+ /**
2345
+ * @param {Element} rootSvg
2346
+ * @constructor
2347
+ * @property {Object.<String,Element>} renderedElements
2348
+ * @property {Element} rootSvg
2349
+ */
2350
+ function ReferencesHandler(rootSvg) {
2351
+ this.renderedElements = {};
2352
+ this.rootSvg = rootSvg;
2353
+ }
2354
+
2355
+ /**
2356
+ * @param {string} id
2357
+ * @return {*}
2358
+ */
2359
+ ReferencesHandler.prototype.getRendered = function (id) {
2360
+ if (this.renderedElements.hasOwnProperty(id)) {
2361
+ return this.renderedElements[id];
2362
+ }
2363
+
2364
+ var node = this.rootSvg.querySelector("#" + cssEsc(id, {isIdentifier: true}));
2365
+
2366
+ if (nodeIs(node, "lineargradient")) {
2367
+ putGradient(node, "axial", [
2368
+ node.getAttribute("x1") || 0,
2369
+ node.getAttribute("y1") || 0,
2370
+ node.getAttribute("x2") || 1,
2371
+ node.getAttribute("y2") || 0
2372
+ ]);
2373
+ } else if (nodeIs(node, "radialgradient")) {
2374
+ putGradient(node, "radial", [
2375
+ node.getAttribute("fx") || node.getAttribute("cx") || 0.5,
2376
+ node.getAttribute("fy") || node.getAttribute("cy") || 0.5,
2377
+ 0,
2378
+ node.getAttribute("cx") || 0.5,
2379
+ node.getAttribute("cy") || 0.5,
2380
+ node.getAttribute("r") || 0.5
2381
+ ]);
2382
+ } else if (nodeIs(node, "pattern")) {
2383
+ pattern(node, this, AttributeState.default())
2384
+ } else if (nodeIs(node, "marker")) {
2385
+ // the transformations directly at the node are written to the pdf form object transformation matrix
2386
+ var tfMatrix = computeNodeTransform(node);
2387
+ var bBox = getUntransformedBBox(node);
2388
+
2389
+ _pdf.beginFormObject(bBox[0], bBox[1], bBox[2], bBox[3], tfMatrix);
2390
+ renderChildren(node, _pdf.unitMatrix, this, false, false, AttributeState.default());
2391
+ _pdf.endFormObject(node.getAttribute("id"));
2392
+ } else if (!nodeIs(node, "clippath")) {
2393
+ // all other nodes will be rendered as PDF form object
2394
+ renderNode(node, _pdf.unitMatrix, this, true, false, AttributeState.default());
2395
+ }
2396
+
2397
+ this.renderedElements[id] = node;
2398
+ return node;
2399
+ };
2400
+
2401
+ var AttributeState = function () {
2402
+ this.xmlSpace = null;
2403
+ this.color = null;
2404
+ this.fill = null;
2405
+ this.fillOpacity = 1.0;
2406
+ // this.fillRule = null;
2407
+ this.fontFamily = null;
2408
+ this.fontSize = 16;
2409
+ this.fontStyle = null;
2410
+ // this.fontVariant = null;
2411
+ this.fontWeight = null;
2412
+ this.opacity = 1.0;
2413
+ this.stroke = null;
2414
+ this.strokeDasharray = null;
2415
+ this.strokeDashoffset = null;
2416
+ this.strokeLinecap = null;
2417
+ this.strokeLinejoin = null;
2418
+ this.strokeMiterlimit = 4.0;
2419
+ this.strokeOpacity = 1.0;
2420
+ this.strokeWidth = 1.0;
2421
+ // this.textAlign = null;
2422
+ this.textAnchor = null;
2423
+ this.visibility = null;
2424
+ };
2425
+
2426
+ AttributeState.default = function () {
2427
+ var attributeState = new AttributeState();
2428
+
2429
+ attributeState.xmlSpace = "default";
2430
+ attributeState.fill = new RGBColor("rgb(0, 0, 0)");
2431
+ attributeState.fillOpacity = 1.0;
2432
+ // attributeState.fillRule = "nonzero";
2433
+ attributeState.fontFamily = "times";
2434
+ attributeState.fontSize = 16;
2435
+ attributeState.fontStyle = "normal";
2436
+ // attributeState.fontVariant = "normal";
2437
+ attributeState.fontWeight = "normal";
2438
+ attributeState.opacity = 1.0;
2439
+ attributeState.stroke = null;
2440
+ attributeState.strokeDasharray = null;
2441
+ attributeState.strokeDashoffset = null;
2442
+ attributeState.strokeLinecap = "butt";
2443
+ attributeState.strokeLinejoin = "miter";
2444
+ attributeState.strokeMiterlimit = 4.0;
2445
+ attributeState.strokeOpacity = 1.0;
2446
+ attributeState.strokeWidth = 1.0;
2447
+ // attributeState.textAlign = "start";
2448
+ attributeState.textAnchor = "start";
2449
+ attributeState.visibility = "visible";
2450
+
2451
+ return attributeState;
2452
+ };
2453
+
2454
+ AttributeState.prototype.clone = function () {
2455
+ var clone = new AttributeState();
2456
+
2457
+ clone.xmlSpace = this.xmlSpace;
2458
+ clone.fill = this.fill;
2459
+ clone.fillOpacity = this.fillOpacity;
2460
+ // clone.fillRule = this.fillRule;
2461
+ clone.fontFamily = this.fontFamily;
2462
+ clone.fontSize = this.fontSize;
2463
+ clone.fontStyle = this.fontStyle;
2464
+ // clone.fontVariant = this.fontVariant;
2465
+ clone.fontWeight = this.fontWeight;
2466
+ clone.opacity = this.opacity;
2467
+ clone.stroke = this.stroke;
2468
+ clone.strokeDasharray = this.strokeDasharray;
2469
+ clone.strokeDashoffset = this.strokeDashoffset;
2470
+ clone.strokeLinecap = this.strokeLinecap;
2471
+ clone.strokeLinejoin = this.strokeLinejoin;
2472
+ clone.strokeMiterlimit = this.strokeMiterlimit;
2473
+ clone.strokeOpacity = this.strokeOpacity;
2474
+ clone.strokeWidth = this.strokeWidth;
2475
+ // clone.textAlign = this.textAlign;
2476
+ clone.textAnchor = this.textAnchor;
2477
+ clone.visibility = this.visibility;
2478
+
2479
+ return clone;
2480
+ };
2481
+
2482
+ /**
2483
+ * @constructor
2484
+ * @property {Marker[]} markers
2485
+ */
2486
+ function MarkerList() {
2487
+ this.markers = [];
2488
+ }
2489
+
2490
+ /**
2491
+ * @param {Marker} marker
2492
+ */
2493
+ MarkerList.prototype.addMarker = function addMarker(marker) {
2494
+ this.markers.push(marker);
2495
+ };
2496
+
2497
+ MarkerList.prototype.draw = function (tfMatrix, refsHandler, attributeState) {
2498
+ for (var i = 0; i < this.markers.length; i++) {
2499
+ var marker = this.markers[i];
2500
+
2501
+ var tf;
2502
+ var angle = marker.angle, anchor = marker.anchor;
2503
+ var cos = Math.cos(angle);
2504
+ var sin = Math.sin(angle);
2505
+ // position at and rotate around anchor
2506
+ tf = new _pdf.Matrix(cos, sin, -sin, cos, anchor[0], anchor[1]);
2507
+ // scale with stroke-width
2508
+ tf = _pdf.matrixMult(new _pdf.Matrix(attributeState.strokeWidth, 0, 0, attributeState.strokeWidth, 0, 0), tf);
2509
+
2510
+ tf = _pdf.matrixMult(tf, tfMatrix);
2511
+
2512
+ // as the marker is already scaled by the current line width we must not apply the line width twice!
2513
+ _pdf.saveGraphicsState();
2514
+ _pdf.setLineWidth(1.0);
2515
+ refsHandler.getRendered(marker.id);
2516
+ _pdf.doFormObject(marker.id, tf);
2517
+ _pdf.restoreGraphicsState();
2518
+ }
2519
+ };
2520
+
2521
+ /**
2522
+ * @param {string} id
2523
+ * @param {[number,number]} anchor
2524
+ * @param {number} angle
2525
+ */
2526
+ function Marker(id, anchor, angle) {
2527
+ this.id = id;
2528
+ this.anchor = anchor;
2529
+ this.angle = angle;
2530
+ }
2531
+
2532
+ function removeNewlines(str) {
2533
+ return str.replace(/[\n\r]/g, "");
2534
+ }
2535
+
2536
+ function replaceTabsBySpace(str) {
2537
+ return str.replace(/[\t]/g, " ");
2538
+ }
2539
+
2540
+ function consolidateSpaces(str) {
2541
+ return str.replace(/ +/g, " ");
2542
+ }
2543
+
2544
+ function trimLeft(str) {
2545
+ return str.replace(/^\s+/,"");
2546
+ }
2547
+
2548
+ function trimRight(str) {
2549
+ return str.replace(/\s+$/,"");
2550
+ }
2551
+
2552
+ function computeViewBoxTransform(node, viewBox, eX, eY, eWidth, eHeight) {
2553
+ var vbX = viewBox[0];
2554
+ var vbY = viewBox[1];
2555
+ var vbWidth = viewBox[2];
2556
+ var vbHeight = viewBox[3];
2557
+
2558
+ var scaleX = eWidth / vbWidth;
2559
+ var scaleY = eHeight / vbHeight;
2560
+
2561
+ var align, meetOrSlice;
2562
+ var preserveAspectRatio = node.getAttribute("preserveAspectRatio");
2563
+ if (preserveAspectRatio) {
2564
+ var alignAndMeetOrSlice = preserveAspectRatio.split(" ");
2565
+ if (alignAndMeetOrSlice[0] === "defer") {
2566
+ alignAndMeetOrSlice = alignAndMeetOrSlice.slice(1);
2567
+ }
2568
+
2569
+ align = alignAndMeetOrSlice[0];
2570
+ meetOrSlice = alignAndMeetOrSlice[1] || "meet";
2571
+ } else {
2572
+ align = "xMidYMid";
2573
+ meetOrSlice = "meet"
2574
+ }
2575
+
2576
+ if (align !== "none") {
2577
+ if (meetOrSlice === "meet") {
2578
+ // uniform scaling with min scale
2579
+ scaleX = scaleY = Math.min(scaleX, scaleY);
2580
+ } else if (meetOrSlice === "slice") {
2581
+ // uniform scaling with max scale
2582
+ scaleX = scaleY = Math.max(scaleX, scaleY);
2583
+ }
2584
+ }
2585
+
2586
+ var translateX = eX - (vbX * scaleX);
2587
+ var translateY = eY - (vbY * scaleY);
2588
+
2589
+ if (align.indexOf("xMid") >= 0) {
2590
+ translateX += (eWidth - vbWidth * scaleX) / 2;
2591
+ } else if (align.indexOf("xMax") >= 0) {
2592
+ translateX += eWidth - vbWidth * scaleX;
2593
+ }
2594
+
2595
+ if (align.indexOf("yMid") >= 0) {
2596
+ translateY += (eHeight - vbHeight * scaleY) / 2;
2597
+ } else if (align.indexOf("yMax") >= 0) {
2598
+ translateY += (eHeight - vbHeight * scaleY);
2599
+ }
2600
+
2601
+ var translate = new _pdf.Matrix(1, 0, 0, 1, translateX, translateY);
2602
+ var scale = new _pdf.Matrix(scaleX, 0, 0, scaleY, 0, 0);
2603
+
2604
+ return _pdf.matrixMult(scale, translate);
2605
+ }
2606
+
2607
+ // computes the transform directly applied at the node (such as viewbox scaling and the "transform" atrribute)
2608
+ // x,y,cx,cy,r,... are omitted
2609
+ var computeNodeTransform = function (node) {
2610
+ var viewBox, x, y;
2611
+ var nodeTransform = _pdf.unitMatrix;
2612
+ if (nodeIs(node, "svg,g")) {
2613
+ x = parseFloat(node.getAttribute("x")) || 0;
2614
+ y = parseFloat(node.getAttribute("y")) || 0;
2615
+
2616
+ viewBox = node.getAttribute("viewBox");
2617
+ if (viewBox) {
2618
+ var box = parseFloats(viewBox);
2619
+ var width = parseFloat(node.getAttribute("width")) || box[2];
2620
+ var height = parseFloat(node.getAttribute("height")) || box[3];
2621
+ nodeTransform = computeViewBoxTransform(node, box, x, y, width, height)
2622
+ } else {
2623
+ nodeTransform = new _pdf.Matrix(1, 0, 0, 1, x, y);
2624
+ }
2625
+ } else if (nodeIs(node, "marker")) {
2626
+ x = parseFloat(node.getAttribute("refX")) || 0;
2627
+ y = parseFloat(node.getAttribute("refY")) || 0;
2628
+
2629
+ viewBox = node.getAttribute("viewBox");
2630
+ if (viewBox) {
2631
+ var bounds = parseFloats(viewBox);
2632
+ bounds[0] = bounds[1] = 0; // for some reason vbX anc vbY seem to be ignored for markers
2633
+ nodeTransform = computeViewBoxTransform(node,
2634
+ bounds,
2635
+ 0,
2636
+ 0,
2637
+ parseFloat(node.getAttribute("markerWidth")) || 3,
2638
+ parseFloat(node.getAttribute("markerHeight")) || 3
2639
+ );
2640
+ nodeTransform = _pdf.matrixMult(new _pdf.Matrix(1, 0, 0, 1, -x, -y), nodeTransform);
2641
+ } else {
2642
+ nodeTransform = new _pdf.Matrix(1, 0, 0, 1, -x, -y);
2643
+ }
2644
+ }
2645
+
2646
+ var transformString = node.getAttribute("transform");
2647
+ if (!transformString)
2648
+ return nodeTransform;
2649
+ else
2650
+ return _pdf.matrixMult(nodeTransform, parseTransform(transformString));
2651
+ };
2652
+
2653
+ // parses the "points" string used by polygons and returns an array of points
2654
+ var parsePointsString = function (string) {
2655
+ var floats = parseFloats(string);
2656
+ var result = [];
2657
+ for (var i = 0; i < floats.length - 1; i += 2) {
2658
+ var x = floats[i];
2659
+ var y = floats[i + 1];
2660
+ result.push([x, y]);
2661
+ }
2662
+ return result;
2663
+ };
2664
+
2665
+ // parses the "transform" string
2666
+ var parseTransform = function (transformString) {
2667
+ if (!transformString)
2668
+ return _pdf.unitMatrix;
2669
+
2670
+ var mRegex = /^\s*matrix\(([^\)]+)\)\s*/,
2671
+ tRegex = /^\s*translate\(([^\)]+)\)\s*/,
2672
+ rRegex = /^\s*rotate\(([^\)]+)\)\s*/,
2673
+ sRegex = /^\s*scale\(([^\)]+)\)\s*/,
2674
+ sXRegex = /^\s*skewX\(([^\)]+)\)\s*/,
2675
+ sYRegex = /^\s*skewY\(([^\)]+)\)\s*/;
2676
+
2677
+ var resultMatrix = _pdf.unitMatrix, m;
2678
+
2679
+ while (transformString.length > 0) {
2680
+ var match = mRegex.exec(transformString);
2681
+ if (match) {
2682
+ m = parseFloats(match[1]);
2683
+ resultMatrix = _pdf.matrixMult(new _pdf.Matrix(m[0], m[1], m[2], m[3], m[4], m[5]), resultMatrix);
2684
+ transformString = transformString.substr(match[0].length);
2685
+ }
2686
+ match = rRegex.exec(transformString);
2687
+ if (match) {
2688
+ m = parseFloats(match[1]);
2689
+ var a = Math.PI * m[0] / 180;
2690
+ resultMatrix = _pdf.matrixMult(new _pdf.Matrix(Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0), resultMatrix);
2691
+ if (m[1] && m[2]) {
2692
+ var t1 = new _pdf.Matrix(1, 0, 0, 1, m[1], m[2]);
2693
+ var t2 = new _pdf.Matrix(1, 0, 0, 1, -m[1], -m[2]);
2694
+ resultMatrix = _pdf.matrixMult(t2, _pdf.matrixMult(resultMatrix, t1));
2695
+ }
2696
+ transformString = transformString.substr(match[0].length);
2697
+ }
2698
+ match = tRegex.exec(transformString);
2699
+ if (match) {
2700
+ m = parseFloats(match[1]);
2701
+ resultMatrix = _pdf.matrixMult(new _pdf.Matrix(1, 0, 0, 1, m[0], m[1] || 0), resultMatrix);
2702
+ transformString = transformString.substr(match[0].length);
2703
+ }
2704
+ match = sRegex.exec(transformString);
2705
+ if (match) {
2706
+ m = parseFloats(match[1]);
2707
+ if (!m[1])
2708
+ m[1] = m[0];
2709
+ resultMatrix = _pdf.matrixMult(new _pdf.Matrix(m[0], 0, 0, m[1], 0, 0), resultMatrix);
2710
+ transformString = transformString.substr(match[0].length);
2711
+ }
2712
+ match = sXRegex.exec(transformString);
2713
+ if (match) {
2714
+ m = parseFloat(match[1]);
2715
+ resultMatrix = _pdf.matrixMult(new _pdf.Matrix(1, 0, Math.tan(m), 1, 0, 0), resultMatrix);
2716
+ transformString = transformString.substr(match[0].length);
2717
+ }
2718
+ match = sYRegex.exec(transformString);
2719
+ if (match) {
2720
+ m = parseFloat(match[1]);
2721
+ resultMatrix = _pdf.matrixMult(new _pdf.Matrix(1, Math.tan(m), 0, 1, 0, 0), resultMatrix);
2722
+ transformString = transformString.substr(match[0].length);
2723
+ }
2724
+ }
2725
+ return resultMatrix;
2726
+ };
2727
+
2728
+ // parses a comma, sign and/or whitespace separated string of floats and returns the single floats in an array
2729
+ var parseFloats = function (str) {
2730
+ var floats = [], match,
2731
+ regex = /[+-]?(?:(?:\d+\.?\d*)|(?:\d*\.?\d+))(?:[eE][+-]?\d+)?/g;
2732
+ while(match = regex.exec(str)) {
2733
+ floats.push(parseFloat(match[0]));
2734
+ }
2735
+ return floats;
2736
+ };
2737
+
2738
+ // extends RGBColor by rgba colors as RGBColor is not capable of it
2739
+ var parseColor = function (colorString) {
2740
+ if (colorString === "transparent") {
2741
+ var transparent = new RGBColor("rgb(0,0,0)");
2742
+ transparent.a = 0;
2743
+ return transparent
2744
+ }
2745
+
2746
+ var match = /\s*rgba\(((?:[^,\)]*,){3}[^,\)]*)\)\s*/.exec(colorString);
2747
+ if (match) {
2748
+ var floats = parseFloats(match[1]);
2749
+ var color = new RGBColor("rgb(" + floats.slice(0,3).join(",") + ")");
2750
+ color.a = floats[3];
2751
+ return color;
2752
+ } else {
2753
+ return new RGBColor(colorString);
2754
+ }
2755
+ };
2756
+
2757
+ // multiplies a vector with a matrix: vec' = vec * matrix
2758
+ var multVecMatrix = function (vec, matrix) {
2759
+ var x = vec[0];
2760
+ var y = vec[1];
2761
+ return [
2762
+ matrix.a * x + matrix.c * y + matrix.e,
2763
+ matrix.b * x + matrix.d * y + matrix.f
2764
+ ];
2765
+ };
2766
+
2767
+ // returns the untransformed bounding box [x, y, width, height] of an svg element (quite expensive for path and polygon objects, as
2768
+ // the whole points/d-string has to be processed)
2769
+ var getUntransformedBBox = function (node) {
2770
+ if (getAttribute(node, "display") === "none") {
2771
+ return [0, 0, 0, 0];
2772
+ }
2773
+
2774
+ var i, minX, minY, maxX, maxY, viewBox, vb, boundingBox;
2775
+ var pf = parseFloat;
2776
+
2777
+ if (nodeIs(node, "polygon,polyline")) {
2778
+ var points = parsePointsString(node.getAttribute("points"));
2779
+ minX = Number.POSITIVE_INFINITY;
2780
+ minY = Number.POSITIVE_INFINITY;
2781
+ maxX = Number.NEGATIVE_INFINITY;
2782
+ maxY = Number.NEGATIVE_INFINITY;
2783
+ for (i = 0; i < points.length; i++) {
2784
+ var point = points[i];
2785
+ minX = Math.min(minX, point[0]);
2786
+ maxX = Math.max(maxX, point[0]);
2787
+ minY = Math.min(minY, point[1]);
2788
+ maxY = Math.max(maxY, point[1]);
2789
+ }
2790
+ boundingBox = [
2791
+ minX,
2792
+ minY,
2793
+ maxX - minX,
2794
+ maxY - minY
2795
+ ];
2796
+ } else if (nodeIs(node, "path")) {
2797
+ var list = getPathSegList(node);
2798
+ minX = Number.POSITIVE_INFINITY;
2799
+ minY = Number.POSITIVE_INFINITY;
2800
+ maxX = Number.NEGATIVE_INFINITY;
2801
+ maxY = Number.NEGATIVE_INFINITY;
2802
+ var x = 0, y = 0;
2803
+ var prevX, prevY, newX, newY;
2804
+ var p2, p3, to;
2805
+ for (i = 0; i < list.numberOfItems; i++) {
2806
+ var seg = list.getItem(i);
2807
+ var cmd = seg.pathSegTypeAsLetter;
2808
+ switch (cmd) {
2809
+ case "H":
2810
+ newX = seg.x;
2811
+ newY = y;
2812
+ break;
2813
+ case "h":
2814
+ newX = seg.x + x;
2815
+ newY = y;
2816
+ break;
2817
+ case "V":
2818
+ newX = x;
2819
+ newY = seg.y;
2820
+ break;
2821
+ case "v":
2822
+ newX = x;
2823
+ newY = seg.y + y;
2824
+ break;
2825
+ case "C":
2826
+ p2 = [seg.x1, seg.y1];
2827
+ p3 = [seg.x2, seg.y2];
2828
+ to = [seg.x, seg.y];
2829
+ break;
2830
+ case "c":
2831
+ p2 = [seg.x1 + x, seg.y1 + y];
2832
+ p3 = [seg.x2 + x, seg.y2 + y];
2833
+ to = [seg.x + x, seg.y + y];
2834
+ break;
2835
+ case "S":
2836
+ p2 = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
2837
+ p3 = [seg.x2, seg.y2];
2838
+ to = [seg.x, seg.y];
2839
+ break;
2840
+ case "s":
2841
+ p2 = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
2842
+ p3 = [seg.x2 + x, seg.y2 + y];
2843
+ to = [seg.x + x, seg.y + y];
2844
+ break;
2845
+ case "Q":
2846
+ pf = [seg.x1, seg.y1];
2847
+ p2 = toCubic([x, y], pf);
2848
+ p3 = toCubic([seg.x, seg.y], pf);
2849
+ to = [seg.x, seg.y];
2850
+ break;
2851
+ case "q":
2852
+ pf = [seg.x1 + x, seg.y1 + y];
2853
+ p2 = toCubic([x, y], pf);
2854
+ p3 = toCubic([x + seg.x, y + seg.y], pf);
2855
+ to = [seg.x + x, seg.y + y];
2856
+ break;
2857
+ case "T":
2858
+ p2 = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
2859
+ p2 = toCubic([x, y], pf);
2860
+ p3 = toCubic([seg.x, seg.y], pf);
2861
+ to = [seg.x, seg.y];
2862
+ break;
2863
+ case "t":
2864
+ pf = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
2865
+ p2 = toCubic([x, y], pf);
2866
+ p3 = toCubic([x + seg.x, y + seg.y], pf);
2867
+ to = [seg.x + x, seg.y + y];
2868
+ break;
2869
+ // TODO: A,a
2870
+ }
2871
+ if ("sScCqQtT".indexOf(cmd) >= 0) {
2872
+ prevX = x;
2873
+ prevY = y;
2874
+ }
2875
+ if ("MLCSQT".indexOf(cmd) >= 0) {
2876
+ x = seg.x;
2877
+ y = seg.y;
2878
+ } else if ("mlcsqt".indexOf(cmd) >= 0) {
2879
+ x = seg.x + x;
2880
+ y = seg.y + y;
2881
+ } else if ("zZ".indexOf(cmd) < 0) {
2882
+ x = newX;
2883
+ y = newY;
2884
+ }
2885
+ if ("CSQTcsqt".indexOf(cmd) >= 0) {
2886
+ minX = Math.min(minX, x, p2[0], p3[0], to[0]);
2887
+ maxX = Math.max(maxX, x, p2[0], p3[0], to[0]);
2888
+ minY = Math.min(minY, y, p2[1], p3[1], to[1]);
2889
+ maxY = Math.max(maxY, y, p2[1], p3[1], to[1]);
2890
+ } else {
2891
+ minX = Math.min(minX, x);
2892
+ maxX = Math.max(maxX, x);
2893
+ minY = Math.min(minY, y);
2894
+ maxY = Math.max(maxY, y);
2895
+ }
2896
+ }
2897
+ boundingBox = [
2898
+ minX,
2899
+ minY,
2900
+ maxX - minX,
2901
+ maxY - minY
2902
+ ];
2903
+ } else if (nodeIs(node, "svg")) {
2904
+ viewBox = node.getAttribute("viewBox");
2905
+ if (viewBox) {
2906
+ vb = parseFloats(viewBox);
2907
+ }
2908
+ return [
2909
+ pf(node.getAttribute("x")) || (vb && vb[0]) || 0,
2910
+ pf(node.getAttribute("y")) || (vb && vb[1]) || 0,
2911
+ pf(node.getAttribute("width")) || (vb && vb[2]) || 0,
2912
+ pf(node.getAttribute("height")) || (vb && vb[3]) || 0
2913
+ ];
2914
+ } else if (nodeIs(node, "g,clippath")) {
2915
+ boundingBox = [0, 0, 0, 0];
2916
+ forEachChild(node, function (i, node) {
2917
+ var nodeBox = getUntransformedBBox(node);
2918
+ boundingBox = [
2919
+ Math.min(boundingBox[0], nodeBox[0]),
2920
+ Math.min(boundingBox[1], nodeBox[1]),
2921
+ Math.max(boundingBox[0] + boundingBox[2], nodeBox[0] + nodeBox[2]) - Math.min(boundingBox[0], nodeBox[0]),
2922
+ Math.max(boundingBox[1] + boundingBox[3], nodeBox[1] + nodeBox[3]) - Math.min(boundingBox[1], nodeBox[1])
2923
+ ];
2924
+ });
2925
+ } else if (nodeIs(node, "marker")) {
2926
+ viewBox = node.getAttribute("viewBox");
2927
+ if (viewBox) {
2928
+ vb = parseFloats(viewBox);
2929
+ }
2930
+ return [
2931
+ (vb && vb[0]) || 0,
2932
+ (vb && vb[1]) || 0,
2933
+ (vb && vb[2]) || pf(node.getAttribute("marker-width")) || 0,
2934
+ (vb && vb[3]) || pf(node.getAttribute("marker-height")) || 0
2935
+ ];
2936
+ } else if (nodeIs(node, "pattern")) {
2937
+ return [
2938
+ pf(node.getAttribute("x")) || 0,
2939
+ pf(node.getAttribute("y")) || 0,
2940
+ pf(node.getAttribute("width")) || 0,
2941
+ pf(node.getAttribute("height")) || 0
2942
+ ]
2943
+ } else {
2944
+ // TODO: check if there are other possible coordinate attributes
2945
+ var x1 = pf(node.getAttribute("x1")) || pf(node.getAttribute("x")) || pf((node.getAttribute("cx")) - pf(node.getAttribute("r"))) || 0;
2946
+ var x2 = pf(node.getAttribute("x2")) || (x1 + pf(node.getAttribute("width"))) || (pf(node.getAttribute("cx")) + pf(node.getAttribute("r"))) || 0;
2947
+ var y1 = pf(node.getAttribute("y1")) || pf(node.getAttribute("y")) || (pf(node.getAttribute("cy")) - pf(node.getAttribute("r"))) || 0;
2948
+ var y2 = pf(node.getAttribute("y2")) || (y1 + pf(node.getAttribute("height"))) || (pf(node.getAttribute("cy")) + pf(node.getAttribute("r"))) || 0;
2949
+ boundingBox = [
2950
+ Math.min(x1, x2),
2951
+ Math.min(y1, y2),
2952
+ Math.max(x1, x2) - Math.min(x1, x2),
2953
+ Math.max(y1, y2) - Math.min(y1, y2)
2954
+ ];
2955
+ }
2956
+
2957
+ if (!nodeIs(node, "marker,svg,g")) {
2958
+ // add line-width
2959
+ var lineWidth = getAttribute(node, "stroke-width") || 1;
2960
+ var miterLimit = getAttribute(node, "stroke-miterlimit");
2961
+ // miterLength / lineWidth = 1 / sin(phi / 2)
2962
+ miterLimit && (lineWidth *= 0.5 / (Math.sin(Math.PI / 12)));
2963
+ return [
2964
+ boundingBox[0] - lineWidth,
2965
+ boundingBox[1] - lineWidth,
2966
+ boundingBox[2] + 2 * lineWidth,
2967
+ boundingBox[3] + 2 * lineWidth
2968
+ ];
2969
+ }
2970
+
2971
+ return boundingBox;
2972
+ };
2973
+
2974
+ // transforms a bounding box and returns a new rect that contains it
2975
+ var transformBBox = function (box, matrix) {
2976
+ var bl = multVecMatrix([box[0], box[1]], matrix);
2977
+ var br = multVecMatrix([box[0] + box[2], box[1]], matrix);
2978
+ var tl = multVecMatrix([box[0], box[1] + box[3]], matrix);
2979
+ var tr = multVecMatrix([box[0] + box[2], box[1] + box[3]], matrix);
2980
+
2981
+ var bottom = Math.min(bl[1], br[1], tl[1], tr[1]);
2982
+ var left = Math.min(bl[0], br[0], tl[0], tr[0]);
2983
+ var top = Math.max(bl[1], br[1], tl[1], tr[1]);
2984
+ var right = Math.max(bl[0], br[0], tl[0], tr[0]);
2985
+
2986
+ return [
2987
+ left,
2988
+ bottom,
2989
+ right - left,
2990
+ top - bottom
2991
+ ]
2992
+ };
2993
+
2994
+ // draws a polygon
2995
+ var polygon = function (node, refsHandler, attributeState, closed) {
2996
+ if (!node.hasAttribute("points") || node.getAttribute("points") === "") {
2997
+ return;
2998
+ }
2999
+
3000
+ var points = parsePointsString(node.getAttribute("points"));
3001
+ var lines = [{op: "m", c: points[0]}];
3002
+ var i, angle;
3003
+ for (i = 1; i < points.length; i++) {
3004
+ lines.push({op: "l", c: points[i]});
3005
+ }
3006
+
3007
+ if (closed) {
3008
+ lines.push({op: "h"});
3009
+ }
3010
+
3011
+ _pdf.path(lines);
3012
+
3013
+ var markerEnd = node.getAttribute("marker-end"),
3014
+ markerStart = node.getAttribute("marker-start"),
3015
+ markerMid = node.getAttribute("marker-mid");
3016
+
3017
+ if (markerStart || markerMid || markerEnd) {
3018
+ var length = lines.length;
3019
+ var markers = new MarkerList();
3020
+ if (markerStart) {
3021
+ markerStart = iriReference.exec(markerStart)[1];
3022
+ angle = addVectors(getDirectionVector(lines[0].c, lines[1].c), getDirectionVector(lines[length - 2].c, lines[0].c));
3023
+ markers.addMarker(new Marker(markerStart, lines[0].c, Math.atan2(angle[1], angle[0])));
3024
+ }
3025
+
3026
+ if (markerMid) {
3027
+ markerMid = iriReference.exec(markerMid)[1];
3028
+ var prevAngle = getDirectionVector(lines[0].c, lines[1].c), curAngle;
3029
+ for (i = 1; i < lines.length - 2; i++) {
3030
+ curAngle = getDirectionVector(lines[i].c, lines[i + 1].c);
3031
+ angle = addVectors(prevAngle, curAngle);
3032
+ markers.addMarker(new Marker(markerMid, lines[i].c, Math.atan2(angle[1], angle[0])));
3033
+ prevAngle = curAngle;
3034
+ }
3035
+
3036
+ curAngle = getDirectionVector(lines[length - 2].c, lines[0].c);
3037
+ angle = addVectors(prevAngle, curAngle);
3038
+ markers.addMarker(new Marker(markerMid, lines[length - 2].c, Math.atan2(angle[1], angle[0])));
3039
+ }
3040
+
3041
+ if (markerEnd) {
3042
+ markerEnd = iriReference.exec(markerEnd)[1];
3043
+ angle = addVectors(getDirectionVector(lines[0].c, lines[1].c), getDirectionVector(lines[length - 2].c, lines[0].c));
3044
+ markers.addMarker(new Marker(markerEnd, lines[0].c, Math.atan2(angle[1], angle[0])));
3045
+ }
3046
+
3047
+ markers.draw(_pdf.unitMatrix, refsHandler, attributeState);
3048
+ }
3049
+ };
3050
+
3051
+ // draws an image
3052
+ var image = function (node) {
3053
+ var width = parseFloat(node.getAttribute("width")),
3054
+ height = parseFloat(node.getAttribute("height")),
3055
+ x = parseFloat(node.getAttribute("x") || 0),
3056
+ y = parseFloat(node.getAttribute("y") || 0);
3057
+
3058
+
3059
+ var imageUrl = node.getAttribute("xlink:href") || node.getAttribute("href");
3060
+
3061
+ var dataUrl = imageUrl.match(dataUrlRegex);
3062
+ if (dataUrl && dataUrl[2] === "image/svg+xml") {
3063
+ var svgText = dataUrl[5];
3064
+ if (dataUrl[4] === "base64") {
3065
+ svgText = atob(svgText);
3066
+ } else {
3067
+ svgText = decodeURIComponent(svgText);
3068
+ }
3069
+
3070
+ var parser = new DOMParser();
3071
+ var svgElement = parser.parseFromString(svgText, "image/svg+xml").firstElementChild;
3072
+
3073
+ // unless preserveAspectRatio starts with "defer", the preserveAspectRatio attribute of the svg is ignored
3074
+ var preserveAspectRatio = node.getAttribute("preserveAspectRatio");
3075
+ if (!preserveAspectRatio
3076
+ || preserveAspectRatio.indexOf("defer") < 0
3077
+ || !svgElement.getAttribute("preserveAspectRatio")) {
3078
+ svgElement.setAttribute("preserveAspectRatio", preserveAspectRatio);
3079
+ }
3080
+
3081
+ svgElement.setAttribute("x", String(x));
3082
+ svgElement.setAttribute("y", String(y));
3083
+ svgElement.setAttribute("width", String(width));
3084
+ svgElement.setAttribute("height", String(height));
3085
+
3086
+ renderNode(svgElement, _pdf.unitMatrix, {}, false, false, AttributeState.default());
3087
+ return;
3088
+ }
3089
+
3090
+ try {
3091
+ _pdf.addImage(
3092
+ imageUrl,
3093
+ "", // will be ignored anyways if imageUrl is a data url
3094
+ x,
3095
+ y,
3096
+ width,
3097
+ height
3098
+ );
3099
+ } catch (e) {
3100
+ (typeof console === "object"
3101
+ && console.warn
3102
+ && console.warn('svg2pdfjs: Images with external resource link are not supported! ("' + imageUrl + '")'));
3103
+ }
3104
+ };
3105
+
3106
+ // draws a path
3107
+ var path = function (node, tfMatrix, refsHandler, withinClipPath, attributeState) {
3108
+ var list = getPathSegList(node);
3109
+ var markerEnd = node.getAttribute("marker-end"),
3110
+ markerStart = node.getAttribute("marker-start"),
3111
+ markerMid = node.getAttribute("marker-mid");
3112
+
3113
+ markerEnd && (markerEnd = iriReference.exec(markerEnd)[1]);
3114
+ markerStart && (markerStart = iriReference.exec(markerStart)[1]);
3115
+ markerMid && (markerMid = iriReference.exec(markerMid)[1]);
3116
+
3117
+ var getLinesFromPath = function () {
3118
+ var x = 0, y = 0;
3119
+ var x0 = x, y0 = y;
3120
+ var prevX, prevY, newX, newY;
3121
+ var to, p, p2, p3;
3122
+ var lines = [];
3123
+ var markers = new MarkerList();
3124
+ var op;
3125
+ var prevAngle = [0, 0], curAngle;
3126
+
3127
+ for (var i = 0; i < list.numberOfItems; i++) {
3128
+ var seg = list.getItem(i);
3129
+ var cmd = seg.pathSegTypeAsLetter;
3130
+ switch (cmd) {
3131
+ case "M":
3132
+ x0 = x;
3133
+ y0 = y;
3134
+ to = [seg.x, seg.y];
3135
+ op = "m";
3136
+ break;
3137
+ case "m":
3138
+ x0 = x;
3139
+ y0 = y;
3140
+ to = [seg.x + x, seg.y + y];
3141
+ op = "m";
3142
+ break;
3143
+ case "L":
3144
+ to = [seg.x, seg.y];
3145
+ op = "l";
3146
+ break;
3147
+ case "l":
3148
+ to = [seg.x + x, seg.y + y];
3149
+ op = "l";
3150
+ break;
3151
+ case "H":
3152
+ to = [seg.x, y];
3153
+ op = "l";
3154
+ newX = seg.x;
3155
+ newY = y;
3156
+ break;
3157
+ case "h":
3158
+ to = [seg.x + x, y];
3159
+ op = "l";
3160
+ newX = seg.x + x;
3161
+ newY = y;
3162
+ break;
3163
+ case "V":
3164
+ to = [x, seg.y];
3165
+ op = "l";
3166
+ newX = x;
3167
+ newY = seg.y;
3168
+ break;
3169
+ case "v":
3170
+ to = [x, seg.y + y];
3171
+ op = "l";
3172
+ newX = x;
3173
+ newY = seg.y + y;
3174
+ break;
3175
+ case "C":
3176
+ p2 = [seg.x1, seg.y1];
3177
+ p3 = [seg.x2, seg.y2];
3178
+ to = [seg.x, seg.y];
3179
+ break;
3180
+ case "c":
3181
+ p2 = [seg.x1 + x, seg.y1 + y];
3182
+ p3 = [seg.x2 + x, seg.y2 + y];
3183
+ to = [seg.x + x, seg.y + y];
3184
+ break;
3185
+ case "S":
3186
+ p2 = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
3187
+ p3 = [seg.x2, seg.y2];
3188
+ to = [seg.x, seg.y];
3189
+ break;
3190
+ case "s":
3191
+ p2 = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
3192
+ p3 = [seg.x2 + x, seg.y2 + y];
3193
+ to = [seg.x + x, seg.y + y];
3194
+ break;
3195
+ case "Q":
3196
+ p = [seg.x1, seg.y1];
3197
+ p2 = toCubic([x, y], p);
3198
+ p3 = toCubic([seg.x, seg.y], p);
3199
+ to = [seg.x, seg.y];
3200
+ break;
3201
+ case "q":
3202
+ p = [seg.x1 + x, seg.y1 + y];
3203
+ p2 = toCubic([x, y], p);
3204
+ p3 = toCubic([x + seg.x, y + seg.y], p);
3205
+ to = [seg.x + x, seg.y + y];
3206
+ break;
3207
+ case "T":
3208
+ p = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
3209
+ p2 = toCubic([x, y], p);
3210
+ p3 = toCubic([seg.x, seg.y], p);
3211
+ to = [seg.x, seg.y];
3212
+ break;
3213
+ case "t":
3214
+ p = getControlPointFromPrevious(i, [x, y], list, prevX, prevY);
3215
+ p2 = toCubic([x, y], p);
3216
+ p3 = toCubic([x + seg.x, y + seg.y], p);
3217
+ to = [seg.x + x, seg.y + y];
3218
+ break;
3219
+ // TODO: A,a
3220
+ case "Z":
3221
+ case "z":
3222
+ x = x0;
3223
+ y = y0;
3224
+ lines.push({op: "h"});
3225
+ break;
3226
+ }
3227
+
3228
+ var hasStartMarker = markerStart
3229
+ && (i === 1
3230
+ || ("mM".indexOf(cmd) < 0 && "mM".indexOf(list.getItem(i - 1).pathSegTypeAsLetter) >= 0));
3231
+ var hasEndMarker = markerEnd
3232
+ && (i === list.numberOfItems - 1
3233
+ || ("mM".indexOf(cmd) < 0 && "mM".indexOf(list.getItem(i + 1).pathSegTypeAsLetter) >= 0));
3234
+ var hasMidMarker = markerMid
3235
+ && i > 0
3236
+ && !(i === 1 && "mM".indexOf(list.getItem(i - 1).pathSegTypeAsLetter) >= 0);
3237
+
3238
+ if ("sScCqQtT".indexOf(cmd) >= 0) {
3239
+ hasStartMarker && markers.addMarker(new Marker(markerStart, [x, y], getAngle([x, y], p2)));
3240
+ hasEndMarker && markers.addMarker(new Marker(markerEnd, to, getAngle(p3, to)));
3241
+ if (hasMidMarker) {
3242
+ curAngle = getDirectionVector([x, y], p2);
3243
+ curAngle = "mM".indexOf(list.getItem(i - 1).pathSegTypeAsLetter) >= 0 ?
3244
+ curAngle : normalize(addVectors(prevAngle, curAngle));
3245
+ markers.addMarker(new Marker(markerMid, [x, y], Math.atan2(curAngle[1], curAngle[0])));
3246
+ }
3247
+
3248
+ prevAngle = getDirectionVector(p3, to);
3249
+
3250
+ prevX = x;
3251
+ prevY = y;
3252
+
3253
+ if (withinClipPath) {
3254
+ p2 = multVecMatrix(p2, tfMatrix);
3255
+ p3 = multVecMatrix(p3, tfMatrix);
3256
+ to = multVecMatrix(to, tfMatrix);
3257
+ }
3258
+
3259
+ lines.push({
3260
+ op: "c", c: [
3261
+ p2[0], p2[1],
3262
+ p3[0], p3[1],
3263
+ to[0], to[1]
3264
+ ]
3265
+ });
3266
+ } else if ("lLhHvVmM".indexOf(cmd) >= 0) {
3267
+ curAngle = getDirectionVector([x, y], to);
3268
+ hasStartMarker && markers.addMarker(new Marker(markerStart, [x, y], Math.atan2(curAngle[1], curAngle[0])));
3269
+ hasEndMarker && markers.addMarker(new Marker(markerEnd, to, Math.atan2(curAngle[1], curAngle[0])));
3270
+ if (hasMidMarker) {
3271
+ var angle = "mM".indexOf(cmd) >= 0 ?
3272
+ prevAngle : "mM".indexOf(list.getItem(i - 1).pathSegTypeAsLetter) >= 0 ?
3273
+ curAngle : normalize(addVectors(prevAngle, curAngle));
3274
+ markers.addMarker(new Marker(markerMid, [x, y], Math.atan2(angle[1], angle[0])));
3275
+ }
3276
+ prevAngle = curAngle;
3277
+
3278
+ if (withinClipPath) {
3279
+ to = multVecMatrix(to, tfMatrix);
3280
+ }
3281
+
3282
+ lines.push({op: op, c: to});
3283
+ }
3284
+
3285
+ if ("MLCSQT".indexOf(cmd) >= 0) {
3286
+ x = seg.x;
3287
+ y = seg.y;
3288
+ } else if ("mlcsqt".indexOf(cmd) >= 0) {
3289
+ x = seg.x + x;
3290
+ y = seg.y + y;
3291
+ } else if ("zZ".indexOf(cmd) < 0) {
3292
+ x = newX;
3293
+ y = newY;
3294
+ }
3295
+ }
3296
+
3297
+ return {lines: lines, markers: markers};
3298
+ };
3299
+ var lines = getLinesFromPath();
3300
+
3301
+ if (lines.lines.length > 0) {
3302
+ _pdf.path(lines.lines);
3303
+ }
3304
+
3305
+ if (markerEnd || markerStart || markerMid) {
3306
+ lines.markers.draw(_pdf.unitMatrix, refsHandler, attributeState);
3307
+ }
3308
+ };
3309
+
3310
+ // draws the element referenced by a use node, makes use of pdf's XObjects/FormObjects so nodes are only written once
3311
+ // to the pdf document. This highly reduces the file size and computation time.
3312
+ var use = function (node, tfMatrix, refsHandler) {
3313
+ var url = (node.getAttribute("href") || node.getAttribute("xlink:href"));
3314
+ // just in case someone has the idea to use empty use-tags, wtf???
3315
+ if (!url)
3316
+ return;
3317
+
3318
+ // get the size of the referenced form object (to apply the correct scaling)
3319
+ var id = url.substring(1);
3320
+ refsHandler.getRendered(id);
3321
+ var formObject = _pdf.getFormObject(id);
3322
+
3323
+ // scale and position it right
3324
+ var x = node.getAttribute("x") || 0;
3325
+ var y = node.getAttribute("y") || 0;
3326
+ var width = node.getAttribute("width") || formObject.width;
3327
+ var height = node.getAttribute("height") || formObject.height;
3328
+ var t = new _pdf.Matrix(width / formObject.width || 0, 0, 0, height / formObject.height || 0, x, y);
3329
+ t = _pdf.matrixMult(t, tfMatrix);
3330
+ _pdf.doFormObject(id, t);
3331
+ };
3332
+
3333
+ // draws a line
3334
+ var line = function (node, refsHandler, attributeState) {
3335
+ var p1 = [parseFloat(node.getAttribute('x1') || 0), parseFloat(node.getAttribute('y1') || 0)];
3336
+ var p2 = [parseFloat(node.getAttribute('x2') || 0), parseFloat(node.getAttribute('y2') || 0)];
3337
+
3338
+ if (attributeState.stroke !== null){
3339
+ _pdf.line(p1[0], p1[1], p2[0], p2[1]);
3340
+ }
3341
+
3342
+ var markerStart = node.getAttribute("marker-start"),
3343
+ markerEnd = node.getAttribute("marker-end");
3344
+
3345
+ if (markerStart || markerEnd) {
3346
+ var markers = new MarkerList();
3347
+ var angle = getAngle(p1, p2);
3348
+ if (markerStart) {
3349
+ markers.addMarker(new Marker(iriReference.exec(markerStart)[1], p1, angle));
3350
+ }
3351
+ if (markerEnd) {
3352
+ markers.addMarker(new Marker(iriReference.exec(markerEnd)[1], p2, angle));
3353
+ }
3354
+ markers.draw(_pdf.unitMatrix, refsHandler, attributeState);
3355
+ }
3356
+ };
3357
+
3358
+ // draws a rect
3359
+ var rect = function (node) {
3360
+ _pdf.roundedRect(
3361
+ parseFloat(node.getAttribute('x')) || 0,
3362
+ parseFloat(node.getAttribute('y')) || 0,
3363
+ parseFloat(node.getAttribute('width')),
3364
+ parseFloat(node.getAttribute('height')),
3365
+ parseFloat(node.getAttribute('rx')) || 0,
3366
+ parseFloat(node.getAttribute('ry')) || 0
3367
+ );
3368
+ };
3369
+
3370
+ // draws an ellipse
3371
+ var ellipse = function (node) {
3372
+ _pdf.ellipse(
3373
+ parseFloat(node.getAttribute('cx')) || 0,
3374
+ parseFloat(node.getAttribute('cy')) || 0,
3375
+ parseFloat(node.getAttribute('rx')),
3376
+ parseFloat(node.getAttribute('ry'))
3377
+ );
3378
+ };
3379
+
3380
+ // draws a circle
3381
+ var circle = function (node) {
3382
+ var radius = parseFloat(node.getAttribute('r')) || 0;
3383
+ _pdf.ellipse(
3384
+ parseFloat(node.getAttribute('cx')) || 0,
3385
+ parseFloat(node.getAttribute('cy')) || 0,
3386
+ radius,
3387
+ radius
3388
+ );
3389
+ };
3390
+
3391
+ // applies text transformations to a text node
3392
+ var transformText = function (node, text) {
3393
+ var textTransform = getAttribute(node, "text-transform");
3394
+ switch (textTransform) {
3395
+ case "uppercase": return text.toUpperCase();
3396
+ case "lowercase": return text.toLowerCase();
3397
+ default: return text;
3398
+ // TODO: capitalize, full-width
3399
+ }
3400
+ };
3401
+
3402
+ /**
3403
+ * Canvas text measuring is a lot faster than svg measuring. However, it is inaccurate for some fonts. So test each
3404
+ * font once and decide if canvas is accurate enough.
3405
+ * @param {string} text
3406
+ * @param {string} fontFamily
3407
+ * @returns {function(string, string, string, string, string)}
3408
+ */
3409
+ var getMeasureFunction = (function getMeasureFunction() {
3410
+ /**
3411
+ * @param {string} text
3412
+ * @param {string} fontFamily
3413
+ * @param {string} fontSize
3414
+ * @param {string} fontStyle
3415
+ * @param {string} fontWeight
3416
+ */
3417
+ function canvasTextMeasure(text, fontFamily, fontSize, fontStyle, fontWeight) {
3418
+ var canvas = document.createElement("canvas");
3419
+ var context = canvas.getContext("2d");
3420
+
3421
+ context.font = [fontStyle, fontWeight, fontSize, fontFamily].join(" ");
3422
+ return context.measureText(text).width;
3423
+ }
3424
+
3425
+ /**
3426
+ * @param {string} text
3427
+ * @param {string} fontFamily
3428
+ * @param {string} fontSize
3429
+ * @param {string} fontStyle
3430
+ * @param {string} fontWeight
3431
+ */
3432
+ function svgTextMeasure(text, fontFamily, fontSize, fontStyle, fontWeight) {
3433
+ var textNode = document.createElementNS(svgNamespaceURI, "text");
3434
+ textNode.setAttribute("font-family", fontFamily);
3435
+ textNode.setAttribute("font-size", fontSize);
3436
+ textNode.setAttribute("font-style", fontStyle);
3437
+ textNode.setAttribute("font-weight", fontWeight);
3438
+ textNode.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
3439
+ textNode.appendChild(document.createTextNode(text));
3440
+
3441
+ var svg = document.createElementNS(svgNamespaceURI, "svg");
3442
+ svg.appendChild(textNode);
3443
+ svg.setAttribute("visibility", "hidden");
3444
+ document.body.appendChild(svg);
3445
+
3446
+ var width = textNode.getBBox().width;
3447
+
3448
+ document.body.removeChild(svg);
3449
+
3450
+ return width;
3451
+ }
3452
+
3453
+ var testString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!\"$%&/()=?'\\+*-_.:,;^}][{#~|<>";
3454
+ var epsilon = 0.1;
3455
+ var measureMethods = {};
3456
+
3457
+ return function getMeasureFunction(fontFamily) {
3458
+ var method = measureMethods[fontFamily];
3459
+ if (!method) {
3460
+ var fontSize = "16px";
3461
+ var fontStyle = "normal";
3462
+ var fontWeight = "normal";
3463
+ var canvasWidth = canvasTextMeasure(testString, fontFamily, fontSize, fontStyle, fontWeight);
3464
+ var svgWidth = svgTextMeasure(testString, fontFamily, fontSize, fontStyle, fontWeight);
3465
+
3466
+ method = Math.abs(canvasWidth - svgWidth) < epsilon ? canvasTextMeasure : svgTextMeasure;
3467
+
3468
+ measureMethods[fontFamily] = method;
3469
+ }
3470
+
3471
+ return method;
3472
+ }
3473
+ })();
3474
+
3475
+ /**
3476
+ * @param {string} text
3477
+ * @param {AttributeState} attributeState
3478
+ * @returns {number}
3479
+ */
3480
+ function measureTextWidth(text, attributeState) {
3481
+ if (text.length === 0) {
3482
+ return 0;
3483
+ }
3484
+
3485
+ var fontFamily = attributeState.fontFamily;
3486
+ var measure = getMeasureFunction(fontFamily);
3487
+
3488
+ return measure(text, attributeState.fontFamily, attributeState.fontSize + "px", attributeState.fontStyle, attributeState.fontWeight);
3489
+ }
3490
+
3491
+ /**
3492
+ * @param {string} text
3493
+ * @param {AttributeState} attributeState
3494
+ * @returns {number}
3495
+ */
3496
+ function getTextOffset(text, attributeState) {
3497
+ var textAnchor = attributeState.textAnchor;
3498
+ if (textAnchor === "start") {
3499
+ return 0;
3500
+ }
3501
+
3502
+ var width = measureTextWidth(text, attributeState);
3503
+
3504
+ var xOffset = 0;
3505
+ switch (textAnchor) {
3506
+ case "end":
3507
+ xOffset = width;
3508
+ break;
3509
+ case "middle":
3510
+ xOffset = width / 2;
3511
+ break;
3512
+ }
3513
+
3514
+ return xOffset;
3515
+ }
3516
+
3517
+ /**
3518
+ * @param {string} textAnchor
3519
+ * @param {number} originX
3520
+ * @param {number} originY
3521
+ * @constructor
3522
+ */
3523
+ function TextChunk(textAnchor, originX, originY) {
3524
+ this.texts = [];
3525
+ this.textNodes = [];
3526
+ this.textAnchor = textAnchor;
3527
+ this.originX = originX;
3528
+ this.originY = originY;
3529
+ }
3530
+
3531
+ /**
3532
+ * @param {SVGElement} tSpan
3533
+ * @param {string} text
3534
+ */
3535
+ TextChunk.prototype.add = function(tSpan, text) {
3536
+ this.texts.push(text);
3537
+ this.textNodes.push(tSpan);
3538
+ };
3539
+ /**
3540
+ * Outputs the chunk to pdf.
3541
+ * @param {jsPDF.Matrix} transform
3542
+ * @param {AttributeState} attributeState
3543
+ * @returns {[number, number]} The last current text position.
3544
+ */
3545
+ TextChunk.prototype.put = function (transform, attributeState) {
3546
+ var i, textNode;
3547
+
3548
+ var xs = [], ys = [], attributeStates = [];
3549
+ var currentTextX = this.originX, currentTextY = this.originY;
3550
+ var minX = currentTextX, maxX = currentTextX;
3551
+ for (i = 0; i < this.textNodes.length; i++) {
3552
+ textNode = this.textNodes[i];
3553
+
3554
+ var x = currentTextX;
3555
+ var y = currentTextY;
3556
+
3557
+ if (textNode.nodeName === "#text") {
3558
+ textNodeAttributeState = attributeState
3559
+ } else {
3560
+ var textNodeAttributeState = attributeState.clone();
3561
+ var tSpanColor = getAttribute(textNode, "fill");
3562
+ setTextProperties(textNode, tSpanColor && new RGBColor(tSpanColor), textNodeAttributeState);
3563
+
3564
+ var tSpanDx = textNode.getAttribute("dx");
3565
+ if (tSpanDx !== null) {
3566
+ x += toPixels(tSpanDx, textNodeAttributeState.fontSize);
3567
+ }
3568
+
3569
+ var tSpanDy = textNode.getAttribute("dy");
3570
+ if (tSpanDy !== null) {
3571
+ y += toPixels(tSpanDy, textNodeAttributeState.fontSize);
3572
+ }
3573
+ }
3574
+
3575
+ attributeStates[i] = textNodeAttributeState;
3576
+
3577
+ xs[i] = x;
3578
+ ys[i] = y;
3579
+
3580
+ currentTextX = x + measureTextWidth(this.texts[i], textNodeAttributeState);
3581
+
3582
+ currentTextY = y;
3583
+
3584
+ minX = Math.min(minX, x);
3585
+ maxX = Math.max(maxX, currentTextX);
3586
+ }
3587
+
3588
+ var textOffset;
3589
+ switch (this.textAnchor) {
3590
+ case "start": textOffset = 0; break;
3591
+ case "middle": textOffset = (maxX - minX) / 2; break;
3592
+ case "end": textOffset = maxX - minX; break;
3593
+ }
3594
+
3595
+ for (i = 0; i < this.textNodes.length; i++) {
3596
+ textNode = this.textNodes[i];
3597
+
3598
+ if (textNode.nodeName !== "#text") {
3599
+ var tSpanVisibility = getAttribute(textNode, "visibility") || attributeState.visibility;
3600
+ if (tSpanVisibility === "hidden") {
3601
+ continue;
3602
+ }
3603
+ }
3604
+
3605
+ _pdf.saveGraphicsState();
3606
+ putTextProperties(attributeStates[i], attributeState);
3607
+
3608
+ _pdf.text(xs[i] - textOffset, ys[i], this.texts[i], void 0, transform);
3609
+
3610
+ _pdf.restoreGraphicsState();
3611
+ }
3612
+
3613
+ return [currentTextX, currentTextY];
3614
+ };
3615
+
3616
+ /**
3617
+ * Convert em, px and bare number attributes to pixel values
3618
+ * @param {string} value
3619
+ * @param {number} pdfFontSize
3620
+ */
3621
+ function toPixels(value, pdfFontSize) {
3622
+ var match;
3623
+
3624
+ // em
3625
+ match = value && value.toString().match(/^([\-0-9.]+)em$/);
3626
+ if (match) {
3627
+ return parseFloat(match[1]) * pdfFontSize;
3628
+ }
3629
+
3630
+ // pixels
3631
+ match = value && value.toString().match(/^([\-0-9.]+)(px|)$/);
3632
+ if (match) {
3633
+ return parseFloat(match[1]);
3634
+ }
3635
+ return 0;
3636
+ }
3637
+
3638
+
3639
+ function transformXmlSpace(trimmedText, attributeState) {
3640
+ trimmedText = removeNewlines(trimmedText);
3641
+ trimmedText = replaceTabsBySpace(trimmedText);
3642
+
3643
+ if (attributeState.xmlSpace === "default") {
3644
+ trimmedText = trimmedText.trim();
3645
+ trimmedText = consolidateSpaces(trimmedText);
3646
+ }
3647
+
3648
+ return trimmedText;
3649
+ }
3650
+
3651
+ /**
3652
+ * Draws a text element and its tspan children.
3653
+ * @param {SVGElement} node
3654
+ * @param {jsPDF.Matrix} tfMatrix
3655
+ * @param {boolean} hasFillColor
3656
+ * @param {RGBColor} fillRGB
3657
+ * @param {AttributeState} attributeState
3658
+ */
3659
+ var text = function (node, tfMatrix, hasFillColor, fillRGB, attributeState) {
3660
+ _pdf.saveGraphicsState();
3661
+
3662
+ var dx, dy, xOffset = 0;
3663
+
3664
+ var pdfFontSize = _pdf.getFontSize();
3665
+ var textX = toPixels(node.getAttribute('x'), pdfFontSize);
3666
+ var textY = toPixels(node.getAttribute('y'), pdfFontSize);
3667
+
3668
+ dx = toPixels(node.getAttribute("dx"), pdfFontSize);
3669
+ dy = toPixels(node.getAttribute("dy"), pdfFontSize);
3670
+
3671
+ var visibility = attributeState.visibility;
3672
+ // when there are no tspans draw the text directly
3673
+ var tSpanCount = node.childElementCount;
3674
+ if (tSpanCount === 0) {
3675
+ var trimmedText = transformXmlSpace(node.textContent, attributeState);
3676
+ var transformedText = transformText(node, trimmedText);
3677
+ xOffset = getTextOffset(transformedText, attributeState);
3678
+
3679
+ if (visibility === "visible") {
3680
+ _pdf.text(
3681
+ textX + dx - xOffset,
3682
+ textY + dy,
3683
+ transformedText,
3684
+ void 0,
3685
+ tfMatrix
3686
+ );
3687
+ }
3688
+ } else {
3689
+ // otherwise loop over tspans and position each relative to the previous one
3690
+ var currentTextSegment = new TextChunk(attributeState.textAnchor, textX + dx, textY + dy);
3691
+
3692
+ for (var i = 0; i < node.childNodes.length; i++) {
3693
+ var textNode = node.childNodes[i];
3694
+ if (!textNode.textContent) {
3695
+ continue;
3696
+ }
3697
+
3698
+ var xmlSpace = attributeState.xmlSpace;
3699
+
3700
+ if (textNode.nodeName === "#text") {
3701
+
3702
+ } else if (nodeIs(textNode, "tspan")) {
3703
+ var tSpan = textNode;
3704
+
3705
+ var lastPositions;
3706
+
3707
+ var tSpanAbsX = tSpan.getAttribute("x");
3708
+ if (tSpanAbsX !== null) {
3709
+ var x = toPixels(tSpanAbsX, pdfFontSize);
3710
+
3711
+ lastPositions = currentTextSegment.put(tfMatrix, attributeState);
3712
+ currentTextSegment = new TextChunk(tSpan.getAttribute("text-anchor") || attributeState.textAnchor, x, lastPositions[1]);
3713
+ }
3714
+
3715
+ var tSpanAbsY = tSpan.getAttribute("y");
3716
+ if (tSpanAbsY !== null) {
3717
+ var y = toPixels(tSpanAbsY, pdfFontSize);
3718
+
3719
+ lastPositions = currentTextSegment.put(tfMatrix, attributeState);
3720
+ currentTextSegment = new TextChunk(tSpan.getAttribute("text-anchor") || attributeState.textAnchor, lastPositions[0], y);
3721
+ }
3722
+
3723
+ var tSpanXmlSpace = tSpan.getAttribute("xml:space");
3724
+ if (tSpanXmlSpace) {
3725
+ xmlSpace = tSpanXmlSpace;
3726
+ }
3727
+ }
3728
+
3729
+ trimmedText = textNode.textContent;
3730
+ trimmedText = removeNewlines(trimmedText);
3731
+ trimmedText = replaceTabsBySpace(trimmedText);
3732
+
3733
+ if (xmlSpace === "default") {
3734
+ if (i === 0) {
3735
+ trimmedText = trimLeft(trimmedText);
3736
+ }
3737
+ if (i === tSpanCount - 1) {
3738
+ trimmedText = trimRight(trimmedText);
3739
+ }
3740
+
3741
+ trimmedText = consolidateSpaces(trimmedText);
3742
+ }
3743
+
3744
+ transformedText = transformText(node, trimmedText);
3745
+ currentTextSegment.add(textNode, transformedText);
3746
+ }
3747
+
3748
+ currentTextSegment.put(tfMatrix, attributeState);
3749
+ }
3750
+
3751
+ _pdf.restoreGraphicsState();
3752
+ };
3753
+
3754
+ // renders all children of a node
3755
+ var renderChildren = function (node, tfMatrix, refsHandler, withinDefs, withinClipPath, attributeState) {
3756
+ forEachChild(node, function (i, node) {
3757
+ renderNode(node, tfMatrix, refsHandler, withinDefs, withinClipPath, attributeState);
3758
+ });
3759
+ };
3760
+
3761
+ // adds a gradient to defs and the pdf document for later use, type is either "axial" or "radial"
3762
+ // opacity is only supported rudimentary by averaging over all stops
3763
+ // transforms are applied on use
3764
+ var putGradient = function (node, type, coords) {
3765
+ var colors = [];
3766
+ var opacitySum = 0;
3767
+ var hasOpacity = false;
3768
+ var gState;
3769
+ forEachChild(node, function (i, element) {
3770
+ // since opacity gradients are hard to realize, average the opacity over the control points
3771
+ if (element.tagName.toLowerCase() === "stop") {
3772
+ var color = new RGBColor(getAttribute(element, "stop-color"));
3773
+ colors.push({
3774
+ offset: parseFloat(element.getAttribute("offset")),
3775
+ color: [color.r, color.g, color.b]
3776
+ });
3777
+ var opacity = getAttribute(element, "stop-opacity");
3778
+ if (opacity && opacity != 1) {
3779
+ opacitySum += parseFloat(opacity);
3780
+ hasOpacity = true;
3781
+ }
3782
+ }
3783
+ });
3784
+
3785
+ if (hasOpacity) {
3786
+ gState = new _pdf.GState({opacity: opacitySum / colors.length});
3787
+ }
3788
+
3789
+ var pattern = new _pdf.ShadingPattern(type, coords, colors, gState);
3790
+ var id = node.getAttribute("id");
3791
+ _pdf.addShadingPattern(id, pattern);
3792
+ };
3793
+
3794
+ var pattern = function (node, refsHandler, attributeState) {
3795
+ var id = node.getAttribute("id");
3796
+
3797
+ // the transformations directly at the node are written to the pattern transformation matrix
3798
+ var bBox = getUntransformedBBox(node);
3799
+ var pattern = new _pdf.TilingPattern([bBox[0], bBox[1], bBox[0] + bBox[2], bBox[1] + bBox[3]], bBox[2], bBox[3],
3800
+ null, _pdf.unitMatrix /* this parameter is ignored !*/);
3801
+
3802
+ _pdf.beginTilingPattern(pattern);
3803
+ // continue without transformation
3804
+ renderChildren(node, _pdf.unitMatrix, refsHandler, false, false, attributeState);
3805
+ _pdf.endTilingPattern(id, pattern);
3806
+ };
3807
+
3808
+ var fontAliases = {
3809
+ "sans-serif": "helvetica",
3810
+ "verdana": "helvetica",
3811
+ "arial": "helvetica",
3812
+
3813
+ "fixed": "courier",
3814
+ "monospace": "courier",
3815
+ "terminal": "courier",
3816
+
3817
+ "serif": "times",
3818
+ "cursive": "times",
3819
+ "fantasy": "times"
3820
+ };
3821
+
3822
+ /**
3823
+ * @param {AttributeState} attributeState
3824
+ * @param {string[]} fontFamilies
3825
+ * @return {string}
3826
+ */
3827
+ function findFirstAvailableFontFamily(attributeState, fontFamilies) {
3828
+ var fontType = "";
3829
+ if (attributeState.fontWeight === "bold") {
3830
+ fontType = "bold";
3831
+ }
3832
+ if (attributeState.fontStyle === "italic") {
3833
+ fontType += "italic";
3834
+ }
3835
+ if (fontType === "") {
3836
+ fontType = "normal";
3837
+ }
3838
+
3839
+ var availableFonts = _pdf.getFontList();
3840
+ var firstAvailable = "";
3841
+ var fontIsAvailable = fontFamilies.some(function (font) {
3842
+ var availableStyles = availableFonts[font];
3843
+ if (availableStyles && availableStyles.indexOf(fontType) >= 0) {
3844
+ firstAvailable = font;
3845
+ return true;
3846
+ }
3847
+
3848
+ font = font.toLowerCase();
3849
+ if (fontAliases.hasOwnProperty(font)) {
3850
+ firstAvailable = font;
3851
+ return true;
3852
+ }
3853
+
3854
+ return false;
3855
+ });
3856
+
3857
+ if (!fontIsAvailable) {
3858
+ firstAvailable = "times";
3859
+ }
3860
+
3861
+ return firstAvailable;
3862
+ }
3863
+
3864
+ function setTextProperties(node, fillRGB, attributeState) {
3865
+ if (fillRGB && fillRGB.ok) {
3866
+ attributeState.fill = fillRGB;
3867
+ }
3868
+
3869
+ var fontWeight = getAttribute(node, "font-weight");
3870
+ if (fontWeight) {
3871
+ attributeState.fontWeight = fontWeight;
3872
+ }
3873
+
3874
+ var fontStyle = getAttribute(node, "font-style");
3875
+ if (fontStyle) {
3876
+ attributeState.fontStyle = fontStyle;
3877
+ }
3878
+
3879
+ var fontFamily = getAttribute(node, "font-family");
3880
+ if (fontFamily) {
3881
+ var fontFamilies = FontFamily.parse(fontFamily);
3882
+ attributeState.fontFamily = findFirstAvailableFontFamily(attributeState, fontFamilies);
3883
+ }
3884
+
3885
+ var fontSize = getAttribute(node, "font-size");
3886
+ if (fontSize) {
3887
+ attributeState.fontSize = parseFloat(fontSize);
3888
+ }
3889
+
3890
+ var textAnchor = getAttribute(node, "text-anchor");
3891
+ if (textAnchor) {
3892
+ attributeState.textAnchor = textAnchor;
3893
+ }
3894
+ }
3895
+
3896
+ /**
3897
+ * @param {AttributeState} attributeState
3898
+ * @param {AttributeState} parentAttributeState
3899
+ */
3900
+ function putTextProperties(attributeState, parentAttributeState) {
3901
+ if (attributeState.fontFamily !== parentAttributeState.fontFamily) {
3902
+ if (fontAliases.hasOwnProperty(attributeState.fontFamily)) {
3903
+ _pdf.setFont(fontAliases[attributeState.fontFamily]);
3904
+ } else {
3905
+ _pdf.setFont(attributeState.fontFamily);
3906
+ }
3907
+ }
3908
+
3909
+ if (attributeState.fill !== parentAttributeState.fill && attributeState.fill.ok) {
3910
+ var fillRGB = attributeState.fill;
3911
+ _pdf.setTextColor(fillRGB.r, fillRGB.g, fillRGB.b);
3912
+ }
3913
+
3914
+ if (attributeState.fontWeight !== parentAttributeState.fontWeight
3915
+ || attributeState.fontStyle !== parentAttributeState.fontStyle) {
3916
+ var fontType = "";
3917
+ if (attributeState.fontWeight === "bold") {
3918
+ fontType = "bold";
3919
+ }
3920
+ if (attributeState.fontStyle === "italic") {
3921
+ fontType += "italic";
3922
+ }
3923
+
3924
+ if (fontType === "") {
3925
+ fontType = "normal";
3926
+ }
3927
+
3928
+ _pdf.setFontType(fontType);
3929
+ }
3930
+
3931
+ if (attributeState.fontSize !== parentAttributeState.fontSize) {
3932
+ _pdf.setFontSize(attributeState.fontSize);
3933
+ }
3934
+ }
3935
+
3936
+
3937
+ /**
3938
+ * Renders a svg node.
3939
+ * @param node The svg element
3940
+ * @param contextTransform The current transformation matrix
3941
+ * @param refsHandler The handler that will render references on demand
3942
+ * @param withinDefs True iff we are top-level within a defs node, so the target can be switched to an pdf form object
3943
+ * @param {boolean} withinClipPath
3944
+ * @param {AttributeState} attributeState Keeps track of parent attributes that are inherited automatically
3945
+ */
3946
+ var renderNode = function (node, contextTransform, refsHandler, withinDefs, withinClipPath, attributeState) {
3947
+ var parentAttributeState = attributeState;
3948
+ attributeState = attributeState.clone();
3949
+
3950
+ if (nodeIs(node, "defs,clippath,pattern,lineargradient,radialgradient,marker")) {
3951
+ // we will only render them on demand
3952
+ return;
3953
+ }
3954
+
3955
+ if (getAttribute(node, "display") === "none") {
3956
+ return;
3957
+ }
3958
+
3959
+ var visibility = attributeState.visibility = getAttribute(node, "visibility") || attributeState.visibility;
3960
+ if (visibility === "hidden" && !nodeIs(node, "svg,g,marker,a,pattern,defs,text")) {
3961
+ return;
3962
+ }
3963
+
3964
+ var tfMatrix,
3965
+ hasFillColor = false,
3966
+ fillRGB = null,
3967
+ fill = "inherit",
3968
+ stroke = "inherit",
3969
+ patternOrGradient = undefined,
3970
+ bBox;
3971
+
3972
+ //
3973
+ // Decide about the render target and set the correct transformation
3974
+ //
3975
+
3976
+ // if we are within a defs node, start a new pdf form object and draw this node and all children on that instead
3977
+ // of the top-level page
3978
+ var targetIsFormObject = withinDefs && !nodeIs(node, "lineargradient,radialgradient,pattern,clippath");
3979
+ if (targetIsFormObject) {
3980
+
3981
+ // the transformations directly at the node are written to the pdf form object transformation matrix
3982
+ tfMatrix = computeNodeTransform(node);
3983
+ bBox = getUntransformedBBox(node);
3984
+
3985
+ _pdf.beginFormObject(bBox[0], bBox[1], bBox[2], bBox[3], tfMatrix);
3986
+
3987
+ // continue without transformation and set withinDefs to false to prevent child nodes from starting new form objects
3988
+ tfMatrix = _pdf.unitMatrix;
3989
+ withinDefs = false;
3990
+
3991
+ } else {
3992
+ tfMatrix = _pdf.matrixMult(computeNodeTransform(node), contextTransform);
3993
+
3994
+ if (!withinClipPath) {
3995
+ _pdf.saveGraphicsState();
3996
+ }
3997
+ }
3998
+
3999
+ var hasClipPath = node.hasAttribute("clip-path") && node.getAttribute("clip-path") !== "none";
4000
+ if (hasClipPath) {
4001
+ var clipPathId = iriReference.exec(node.getAttribute("clip-path"));
4002
+ var clipPathNode = refsHandler.getRendered(clipPathId[1]);
4003
+
4004
+ var clipPathMatrix = tfMatrix;
4005
+ if (clipPathNode.hasAttribute("clipPathUnits")
4006
+ && clipPathNode.getAttribute("clipPathUnits").toLowerCase() === "objectboundingbox") {
4007
+ bBox = getUntransformedBBox(node);
4008
+ clipPathMatrix = _pdf.matrixMult(new _pdf.Matrix(bBox[2], 0, 0, bBox[3], bBox[0], bBox[1]), clipPathMatrix);
4009
+ }
4010
+
4011
+ // here, browsers show different results for a "transform" attribute on the clipPath element itself:
4012
+ // IE/Edge considers it, Chrome and Firefox ignore it. However, the specification lists "transform" as a valid
4013
+ // attribute for clipPath elements, although not explicitly explaining its behavior. This implementation follows
4014
+ // IE/Edge and considers the "transform" attribute as additional transformation within the coordinate system
4015
+ // established by the "clipPathUnits" attribute.
4016
+ clipPathMatrix = _pdf.matrixMult(computeNodeTransform(clipPathNode), clipPathMatrix);
4017
+
4018
+ _pdf.saveGraphicsState();
4019
+ _pdf.setCurrentTransformationMatrix(clipPathMatrix);
4020
+
4021
+ renderChildren(clipPathNode, _pdf.unitMatrix, refsHandler, false, true, attributeState);
4022
+ _pdf.clip().discardPath();
4023
+
4024
+ // as we cannot use restoreGraphicsState() to reset the transform (this would reset the clipping path, as well),
4025
+ // we must append the inverse instead
4026
+ _pdf.setCurrentTransformationMatrix(clipPathMatrix.inversed());
4027
+ }
4028
+
4029
+ //
4030
+ // extract fill and stroke mode
4031
+ //
4032
+
4033
+ // fill mode
4034
+ if (nodeIs(node, "g,path,rect,text,ellipse,line,circle,polygon,polyline")) {
4035
+ function setDefaultColor() {
4036
+ fillRGB = new RGBColor("rgb(0, 0, 0)");
4037
+ hasFillColor = true;
4038
+ fill = true;
4039
+ }
4040
+
4041
+ var fillColor = getAttribute(node, "fill");
4042
+ if (fillColor) {
4043
+ var url = iriReference.exec(fillColor);
4044
+ if (url) {
4045
+ // probably a gradient or pattern (or something unsupported)
4046
+ var fillUrl = url[1];
4047
+ var fillNode = refsHandler.getRendered(fillUrl);
4048
+ if (fillNode && nodeIs(fillNode, "lineargradient,radialgradient")) {
4049
+
4050
+ // matrix to convert between gradient space and user space
4051
+ // for "userSpaceOnUse" this is the current transformation: tfMatrix
4052
+ // for "objectBoundingBox" or default, the gradient gets scaled and transformed to the bounding box
4053
+ var gradientUnitsMatrix;
4054
+ if (!fillNode.hasAttribute("gradientUnits")
4055
+ || fillNode.getAttribute("gradientUnits").toLowerCase() === "objectboundingbox") {
4056
+ bBox || (bBox = getUntransformedBBox(node));
4057
+ gradientUnitsMatrix = new _pdf.Matrix(bBox[2], 0, 0, bBox[3], bBox[0], bBox[1]);
4058
+ } else {
4059
+ gradientUnitsMatrix = _pdf.unitMatrix;
4060
+ }
4061
+
4062
+ // matrix that is applied to the gradient before any other transformations
4063
+ var gradientTransform = parseTransform(fillNode.getAttribute("gradientTransform"));
4064
+
4065
+ patternOrGradient = {
4066
+ key: fillUrl,
4067
+ matrix: _pdf.matrixMult(gradientTransform, gradientUnitsMatrix)
4068
+ };
4069
+
4070
+ fill = true;
4071
+ } else if (fillNode && nodeIs(fillNode, "pattern")) {
4072
+ var fillBBox, y, width, height, x;
4073
+ patternOrGradient = { key: fillUrl };
4074
+
4075
+ var patternUnitsMatrix = _pdf.unitMatrix;
4076
+ if (!fillNode.hasAttribute("patternUnits")
4077
+ || fillNode.getAttribute("patternUnits").toLowerCase() === "objectboundingbox") {
4078
+ bBox || (bBox = getUntransformedBBox(node));
4079
+ patternUnitsMatrix = new _pdf.Matrix(1, 0, 0, 1, bBox[0], bBox[1]);
4080
+
4081
+ // TODO: slightly inaccurate (rounding errors? line width bBoxes?)
4082
+ fillBBox = getUntransformedBBox(fillNode);
4083
+ x = fillBBox[0] * bBox[0];
4084
+ y = fillBBox[1] * bBox[1];
4085
+ width = fillBBox[2] * bBox[2];
4086
+ height = fillBBox[3] * bBox[3];
4087
+ patternOrGradient.boundingBox = [x, y, x + width, y + height];
4088
+ patternOrGradient.xStep = width;
4089
+ patternOrGradient.yStep = height;
4090
+ }
4091
+
4092
+ var patternContentUnitsMatrix = _pdf.unitMatrix;
4093
+ if (fillNode.hasAttribute("patternContentUnits")
4094
+ && fillNode.getAttribute("patternContentUnits").toLowerCase() === "objectboundingbox") {
4095
+ bBox || (bBox = getUntransformedBBox(node));
4096
+ patternContentUnitsMatrix = new _pdf.Matrix(bBox[2], 0, 0, bBox[3], 0, 0);
4097
+
4098
+ fillBBox = patternOrGradient.boundingBox || getUntransformedBBox(fillNode);
4099
+ x = fillBBox[0] / bBox[0];
4100
+ y = fillBBox[1] / bBox[1];
4101
+ width = fillBBox[2] / bBox[2];
4102
+ height = fillBBox[3] / bBox[3];
4103
+ patternOrGradient.boundingBox = [x, y, x + width, y + height];
4104
+ patternOrGradient.xStep = width;
4105
+ patternOrGradient.yStep = height;
4106
+ }
4107
+
4108
+ var patternTransformMatrix = _pdf.unitMatrix;
4109
+ if (fillNode.hasAttribute("patternTransform")) {
4110
+ patternTransformMatrix = parseTransform(fillNode.getAttribute("patternTransform"));
4111
+ }
4112
+
4113
+ var matrix = patternContentUnitsMatrix;
4114
+ matrix = _pdf.matrixMult(matrix, patternUnitsMatrix);
4115
+ matrix = _pdf.matrixMult(matrix, patternTransformMatrix);
4116
+ matrix = _pdf.matrixMult(matrix, tfMatrix);
4117
+
4118
+ patternOrGradient.matrix = matrix;
4119
+
4120
+ fill = true;
4121
+ } else {
4122
+ // unsupported fill argument -> fill black
4123
+ setDefaultColor();
4124
+ }
4125
+ } else {
4126
+ // plain color
4127
+ fillRGB = parseColor(fillColor);
4128
+ if (fillRGB.ok) {
4129
+ hasFillColor = true;
4130
+ fill = true;
4131
+ } else {
4132
+ fill = false;
4133
+ }
4134
+ }
4135
+ }
4136
+
4137
+ // opacity is realized via a pdf graphics state
4138
+ var fillOpacity = 1.0, strokeOpacity = 1.0;
4139
+ var nodeFillOpacity = getAttribute(node, "fill-opacity");
4140
+ if (nodeFillOpacity) {
4141
+ fillOpacity *= parseFloat(nodeFillOpacity);
4142
+ }
4143
+ if (fillRGB && typeof fillRGB.a === "number") {
4144
+ fillOpacity *= fillRGB.a;
4145
+ }
4146
+
4147
+ var nodeStrokeOpacity = getAttribute(node, "stroke-opacity");
4148
+ if (nodeStrokeOpacity) {
4149
+ strokeOpacity *= parseFloat(nodeStrokeOpacity);
4150
+ }
4151
+ if (strokeRGB && typeof strokeRGB.a === "number") {
4152
+ strokeOpacity *= strokeRGB.a;
4153
+ }
4154
+
4155
+ var nodeOpacity = getAttribute(node, "opacity");
4156
+ if (nodeOpacity) {
4157
+ var opacity = parseFloat(nodeOpacity);
4158
+ strokeOpacity *= opacity;
4159
+ fillOpacity *= opacity;
4160
+ }
4161
+
4162
+ var hasFillOpacity = fillOpacity < 1.0;
4163
+ var hasStrokeOpacity = strokeOpacity < 1.0;
4164
+ if (hasFillOpacity || hasStrokeOpacity) {
4165
+ var gState = {};
4166
+ hasFillOpacity && (gState["opacity"] = fillOpacity);
4167
+ hasStrokeOpacity && (gState["stroke-opacity"] = strokeOpacity);
4168
+ _pdf.setGState(new _pdf.GState(gState));
4169
+ }
4170
+
4171
+ }
4172
+
4173
+ if (nodeIs(node, "g,path,rect,ellipse,line,circle,polygon,polyline")) {
4174
+ // text has no fill color, so don't apply it until here
4175
+ if (hasFillColor) {
4176
+ attributeState.fill = fillRGB;
4177
+ _pdf.setFillColor(fillRGB.r, fillRGB.g, fillRGB.b);
4178
+ }
4179
+
4180
+ // stroke mode
4181
+ var strokeColor = getAttribute(node, "stroke");
4182
+ if (strokeColor) {
4183
+ var strokeWidth = getAttribute(node, "stroke-width");
4184
+ if (strokeWidth !== void 0 && strokeWidth !== "") {
4185
+ strokeWidth = Math.abs(parseFloat(strokeWidth));
4186
+ attributeState.strokeWidth = strokeWidth;
4187
+ _pdf.setLineWidth(strokeWidth);
4188
+ } else {
4189
+ // needed for inherited zero width strokes
4190
+ strokeWidth = attributeState.strokeWidth
4191
+ }
4192
+ var strokeRGB = new RGBColor(strokeColor);
4193
+ if (strokeRGB.ok) {
4194
+ attributeState.stroke = strokeRGB;
4195
+ _pdf.setDrawColor(strokeRGB.r, strokeRGB.g, strokeRGB.b);
4196
+
4197
+ // pdf spec states: "A line width of 0 denotes the thinnest line that can be rendered at device resolution:
4198
+ // 1 device pixel wide". SVG, however, does not draw zero width lines.
4199
+ stroke = strokeWidth !== 0;
4200
+ }
4201
+ var lineCap = getAttribute(node, "stroke-linecap");
4202
+ if (lineCap) {
4203
+ _pdf.setLineCap(attributeState.strokeLinecap = lineCap);
4204
+ }
4205
+ var lineJoin = getAttribute(node, "stroke-linejoin");
4206
+ if (lineJoin) {
4207
+ _pdf.setLineJoin(attributeState.strokeLinejoin = lineJoin);
4208
+ }
4209
+ var dashArray = getAttribute(node, "stroke-dasharray");
4210
+ if (dashArray) {
4211
+ dashArray = parseFloats(dashArray);
4212
+ var dashOffset = parseInt(getAttribute(node, "stroke-dashoffset")) || 0;
4213
+ attributeState.strokeDasharray = dashArray;
4214
+ attributeState.strokeDashoffset = dashOffset;
4215
+ _pdf.setLineDashPattern(dashArray, dashOffset);
4216
+ }
4217
+ var miterLimit = getAttribute(node, "stroke-miterlimit");
4218
+ if (miterLimit !== void 0 && miterLimit !== "") {
4219
+ _pdf.setLineMiterLimit(attributeState.strokeMiterlimit = parseFloat(miterLimit));
4220
+ }
4221
+ }
4222
+ }
4223
+
4224
+ // inherit fill and stroke mode if not specified at this node
4225
+ if (fill === "inherit") {
4226
+ fill = attributeState.fill !== null;
4227
+ }
4228
+ if (stroke === "inherit") {
4229
+ stroke = attributeState.stroke !== null;
4230
+ }
4231
+
4232
+ var xmlSpace = node.getAttribute("xml:space");
4233
+ if (xmlSpace) {
4234
+ attributeState.xmlSpace = xmlSpace;
4235
+ }
4236
+
4237
+ setTextProperties(node, fillRGB, attributeState);
4238
+ putTextProperties(attributeState, parentAttributeState);
4239
+
4240
+ // do the actual drawing
4241
+ switch (node.tagName.toLowerCase()) {
4242
+ case 'svg':
4243
+ case 'g':
4244
+ case 'a':
4245
+ renderChildren(node, tfMatrix, refsHandler, withinDefs, false, attributeState);
4246
+ break;
4247
+
4248
+ case 'use':
4249
+ use(node, tfMatrix, refsHandler);
4250
+ break;
4251
+
4252
+ case 'line':
4253
+ if (!withinClipPath) {
4254
+ _pdf.setCurrentTransformationMatrix(tfMatrix);
4255
+ line(node, refsHandler, attributeState);
4256
+ }
4257
+ break;
4258
+
4259
+ case 'rect':
4260
+ if (!withinClipPath) {
4261
+ _pdf.setCurrentTransformationMatrix(tfMatrix);
4262
+ }
4263
+ rect(node);
4264
+ break;
4265
+
4266
+ case 'ellipse':
4267
+ if (!withinClipPath) {
4268
+ _pdf.setCurrentTransformationMatrix(tfMatrix);
4269
+ }
4270
+ ellipse(node);
4271
+ break;
4272
+
4273
+ case 'circle':
4274
+ if (!withinClipPath) {
4275
+ _pdf.setCurrentTransformationMatrix(tfMatrix);
4276
+ }
4277
+ circle(node);
4278
+ break;
4279
+ case 'text':
4280
+ text(node, tfMatrix, hasFillColor, fillRGB, attributeState);
4281
+ break;
4282
+
4283
+ case 'path':
4284
+ if (!withinClipPath) {
4285
+ _pdf.setCurrentTransformationMatrix(tfMatrix);
4286
+ }
4287
+ path(node, tfMatrix, refsHandler, withinClipPath, attributeState);
4288
+ break;
4289
+
4290
+ case 'polygon':
4291
+ case 'polyline':
4292
+ if (!withinClipPath) {
4293
+ _pdf.setCurrentTransformationMatrix(tfMatrix);
4294
+ }
4295
+ polygon(node, refsHandler, attributeState, node.tagName.toLowerCase() === "polygon");
4296
+ break;
4297
+
4298
+ case 'image':
4299
+ _pdf.setCurrentTransformationMatrix(tfMatrix);
4300
+ image(node);
4301
+ break;
4302
+ }
4303
+
4304
+ if (nodeIs(node, "path,rect,ellipse,circle,polygon,polyline") && !withinClipPath) {
4305
+ if (fill && stroke) {
4306
+ _pdf.fillStroke(patternOrGradient);
4307
+ } else if (fill) {
4308
+ _pdf.fill(patternOrGradient);
4309
+ } else if (stroke) {
4310
+ _pdf.stroke();
4311
+ } else {
4312
+ _pdf.discardPath();
4313
+ }
4314
+ }
4315
+
4316
+ // close either the formObject or the graphics context
4317
+ if (targetIsFormObject) {
4318
+ _pdf.endFormObject(node.getAttribute("id"));
4319
+ } else if (!withinClipPath) {
4320
+ _pdf.restoreGraphicsState();
4321
+ }
4322
+
4323
+ if (hasClipPath) {
4324
+ _pdf.restoreGraphicsState();
4325
+ }
4326
+ };
4327
+
4328
+ // the actual svgToPdf function (see above)
4329
+ var svg2pdf = function (element, pdf, options) {
4330
+ _pdf = pdf;
4331
+
4332
+ var k = options.scale || 1.0,
4333
+ xOffset = options.xOffset || 0.0,
4334
+ yOffset = options.yOffset || 0.0;
4335
+
4336
+
4337
+ _pdf.advancedAPI(function () {
4338
+
4339
+ // set offsets and scale everything by k
4340
+ _pdf.saveGraphicsState();
4341
+ _pdf.setCurrentTransformationMatrix(new _pdf.Matrix(k, 0, 0, k, xOffset, yOffset));
4342
+
4343
+ // set default values that differ from pdf defaults
4344
+ var attributeState = AttributeState.default();
4345
+ _pdf.setLineWidth(attributeState.strokeWidth);
4346
+ var fill = attributeState.fill;
4347
+ _pdf.setFillColor(fill.r, fill.g, fill.b);
4348
+ _pdf.setFont(attributeState.fontFamily);
4349
+ _pdf.setFontSize(attributeState.fontSize);
4350
+
4351
+
4352
+ var refsHandler = new ReferencesHandler(element);
4353
+ renderNode(element.cloneNode(true), _pdf.unitMatrix, refsHandler, false, false, attributeState);
4354
+
4355
+ _pdf.restoreGraphicsState();
4356
+
4357
+ });
4358
+
4359
+ return _pdf;
4360
+ };
4361
+
4362
+ if (typeof define === "function" && define.amd) {
4363
+ define(["./rgbcolor", "SvgPath", "font-family", "cssesc"], function (rgbcolor, svgpath, fontFamily, cssesc) {
4364
+ RGBColor = rgbcolor;
4365
+ SvgPath = svgpath;
4366
+ FontFamily = fontFamily;
4367
+ cssEsc = cssesc;
4368
+ return svg2pdf;
4369
+ });
4370
+ } else if (typeof module !== "undefined" && module.exports) {
4371
+ RGBColor = require("./rgbcolor.js");
4372
+ SvgPath = require("SvgPath");
4373
+ FontFamily = require("font-family");
4374
+ cssEsc = require("cssesc");
4375
+ module.exports = svg2pdf;
4376
+ } else {
4377
+ SvgPath = global.SvgPath;
4378
+ RGBColor = global.RGBColor;
4379
+ FontFamily = global.FontFamily;
4380
+ cssEsc = global.cssesc;
4381
+ global.svg2pdf = svg2pdf;
4382
+ // for compatibility reasons
4383
+ global.svgElementToPdf = svg2pdf;
4384
+ }
4385
+ return svg2pdf;
4386
+ }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this));
4387
+
4388
+ },{"./rgbcolor.js":10,"SvgPath":1,"cssesc":8,"font-family":9}]},{},[11])(11)
4389
+ });
4390
+ //# sourceMappingURL=svg2pdf.js.map