ps-toolkit-ui 0.0.212 → 0.0.216

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 (1058) hide show
  1. package/bundles/ps-toolkit-ui.umd.js +17 -11
  2. package/bundles/ps-toolkit-ui.umd.js.map +1 -1
  3. package/bundles/ps-toolkit-ui.umd.min.js +1 -1
  4. package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
  5. package/esm2015/lib/classes/enum.class.js +2 -2
  6. package/esm2015/lib/classes/lang.class.js +4 -1
  7. package/esm2015/lib/classes/table.class.js +2 -3
  8. package/esm2015/lib/components/chart/chart.component.js +1 -1
  9. package/esm2015/lib/components/form/tree/form.tree.component.js +6 -4
  10. package/esm2015/lib/components/table/row/table.row.component.js +5 -3
  11. package/esm2015/lib/components/table/table.component.js +3 -3
  12. package/fesm2015/ps-toolkit-ui.js +17 -11
  13. package/fesm2015/ps-toolkit-ui.js.map +1 -1
  14. package/lib/classes/enum.class.d.ts +1 -1
  15. package/package.json +1 -1
  16. package/ps-toolkit-ui.metadata.json +1 -1
  17. package/src/assets/plugins/highcharts/code/css/annotations/popup.css +0 -276
  18. package/src/assets/plugins/highcharts/code/css/annotations/popup.scss +0 -289
  19. package/src/assets/plugins/highcharts/code/css/highcharts.css +0 -1013
  20. package/src/assets/plugins/highcharts/code/css/highcharts.scss +0 -896
  21. package/src/assets/plugins/highcharts/code/css/stocktools/gui.css +0 -271
  22. package/src/assets/plugins/highcharts/code/css/stocktools/gui.scss +0 -271
  23. package/src/assets/plugins/highcharts/code/css/themes/dark-unica.css +0 -1074
  24. package/src/assets/plugins/highcharts/code/css/themes/dark-unica.scss +0 -122
  25. package/src/assets/plugins/highcharts/code/css/themes/grid-light.css +0 -1027
  26. package/src/assets/plugins/highcharts/code/css/themes/grid-light.scss +0 -33
  27. package/src/assets/plugins/highcharts/code/css/themes/sand-signika.css +0 -1043
  28. package/src/assets/plugins/highcharts/code/css/themes/sand-signika.scss +0 -74
  29. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/A11yI18n.js +0 -299
  30. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Accessibility.js +0 -401
  31. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/AccessibilityComponent.js +0 -153
  32. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/AnnotationsA11y.js +0 -160
  33. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/ContainerComponent.js +0 -159
  34. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/InfoRegionsComponent.js +0 -543
  35. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/LegendComponent.js +0 -478
  36. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/MenuComponent.js +0 -451
  37. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/RangeSelectorComponent.js +0 -506
  38. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +0 -217
  39. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +0 -324
  40. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +0 -148
  41. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +0 -390
  42. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +0 -650
  43. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Components/ZoomComponent.js +0 -375
  44. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/FocusBorder.js +0 -302
  45. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/HighContrastMode.js +0 -96
  46. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/HighContrastTheme.js +0 -221
  47. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/KeyboardNavigation.js +0 -449
  48. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/KeyboardNavigationHandler.js +0 -128
  49. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Options/DeprecatedOptions.js +0 -250
  50. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Options/LangOptions.js +0 -339
  51. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Options/Options.js +0 -831
  52. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/ProxyElement.js +0 -218
  53. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/ProxyProvider.js +0 -302
  54. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/Announcer.js +0 -91
  55. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/ChartUtilities.js +0 -294
  56. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/DOMElementProvider.js +0 -62
  57. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/EventProvider.js +0 -58
  58. package/src/assets/plugins/highcharts/code/es-modules/Accessibility/Utils/HTMLUtilities.js +0 -305
  59. package/src/assets/plugins/highcharts/code/es-modules/Core/Animation/AnimationUtilities.js +0 -200
  60. package/src/assets/plugins/highcharts/code/es-modules/Core/Animation/Fx.js +0 -387
  61. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Axis.js +0 -3225
  62. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Axis3D.js +0 -612
  63. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/AxisDefaults.js +0 -2935
  64. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/BrokenAxis.js +0 -601
  65. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Color/ColorAxis.js +0 -668
  66. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Color/ColorAxisComposition.js +0 -287
  67. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Color/ColorAxisDefaults.js +0 -434
  68. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/DateTimeAxis.js +0 -196
  69. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/GridAxis.js +0 -1046
  70. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/LogarithmicAxis.js +0 -202
  71. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/NavigatorAxis.js +0 -159
  72. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/OrdinalAxis.js +0 -992
  73. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +0 -873
  74. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js +0 -287
  75. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/RadialAxis.js +0 -954
  76. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/ScrollbarAxis.js +0 -182
  77. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/SolidGaugeAxis.js +0 -127
  78. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/StackingAxis.js +0 -216
  79. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Tick.js +0 -723
  80. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/Tick3D.js +0 -68
  81. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/TreeGridAxis.js +0 -720
  82. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/TreeGridTick.js +0 -306
  83. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/WaterfallAxis.js +0 -149
  84. package/src/assets/plugins/highcharts/code/es-modules/Core/Axis/ZAxis.js +0 -156
  85. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/Chart.js +0 -2909
  86. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/Chart3D.js +0 -1695
  87. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/ChartDefaults.js +0 -1053
  88. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/ChartNavigationComposition.js +0 -92
  89. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/GanttChart.js +0 -177
  90. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/MapChart.js +0 -179
  91. package/src/assets/plugins/highcharts/code/es-modules/Core/Chart/StockChart.js +0 -644
  92. package/src/assets/plugins/highcharts/code/es-modules/Core/Color/Color.js +0 -419
  93. package/src/assets/plugins/highcharts/code/es-modules/Core/Color/Palettes.js +0 -22
  94. package/src/assets/plugins/highcharts/code/es-modules/Core/DefaultOptions.js +0 -2743
  95. package/src/assets/plugins/highcharts/code/es-modules/Core/FormatUtilities.js +0 -246
  96. package/src/assets/plugins/highcharts/code/es-modules/Core/Foundation.js +0 -61
  97. package/src/assets/plugins/highcharts/code/es-modules/Core/Geometry/CircleUtilities.js +0 -386
  98. package/src/assets/plugins/highcharts/code/es-modules/Core/Geometry/GeometryUtilities.js +0 -83
  99. package/src/assets/plugins/highcharts/code/es-modules/Core/Globals.js +0 -131
  100. package/src/assets/plugins/highcharts/code/es-modules/Core/HttpUtilities.js +0 -195
  101. package/src/assets/plugins/highcharts/code/es-modules/Core/Legend/Legend.js +0 -1284
  102. package/src/assets/plugins/highcharts/code/es-modules/Core/Legend/LegendSymbol.js +0 -109
  103. package/src/assets/plugins/highcharts/code/es-modules/Core/MSPointer.js +0 -170
  104. package/src/assets/plugins/highcharts/code/es-modules/Core/Navigator.js +0 -1958
  105. package/src/assets/plugins/highcharts/code/es-modules/Core/Pointer.js +0 -1518
  106. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/HTML/AST.js +0 -475
  107. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/HTML/HTMLElement.js +0 -261
  108. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/HTML/HTMLRenderer.js +0 -272
  109. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/RendererRegistry.js +0 -77
  110. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/RendererUtilities.js +0 -159
  111. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGElement.js +0 -2176
  112. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGElement3D.js +0 -160
  113. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGLabel.js +0 -408
  114. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGRenderer.js +0 -1900
  115. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +0 -842
  116. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/Symbols.js +0 -197
  117. package/src/assets/plugins/highcharts/code/es-modules/Core/Renderer/SVG/TextBuilder.js +0 -452
  118. package/src/assets/plugins/highcharts/code/es-modules/Core/Responsive.js +0 -334
  119. package/src/assets/plugins/highcharts/code/es-modules/Core/Scrollbar.js +0 -658
  120. package/src/assets/plugins/highcharts/code/es-modules/Core/ScrollbarDefaults.js +0 -218
  121. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/DataLabel.js +0 -568
  122. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/Point.js +0 -1307
  123. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/Series.js +0 -3718
  124. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/Series3D.js +0 -126
  125. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/SeriesDefaults.js +0 -2293
  126. package/src/assets/plugins/highcharts/code/es-modules/Core/Series/SeriesRegistry.js +0 -127
  127. package/src/assets/plugins/highcharts/code/es-modules/Core/Time.js +0 -741
  128. package/src/assets/plugins/highcharts/code/es-modules/Core/Tooltip.js +0 -1378
  129. package/src/assets/plugins/highcharts/code/es-modules/Core/Utilities.js +0 -1967
  130. package/src/assets/plugins/highcharts/code/es-modules/Data/DataConverter.js +0 -483
  131. package/src/assets/plugins/highcharts/code/es-modules/Data/DataPromise.js +0 -252
  132. package/src/assets/plugins/highcharts/code/es-modules/Data/DataSeriesConverter.js +0 -207
  133. package/src/assets/plugins/highcharts/code/es-modules/Data/DataTable.js +0 -1205
  134. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/ChainModifier.js +0 -299
  135. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/DataModifier.js +0 -303
  136. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/GroupModifier.js +0 -144
  137. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/InvertModifier.js +0 -254
  138. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/RangeModifier.js +0 -143
  139. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/SeriesPointsModifier.js +0 -110
  140. package/src/assets/plugins/highcharts/code/es-modules/Data/Modifiers/SortModifier.js +0 -249
  141. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/CSVParser.js +0 -400
  142. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/DataParser.js +0 -101
  143. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/GoogleSheetsParser.js +0 -223
  144. package/src/assets/plugins/highcharts/code/es-modules/Data/Parsers/HTMLTableParser.js +0 -213
  145. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/CSVStore.js +0 -317
  146. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/DataStore.js +0 -276
  147. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/GoogleSheetsStore.js +0 -169
  148. package/src/assets/plugins/highcharts/code/es-modules/Data/Stores/HTMLTableStore.js +0 -353
  149. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Annotations.js +0 -1442
  150. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/ControlPoint.js +0 -141
  151. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +0 -117
  152. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +0 -199
  153. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +0 -111
  154. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +0 -387
  155. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +0 -181
  156. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +0 -121
  157. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +0 -378
  158. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Mixins/EventEmitterMixin.js +0 -221
  159. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Mixins/MarkerMixin.js +0 -179
  160. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/MockPoint.js +0 -428
  161. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/NavigationBindings.js +0 -1212
  162. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Popup.js +0 -1123
  163. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +0 -237
  164. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/CrookedLine.js +0 -185
  165. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/ElliottWave.js +0 -95
  166. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Fibonacci.js +0 -205
  167. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +0 -219
  168. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/InfinityLine.js +0 -161
  169. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Measure.js +0 -791
  170. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Pitchfork.js +0 -194
  171. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/TimeCycles.js +0 -211
  172. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/Tunnel.js +0 -211
  173. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Annotations/Types/VerticalLine.js +0 -156
  174. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ArrowSymbols.js +0 -166
  175. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/Boost.js +0 -34
  176. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostAttach.js +0 -150
  177. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostInit.js +0 -318
  178. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostOptions.js +0 -219
  179. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostOverrides.js +0 -386
  180. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostUtils.js +0 -255
  181. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/BoostableMap.js +0 -18
  182. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/Boostables.js +0 -25
  183. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/NamedColors.js +0 -162
  184. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/WGLRenderer.js +0 -1188
  185. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/WGLShader.js +0 -470
  186. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Boost/WGLVBuffer.js +0 -153
  187. package/src/assets/plugins/highcharts/code/es-modules/Extensions/BoostCanvas.js +0 -509
  188. package/src/assets/plugins/highcharts/code/es-modules/Extensions/CurrentDateIndication.js +0 -100
  189. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Data.js +0 -2037
  190. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DataGrouping.js +0 -1134
  191. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Debugger/Debugger.js +0 -101
  192. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Debugger/ErrorMessages.js +0 -106
  193. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DownloadURL.js +0 -106
  194. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DragPanes.js +0 -512
  195. package/src/assets/plugins/highcharts/code/es-modules/Extensions/DraggablePoints.js +0 -2259
  196. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Drilldown.js +0 -1170
  197. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ExportData.js +0 -997
  198. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Exporting/Exporting.js +0 -1260
  199. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Exporting/ExportingDefaults.js +0 -796
  200. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Exporting/ExportingSymbols.js +0 -73
  201. package/src/assets/plugins/highcharts/code/es-modules/Extensions/FullScreen.js +0 -240
  202. package/src/assets/plugins/highcharts/code/es-modules/Extensions/GeoJSON.js +0 -436
  203. package/src/assets/plugins/highcharts/code/es-modules/Extensions/MarkerClusters.js +0 -1436
  204. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Math3D.js +0 -245
  205. package/src/assets/plugins/highcharts/code/es-modules/Extensions/NoDataToDisplay.js +0 -189
  206. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OfflineExporting/OfflineExporting.js +0 -617
  207. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +0 -58
  208. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Oldie/Oldie.js +0 -1182
  209. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Oldie/VMLAxis3D.js +0 -101
  210. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Oldie/VMLRenderer3D.js +0 -47
  211. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OldiePolyfills.js +0 -167
  212. package/src/assets/plugins/highcharts/code/es-modules/Extensions/OverlappingDataLabels.js +0 -226
  213. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Pane.js +0 -404
  214. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ParallelCoordinates.js +0 -464
  215. package/src/assets/plugins/highcharts/code/es-modules/Extensions/PatternFill.js +0 -580
  216. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Polar.js +0 -740
  217. package/src/assets/plugins/highcharts/code/es-modules/Extensions/PriceIndication.js +0 -292
  218. package/src/assets/plugins/highcharts/code/es-modules/Extensions/RangeSelector.js +0 -2175
  219. package/src/assets/plugins/highcharts/code/es-modules/Extensions/ScrollablePlotArea.js +0 -387
  220. package/src/assets/plugins/highcharts/code/es-modules/Extensions/SeriesLabel.js +0 -765
  221. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/ChartSonify.js +0 -724
  222. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Earcon.js +0 -197
  223. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Instrument.js +0 -606
  224. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/MusicalFrequencies.js +0 -122
  225. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Options.js +0 -44
  226. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/PointSonify.js +0 -391
  227. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/SeriesSonify.js +0 -474
  228. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/SignalHandler.js +0 -122
  229. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Sonification.js +0 -97
  230. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/SonificationUtilities.js +0 -150
  231. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/Timeline.js +0 -308
  232. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/TimelineEvent.js +0 -157
  233. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Sonification/TimelinePath.js +0 -311
  234. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Stacking.js +0 -516
  235. package/src/assets/plugins/highcharts/code/es-modules/Extensions/StaticScale.js +0 -76
  236. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Avocado.js +0 -67
  237. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/BrandDark.js +0 -293
  238. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/BrandLight.js +0 -259
  239. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/DarkBlue.js +0 -279
  240. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/DarkGreen.js +0 -279
  241. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/DarkUnica.js +0 -249
  242. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Gray.js +0 -287
  243. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Grid.js +0 -140
  244. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/GridLight.js +0 -111
  245. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/HighContrastDark.js +0 -239
  246. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/HighContrastLight.js +0 -69
  247. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/SandSignika.js +0 -144
  248. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Skies.js +0 -131
  249. package/src/assets/plugins/highcharts/code/es-modules/Extensions/Themes/Sunset.js +0 -66
  250. package/src/assets/plugins/highcharts/code/es-modules/Gantt/Connection.js +0 -838
  251. package/src/assets/plugins/highcharts/code/es-modules/Gantt/Pathfinder.js +0 -818
  252. package/src/assets/plugins/highcharts/code/es-modules/Gantt/PathfinderAlgorithms.js +0 -657
  253. package/src/assets/plugins/highcharts/code/es-modules/Gantt/Tree.js +0 -110
  254. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapNavigation.js +0 -278
  255. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapNavigationOptionsDefault.js +0 -264
  256. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapPointer.js +0 -83
  257. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapSymbols.js +0 -80
  258. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapView.js +0 -450
  259. package/src/assets/plugins/highcharts/code/es-modules/Maps/MapViewOptionsDefault.js +0 -97
  260. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projection.js +0 -436
  261. package/src/assets/plugins/highcharts/code/es-modules/Maps/ProjectionDefinition.js +0 -9
  262. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/EqualEarth.js +0 -42
  263. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/LambertConformalConic.js +0 -52
  264. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/Miller.js +0 -16
  265. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/Orthographic.js +0 -26
  266. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/ProjectionRegistry.js +0 -19
  267. package/src/assets/plugins/highcharts/code/es-modules/Maps/Projections/WebMercator.js +0 -24
  268. package/src/assets/plugins/highcharts/code/es-modules/Series/Area/AreaSeries.js +0 -563
  269. package/src/assets/plugins/highcharts/code/es-modules/Series/Area3DSeries.js +0 -70
  270. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaRange/AreaRangePoint.js +0 -129
  271. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaRange/AreaRangeSeries.js +0 -650
  272. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaSpline/AreaSplineSeries.js +0 -203
  273. package/src/assets/plugins/highcharts/code/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +0 -199
  274. package/src/assets/plugins/highcharts/code/es-modules/Series/Bar/BarSeries.js +0 -171
  275. package/src/assets/plugins/highcharts/code/es-modules/Series/Bellcurve/BellcurveSeries.js +0 -241
  276. package/src/assets/plugins/highcharts/code/es-modules/Series/BoxPlot/BoxPlotSeries.js +0 -681
  277. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleLegendComposition.js +0 -279
  278. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleLegendDefaults.js +0 -266
  279. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleLegendItem.js +0 -462
  280. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubblePoint.js +0 -77
  281. package/src/assets/plugins/highcharts/code/es-modules/Series/Bubble/BubbleSeries.js +0 -676
  282. package/src/assets/plugins/highcharts/code/es-modules/Series/Bullet/BulletPoint.js +0 -62
  283. package/src/assets/plugins/highcharts/code/es-modules/Series/Bullet/BulletSeries.js +0 -365
  284. package/src/assets/plugins/highcharts/code/es-modules/Series/Candlestick/CandlestickSeries.js +0 -333
  285. package/src/assets/plugins/highcharts/code/es-modules/Series/CenteredUtilities.js +0 -128
  286. package/src/assets/plugins/highcharts/code/es-modules/Series/ColorMapMixin.js +0 -84
  287. package/src/assets/plugins/highcharts/code/es-modules/Series/Column/ColumnDataLabel.js +0 -109
  288. package/src/assets/plugins/highcharts/code/es-modules/Series/Column/ColumnSeries.js +0 -1171
  289. package/src/assets/plugins/highcharts/code/es-modules/Series/Column3D/Column3DComposition.js +0 -508
  290. package/src/assets/plugins/highcharts/code/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +0 -308
  291. package/src/assets/plugins/highcharts/code/es-modules/Series/ColumnRange/ColumnRangePoint.js +0 -62
  292. package/src/assets/plugins/highcharts/code/es-modules/Series/ColumnRange/ColumnRangeSeries.js +0 -308
  293. package/src/assets/plugins/highcharts/code/es-modules/Series/Cylinder/CylinderComposition.js +0 -274
  294. package/src/assets/plugins/highcharts/code/es-modules/Series/Cylinder/CylinderPoint.js +0 -60
  295. package/src/assets/plugins/highcharts/code/es-modules/Series/Cylinder/CylinderSeries.js +0 -175
  296. package/src/assets/plugins/highcharts/code/es-modules/Series/DataModifyComposition.js +0 -539
  297. package/src/assets/plugins/highcharts/code/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +0 -100
  298. package/src/assets/plugins/highcharts/code/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +0 -368
  299. package/src/assets/plugins/highcharts/code/es-modules/Series/DerivedComposition.js +0 -137
  300. package/src/assets/plugins/highcharts/code/es-modules/Series/DotPlot/DotPlotSeries.js +0 -158
  301. package/src/assets/plugins/highcharts/code/es-modules/Series/DrawPointComposition.js +0 -111
  302. package/src/assets/plugins/highcharts/code/es-modules/Series/Dumbbell/DumbbellPoint.js +0 -104
  303. package/src/assets/plugins/highcharts/code/es-modules/Series/Dumbbell/DumbbellSeries.js +0 -464
  304. package/src/assets/plugins/highcharts/code/es-modules/Series/ErrorBar/ErrorBarSeries.js +0 -228
  305. package/src/assets/plugins/highcharts/code/es-modules/Series/Flags/FlagsPoint.js +0 -74
  306. package/src/assets/plugins/highcharts/code/es-modules/Series/Flags/FlagsSeries.js +0 -614
  307. package/src/assets/plugins/highcharts/code/es-modules/Series/Flags/FlagsSymbols.js +0 -90
  308. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel/FunnelSeries.js +0 -517
  309. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel3D/Funnel3DComposition.js +0 -383
  310. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel3D/Funnel3DPoint.js +0 -62
  311. package/src/assets/plugins/highcharts/code/es-modules/Series/Funnel3D/Funnel3DSeries.js +0 -447
  312. package/src/assets/plugins/highcharts/code/es-modules/Series/Gantt/GanttPoint.js +0 -109
  313. package/src/assets/plugins/highcharts/code/es-modules/Series/Gantt/GanttSeries.js +0 -352
  314. package/src/assets/plugins/highcharts/code/es-modules/Series/Gauge/GaugePoint.js +0 -66
  315. package/src/assets/plugins/highcharts/code/es-modules/Series/Gauge/GaugeSeries.js +0 -568
  316. package/src/assets/plugins/highcharts/code/es-modules/Series/HLC/HLCPoint.js +0 -55
  317. package/src/assets/plugins/highcharts/code/es-modules/Series/HLC/HLCSeries.js +0 -378
  318. package/src/assets/plugins/highcharts/code/es-modules/Series/Heatmap/HeatmapPoint.js +0 -144
  319. package/src/assets/plugins/highcharts/code/es-modules/Series/Heatmap/HeatmapSeries.js +0 -946
  320. package/src/assets/plugins/highcharts/code/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +0 -60
  321. package/src/assets/plugins/highcharts/code/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +0 -278
  322. package/src/assets/plugins/highcharts/code/es-modules/Series/Histogram/HistogramSeries.js +0 -253
  323. package/src/assets/plugins/highcharts/code/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +0 -80
  324. package/src/assets/plugins/highcharts/code/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +0 -368
  325. package/src/assets/plugins/highcharts/code/es-modules/Series/Item/ItemPoint.js +0 -59
  326. package/src/assets/plugins/highcharts/code/es-modules/Series/Item/ItemSeries.js +0 -505
  327. package/src/assets/plugins/highcharts/code/es-modules/Series/Line/LineSeries.js +0 -541
  328. package/src/assets/plugins/highcharts/code/es-modules/Series/Lollipop/LollipopPoint.js +0 -60
  329. package/src/assets/plugins/highcharts/code/es-modules/Series/Lollipop/LollipopSeries.js +0 -209
  330. package/src/assets/plugins/highcharts/code/es-modules/Series/Map/MapPoint.js +0 -136
  331. package/src/assets/plugins/highcharts/code/es-modules/Series/Map/MapSeries.js +0 -1100
  332. package/src/assets/plugins/highcharts/code/es-modules/Series/MapBubble/MapBubblePoint.js +0 -73
  333. package/src/assets/plugins/highcharts/code/es-modules/Series/MapBubble/MapBubbleSeries.js +0 -283
  334. package/src/assets/plugins/highcharts/code/es-modules/Series/MapLine/MapLineSeries.js +0 -181
  335. package/src/assets/plugins/highcharts/code/es-modules/Series/MapPoint/MapPointPoint.js +0 -71
  336. package/src/assets/plugins/highcharts/code/es-modules/Series/MapPoint/MapPointSeries.js +0 -309
  337. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/DraggableNodes.js +0 -132
  338. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/Integrations.js +0 -348
  339. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/Layouts.js +0 -555
  340. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/Networkgraph.js +0 -1178
  341. package/src/assets/plugins/highcharts/code/es-modules/Series/Networkgraph/QuadTree.js +0 -352
  342. package/src/assets/plugins/highcharts/code/es-modules/Series/NodesComposition.js +0 -229
  343. package/src/assets/plugins/highcharts/code/es-modules/Series/OHLC/OHLCPoint.js +0 -116
  344. package/src/assets/plugins/highcharts/code/es-modules/Series/OHLC/OHLCSeries.js +0 -254
  345. package/src/assets/plugins/highcharts/code/es-modules/Series/OnSeriesComposition.js +0 -168
  346. package/src/assets/plugins/highcharts/code/es-modules/Series/Organization/OrganizationPoint.js +0 -71
  347. package/src/assets/plugins/highcharts/code/es-modules/Series/Organization/OrganizationSeries.js +0 -594
  348. package/src/assets/plugins/highcharts/code/es-modules/Series/PackedBubble/PackedBubbleComposition.js +0 -172
  349. package/src/assets/plugins/highcharts/code/es-modules/Series/PackedBubble/PackedBubblePoint.js +0 -98
  350. package/src/assets/plugins/highcharts/code/es-modules/Series/PackedBubble/PackedBubbleSeries.js +0 -1284
  351. package/src/assets/plugins/highcharts/code/es-modules/Series/ParetoSeries/ParetoSeries.js +0 -195
  352. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie/PieDataLabel.js +0 -447
  353. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie/PiePoint.js +0 -270
  354. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie/PieSeries.js +0 -1074
  355. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie3D/Pie3DComposition.js +0 -27
  356. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie3D/Pie3DPoint.js +0 -72
  357. package/src/assets/plugins/highcharts/code/es-modules/Series/Pie3D/Pie3DSeries.js +0 -200
  358. package/src/assets/plugins/highcharts/code/es-modules/Series/Polygon/PolygonSeries.js +0 -195
  359. package/src/assets/plugins/highcharts/code/es-modules/Series/Pyramid/PyramidSeries.js +0 -161
  360. package/src/assets/plugins/highcharts/code/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +0 -172
  361. package/src/assets/plugins/highcharts/code/es-modules/Series/Sankey/SankeyPoint.js +0 -97
  362. package/src/assets/plugins/highcharts/code/es-modules/Series/Sankey/SankeySeries.js +0 -1195
  363. package/src/assets/plugins/highcharts/code/es-modules/Series/Scatter/ScatterSeries.js +0 -306
  364. package/src/assets/plugins/highcharts/code/es-modules/Series/Scatter3D/Scatter3DPoint.js +0 -66
  365. package/src/assets/plugins/highcharts/code/es-modules/Series/Scatter3D/Scatter3DSeries.js +0 -194
  366. package/src/assets/plugins/highcharts/code/es-modules/Series/SolidGauge/SolidGaugeComposition.js +0 -62
  367. package/src/assets/plugins/highcharts/code/es-modules/Series/SolidGauge/SolidGaugeSeries.js +0 -358
  368. package/src/assets/plugins/highcharts/code/es-modules/Series/Spline/SplineSeries.js +0 -279
  369. package/src/assets/plugins/highcharts/code/es-modules/Series/Streamgraph/StreamgraphSeries.js +0 -213
  370. package/src/assets/plugins/highcharts/code/es-modules/Series/Sunburst/SunburstPoint.js +0 -115
  371. package/src/assets/plugins/highcharts/code/es-modules/Series/Sunburst/SunburstSeries.js +0 -907
  372. package/src/assets/plugins/highcharts/code/es-modules/Series/Sunburst/SunburstUtilities.js +0 -138
  373. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapComposition.js +0 -61
  374. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapPoint.js +0 -77
  375. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapSeries.js +0 -368
  376. package/src/assets/plugins/highcharts/code/es-modules/Series/Tilemap/TilemapShapes.js +0 -275
  377. package/src/assets/plugins/highcharts/code/es-modules/Series/Timeline/TimelinePoint.js +0 -168
  378. package/src/assets/plugins/highcharts/code/es-modules/Series/Timeline/TimelineSeries.js +0 -552
  379. package/src/assets/plugins/highcharts/code/es-modules/Series/TreeUtilities.js +0 -192
  380. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapAlgorithmGroup.js +0 -93
  381. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapComposition.js +0 -58
  382. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapPoint.js +0 -107
  383. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapSeries.js +0 -1473
  384. package/src/assets/plugins/highcharts/code/es-modules/Series/Treemap/TreemapUtilities.js +0 -65
  385. package/src/assets/plugins/highcharts/code/es-modules/Series/VariablePie/VariablePieSeries.js +0 -446
  386. package/src/assets/plugins/highcharts/code/es-modules/Series/Variwide/VariwideComposition.js +0 -78
  387. package/src/assets/plugins/highcharts/code/es-modules/Series/Variwide/VariwidePoint.js +0 -63
  388. package/src/assets/plugins/highcharts/code/es-modules/Series/Variwide/VariwideSeries.js +0 -317
  389. package/src/assets/plugins/highcharts/code/es-modules/Series/Vector/VectorSeries.js +0 -362
  390. package/src/assets/plugins/highcharts/code/es-modules/Series/Venn/VennPoint.js +0 -76
  391. package/src/assets/plugins/highcharts/code/es-modules/Series/Venn/VennSeries.js +0 -633
  392. package/src/assets/plugins/highcharts/code/es-modules/Series/Venn/VennUtils.js +0 -607
  393. package/src/assets/plugins/highcharts/code/es-modules/Series/Waterfall/WaterfallPoint.js +0 -68
  394. package/src/assets/plugins/highcharts/code/es-modules/Series/Waterfall/WaterfallSeries.js +0 -743
  395. package/src/assets/plugins/highcharts/code/es-modules/Series/Windbarb/WindbarbPoint.js +0 -64
  396. package/src/assets/plugins/highcharts/code/es-modules/Series/Windbarb/WindbarbSeries.js +0 -462
  397. package/src/assets/plugins/highcharts/code/es-modules/Series/Wordcloud/WordcloudPoint.js +0 -66
  398. package/src/assets/plugins/highcharts/code/es-modules/Series/Wordcloud/WordcloudSeries.js +0 -503
  399. package/src/assets/plugins/highcharts/code/es-modules/Series/Wordcloud/WordcloudUtils.js +0 -718
  400. package/src/assets/plugins/highcharts/code/es-modules/Series/XRange/XRangeComposition.js +0 -49
  401. package/src/assets/plugins/highcharts/code/es-modules/Series/XRange/XRangePoint.js +0 -168
  402. package/src/assets/plugins/highcharts/code/es-modules/Series/XRange/XRangeSeries.js +0 -608
  403. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +0 -243
  404. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/AD/ADIndicator.js +0 -160
  405. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/AO/AOIndicator.js +0 -212
  406. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/APO/APOIndicator.js +0 -167
  407. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ATR/ATRIndicator.js +0 -162
  408. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +0 -197
  409. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +0 -141
  410. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ArrayUtilities.js +0 -47
  411. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/BB/BBIndicator.js +0 -241
  412. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/CCI/CCIIndicator.js +0 -154
  413. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/CMF/CMFIndicator.js +0 -243
  414. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/CMO/CMOIndicator.js +0 -166
  415. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +0 -187
  416. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +0 -149
  417. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DMI/DMIIndicator.js +0 -276
  418. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DPO/DPOIndicator.js +0 -163
  419. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +0 -179
  420. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/EMA/EMAIndicator.js +0 -154
  421. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/IKH/IKHIndicator.js +0 -682
  422. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +0 -217
  423. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +0 -270
  424. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +0 -282
  425. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +0 -119
  426. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +0 -104
  427. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +0 -104
  428. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/MACD/MACDIndicator.js +0 -402
  429. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/MFI/MFIIndicator.js +0 -198
  430. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +0 -121
  431. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/MultipleLinesComposition.js +0 -294
  432. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/NATR/NATRIndicator.js +0 -111
  433. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/OBV/OBVIndicator.js +0 -170
  434. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PC/PCIndicator.js +0 -197
  435. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PPO/PPOIndicator.js +0 -164
  436. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +0 -280
  437. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +0 -310
  438. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PivotPoints/PivotPointsPoint.js +0 -78
  439. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +0 -240
  440. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/ROC/ROCIndicator.js +0 -176
  441. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/RSI/RSIIndicator.js +0 -171
  442. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -12
  443. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/SMA/SMAIndicator.js +0 -367
  444. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +0 -134
  445. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +0 -208
  446. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +0 -485
  447. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +0 -208
  448. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +0 -98
  449. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +0 -148
  450. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/VBP/VBPIndicator.js +0 -556
  451. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/VBP/VBPPoint.js +0 -49
  452. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +0 -193
  453. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/WMA/WMAIndicator.js +0 -153
  454. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +0 -135
  455. package/src/assets/plugins/highcharts/code/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +0 -228
  456. package/src/assets/plugins/highcharts/code/es-modules/Stock/StockToolsBindings.js +0 -2009
  457. package/src/assets/plugins/highcharts/code/es-modules/Stock/StockToolsGui.js +0 -1816
  458. package/src/assets/plugins/highcharts/code/es-modules/masters/highcharts-3d.src.js +0 -28
  459. package/src/assets/plugins/highcharts/code/es-modules/masters/highcharts-more.src.js +0 -28
  460. package/src/assets/plugins/highcharts/code/es-modules/masters/highcharts.src.js +0 -147
  461. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/accessibility.src.js +0 -28
  462. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/annotations-advanced.src.js +0 -26
  463. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/annotations.src.js +0 -15
  464. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/arrow-symbols.src.js +0 -13
  465. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/boost-canvas.src.js +0 -14
  466. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/boost.src.js +0 -15
  467. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/broken-axis.src.js +0 -15
  468. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/bullet.src.js +0 -13
  469. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/coloraxis.src.js +0 -17
  470. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/current-date-indicator.src.js +0 -13
  471. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/cylinder.src.js +0 -14
  472. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/data.src.js +0 -23
  473. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/datagrouping.src.js +0 -14
  474. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/debugger.src.js +0 -16
  475. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/dependency-wheel.src.js +0 -14
  476. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/dotplot.src.js +0 -13
  477. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/drag-panes.src.js +0 -15
  478. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/draggable-points.src.js +0 -11
  479. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/drilldown.src.js +0 -13
  480. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/dumbbell.src.js +0 -11
  481. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/export-data.src.js +0 -14
  482. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/exporting.src.js +0 -22
  483. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/full-screen.src.js +0 -14
  484. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/funnel.src.js +0 -14
  485. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/funnel3d.src.js +0 -18
  486. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/gantt.src.js +0 -26
  487. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/grid-axis.src.js +0 -17
  488. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/heatmap.src.js +0 -16
  489. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/heikinashi.src.js +0 -14
  490. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/histogram-bellcurve.src.js +0 -13
  491. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/hollowcandlestick.src.js +0 -14
  492. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/item-series.src.js +0 -13
  493. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/lollipop.src.js +0 -11
  494. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/marker-clusters.src.js +0 -13
  495. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/networkgraph.src.js +0 -13
  496. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/no-data-to-display.src.js +0 -14
  497. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/offline-exporting.src.js +0 -20
  498. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/oldie-polyfills.src.js +0 -14
  499. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/oldie.src.js +0 -14
  500. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/organization.src.js +0 -13
  501. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/overlapping-datalabels.src.js +0 -11
  502. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/parallel-coordinates.src.js +0 -13
  503. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pareto.src.js +0 -13
  504. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pathfinder.src.js +0 -13
  505. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pattern-fill.src.js +0 -14
  506. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/price-indicator.src.js +0 -15
  507. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/pyramid3d.src.js +0 -16
  508. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/sankey.src.js +0 -13
  509. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/series-label.src.js +0 -11
  510. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/solid-gauge.src.js +0 -14
  511. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/sonification.src.js +0 -44
  512. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/static-scale.src.js +0 -13
  513. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/stock-tools.src.js +0 -16
  514. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/stock.src.js +0 -33
  515. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/streamgraph.src.js +0 -13
  516. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/sunburst.src.js +0 -13
  517. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/tilemap.src.js +0 -14
  518. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/timeline.src.js +0 -14
  519. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/treegrid.src.js +0 -17
  520. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/treemap.src.js +0 -12
  521. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/variable-pie.src.js +0 -13
  522. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/variwide.src.js +0 -13
  523. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/vector.src.js +0 -13
  524. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/venn.src.js +0 -12
  525. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/windbarb.src.js +0 -13
  526. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/wordcloud.src.js +0 -12
  527. package/src/assets/plugins/highcharts/code/es-modules/masters/modules/xrange.src.js +0 -13
  528. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/avocado.src.js +0 -14
  529. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/brand-dark.src.js +0 -14
  530. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/brand-light.src.js +0 -14
  531. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/dark-blue.src.js +0 -14
  532. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/dark-green.src.js +0 -14
  533. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/dark-unica.src.js +0 -14
  534. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/gray.src.js +0 -14
  535. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/grid-light.src.js +0 -14
  536. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/grid.src.js +0 -14
  537. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/high-contrast-dark.src.js +0 -14
  538. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/high-contrast-light.src.js +0 -14
  539. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/sand-signika.src.js +0 -14
  540. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/skies.src.js +0 -14
  541. package/src/assets/plugins/highcharts/code/es-modules/masters/themes/sunset.src.js +0 -14
  542. package/src/assets/plugins/highcharts/code/highcharts-3d.js +0 -105
  543. package/src/assets/plugins/highcharts/code/highcharts-3d.js.map +0 -1
  544. package/src/assets/plugins/highcharts/code/highcharts-3d.src.js +0 -5439
  545. package/src/assets/plugins/highcharts/code/highcharts-more.js +0 -201
  546. package/src/assets/plugins/highcharts/code/highcharts-more.js.map +0 -1
  547. package/src/assets/plugins/highcharts/code/highcharts-more.src.js +0 -12004
  548. package/src/assets/plugins/highcharts/code/highcharts.js +0 -593
  549. package/src/assets/plugins/highcharts/code/highcharts.js.map +0 -1
  550. package/src/assets/plugins/highcharts/code/highcharts.src.js +0 -47519
  551. package/src/assets/plugins/highcharts/code/lib/canvg.js +0 -8
  552. package/src/assets/plugins/highcharts/code/lib/jspdf.js +0 -283
  553. package/src/assets/plugins/highcharts/code/lib/jspdf.src.js +0 -21627
  554. package/src/assets/plugins/highcharts/code/lib/svg2pdf.js +0 -38
  555. package/src/assets/plugins/highcharts/code/lib/svg2pdf.src.js +0 -4390
  556. package/src/assets/plugins/highcharts/code/modules/accessibility.js +0 -256
  557. package/src/assets/plugins/highcharts/code/modules/accessibility.js.map +0 -1
  558. package/src/assets/plugins/highcharts/code/modules/accessibility.src.js +0 -11868
  559. package/src/assets/plugins/highcharts/code/modules/annotations-advanced.js +0 -201
  560. package/src/assets/plugins/highcharts/code/modules/annotations-advanced.js.map +0 -1
  561. package/src/assets/plugins/highcharts/code/modules/annotations-advanced.src.js +0 -9616
  562. package/src/assets/plugins/highcharts/code/modules/annotations.js +0 -135
  563. package/src/assets/plugins/highcharts/code/modules/annotations.js.map +0 -1
  564. package/src/assets/plugins/highcharts/code/modules/annotations.src.js +0 -6712
  565. package/src/assets/plugins/highcharts/code/modules/arrow-symbols.js +0 -12
  566. package/src/assets/plugins/highcharts/code/modules/arrow-symbols.js.map +0 -1
  567. package/src/assets/plugins/highcharts/code/modules/arrow-symbols.src.js +0 -202
  568. package/src/assets/plugins/highcharts/code/modules/boost-canvas.js +0 -25
  569. package/src/assets/plugins/highcharts/code/modules/boost-canvas.js.map +0 -1
  570. package/src/assets/plugins/highcharts/code/modules/boost-canvas.src.js +0 -593
  571. package/src/assets/plugins/highcharts/code/modules/boost.js +0 -90
  572. package/src/assets/plugins/highcharts/code/modules/boost.js.map +0 -1
  573. package/src/assets/plugins/highcharts/code/modules/boost.src.js +0 -3834
  574. package/src/assets/plugins/highcharts/code/modules/broken-axis.js +0 -20
  575. package/src/assets/plugins/highcharts/code/modules/broken-axis.js.map +0 -1
  576. package/src/assets/plugins/highcharts/code/modules/broken-axis.src.js +0 -682
  577. package/src/assets/plugins/highcharts/code/modules/bullet.js +0 -18
  578. package/src/assets/plugins/highcharts/code/modules/bullet.js.map +0 -1
  579. package/src/assets/plugins/highcharts/code/modules/bullet.src.js +0 -489
  580. package/src/assets/plugins/highcharts/code/modules/coloraxis.js +0 -33
  581. package/src/assets/plugins/highcharts/code/modules/coloraxis.js.map +0 -1
  582. package/src/assets/plugins/highcharts/code/modules/coloraxis.src.js +0 -1484
  583. package/src/assets/plugins/highcharts/code/modules/current-date-indicator.js +0 -13
  584. package/src/assets/plugins/highcharts/code/modules/current-date-indicator.js.map +0 -1
  585. package/src/assets/plugins/highcharts/code/modules/current-date-indicator.src.js +0 -138
  586. package/src/assets/plugins/highcharts/code/modules/cylinder.js +0 -20
  587. package/src/assets/plugins/highcharts/code/modules/cylinder.js.map +0 -1
  588. package/src/assets/plugins/highcharts/code/modules/cylinder.src.js +0 -585
  589. package/src/assets/plugins/highcharts/code/modules/data.js +0 -42
  590. package/src/assets/plugins/highcharts/code/modules/data.js.map +0 -1
  591. package/src/assets/plugins/highcharts/code/modules/data.src.js +0 -2383
  592. package/src/assets/plugins/highcharts/code/modules/datagrouping.js +0 -29
  593. package/src/assets/plugins/highcharts/code/modules/datagrouping.js.map +0 -1
  594. package/src/assets/plugins/highcharts/code/modules/datagrouping.src.js +0 -1275
  595. package/src/assets/plugins/highcharts/code/modules/debugger.js +0 -30
  596. package/src/assets/plugins/highcharts/code/modules/debugger.js.map +0 -1
  597. package/src/assets/plugins/highcharts/code/modules/debugger.src.js +0 -250
  598. package/src/assets/plugins/highcharts/code/modules/dependency-wheel.js +0 -20
  599. package/src/assets/plugins/highcharts/code/modules/dependency-wheel.js.map +0 -1
  600. package/src/assets/plugins/highcharts/code/modules/dependency-wheel.src.js +0 -533
  601. package/src/assets/plugins/highcharts/code/modules/dotplot.js +0 -15
  602. package/src/assets/plugins/highcharts/code/modules/dotplot.js.map +0 -1
  603. package/src/assets/plugins/highcharts/code/modules/dotplot.src.js +0 -216
  604. package/src/assets/plugins/highcharts/code/modules/drag-panes.js +0 -20
  605. package/src/assets/plugins/highcharts/code/modules/drag-panes.js.map +0 -1
  606. package/src/assets/plugins/highcharts/code/modules/drag-panes.src.js +0 -586
  607. package/src/assets/plugins/highcharts/code/modules/draggable-points.js +0 -41
  608. package/src/assets/plugins/highcharts/code/modules/draggable-points.js.map +0 -1
  609. package/src/assets/plugins/highcharts/code/modules/draggable-points.src.js +0 -2405
  610. package/src/assets/plugins/highcharts/code/modules/drilldown.js +0 -34
  611. package/src/assets/plugins/highcharts/code/modules/drilldown.js.map +0 -1
  612. package/src/assets/plugins/highcharts/code/modules/drilldown.src.js +0 -1266
  613. package/src/assets/plugins/highcharts/code/modules/dumbbell.js +0 -24
  614. package/src/assets/plugins/highcharts/code/modules/dumbbell.js.map +0 -1
  615. package/src/assets/plugins/highcharts/code/modules/dumbbell.src.js +0 -798
  616. package/src/assets/plugins/highcharts/code/modules/export-data.js +0 -30
  617. package/src/assets/plugins/highcharts/code/modules/export-data.js.map +0 -1
  618. package/src/assets/plugins/highcharts/code/modules/export-data.src.js +0 -1203
  619. package/src/assets/plugins/highcharts/code/modules/exporting.js +0 -48
  620. package/src/assets/plugins/highcharts/code/modules/exporting.js.map +0 -1
  621. package/src/assets/plugins/highcharts/code/modules/exporting.src.js +0 -2789
  622. package/src/assets/plugins/highcharts/code/modules/full-screen.js +0 -17
  623. package/src/assets/plugins/highcharts/code/modules/full-screen.js.map +0 -1
  624. package/src/assets/plugins/highcharts/code/modules/full-screen.src.js +0 -284
  625. package/src/assets/plugins/highcharts/code/modules/funnel.js +0 -21
  626. package/src/assets/plugins/highcharts/code/modules/funnel.js.map +0 -1
  627. package/src/assets/plugins/highcharts/code/modules/funnel.src.js +0 -777
  628. package/src/assets/plugins/highcharts/code/modules/funnel3d.js +0 -30
  629. package/src/assets/plugins/highcharts/code/modules/funnel3d.js.map +0 -1
  630. package/src/assets/plugins/highcharts/code/modules/funnel3d.src.js +0 -1004
  631. package/src/assets/plugins/highcharts/code/modules/gantt.js +0 -226
  632. package/src/assets/plugins/highcharts/code/modules/gantt.js.map +0 -1
  633. package/src/assets/plugins/highcharts/code/modules/gantt.src.js +0 -13485
  634. package/src/assets/plugins/highcharts/code/modules/grid-axis.js +0 -32
  635. package/src/assets/plugins/highcharts/code/modules/grid-axis.js.map +0 -1
  636. package/src/assets/plugins/highcharts/code/modules/grid-axis.src.js +0 -1160
  637. package/src/assets/plugins/highcharts/code/modules/heatmap.js +0 -46
  638. package/src/assets/plugins/highcharts/code/modules/heatmap.js.map +0 -1
  639. package/src/assets/plugins/highcharts/code/modules/heatmap.src.js +0 -2726
  640. package/src/assets/plugins/highcharts/code/modules/heikinashi.js +0 -17
  641. package/src/assets/plugins/highcharts/code/modules/heikinashi.js.map +0 -1
  642. package/src/assets/plugins/highcharts/code/modules/heikinashi.src.js +0 -396
  643. package/src/assets/plugins/highcharts/code/modules/histogram-bellcurve.js +0 -21
  644. package/src/assets/plugins/highcharts/code/modules/histogram-bellcurve.js.map +0 -1
  645. package/src/assets/plugins/highcharts/code/modules/histogram-bellcurve.src.js +0 -699
  646. package/src/assets/plugins/highcharts/code/modules/hollowcandlestick.js +0 -18
  647. package/src/assets/plugins/highcharts/code/modules/hollowcandlestick.js.map +0 -1
  648. package/src/assets/plugins/highcharts/code/modules/hollowcandlestick.src.js +0 -500
  649. package/src/assets/plugins/highcharts/code/modules/item-series.js +0 -21
  650. package/src/assets/plugins/highcharts/code/modules/item-series.js.map +0 -1
  651. package/src/assets/plugins/highcharts/code/modules/item-series.src.js +0 -660
  652. package/src/assets/plugins/highcharts/code/modules/lollipop.js +0 -14
  653. package/src/assets/plugins/highcharts/code/modules/lollipop.js.map +0 -1
  654. package/src/assets/plugins/highcharts/code/modules/lollipop.src.js +0 -318
  655. package/src/assets/plugins/highcharts/code/modules/marker-clusters.js +0 -45
  656. package/src/assets/plugins/highcharts/code/modules/marker-clusters.js.map +0 -1
  657. package/src/assets/plugins/highcharts/code/modules/marker-clusters.src.js +0 -1713
  658. package/src/assets/plugins/highcharts/code/modules/networkgraph.js +0 -58
  659. package/src/assets/plugins/highcharts/code/modules/networkgraph.js.map +0 -1
  660. package/src/assets/plugins/highcharts/code/modules/networkgraph.src.js +0 -2926
  661. package/src/assets/plugins/highcharts/code/modules/no-data-to-display.js +0 -15
  662. package/src/assets/plugins/highcharts/code/modules/no-data-to-display.js.map +0 -1
  663. package/src/assets/plugins/highcharts/code/modules/no-data-to-display.src.js +0 -231
  664. package/src/assets/plugins/highcharts/code/modules/offline-exporting.js +0 -27
  665. package/src/assets/plugins/highcharts/code/modules/offline-exporting.js.map +0 -1
  666. package/src/assets/plugins/highcharts/code/modules/offline-exporting.src.js +0 -847
  667. package/src/assets/plugins/highcharts/code/modules/oldie-polyfills.js +0 -17
  668. package/src/assets/plugins/highcharts/code/modules/oldie-polyfills.js.map +0 -1
  669. package/src/assets/plugins/highcharts/code/modules/oldie-polyfills.src.js +0 -220
  670. package/src/assets/plugins/highcharts/code/modules/oldie.js +0 -40
  671. package/src/assets/plugins/highcharts/code/modules/oldie.js.map +0 -1
  672. package/src/assets/plugins/highcharts/code/modules/oldie.src.js +0 -1443
  673. package/src/assets/plugins/highcharts/code/modules/organization.js +0 -22
  674. package/src/assets/plugins/highcharts/code/modules/organization.js.map +0 -1
  675. package/src/assets/plugins/highcharts/code/modules/organization.src.js +0 -736
  676. package/src/assets/plugins/highcharts/code/modules/overlapping-datalabels.js +0 -9
  677. package/src/assets/plugins/highcharts/code/modules/overlapping-datalabels.js.map +0 -1
  678. package/src/assets/plugins/highcharts/code/modules/overlapping-datalabels.src.js +0 -33
  679. package/src/assets/plugins/highcharts/code/modules/parallel-coordinates.js +0 -20
  680. package/src/assets/plugins/highcharts/code/modules/parallel-coordinates.js.map +0 -1
  681. package/src/assets/plugins/highcharts/code/modules/parallel-coordinates.src.js +0 -555
  682. package/src/assets/plugins/highcharts/code/modules/pareto.js +0 -16
  683. package/src/assets/plugins/highcharts/code/modules/pareto.js.map +0 -1
  684. package/src/assets/plugins/highcharts/code/modules/pareto.src.js +0 -382
  685. package/src/assets/plugins/highcharts/code/modules/pathfinder.js +0 -40
  686. package/src/assets/plugins/highcharts/code/modules/pathfinder.js.map +0 -1
  687. package/src/assets/plugins/highcharts/code/modules/pathfinder.src.js +0 -2693
  688. package/src/assets/plugins/highcharts/code/modules/pattern-fill.js +0 -24
  689. package/src/assets/plugins/highcharts/code/modules/pattern-fill.js.map +0 -1
  690. package/src/assets/plugins/highcharts/code/modules/pattern-fill.src.js +0 -640
  691. package/src/assets/plugins/highcharts/code/modules/price-indicator.js +0 -15
  692. package/src/assets/plugins/highcharts/code/modules/price-indicator.js.map +0 -1
  693. package/src/assets/plugins/highcharts/code/modules/price-indicator.src.js +0 -346
  694. package/src/assets/plugins/highcharts/code/modules/pyramid3d.js +0 -13
  695. package/src/assets/plugins/highcharts/code/modules/pyramid3d.js.map +0 -1
  696. package/src/assets/plugins/highcharts/code/modules/pyramid3d.src.js +0 -211
  697. package/src/assets/plugins/highcharts/code/modules/sankey.js +0 -38
  698. package/src/assets/plugins/highcharts/code/modules/sankey.js.map +0 -1
  699. package/src/assets/plugins/highcharts/code/modules/sankey.src.js +0 -1868
  700. package/src/assets/plugins/highcharts/code/modules/series-label.js +0 -24
  701. package/src/assets/plugins/highcharts/code/modules/series-label.js.map +0 -1
  702. package/src/assets/plugins/highcharts/code/modules/series-label.src.js +0 -852
  703. package/src/assets/plugins/highcharts/code/modules/solid-gauge.js +0 -19
  704. package/src/assets/plugins/highcharts/code/modules/solid-gauge.js.map +0 -1
  705. package/src/assets/plugins/highcharts/code/modules/solid-gauge.src.js +0 -650
  706. package/src/assets/plugins/highcharts/code/modules/sonification.js +0 -68
  707. package/src/assets/plugins/highcharts/code/modules/sonification.js.map +0 -1
  708. package/src/assets/plugins/highcharts/code/modules/sonification.src.js +0 -3869
  709. package/src/assets/plugins/highcharts/code/modules/static-scale.js +0 -13
  710. package/src/assets/plugins/highcharts/code/modules/static-scale.js.map +0 -1
  711. package/src/assets/plugins/highcharts/code/modules/static-scale.src.js +0 -117
  712. package/src/assets/plugins/highcharts/code/modules/stock-tools.js +0 -189
  713. package/src/assets/plugins/highcharts/code/modules/stock-tools.js.map +0 -1
  714. package/src/assets/plugins/highcharts/code/modules/stock-tools.src.js +0 -9592
  715. package/src/assets/plugins/highcharts/code/modules/stock.js +0 -213
  716. package/src/assets/plugins/highcharts/code/modules/stock.js.map +0 -1
  717. package/src/assets/plugins/highcharts/code/modules/stock.src.js +0 -12237
  718. package/src/assets/plugins/highcharts/code/modules/streamgraph.js +0 -13
  719. package/src/assets/plugins/highcharts/code/modules/streamgraph.js.map +0 -1
  720. package/src/assets/plugins/highcharts/code/modules/streamgraph.src.js +0 -253
  721. package/src/assets/plugins/highcharts/code/modules/sunburst.js +0 -68
  722. package/src/assets/plugins/highcharts/code/modules/sunburst.js.map +0 -1
  723. package/src/assets/plugins/highcharts/code/modules/sunburst.src.js +0 -3721
  724. package/src/assets/plugins/highcharts/code/modules/tilemap.js +0 -26
  725. package/src/assets/plugins/highcharts/code/modules/tilemap.js.map +0 -1
  726. package/src/assets/plugins/highcharts/code/modules/tilemap.src.js +0 -878
  727. package/src/assets/plugins/highcharts/code/modules/timeline.js +0 -28
  728. package/src/assets/plugins/highcharts/code/modules/timeline.js.map +0 -1
  729. package/src/assets/plugins/highcharts/code/modules/timeline.src.js +0 -815
  730. package/src/assets/plugins/highcharts/code/modules/treegrid.js +0 -65
  731. package/src/assets/plugins/highcharts/code/modules/treegrid.js.map +0 -1
  732. package/src/assets/plugins/highcharts/code/modules/treegrid.src.js +0 -3294
  733. package/src/assets/plugins/highcharts/code/modules/treemap.js +0 -49
  734. package/src/assets/plugins/highcharts/code/modules/treemap.js.map +0 -1
  735. package/src/assets/plugins/highcharts/code/modules/treemap.src.js +0 -2416
  736. package/src/assets/plugins/highcharts/code/modules/variable-pie.js +0 -18
  737. package/src/assets/plugins/highcharts/code/modules/variable-pie.js.map +0 -1
  738. package/src/assets/plugins/highcharts/code/modules/variable-pie.src.js +0 -533
  739. package/src/assets/plugins/highcharts/code/modules/variwide.js +0 -21
  740. package/src/assets/plugins/highcharts/code/modules/variwide.js.map +0 -1
  741. package/src/assets/plugins/highcharts/code/modules/variwide.src.js +0 -529
  742. package/src/assets/plugins/highcharts/code/modules/vector.js +0 -16
  743. package/src/assets/plugins/highcharts/code/modules/vector.js.map +0 -1
  744. package/src/assets/plugins/highcharts/code/modules/vector.src.js +0 -409
  745. package/src/assets/plugins/highcharts/code/modules/venn.js +0 -39
  746. package/src/assets/plugins/highcharts/code/modules/venn.js.map +0 -1
  747. package/src/assets/plugins/highcharts/code/modules/venn.src.js +0 -2095
  748. package/src/assets/plugins/highcharts/code/modules/windbarb.js +0 -24
  749. package/src/assets/plugins/highcharts/code/modules/windbarb.js.map +0 -1
  750. package/src/assets/plugins/highcharts/code/modules/windbarb.src.js +0 -772
  751. package/src/assets/plugins/highcharts/code/modules/wordcloud.js +0 -31
  752. package/src/assets/plugins/highcharts/code/modules/wordcloud.js.map +0 -1
  753. package/src/assets/plugins/highcharts/code/modules/wordcloud.src.js +0 -1584
  754. package/src/assets/plugins/highcharts/code/modules/xrange.js +0 -26
  755. package/src/assets/plugins/highcharts/code/modules/xrange.js.map +0 -1
  756. package/src/assets/plugins/highcharts/code/modules/xrange.src.js +0 -940
  757. package/src/assets/plugins/highcharts/code/themes/avocado.js +0 -10
  758. package/src/assets/plugins/highcharts/code/themes/avocado.js.map +0 -1
  759. package/src/assets/plugins/highcharts/code/themes/avocado.src.js +0 -103
  760. package/src/assets/plugins/highcharts/code/themes/brand-dark.js +0 -15
  761. package/src/assets/plugins/highcharts/code/themes/brand-dark.js.map +0 -1
  762. package/src/assets/plugins/highcharts/code/themes/brand-dark.src.js +0 -328
  763. package/src/assets/plugins/highcharts/code/themes/brand-light.js +0 -15
  764. package/src/assets/plugins/highcharts/code/themes/brand-light.js.map +0 -1
  765. package/src/assets/plugins/highcharts/code/themes/brand-light.src.js +0 -294
  766. package/src/assets/plugins/highcharts/code/themes/dark-blue.js +0 -15
  767. package/src/assets/plugins/highcharts/code/themes/dark-blue.js.map +0 -1
  768. package/src/assets/plugins/highcharts/code/themes/dark-blue.src.js +0 -315
  769. package/src/assets/plugins/highcharts/code/themes/dark-green.js +0 -15
  770. package/src/assets/plugins/highcharts/code/themes/dark-green.js.map +0 -1
  771. package/src/assets/plugins/highcharts/code/themes/dark-green.src.js +0 -315
  772. package/src/assets/plugins/highcharts/code/themes/dark-unica.js +0 -14
  773. package/src/assets/plugins/highcharts/code/themes/dark-unica.js.map +0 -1
  774. package/src/assets/plugins/highcharts/code/themes/dark-unica.src.js +0 -284
  775. package/src/assets/plugins/highcharts/code/themes/gray.js +0 -15
  776. package/src/assets/plugins/highcharts/code/themes/gray.js.map +0 -1
  777. package/src/assets/plugins/highcharts/code/themes/gray.src.js +0 -323
  778. package/src/assets/plugins/highcharts/code/themes/grid-light.js +0 -11
  779. package/src/assets/plugins/highcharts/code/themes/grid-light.js.map +0 -1
  780. package/src/assets/plugins/highcharts/code/themes/grid-light.src.js +0 -146
  781. package/src/assets/plugins/highcharts/code/themes/grid.js +0 -12
  782. package/src/assets/plugins/highcharts/code/themes/grid.js.map +0 -1
  783. package/src/assets/plugins/highcharts/code/themes/grid.src.js +0 -176
  784. package/src/assets/plugins/highcharts/code/themes/high-contrast-dark.js +0 -14
  785. package/src/assets/plugins/highcharts/code/themes/high-contrast-dark.js.map +0 -1
  786. package/src/assets/plugins/highcharts/code/themes/high-contrast-dark.src.js +0 -275
  787. package/src/assets/plugins/highcharts/code/themes/high-contrast-light.js +0 -10
  788. package/src/assets/plugins/highcharts/code/themes/high-contrast-light.js.map +0 -1
  789. package/src/assets/plugins/highcharts/code/themes/high-contrast-light.src.js +0 -105
  790. package/src/assets/plugins/highcharts/code/themes/sand-signika.js +0 -12
  791. package/src/assets/plugins/highcharts/code/themes/sand-signika.js.map +0 -1
  792. package/src/assets/plugins/highcharts/code/themes/sand-signika.src.js +0 -179
  793. package/src/assets/plugins/highcharts/code/themes/skies.js +0 -12
  794. package/src/assets/plugins/highcharts/code/themes/skies.js.map +0 -1
  795. package/src/assets/plugins/highcharts/code/themes/skies.src.js +0 -167
  796. package/src/assets/plugins/highcharts/code/themes/sunset.js +0 -10
  797. package/src/assets/plugins/highcharts/code/themes/sunset.js.map +0 -1
  798. package/src/assets/plugins/highcharts/code/themes/sunset.src.js +0 -102
  799. package/src/assets/plugins/highcharts/examples/3d-area-multiple/index.html +0 -192
  800. package/src/assets/plugins/highcharts/examples/3d-column-interactive/index.html +0 -111
  801. package/src/assets/plugins/highcharts/examples/3d-column-null-values/index.html +0 -118
  802. package/src/assets/plugins/highcharts/examples/3d-column-stacking-grouping/index.html +0 -144
  803. package/src/assets/plugins/highcharts/examples/3d-pie/index.html +0 -130
  804. package/src/assets/plugins/highcharts/examples/3d-pie-donut/index.html +0 -112
  805. package/src/assets/plugins/highcharts/examples/3d-scatter-draggable/index.html +0 -221
  806. package/src/assets/plugins/highcharts/examples/accessible-line/index.html +0 -198
  807. package/src/assets/plugins/highcharts/examples/accessible-pie/index.html +0 -213
  808. package/src/assets/plugins/highcharts/examples/advanced-accessible/index.html +0 -271
  809. package/src/assets/plugins/highcharts/examples/annotations/index.html +0 -2170
  810. package/src/assets/plugins/highcharts/examples/area-basic/index.html +0 -157
  811. package/src/assets/plugins/highcharts/examples/area-inverted/index.html +0 -135
  812. package/src/assets/plugins/highcharts/examples/area-missing/index.html +0 -125
  813. package/src/assets/plugins/highcharts/examples/area-negative/index.html +0 -101
  814. package/src/assets/plugins/highcharts/examples/area-stacked/index.html +0 -136
  815. package/src/assets/plugins/highcharts/examples/area-stacked-percent/index.html +0 -141
  816. package/src/assets/plugins/highcharts/examples/arearange/index.html +0 -132
  817. package/src/assets/plugins/highcharts/examples/arearange-line/index.html +0 -195
  818. package/src/assets/plugins/highcharts/examples/areaspline/index.html +0 -137
  819. package/src/assets/plugins/highcharts/examples/bar-basic/index.html +0 -143
  820. package/src/assets/plugins/highcharts/examples/bar-negative-stack/index.html +0 -173
  821. package/src/assets/plugins/highcharts/examples/bar-stacked/index.html +0 -112
  822. package/src/assets/plugins/highcharts/examples/bellcurve/index.html +0 -133
  823. package/src/assets/plugins/highcharts/examples/box-plot/index.html +0 -149
  824. package/src/assets/plugins/highcharts/examples/bubble/index.html +0 -209
  825. package/src/assets/plugins/highcharts/examples/bubble-3d/index.html +0 -159
  826. package/src/assets/plugins/highcharts/examples/bullet-graph/index.html +0 -233
  827. package/src/assets/plugins/highcharts/examples/chart-update/index.html +0 -137
  828. package/src/assets/plugins/highcharts/examples/column-basic/index.html +0 -144
  829. package/src/assets/plugins/highcharts/examples/column-comparison/index.html +0 -350
  830. package/src/assets/plugins/highcharts/examples/column-drilldown/index.html +0 -387
  831. package/src/assets/plugins/highcharts/examples/column-negative/index.html +0 -101
  832. package/src/assets/plugins/highcharts/examples/column-parsed/index.html +0 -138
  833. package/src/assets/plugins/highcharts/examples/column-placement/index.html +0 -160
  834. package/src/assets/plugins/highcharts/examples/column-pyramid/index.html +0 -117
  835. package/src/assets/plugins/highcharts/examples/column-rotated-labels/index.html +0 -147
  836. package/src/assets/plugins/highcharts/examples/column-stacked/index.html +0 -138
  837. package/src/assets/plugins/highcharts/examples/column-stacked-and-grouped/index.html +0 -133
  838. package/src/assets/plugins/highcharts/examples/column-stacked-percent/index.html +0 -113
  839. package/src/assets/plugins/highcharts/examples/columnrange/index.html +0 -145
  840. package/src/assets/plugins/highcharts/examples/combo/index.html +0 -146
  841. package/src/assets/plugins/highcharts/examples/combo-dual-axes/index.html +0 -153
  842. package/src/assets/plugins/highcharts/examples/combo-meteogram/index.html +0 -768
  843. package/src/assets/plugins/highcharts/examples/combo-multi-axes/index.html +0 -222
  844. package/src/assets/plugins/highcharts/examples/combo-regression/index.html +0 -110
  845. package/src/assets/plugins/highcharts/examples/combo-timeline/index.html +0 -592
  846. package/src/assets/plugins/highcharts/examples/cylinder/index.html +0 -104
  847. package/src/assets/plugins/highcharts/examples/dependency-wheel/index.html +0 -165
  848. package/src/assets/plugins/highcharts/examples/dumbbell/index.html +0 -230
  849. package/src/assets/plugins/highcharts/examples/dynamic-click-to-add/index.html +0 -147
  850. package/src/assets/plugins/highcharts/examples/dynamic-master-detail/index.html +0 -316
  851. package/src/assets/plugins/highcharts/examples/dynamic-update/index.html +0 -163
  852. package/src/assets/plugins/highcharts/examples/error-bar/index.html +0 -154
  853. package/src/assets/plugins/highcharts/examples/euler-diagram/index.html +0 -119
  854. package/src/assets/plugins/highcharts/examples/flame/index.html +0 -1324
  855. package/src/assets/plugins/highcharts/examples/funnel/index.html +0 -131
  856. package/src/assets/plugins/highcharts/examples/funnel3d/index.html +0 -117
  857. package/src/assets/plugins/highcharts/examples/gauge-activity/index.html +0 -272
  858. package/src/assets/plugins/highcharts/examples/gauge-clock/index.html +0 -261
  859. package/src/assets/plugins/highcharts/examples/gauge-dual/index.html +0 -181
  860. package/src/assets/plugins/highcharts/examples/gauge-solid/index.html +0 -248
  861. package/src/assets/plugins/highcharts/examples/gauge-speedometer/index.html +0 -189
  862. package/src/assets/plugins/highcharts/examples/gauge-vu-meter/index.html +0 -210
  863. package/src/assets/plugins/highcharts/examples/heatmap/index.html +0 -168
  864. package/src/assets/plugins/highcharts/examples/heatmap-canvas/index.html +0 -8928
  865. package/src/assets/plugins/highcharts/examples/histogram/index.html +0 -133
  866. package/src/assets/plugins/highcharts/examples/honeycomb-usa/index.html +0 -518
  867. package/src/assets/plugins/highcharts/examples/line-ajax/index.html +0 -206
  868. package/src/assets/plugins/highcharts/examples/line-basic/index.html +0 -147
  869. package/src/assets/plugins/highcharts/examples/line-boost/index.html +0 -144
  870. package/src/assets/plugins/highcharts/examples/line-labels/index.html +0 -108
  871. package/src/assets/plugins/highcharts/examples/line-log-axis/index.html +0 -106
  872. package/src/assets/plugins/highcharts/examples/line-time-series/index.html +0 -136
  873. package/src/assets/plugins/highcharts/examples/live-data/index.html +0 -155
  874. package/src/assets/plugins/highcharts/examples/lollipop/index.html +0 -161
  875. package/src/assets/plugins/highcharts/examples/network-graph/index.html +0 -277
  876. package/src/assets/plugins/highcharts/examples/organization-chart/index.html +0 -224
  877. package/src/assets/plugins/highcharts/examples/packed-bubble/index.html +0 -588
  878. package/src/assets/plugins/highcharts/examples/packed-bubble-split/index.html +0 -589
  879. package/src/assets/plugins/highcharts/examples/parallel-coordinates/index.html +0 -176
  880. package/src/assets/plugins/highcharts/examples/pareto/index.html +0 -133
  881. package/src/assets/plugins/highcharts/examples/parliament-chart/index.html +0 -138
  882. package/src/assets/plugins/highcharts/examples/pie-basic/index.html +0 -141
  883. package/src/assets/plugins/highcharts/examples/pie-donut/index.html +0 -347
  884. package/src/assets/plugins/highcharts/examples/pie-drilldown/index.html +0 -418
  885. package/src/assets/plugins/highcharts/examples/pie-gradient/index.html +0 -133
  886. package/src/assets/plugins/highcharts/examples/pie-legend/index.html +0 -128
  887. package/src/assets/plugins/highcharts/examples/pie-monochrome/index.html +0 -139
  888. package/src/assets/plugins/highcharts/examples/pie-semi-circle/index.html +0 -133
  889. package/src/assets/plugins/highcharts/examples/polar/index.html +0 -136
  890. package/src/assets/plugins/highcharts/examples/polar-radial-bar/index.html +0 -169
  891. package/src/assets/plugins/highcharts/examples/polar-spider/index.html +0 -148
  892. package/src/assets/plugins/highcharts/examples/polar-wind-rose/index.html +0 -351
  893. package/src/assets/plugins/highcharts/examples/polygon/index.html +0 -190
  894. package/src/assets/plugins/highcharts/examples/pyramid/index.html +0 -126
  895. package/src/assets/plugins/highcharts/examples/pyramid3d/index.html +0 -117
  896. package/src/assets/plugins/highcharts/examples/renderer/index.html +0 -334
  897. package/src/assets/plugins/highcharts/examples/responsive/index.html +0 -176
  898. package/src/assets/plugins/highcharts/examples/sankey-diagram/index.html +0 -145
  899. package/src/assets/plugins/highcharts/examples/scatter/index.html +0 -246
  900. package/src/assets/plugins/highcharts/examples/scatter-boost/index.html +0 -142
  901. package/src/assets/plugins/highcharts/examples/sonification/index.html +0 -331
  902. package/src/assets/plugins/highcharts/examples/sparkline/index.html +0 -676
  903. package/src/assets/plugins/highcharts/examples/spline-inverted/index.html +0 -135
  904. package/src/assets/plugins/highcharts/examples/spline-irregular-time/index.html +0 -255
  905. package/src/assets/plugins/highcharts/examples/spline-plot-bands/index.html +0 -223
  906. package/src/assets/plugins/highcharts/examples/spline-symbols/index.html +0 -139
  907. package/src/assets/plugins/highcharts/examples/streamgraph/index.html +0 -447
  908. package/src/assets/plugins/highcharts/examples/styled-mode-column/index.html +0 -146
  909. package/src/assets/plugins/highcharts/examples/styled-mode-pie/index.html +0 -119
  910. package/src/assets/plugins/highcharts/examples/sunburst/index.html +0 -1520
  911. package/src/assets/plugins/highcharts/examples/synchronized-charts/index.html +0 -238
  912. package/src/assets/plugins/highcharts/examples/timeline/index.html +0 -142
  913. package/src/assets/plugins/highcharts/examples/treemap-coloraxis/index.html +0 -119
  914. package/src/assets/plugins/highcharts/examples/treemap-large-dataset/index.html +0 -172
  915. package/src/assets/plugins/highcharts/examples/treemap-with-levels/index.html +0 -151
  916. package/src/assets/plugins/highcharts/examples/variable-radius-pie/index.html +0 -131
  917. package/src/assets/plugins/highcharts/examples/variwide/index.html +0 -146
  918. package/src/assets/plugins/highcharts/examples/vector-plot/index.html +0 -494
  919. package/src/assets/plugins/highcharts/examples/venn-diagram/index.html +0 -124
  920. package/src/assets/plugins/highcharts/examples/waterfall/index.html +0 -143
  921. package/src/assets/plugins/highcharts/examples/windbarb-series/index.html +0 -189
  922. package/src/assets/plugins/highcharts/examples/wordcloud/index.html +0 -110
  923. package/src/assets/plugins/highcharts/examples/x-range/index.html +0 -142
  924. package/src/assets/plugins/highcharts/gfx/stock-icons/annotations-hidden.svg +0 -19
  925. package/src/assets/plugins/highcharts/gfx/stock-icons/annotations-visible.svg +0 -20
  926. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-bottom.svg +0 -9
  927. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-left.svg +0 -9
  928. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-line.svg +0 -11
  929. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-ray.svg +0 -10
  930. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-right.svg +0 -9
  931. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow-segment.svg +0 -11
  932. package/src/assets/plugins/highcharts/gfx/stock-icons/arrow.svg +0 -13
  933. package/src/assets/plugins/highcharts/gfx/stock-icons/circle.svg +0 -13
  934. package/src/assets/plugins/highcharts/gfx/stock-icons/close.svg +0 -8
  935. package/src/assets/plugins/highcharts/gfx/stock-icons/crooked-3.svg +0 -13
  936. package/src/assets/plugins/highcharts/gfx/stock-icons/crooked-5.svg +0 -11
  937. package/src/assets/plugins/highcharts/gfx/stock-icons/current-price-hide.svg +0 -40
  938. package/src/assets/plugins/highcharts/gfx/stock-icons/current-price-show.svg +0 -41
  939. package/src/assets/plugins/highcharts/gfx/stock-icons/destroy.svg +0 -14
  940. package/src/assets/plugins/highcharts/gfx/stock-icons/drawing.svg +0 -18
  941. package/src/assets/plugins/highcharts/gfx/stock-icons/edit.svg +0 -10
  942. package/src/assets/plugins/highcharts/gfx/stock-icons/elliott-3.svg +0 -59
  943. package/src/assets/plugins/highcharts/gfx/stock-icons/elliott-5.svg +0 -41
  944. package/src/assets/plugins/highcharts/gfx/stock-icons/ellipse.svg +0 -11
  945. package/src/assets/plugins/highcharts/gfx/stock-icons/fibonacci-timezone.svg +0 -16
  946. package/src/assets/plugins/highcharts/gfx/stock-icons/fibonacci.svg +0 -25
  947. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-basic.svg +0 -10
  948. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-diamond.svg +0 -12
  949. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-elipse.svg +0 -13
  950. package/src/assets/plugins/highcharts/gfx/stock-icons/flag-trapeze.svg +0 -14
  951. package/src/assets/plugins/highcharts/gfx/stock-icons/fullscreen.svg +0 -15
  952. package/src/assets/plugins/highcharts/gfx/stock-icons/horizontal-line.svg +0 -8
  953. package/src/assets/plugins/highcharts/gfx/stock-icons/indicators.svg +0 -27
  954. package/src/assets/plugins/highcharts/gfx/stock-icons/label.svg +0 -16
  955. package/src/assets/plugins/highcharts/gfx/stock-icons/line.svg +0 -11
  956. package/src/assets/plugins/highcharts/gfx/stock-icons/linear.svg +0 -11
  957. package/src/assets/plugins/highcharts/gfx/stock-icons/logarithmic.svg +0 -1
  958. package/src/assets/plugins/highcharts/gfx/stock-icons/measure-x.svg +0 -23
  959. package/src/assets/plugins/highcharts/gfx/stock-icons/measure-xy.svg +0 -28
  960. package/src/assets/plugins/highcharts/gfx/stock-icons/measure-y.svg +0 -24
  961. package/src/assets/plugins/highcharts/gfx/stock-icons/panning.svg +0 -17
  962. package/src/assets/plugins/highcharts/gfx/stock-icons/parallel-channel.svg +0 -15
  963. package/src/assets/plugins/highcharts/gfx/stock-icons/pitchfork.svg +0 -13
  964. package/src/assets/plugins/highcharts/gfx/stock-icons/ray.svg +0 -10
  965. package/src/assets/plugins/highcharts/gfx/stock-icons/rectangle.svg +0 -8
  966. package/src/assets/plugins/highcharts/gfx/stock-icons/remove-annotations.svg +0 -15
  967. package/src/assets/plugins/highcharts/gfx/stock-icons/save-chart.svg +0 -12
  968. package/src/assets/plugins/highcharts/gfx/stock-icons/segment.svg +0 -10
  969. package/src/assets/plugins/highcharts/gfx/stock-icons/separator.svg +0 -10
  970. package/src/assets/plugins/highcharts/gfx/stock-icons/series-candlestick.svg +0 -12
  971. package/src/assets/plugins/highcharts/gfx/stock-icons/series-heikin-ashi.svg +0 -1
  972. package/src/assets/plugins/highcharts/gfx/stock-icons/series-hlc.svg +0 -1
  973. package/src/assets/plugins/highcharts/gfx/stock-icons/series-hollow-candlestick.svg +0 -1
  974. package/src/assets/plugins/highcharts/gfx/stock-icons/series-line.svg +0 -11
  975. package/src/assets/plugins/highcharts/gfx/stock-icons/series-ohlc.svg +0 -14
  976. package/src/assets/plugins/highcharts/gfx/stock-icons/text.svg +0 -13
  977. package/src/assets/plugins/highcharts/gfx/stock-icons/time-cycles.svg +0 -35
  978. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-arrow.svg +0 -7
  979. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-counter.svg +0 -23
  980. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-double-arrow.svg +0 -10
  981. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-label.svg +0 -14
  982. package/src/assets/plugins/highcharts/gfx/stock-icons/vertical-line.svg +0 -8
  983. package/src/assets/plugins/highcharts/gfx/stock-icons/zoom-x.svg +0 -17
  984. package/src/assets/plugins/highcharts/gfx/stock-icons/zoom-xy.svg +0 -13
  985. package/src/assets/plugins/highcharts/gfx/stock-icons/zoom-y.svg +0 -17
  986. package/src/assets/plugins/highcharts/gfx/vml-radial-gradient.png +0 -0
  987. package/src/assets/plugins/highcharts/graphics/color-picker.svg +0 -12
  988. package/src/assets/plugins/highcharts/graphics/cursor.svg +0 -11
  989. package/src/assets/plugins/highcharts/graphics/earth.svg +0 -432
  990. package/src/assets/plugins/highcharts/graphics/feature.svg +0 -13
  991. package/src/assets/plugins/highcharts/graphics/flag-circle.svg +0 -17
  992. package/src/assets/plugins/highcharts/graphics/flag-circlepin.svg +0 -15
  993. package/src/assets/plugins/highcharts/graphics/flag-diamondpin.svg +0 -15
  994. package/src/assets/plugins/highcharts/graphics/flag-flag.svg +0 -14
  995. package/src/assets/plugins/highcharts/graphics/flag-rectangle.svg +0 -18
  996. package/src/assets/plugins/highcharts/graphics/flag-squarepin.svg +0 -16
  997. package/src/assets/plugins/highcharts/graphics/flag.svg +0 -15
  998. package/src/assets/plugins/highcharts/graphics/homepage/apple.svg +0 -55
  999. package/src/assets/plugins/highcharts/graphics/homepage/award.png +0 -0
  1000. package/src/assets/plugins/highcharts/graphics/homepage/cloud.png +0 -0
  1001. package/src/assets/plugins/highcharts/graphics/homepage/earth.png +0 -0
  1002. package/src/assets/plugins/highcharts/graphics/homepage/jupiter.png +0 -0
  1003. package/src/assets/plugins/highcharts/graphics/homepage/mars.png +0 -0
  1004. package/src/assets/plugins/highcharts/graphics/homepage/mercury.png +0 -0
  1005. package/src/assets/plugins/highcharts/graphics/homepage/moon.png +0 -0
  1006. package/src/assets/plugins/highcharts/graphics/homepage/neptune.png +0 -0
  1007. package/src/assets/plugins/highcharts/graphics/homepage/p1.png +0 -0
  1008. package/src/assets/plugins/highcharts/graphics/homepage/p1.svg +0 -9
  1009. package/src/assets/plugins/highcharts/graphics/homepage/p2.png +0 -0
  1010. package/src/assets/plugins/highcharts/graphics/homepage/p2.svg +0 -9
  1011. package/src/assets/plugins/highcharts/graphics/homepage/p3.png +0 -0
  1012. package/src/assets/plugins/highcharts/graphics/homepage/p3.svg +0 -9
  1013. package/src/assets/plugins/highcharts/graphics/homepage/p4.png +0 -0
  1014. package/src/assets/plugins/highcharts/graphics/homepage/p4.svg +0 -9
  1015. package/src/assets/plugins/highcharts/graphics/homepage/p5.png +0 -0
  1016. package/src/assets/plugins/highcharts/graphics/homepage/p5.svg +0 -9
  1017. package/src/assets/plugins/highcharts/graphics/homepage/p6.png +0 -0
  1018. package/src/assets/plugins/highcharts/graphics/homepage/p6.svg +0 -9
  1019. package/src/assets/plugins/highcharts/graphics/homepage/product.png +0 -0
  1020. package/src/assets/plugins/highcharts/graphics/homepage/saturn.png +0 -0
  1021. package/src/assets/plugins/highcharts/graphics/homepage/sun.png +0 -0
  1022. package/src/assets/plugins/highcharts/graphics/homepage/uranus.png +0 -0
  1023. package/src/assets/plugins/highcharts/graphics/homepage/venus.png +0 -0
  1024. package/src/assets/plugins/highcharts/graphics/homepage/version.png +0 -0
  1025. package/src/assets/plugins/highcharts/graphics/rect.svg +0 -12
  1026. package/src/assets/plugins/highcharts/graphics/reset.svg +0 -16
  1027. package/src/assets/plugins/highcharts/graphics/sand.png +0 -0
  1028. package/src/assets/plugins/highcharts/graphics/save-chart-cloud.svg +0 -14
  1029. package/src/assets/plugins/highcharts/graphics/save.svg +0 -14
  1030. package/src/assets/plugins/highcharts/graphics/search.png +0 -0
  1031. package/src/assets/plugins/highcharts/graphics/skies.jpg +0 -0
  1032. package/src/assets/plugins/highcharts/graphics/snow.png +0 -0
  1033. package/src/assets/plugins/highcharts/graphics/sun.png +0 -0
  1034. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/blue-flake-big.svg +0 -32
  1035. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/blue-star-big.svg +0 -16
  1036. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/car-tree.svg +0 -429
  1037. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/green-flake-big.svg +0 -119
  1038. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/green-star.svg +0 -20
  1039. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/hill.svg +0 -193
  1040. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/hill2.svg +0 -164
  1041. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/horse.svg +0 -1
  1042. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/people.svg +0 -2336
  1043. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/pines.svg +0 -777
  1044. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/pond-skate.svg +0 -1
  1045. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-flake.svg +0 -30
  1046. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-house.svg +0 -85
  1047. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-star-big.svg +0 -36
  1048. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/red-star.svg +0 -20
  1049. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/santa-b.svg +0 -91
  1050. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/santa.svg +0 -91
  1051. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/snow-mound.svg +0 -146
  1052. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/snow.svg +0 -20788
  1053. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/sun-disk.svg +0 -597
  1054. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/tree-cluster.svg +0 -2735
  1055. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/white-flake-big.svg +0 -99
  1056. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/white-flake.big.svg +0 -96
  1057. package/src/assets/plugins/highcharts/graphics/xmas-card-2020/white-star-big.svg +0 -36
  1058. package/src/assets/plugins/highcharts/index.html +0 -133
@@ -1,4390 +0,0 @@
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