@antv/g 5.1.2 → 5.1.3-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (943) hide show
  1. package/dist/AbstractRenderer.d.ts +38 -0
  2. package/dist/AbstractRenderer.d.ts.map +1 -0
  3. package/dist/Canvas.d.ts +150 -0
  4. package/dist/Canvas.d.ts.map +1 -0
  5. package/dist/DisplayObjectPool.d.ts +10 -0
  6. package/dist/DisplayObjectPool.d.ts.map +1 -0
  7. package/dist/__tests__/utils.d.ts +2 -0
  8. package/dist/__tests__/utils.d.ts.map +1 -0
  9. package/dist/camera/Camera.d.ts +328 -0
  10. package/dist/camera/Camera.d.ts.map +1 -0
  11. package/dist/camera/Landmark.d.ts +24 -0
  12. package/dist/camera/Landmark.d.ts.map +1 -0
  13. package/dist/camera/index.d.ts +3 -0
  14. package/dist/camera/index.d.ts.map +1 -0
  15. package/dist/canvas-module.d.ts +2 -0
  16. package/dist/canvas-module.d.ts.map +1 -0
  17. package/dist/components/Cullable.d.ts +15 -0
  18. package/dist/components/Cullable.d.ts.map +1 -0
  19. package/dist/components/Geometry.d.ts +13 -0
  20. package/dist/components/Geometry.d.ts.map +1 -0
  21. package/dist/components/Renderable.d.ts +25 -0
  22. package/dist/components/Renderable.d.ts.map +1 -0
  23. package/dist/components/Sortable.d.ts +21 -0
  24. package/dist/components/Sortable.d.ts.map +1 -0
  25. package/dist/components/Transform.d.ts +29 -0
  26. package/dist/components/Transform.d.ts.map +1 -0
  27. package/dist/components/index.d.ts +6 -0
  28. package/dist/components/index.d.ts.map +1 -0
  29. package/dist/css/CSS.d.ts +89 -0
  30. package/dist/css/CSS.d.ts.map +1 -0
  31. package/dist/css/CSSProperty.d.ts +42 -0
  32. package/dist/css/CSSProperty.d.ts.map +1 -0
  33. package/dist/css/StyleValueRegistry.d.ts +124 -0
  34. package/dist/css/StyleValueRegistry.d.ts.map +1 -0
  35. package/dist/css/cssom/CSSColorValue.d.ts +24 -0
  36. package/dist/css/cssom/CSSColorValue.d.ts.map +1 -0
  37. package/dist/css/cssom/CSSGradientValue.d.ts +40 -0
  38. package/dist/css/cssom/CSSGradientValue.d.ts.map +1 -0
  39. package/dist/css/cssom/CSSKeywordValue.d.ts +16 -0
  40. package/dist/css/cssom/CSSKeywordValue.d.ts.map +1 -0
  41. package/dist/css/cssom/CSSMathOperator.d.ts +12 -0
  42. package/dist/css/cssom/CSSMathOperator.d.ts.map +1 -0
  43. package/dist/css/cssom/CSSNumericSumValue.d.ts +8 -0
  44. package/dist/css/cssom/CSSNumericSumValue.d.ts.map +1 -0
  45. package/dist/css/cssom/CSSNumericValue.d.ts +213 -0
  46. package/dist/css/cssom/CSSNumericValue.d.ts.map +1 -0
  47. package/dist/css/cssom/CSSRGB.d.ts +26 -0
  48. package/dist/css/cssom/CSSRGB.d.ts.map +1 -0
  49. package/dist/css/cssom/CSSStyleValue.d.ts +54 -0
  50. package/dist/css/cssom/CSSStyleValue.d.ts.map +1 -0
  51. package/dist/css/cssom/index.d.ts +18 -0
  52. package/dist/css/cssom/index.d.ts.map +1 -0
  53. package/dist/css/cssom/types.d.ts +87 -0
  54. package/dist/css/cssom/types.d.ts.map +1 -0
  55. package/dist/css/index.d.ts +12 -0
  56. package/dist/css/index.d.ts.map +1 -0
  57. package/dist/css/interfaces.d.ts +117 -0
  58. package/dist/css/interfaces.d.ts.map +1 -0
  59. package/dist/css/layout/FragmentResult.d.ts +33 -0
  60. package/dist/css/layout/FragmentResult.d.ts.map +1 -0
  61. package/dist/css/layout/LayoutChildren.d.ts +24 -0
  62. package/dist/css/layout/LayoutChildren.d.ts.map +1 -0
  63. package/dist/css/layout/LayoutContext.d.ts +36 -0
  64. package/dist/css/layout/LayoutContext.d.ts.map +1 -0
  65. package/dist/css/layout/LayoutDefinition.d.ts +21 -0
  66. package/dist/css/layout/LayoutDefinition.d.ts.map +1 -0
  67. package/dist/css/layout/LayoutEdges.d.ts +25 -0
  68. package/dist/css/layout/LayoutEdges.d.ts.map +1 -0
  69. package/dist/css/layout/LayoutEngine.d.ts +42 -0
  70. package/dist/css/layout/LayoutEngine.d.ts.map +1 -0
  71. package/dist/css/layout/LayoutFragment.d.ts +27 -0
  72. package/dist/css/layout/LayoutFragment.d.ts.map +1 -0
  73. package/dist/css/layout/LayoutObject.d.ts +47 -0
  74. package/dist/css/layout/LayoutObject.d.ts.map +1 -0
  75. package/dist/css/layout/LayoutRegistry.d.ts +17 -0
  76. package/dist/css/layout/LayoutRegistry.d.ts.map +1 -0
  77. package/dist/css/layout/LayoutWorkTask.d.ts +15 -0
  78. package/dist/css/layout/LayoutWorkTask.d.ts.map +1 -0
  79. package/dist/css/layout/index.d.ts +12 -0
  80. package/dist/css/layout/index.d.ts.map +1 -0
  81. package/dist/css/layout/types.d.ts +105 -0
  82. package/dist/css/layout/types.d.ts.map +1 -0
  83. package/dist/css/parser/color.d.ts +7 -0
  84. package/dist/css/parser/color.d.ts.map +1 -0
  85. package/dist/css/parser/dimension.d.ts +38 -0
  86. package/dist/css/parser/dimension.d.ts.map +1 -0
  87. package/dist/css/parser/filter.d.ts +8 -0
  88. package/dist/css/parser/filter.d.ts.map +1 -0
  89. package/dist/css/parser/index.d.ts +16 -0
  90. package/dist/css/parser/index.d.ts.map +1 -0
  91. package/dist/css/parser/numeric.d.ts +20 -0
  92. package/dist/css/parser/numeric.d.ts.map +1 -0
  93. package/dist/css/parser/path.d.ts +6 -0
  94. package/dist/css/parser/path.d.ts.map +1 -0
  95. package/dist/css/parser/points.d.ts +13 -0
  96. package/dist/css/parser/points.d.ts.map +1 -0
  97. package/dist/css/parser/transform-origin.d.ts +7 -0
  98. package/dist/css/parser/transform-origin.d.ts.map +1 -0
  99. package/dist/css/parser/transform.d.ts +14 -0
  100. package/dist/css/parser/transform.d.ts.map +1 -0
  101. package/dist/css/parser/types.d.ts +3 -0
  102. package/dist/css/parser/types.d.ts.map +1 -0
  103. package/dist/css/properties/CSSPropertyClipPath.d.ts +21 -0
  104. package/dist/css/properties/CSSPropertyClipPath.d.ts.map +1 -0
  105. package/dist/css/properties/CSSPropertyColor.d.ts +5 -0
  106. package/dist/css/properties/CSSPropertyColor.d.ts.map +1 -0
  107. package/dist/css/properties/CSSPropertyFilter.d.ts +4 -0
  108. package/dist/css/properties/CSSPropertyFilter.d.ts.map +1 -0
  109. package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts +7 -0
  110. package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts.map +1 -0
  111. package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts +12 -0
  112. package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts.map +1 -0
  113. package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts +22 -0
  114. package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts.map +1 -0
  115. package/dist/css/properties/CSSPropertyLocalPosition.d.ts +7 -0
  116. package/dist/css/properties/CSSPropertyLocalPosition.d.ts.map +1 -0
  117. package/dist/css/properties/CSSPropertyOffsetDistance.d.ts +4 -0
  118. package/dist/css/properties/CSSPropertyOffsetDistance.d.ts.map +1 -0
  119. package/dist/css/properties/CSSPropertyOffsetPath.d.ts +4 -0
  120. package/dist/css/properties/CSSPropertyOffsetPath.d.ts.map +1 -0
  121. package/dist/css/properties/CSSPropertyOpacity.d.ts +7 -0
  122. package/dist/css/properties/CSSPropertyOpacity.d.ts.map +1 -0
  123. package/dist/css/properties/CSSPropertyPath.d.ts +4 -0
  124. package/dist/css/properties/CSSPropertyPath.d.ts.map +1 -0
  125. package/dist/css/properties/CSSPropertyPoints.d.ts +11 -0
  126. package/dist/css/properties/CSSPropertyPoints.d.ts.map +1 -0
  127. package/dist/css/properties/CSSPropertyShadowBlur.d.ts +3 -0
  128. package/dist/css/properties/CSSPropertyShadowBlur.d.ts.map +1 -0
  129. package/dist/css/properties/CSSPropertyText.d.ts +4 -0
  130. package/dist/css/properties/CSSPropertyText.d.ts.map +1 -0
  131. package/dist/css/properties/CSSPropertyTextTransform.d.ts +4 -0
  132. package/dist/css/properties/CSSPropertyTextTransform.d.ts.map +1 -0
  133. package/dist/css/properties/CSSPropertyTransform.d.ts +33 -0
  134. package/dist/css/properties/CSSPropertyTransform.d.ts.map +1 -0
  135. package/dist/css/properties/CSSPropertyTransformOrigin.d.ts +9 -0
  136. package/dist/css/properties/CSSPropertyTransformOrigin.d.ts.map +1 -0
  137. package/dist/css/properties/CSSPropertyZIndex.d.ts +4 -0
  138. package/dist/css/properties/CSSPropertyZIndex.d.ts.map +1 -0
  139. package/dist/css/properties/index.d.ts +19 -0
  140. package/dist/css/properties/index.d.ts.map +1 -0
  141. package/dist/display-objects/Circle.d.ts +18 -0
  142. package/dist/display-objects/Circle.d.ts.map +1 -0
  143. package/dist/display-objects/CustomElement.d.ts +25 -0
  144. package/dist/display-objects/CustomElement.d.ts.map +1 -0
  145. package/dist/display-objects/DisplayObject.d.ts +275 -0
  146. package/dist/display-objects/DisplayObject.d.ts.map +1 -0
  147. package/dist/display-objects/Ellipse.d.ts +20 -0
  148. package/dist/display-objects/Ellipse.d.ts.map +1 -0
  149. package/dist/display-objects/Group.d.ts +30 -0
  150. package/dist/display-objects/Group.d.ts.map +1 -0
  151. package/dist/display-objects/HTML.d.ts +42 -0
  152. package/dist/display-objects/HTML.d.ts.map +1 -0
  153. package/dist/display-objects/Image.d.ts +24 -0
  154. package/dist/display-objects/Image.d.ts.map +1 -0
  155. package/dist/display-objects/Line.d.ts +31 -0
  156. package/dist/display-objects/Line.d.ts.map +1 -0
  157. package/dist/display-objects/Path.d.ts +49 -0
  158. package/dist/display-objects/Path.d.ts.map +1 -0
  159. package/dist/display-objects/Polygon.d.ts +17 -0
  160. package/dist/display-objects/Polygon.d.ts.map +1 -0
  161. package/dist/display-objects/Polyline.d.ts +22 -0
  162. package/dist/display-objects/Polyline.d.ts.map +1 -0
  163. package/dist/display-objects/Rect.d.ts +25 -0
  164. package/dist/display-objects/Rect.d.ts.map +1 -0
  165. package/dist/display-objects/Text.d.ts +92 -0
  166. package/dist/display-objects/Text.d.ts.map +1 -0
  167. package/dist/display-objects/index.d.ts +14 -0
  168. package/dist/display-objects/index.d.ts.map +1 -0
  169. package/dist/dom/Animation.d.ts +133 -0
  170. package/dist/dom/Animation.d.ts.map +1 -0
  171. package/dist/dom/AnimationEffectTiming.d.ts +59 -0
  172. package/dist/dom/AnimationEffectTiming.d.ts.map +1 -0
  173. package/dist/dom/AnimationEvent.d.ts +12 -0
  174. package/dist/dom/AnimationEvent.d.ts.map +1 -0
  175. package/dist/dom/AnimationTimeline.d.ts +41 -0
  176. package/dist/dom/AnimationTimeline.d.ts.map +1 -0
  177. package/dist/dom/CustomElementRegistry.d.ts +16 -0
  178. package/dist/dom/CustomElementRegistry.d.ts.map +1 -0
  179. package/dist/dom/CustomEvent.d.ts +17 -0
  180. package/dist/dom/CustomEvent.d.ts.map +1 -0
  181. package/dist/dom/Document.d.ts +73 -0
  182. package/dist/dom/Document.d.ts.map +1 -0
  183. package/dist/dom/Element.d.ts +188 -0
  184. package/dist/dom/Element.d.ts.map +1 -0
  185. package/dist/dom/EventTarget.d.ts +41 -0
  186. package/dist/dom/EventTarget.d.ts.map +1 -0
  187. package/dist/dom/FederatedEvent.d.ts +146 -0
  188. package/dist/dom/FederatedEvent.d.ts.map +1 -0
  189. package/dist/dom/FederatedMouseEvent.d.ts +53 -0
  190. package/dist/dom/FederatedMouseEvent.d.ts.map +1 -0
  191. package/dist/dom/FederatedPointerEvent.d.ts +76 -0
  192. package/dist/dom/FederatedPointerEvent.d.ts.map +1 -0
  193. package/dist/dom/FederatedWheelEvent.d.ts +21 -0
  194. package/dist/dom/FederatedWheelEvent.d.ts.map +1 -0
  195. package/dist/dom/KeyframeEffect.d.ts +48 -0
  196. package/dist/dom/KeyframeEffect.d.ts.map +1 -0
  197. package/dist/dom/KeyframeList.d.ts +3 -0
  198. package/dist/dom/KeyframeList.d.ts.map +1 -0
  199. package/dist/dom/MutationEvent.d.ts +16 -0
  200. package/dist/dom/MutationEvent.d.ts.map +1 -0
  201. package/dist/dom/MutationObserver.d.ts +37 -0
  202. package/dist/dom/MutationObserver.d.ts.map +1 -0
  203. package/dist/dom/MutationRecord.d.ts +15 -0
  204. package/dist/dom/MutationRecord.d.ts.map +1 -0
  205. package/dist/dom/Node.d.ts +139 -0
  206. package/dist/dom/Node.d.ts.map +1 -0
  207. package/dist/dom/index.d.ts +21 -0
  208. package/dist/dom/index.d.ts.map +1 -0
  209. package/dist/dom/interfaces.d.ts +373 -0
  210. package/dist/dom/interfaces.d.ts.map +1 -0
  211. package/dist/global-module.d.ts +2 -0
  212. package/dist/global-module.d.ts.map +1 -0
  213. package/dist/index.d.ts +19 -0
  214. package/dist/index.d.ts.map +1 -0
  215. package/dist/index.esm.js +19679 -0
  216. package/dist/index.js +19851 -0
  217. package/dist/index.umd.js +29159 -0
  218. package/dist/index.umd.min.js +14 -28
  219. package/dist/plugins/CullingPlugin.d.ts +18 -0
  220. package/dist/plugins/CullingPlugin.d.ts.map +1 -0
  221. package/dist/plugins/DirtyCheckPlugin.d.ts +11 -0
  222. package/dist/plugins/DirtyCheckPlugin.d.ts.map +1 -0
  223. package/dist/plugins/EventPlugin.d.ts +30 -0
  224. package/dist/plugins/EventPlugin.d.ts.map +1 -0
  225. package/dist/plugins/FrustumCullingStrategy.d.ts +22 -0
  226. package/dist/plugins/FrustumCullingStrategy.d.ts.map +1 -0
  227. package/dist/plugins/PrepareRendererPlugin.d.ts +8 -0
  228. package/dist/plugins/PrepareRendererPlugin.d.ts.map +1 -0
  229. package/dist/services/ContextService.d.ts +14 -0
  230. package/dist/services/ContextService.d.ts.map +1 -0
  231. package/dist/services/EventService.d.ts +72 -0
  232. package/dist/services/EventService.d.ts.map +1 -0
  233. package/dist/services/OffscreenCanvasCreator.d.ts +14 -0
  234. package/dist/services/OffscreenCanvasCreator.d.ts.map +1 -0
  235. package/dist/services/RenderingContext.d.ts +27 -0
  236. package/dist/services/RenderingContext.d.ts.map +1 -0
  237. package/dist/services/RenderingService.d.ts +103 -0
  238. package/dist/services/RenderingService.d.ts.map +1 -0
  239. package/dist/services/SceneGraphSelector.d.ts +24 -0
  240. package/dist/services/SceneGraphSelector.d.ts.map +1 -0
  241. package/dist/services/SceneGraphService.d.ts +154 -0
  242. package/dist/services/SceneGraphService.d.ts.map +1 -0
  243. package/dist/services/TextService.d.ts +37 -0
  244. package/dist/services/TextService.d.ts.map +1 -0
  245. package/dist/services/aabb/CircleUpdater.d.ts +9 -0
  246. package/dist/services/aabb/CircleUpdater.d.ts.map +1 -0
  247. package/dist/services/aabb/EllipseUpdater.d.ts +9 -0
  248. package/dist/services/aabb/EllipseUpdater.d.ts.map +1 -0
  249. package/dist/services/aabb/LineUpdater.d.ts +9 -0
  250. package/dist/services/aabb/LineUpdater.d.ts.map +1 -0
  251. package/dist/services/aabb/PathUpdater.d.ts +9 -0
  252. package/dist/services/aabb/PathUpdater.d.ts.map +1 -0
  253. package/dist/services/aabb/PolylineUpdater.d.ts +9 -0
  254. package/dist/services/aabb/PolylineUpdater.d.ts.map +1 -0
  255. package/dist/services/aabb/RectUpdater.d.ts +9 -0
  256. package/dist/services/aabb/RectUpdater.d.ts.map +1 -0
  257. package/dist/services/aabb/TextUpdater.d.ts +22 -0
  258. package/dist/services/aabb/TextUpdater.d.ts.map +1 -0
  259. package/dist/services/aabb/index.d.ts +9 -0
  260. package/dist/services/aabb/index.d.ts.map +1 -0
  261. package/dist/services/aabb/interfaces.d.ts +16 -0
  262. package/dist/services/aabb/interfaces.d.ts.map +1 -0
  263. package/dist/services/index.d.ts +11 -0
  264. package/dist/services/index.d.ts.map +1 -0
  265. package/dist/shapes/AABB.d.ts +36 -0
  266. package/dist/shapes/AABB.d.ts.map +1 -0
  267. package/dist/shapes/BoundingSphere.d.ts +9 -0
  268. package/dist/shapes/BoundingSphere.d.ts.map +1 -0
  269. package/dist/shapes/Frustum.d.ts +17 -0
  270. package/dist/shapes/Frustum.d.ts.map +1 -0
  271. package/dist/shapes/Plane.d.ts +15 -0
  272. package/dist/shapes/Plane.d.ts.map +1 -0
  273. package/dist/shapes/Point.d.ts +12 -0
  274. package/dist/shapes/Point.d.ts.map +1 -0
  275. package/dist/shapes/Ray.d.ts +25 -0
  276. package/dist/shapes/Ray.d.ts.map +1 -0
  277. package/dist/shapes/Rectangle.d.ts +13 -0
  278. package/dist/shapes/Rectangle.d.ts.map +1 -0
  279. package/dist/shapes/index.d.ts +8 -0
  280. package/dist/shapes/index.d.ts.map +1 -0
  281. package/dist/types.d.ts +270 -0
  282. package/dist/types.d.ts.map +1 -0
  283. package/dist/utils/animation.d.ts +16 -0
  284. package/dist/utils/animation.d.ts.map +1 -0
  285. package/dist/utils/assert.d.ts +10 -0
  286. package/dist/utils/assert.d.ts.map +1 -0
  287. package/dist/utils/bezier-easing.d.ts +21 -0
  288. package/dist/utils/bezier-easing.d.ts.map +1 -0
  289. package/dist/utils/canvas.d.ts +7 -0
  290. package/dist/utils/canvas.d.ts.map +1 -0
  291. package/dist/utils/custom-easing.d.ts +16 -0
  292. package/dist/utils/custom-easing.d.ts.map +1 -0
  293. package/dist/utils/deferred.d.ts +44 -0
  294. package/dist/utils/deferred.d.ts.map +1 -0
  295. package/dist/utils/dom.d.ts +3 -0
  296. package/dist/utils/dom.d.ts.map +1 -0
  297. package/dist/utils/event.d.ts +36 -0
  298. package/dist/utils/event.d.ts.map +1 -0
  299. package/dist/utils/index.d.ts +12 -0
  300. package/dist/utils/index.d.ts.map +1 -0
  301. package/dist/utils/interpolation.d.ts +5 -0
  302. package/dist/utils/interpolation.d.ts.map +1 -0
  303. package/dist/utils/math.d.ts +30 -0
  304. package/dist/utils/math.d.ts.map +1 -0
  305. package/dist/utils/path.d.ts +16 -0
  306. package/dist/utils/path.d.ts.map +1 -0
  307. package/dist/utils/string.d.ts +3 -0
  308. package/dist/utils/string.d.ts.map +1 -0
  309. package/dist/utils/text.d.ts +3 -0
  310. package/dist/utils/text.d.ts.map +1 -0
  311. package/package.json +27 -33
  312. package/es/AbstractRenderer.d.ts +0 -37
  313. package/es/AbstractRenderer.js +0 -62
  314. package/es/Canvas.d.ts +0 -149
  315. package/es/Canvas.js +0 -518
  316. package/es/DisplayObjectPool.d.ts +0 -7
  317. package/es/DisplayObjectPool.js +0 -27
  318. package/es/camera/Camera.d.ts +0 -327
  319. package/es/camera/Camera.js +0 -1154
  320. package/es/camera/Landmark.d.ts +0 -23
  321. package/es/camera/Landmark.js +0 -1
  322. package/es/camera/index.d.ts +0 -2
  323. package/es/camera/index.js +0 -2
  324. package/es/canvas-module.d.ts +0 -1
  325. package/es/canvas-module.js +0 -25
  326. package/es/components/Cullable.d.ts +0 -14
  327. package/es/components/Cullable.js +0 -28
  328. package/es/components/Geometry.d.ts +0 -12
  329. package/es/components/Geometry.js +0 -10
  330. package/es/components/Renderable.d.ts +0 -24
  331. package/es/components/Renderable.js +0 -18
  332. package/es/components/Sortable.d.ts +0 -20
  333. package/es/components/Sortable.js +0 -20
  334. package/es/components/Transform.d.ts +0 -28
  335. package/es/components/Transform.js +0 -64
  336. package/es/components/index.d.ts +0 -5
  337. package/es/components/index.js +0 -5
  338. package/es/css/CSS.d.ts +0 -87
  339. package/es/css/CSS.js +0 -121
  340. package/es/css/CSSProperty.d.ts +0 -41
  341. package/es/css/CSSProperty.js +0 -1
  342. package/es/css/StyleValueRegistry.d.ts +0 -92
  343. package/es/css/StyleValueRegistry.js +0 -882
  344. package/es/css/cssom/CSSColorValue.d.ts +0 -23
  345. package/es/css/cssom/CSSColorValue.js +0 -43
  346. package/es/css/cssom/CSSGradientValue.d.ts +0 -39
  347. package/es/css/cssom/CSSGradientValue.js +0 -54
  348. package/es/css/cssom/CSSImageValue.d.ts +0 -1
  349. package/es/css/cssom/CSSImageValue.js +0 -0
  350. package/es/css/cssom/CSSKeywordValue.d.ts +0 -15
  351. package/es/css/cssom/CSSKeywordValue.js +0 -37
  352. package/es/css/cssom/CSSMathOperator.d.ts +0 -11
  353. package/es/css/cssom/CSSMathOperator.js +0 -32
  354. package/es/css/cssom/CSSNumericSumValue.d.ts +0 -7
  355. package/es/css/cssom/CSSNumericSumValue.js +0 -1
  356. package/es/css/cssom/CSSNumericValue.d.ts +0 -212
  357. package/es/css/cssom/CSSNumericValue.js +0 -1661
  358. package/es/css/cssom/CSSRGB.d.ts +0 -25
  359. package/es/css/cssom/CSSRGB.js +0 -48
  360. package/es/css/cssom/CSSStyleValue.d.ts +0 -53
  361. package/es/css/cssom/CSSStyleValue.js +0 -625
  362. package/es/css/cssom/CSSTransformComponent.d.ts +0 -22
  363. package/es/css/cssom/CSSTransformComponent.js +0 -32
  364. package/es/css/cssom/CSSTransformValue.d.ts +0 -30
  365. package/es/css/cssom/CSSTransformValue.js +0 -48
  366. package/es/css/cssom/CSSTranslate.d.ts +0 -15
  367. package/es/css/cssom/CSSTranslate.js +0 -44
  368. package/es/css/cssom/index.d.ts +0 -19
  369. package/es/css/cssom/index.js +0 -19
  370. package/es/css/cssom/types.d.ts +0 -86
  371. package/es/css/cssom/types.js +0 -119
  372. package/es/css/index.d.ts +0 -11
  373. package/es/css/index.js +0 -11
  374. package/es/css/interfaces.d.ts +0 -116
  375. package/es/css/interfaces.js +0 -77
  376. package/es/css/layout/FragmentResult.d.ts +0 -32
  377. package/es/css/layout/FragmentResult.js +0 -32
  378. package/es/css/layout/LayoutChildren.d.ts +0 -23
  379. package/es/css/layout/LayoutChildren.js +0 -55
  380. package/es/css/layout/LayoutContext.d.ts +0 -35
  381. package/es/css/layout/LayoutContext.js +0 -35
  382. package/es/css/layout/LayoutDefinition.d.ts +0 -20
  383. package/es/css/layout/LayoutDefinition.js +0 -9
  384. package/es/css/layout/LayoutEdges.d.ts +0 -24
  385. package/es/css/layout/LayoutEdges.js +0 -41
  386. package/es/css/layout/LayoutEngine.d.ts +0 -41
  387. package/es/css/layout/LayoutEngine.js +0 -332
  388. package/es/css/layout/LayoutFragment.d.ts +0 -26
  389. package/es/css/layout/LayoutFragment.js +0 -28
  390. package/es/css/layout/LayoutObject.d.ts +0 -46
  391. package/es/css/layout/LayoutObject.js +0 -172
  392. package/es/css/layout/LayoutRegistry.d.ts +0 -16
  393. package/es/css/layout/LayoutRegistry.js +0 -78
  394. package/es/css/layout/LayoutWorkTask.d.ts +0 -14
  395. package/es/css/layout/LayoutWorkTask.js +0 -1
  396. package/es/css/layout/index.d.ts +0 -11
  397. package/es/css/layout/index.js +0 -11
  398. package/es/css/layout/types.d.ts +0 -104
  399. package/es/css/layout/types.js +0 -66
  400. package/es/css/parser/color.d.ts +0 -6
  401. package/es/css/parser/color.js +0 -241
  402. package/es/css/parser/dimension.d.ts +0 -37
  403. package/es/css/parser/dimension.js +0 -149
  404. package/es/css/parser/filter.d.ts +0 -7
  405. package/es/css/parser/filter.js +0 -43
  406. package/es/css/parser/index.d.ts +0 -15
  407. package/es/css/parser/index.js +0 -15
  408. package/es/css/parser/numeric.d.ts +0 -19
  409. package/es/css/parser/numeric.js +0 -62
  410. package/es/css/parser/path.d.ts +0 -5
  411. package/es/css/parser/path.js +0 -207
  412. package/es/css/parser/points.d.ts +0 -12
  413. package/es/css/parser/points.js +0 -58
  414. package/es/css/parser/transform-origin.d.ts +0 -6
  415. package/es/css/parser/transform-origin.js +0 -45
  416. package/es/css/parser/transform.d.ts +0 -13
  417. package/es/css/parser/transform.js +0 -289
  418. package/es/css/parser/types.d.ts +0 -2
  419. package/es/css/parser/types.js +0 -1
  420. package/es/css/properties/CSSPropertyClipPath.d.ts +0 -22
  421. package/es/css/properties/CSSPropertyClipPath.js +0 -56
  422. package/es/css/properties/CSSPropertyColor.d.ts +0 -14
  423. package/es/css/properties/CSSPropertyColor.js +0 -30
  424. package/es/css/properties/CSSPropertyFilter.d.ts +0 -6
  425. package/es/css/properties/CSSPropertyFilter.js +0 -16
  426. package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +0 -20
  427. package/es/css/properties/CSSPropertyLengthOrPercentage.js +0 -95
  428. package/es/css/properties/CSSPropertyLengthOrPercentage12.d.ts +0 -15
  429. package/es/css/properties/CSSPropertyLengthOrPercentage12.js +0 -38
  430. package/es/css/properties/CSSPropertyLengthOrPercentage14.d.ts +0 -25
  431. package/es/css/properties/CSSPropertyLengthOrPercentage14.js +0 -42
  432. package/es/css/properties/CSSPropertyLocalPosition.d.ts +0 -13
  433. package/es/css/properties/CSSPropertyLocalPosition.js +0 -85
  434. package/es/css/properties/CSSPropertyOffsetDistance.d.ts +0 -9
  435. package/es/css/properties/CSSPropertyOffsetDistance.js +0 -34
  436. package/es/css/properties/CSSPropertyOffsetPath.d.ts +0 -5
  437. package/es/css/properties/CSSPropertyOffsetPath.js +0 -31
  438. package/es/css/properties/CSSPropertyOpacity.d.ts +0 -10
  439. package/es/css/properties/CSSPropertyOpacity.js +0 -20
  440. package/es/css/properties/CSSPropertyPath.d.ts +0 -27
  441. package/es/css/properties/CSSPropertyPath.js +0 -58
  442. package/es/css/properties/CSSPropertyPoints.d.ts +0 -18
  443. package/es/css/properties/CSSPropertyPoints.js +0 -30
  444. package/es/css/properties/CSSPropertyShadowBlur.d.ts +0 -4
  445. package/es/css/properties/CSSPropertyShadowBlur.js +0 -22
  446. package/es/css/properties/CSSPropertyText.d.ts +0 -7
  447. package/es/css/properties/CSSPropertyText.js +0 -30
  448. package/es/css/properties/CSSPropertyTextTransform.d.ts +0 -5
  449. package/es/css/properties/CSSPropertyTextTransform.js +0 -29
  450. package/es/css/properties/CSSPropertyTransform.d.ts +0 -38
  451. package/es/css/properties/CSSPropertyTransform.js +0 -128
  452. package/es/css/properties/CSSPropertyTransformOrigin.d.ts +0 -11
  453. package/es/css/properties/CSSPropertyTransformOrigin.js +0 -21
  454. package/es/css/properties/CSSPropertyVisibility.d.ts +0 -13
  455. package/es/css/properties/CSSPropertyVisibility.js +0 -24
  456. package/es/css/properties/CSSPropertyZIndex.d.ts +0 -8
  457. package/es/css/properties/CSSPropertyZIndex.js +0 -33
  458. package/es/css/properties/index.d.ts +0 -18
  459. package/es/css/properties/index.js +0 -18
  460. package/es/display-objects/Circle.d.ts +0 -17
  461. package/es/display-objects/Circle.js +0 -34
  462. package/es/display-objects/CustomElement.d.ts +0 -26
  463. package/es/display-objects/CustomElement.js +0 -102
  464. package/es/display-objects/DisplayObject.d.ts +0 -274
  465. package/es/display-objects/DisplayObject.js +0 -887
  466. package/es/display-objects/Ellipse.d.ts +0 -19
  467. package/es/display-objects/Ellipse.js +0 -35
  468. package/es/display-objects/Group.d.ts +0 -29
  469. package/es/display-objects/Group.js +0 -42
  470. package/es/display-objects/HTML.d.ts +0 -41
  471. package/es/display-objects/HTML.js +0 -100
  472. package/es/display-objects/Image.d.ts +0 -23
  473. package/es/display-objects/Image.js +0 -34
  474. package/es/display-objects/Line.d.ts +0 -30
  475. package/es/display-objects/Line.js +0 -63
  476. package/es/display-objects/Path.d.ts +0 -48
  477. package/es/display-objects/Path.js +0 -131
  478. package/es/display-objects/Polygon.d.ts +0 -16
  479. package/es/display-objects/Polygon.js +0 -31
  480. package/es/display-objects/Polyline.d.ts +0 -21
  481. package/es/display-objects/Polyline.js +0 -74
  482. package/es/display-objects/Rect.d.ts +0 -24
  483. package/es/display-objects/Rect.js +0 -34
  484. package/es/display-objects/Text.d.ts +0 -91
  485. package/es/display-objects/Text.js +0 -118
  486. package/es/display-objects/index.d.ts +0 -13
  487. package/es/display-objects/index.js +0 -13
  488. package/es/dom/Animation.d.ts +0 -132
  489. package/es/dom/Animation.js +0 -503
  490. package/es/dom/AnimationEffectTiming.d.ts +0 -58
  491. package/es/dom/AnimationEffectTiming.js +0 -68
  492. package/es/dom/AnimationEvent.d.ts +0 -11
  493. package/es/dom/AnimationEvent.js +0 -34
  494. package/es/dom/AnimationTimeline.d.ts +0 -40
  495. package/es/dom/AnimationTimeline.js +0 -217
  496. package/es/dom/CustomElementRegistry.d.ts +0 -15
  497. package/es/dom/CustomElementRegistry.js +0 -42
  498. package/es/dom/CustomEvent.d.ts +0 -16
  499. package/es/dom/CustomEvent.js +0 -35
  500. package/es/dom/Document.d.ts +0 -72
  501. package/es/dom/Document.js +0 -316
  502. package/es/dom/Element.d.ts +0 -187
  503. package/es/dom/Element.js +0 -604
  504. package/es/dom/EventTarget.d.ts +0 -40
  505. package/es/dom/EventTarget.js +0 -157
  506. package/es/dom/FederatedEvent.d.ts +0 -145
  507. package/es/dom/FederatedEvent.js +0 -222
  508. package/es/dom/FederatedMouseEvent.d.ts +0 -52
  509. package/es/dom/FederatedMouseEvent.js +0 -124
  510. package/es/dom/FederatedPointerEvent.d.ts +0 -75
  511. package/es/dom/FederatedPointerEvent.js +0 -61
  512. package/es/dom/FederatedTouchEvent.d.ts +0 -15
  513. package/es/dom/FederatedTouchEvent.js +0 -19
  514. package/es/dom/FederatedWheelEvent.d.ts +0 -20
  515. package/es/dom/FederatedWheelEvent.js +0 -27
  516. package/es/dom/KeyframeEffect.d.ts +0 -47
  517. package/es/dom/KeyframeEffect.js +0 -174
  518. package/es/dom/KeyframeList.d.ts +0 -2
  519. package/es/dom/KeyframeList.js +0 -176
  520. package/es/dom/MutationEvent.d.ts +0 -15
  521. package/es/dom/MutationEvent.js +0 -29
  522. package/es/dom/MutationObserver.d.ts +0 -36
  523. package/es/dom/MutationObserver.js +0 -416
  524. package/es/dom/MutationRecord.d.ts +0 -14
  525. package/es/dom/MutationRecord.js +0 -31
  526. package/es/dom/Node.d.ts +0 -138
  527. package/es/dom/Node.js +0 -387
  528. package/es/dom/index.d.ts +0 -20
  529. package/es/dom/index.js +0 -20
  530. package/es/dom/interfaces.d.ts +0 -372
  531. package/es/dom/interfaces.js +0 -56
  532. package/es/global-module.d.ts +0 -1
  533. package/es/global-module.js +0 -155
  534. package/es/index.d.ts +0 -18
  535. package/es/index.js +0 -21
  536. package/es/plugins/CullingPlugin.d.ts +0 -17
  537. package/es/plugins/CullingPlugin.js +0 -58
  538. package/es/plugins/DirtyCheckPlugin.d.ts +0 -10
  539. package/es/plugins/DirtyCheckPlugin.js +0 -55
  540. package/es/plugins/EventPlugin.d.ts +0 -30
  541. package/es/plugins/EventPlugin.js +0 -374
  542. package/es/plugins/FrustumCullingStrategy.d.ts +0 -21
  543. package/es/plugins/FrustumCullingStrategy.js +0 -108
  544. package/es/plugins/PrepareRendererPlugin.d.ts +0 -7
  545. package/es/plugins/PrepareRendererPlugin.js +0 -79
  546. package/es/services/ContextService.d.ts +0 -13
  547. package/es/services/ContextService.js +0 -5
  548. package/es/services/EventService.d.ts +0 -73
  549. package/es/services/EventService.js +0 -1238
  550. package/es/services/OffscreenCanvasCreator.d.ts +0 -13
  551. package/es/services/OffscreenCanvasCreator.js +0 -58
  552. package/es/services/RenderingContext.d.ts +0 -26
  553. package/es/services/RenderingContext.js +0 -14
  554. package/es/services/RenderingService.d.ts +0 -102
  555. package/es/services/RenderingService.js +0 -231
  556. package/es/services/SceneGraphSelector.d.ts +0 -23
  557. package/es/services/SceneGraphSelector.js +0 -100
  558. package/es/services/SceneGraphService.d.ts +0 -153
  559. package/es/services/SceneGraphService.js +0 -819
  560. package/es/services/TextService.d.ts +0 -36
  561. package/es/services/TextService.js +0 -350
  562. package/es/services/aabb/CircleUpdater.d.ts +0 -8
  563. package/es/services/aabb/CircleUpdater.js +0 -30
  564. package/es/services/aabb/EllipseUpdater.d.ts +0 -8
  565. package/es/services/aabb/EllipseUpdater.js +0 -31
  566. package/es/services/aabb/LineUpdater.d.ts +0 -8
  567. package/es/services/aabb/LineUpdater.js +0 -37
  568. package/es/services/aabb/PathUpdater.d.ts +0 -8
  569. package/es/services/aabb/PathUpdater.js +0 -168
  570. package/es/services/aabb/PolylineUpdater.d.ts +0 -8
  571. package/es/services/aabb/PolylineUpdater.js +0 -46
  572. package/es/services/aabb/RectUpdater.d.ts +0 -8
  573. package/es/services/aabb/RectUpdater.js +0 -72
  574. package/es/services/aabb/TextUpdater.d.ts +0 -21
  575. package/es/services/aabb/TextUpdater.js +0 -136
  576. package/es/services/aabb/index.d.ts +0 -8
  577. package/es/services/aabb/index.js +0 -8
  578. package/es/services/aabb/interfaces.d.ts +0 -15
  579. package/es/services/aabb/interfaces.js +0 -3
  580. package/es/services/index.d.ts +0 -10
  581. package/es/services/index.js +0 -10
  582. package/es/shapes/AABB.d.ts +0 -35
  583. package/es/shapes/AABB.js +0 -230
  584. package/es/shapes/BoundingSphere.d.ts +0 -8
  585. package/es/shapes/BoundingSphere.js +0 -31
  586. package/es/shapes/Frustum.d.ts +0 -16
  587. package/es/shapes/Frustum.js +0 -79
  588. package/es/shapes/Plane.d.ts +0 -14
  589. package/es/shapes/Plane.js +0 -42
  590. package/es/shapes/Point.d.ts +0 -11
  591. package/es/shapes/Point.js +0 -31
  592. package/es/shapes/Ray.d.ts +0 -24
  593. package/es/shapes/Ray.js +0 -138
  594. package/es/shapes/Rectangle.d.ts +0 -12
  595. package/es/shapes/Rectangle.js +0 -20
  596. package/es/shapes/index.d.ts +0 -7
  597. package/es/shapes/index.js +0 -7
  598. package/es/types.d.ts +0 -289
  599. package/es/types.js +0 -54
  600. package/es/utils/animation.d.ts +0 -15
  601. package/es/utils/animation.js +0 -251
  602. package/es/utils/assert.d.ts +0 -9
  603. package/es/utils/assert.js +0 -33
  604. package/es/utils/bezier-easing.d.ts +0 -20
  605. package/es/utils/bezier-easing.js +0 -90
  606. package/es/utils/canvas.d.ts +0 -6
  607. package/es/utils/canvas.js +0 -18
  608. package/es/utils/custom-easing.d.ts +0 -64
  609. package/es/utils/custom-easing.js +0 -317
  610. package/es/utils/deferred.d.ts +0 -43
  611. package/es/utils/deferred.js +0 -117
  612. package/es/utils/dom.d.ts +0 -2
  613. package/es/utils/dom.js +0 -8
  614. package/es/utils/event.d.ts +0 -45
  615. package/es/utils/event.js +0 -9
  616. package/es/utils/index.d.ts +0 -10
  617. package/es/utils/index.js +0 -10
  618. package/es/utils/interpolation.d.ts +0 -4
  619. package/es/utils/interpolation.js +0 -212
  620. package/es/utils/math.d.ts +0 -29
  621. package/es/utils/math.js +0 -236
  622. package/es/utils/path.d.ts +0 -15
  623. package/es/utils/path.js +0 -387
  624. package/es/utils/string.d.ts +0 -2
  625. package/es/utils/string.js +0 -17
  626. package/es/utils/text.d.ts +0 -2
  627. package/es/utils/text.js +0 -29
  628. package/lib/AbstractRenderer.d.ts +0 -37
  629. package/lib/AbstractRenderer.js +0 -69
  630. package/lib/Canvas.d.ts +0 -149
  631. package/lib/Canvas.js +0 -540
  632. package/lib/DisplayObjectPool.d.ts +0 -7
  633. package/lib/DisplayObjectPool.js +0 -35
  634. package/lib/camera/Camera.d.ts +0 -327
  635. package/lib/camera/Camera.js +0 -1232
  636. package/lib/camera/Landmark.d.ts +0 -23
  637. package/lib/camera/Landmark.js +0 -5
  638. package/lib/camera/index.d.ts +0 -2
  639. package/lib/camera/index.js +0 -31
  640. package/lib/canvas-module.d.ts +0 -1
  641. package/lib/canvas-module.js +0 -41
  642. package/lib/components/Cullable.d.ts +0 -14
  643. package/lib/components/Cullable.js +0 -36
  644. package/lib/components/Geometry.d.ts +0 -12
  645. package/lib/components/Geometry.js +0 -17
  646. package/lib/components/Renderable.d.ts +0 -24
  647. package/lib/components/Renderable.js +0 -25
  648. package/lib/components/Sortable.d.ts +0 -20
  649. package/lib/components/Sortable.js +0 -27
  650. package/lib/components/Transform.d.ts +0 -28
  651. package/lib/components/Transform.js +0 -71
  652. package/lib/components/index.d.ts +0 -5
  653. package/lib/components/index.js +0 -70
  654. package/lib/css/CSS.d.ts +0 -87
  655. package/lib/css/CSS.js +0 -135
  656. package/lib/css/CSSProperty.d.ts +0 -41
  657. package/lib/css/CSSProperty.js +0 -5
  658. package/lib/css/StyleValueRegistry.d.ts +0 -92
  659. package/lib/css/StyleValueRegistry.js +0 -909
  660. package/lib/css/cssom/CSSColorValue.d.ts +0 -23
  661. package/lib/css/cssom/CSSColorValue.js +0 -51
  662. package/lib/css/cssom/CSSGradientValue.d.ts +0 -39
  663. package/lib/css/cssom/CSSGradientValue.js +0 -64
  664. package/lib/css/cssom/CSSImageValue.d.ts +0 -1
  665. package/lib/css/cssom/CSSImageValue.js +0 -1
  666. package/lib/css/cssom/CSSKeywordValue.d.ts +0 -15
  667. package/lib/css/cssom/CSSKeywordValue.js +0 -45
  668. package/lib/css/cssom/CSSMathOperator.d.ts +0 -11
  669. package/lib/css/cssom/CSSMathOperator.js +0 -40
  670. package/lib/css/cssom/CSSNumericSumValue.d.ts +0 -7
  671. package/lib/css/cssom/CSSNumericSumValue.js +0 -5
  672. package/lib/css/cssom/CSSNumericValue.d.ts +0 -212
  673. package/lib/css/cssom/CSSNumericValue.js +0 -1685
  674. package/lib/css/cssom/CSSRGB.d.ts +0 -25
  675. package/lib/css/cssom/CSSRGB.js +0 -56
  676. package/lib/css/cssom/CSSStyleValue.d.ts +0 -53
  677. package/lib/css/cssom/CSSStyleValue.js +0 -634
  678. package/lib/css/cssom/CSSTransformComponent.d.ts +0 -22
  679. package/lib/css/cssom/CSSTransformComponent.js +0 -39
  680. package/lib/css/cssom/CSSTransformValue.d.ts +0 -30
  681. package/lib/css/cssom/CSSTransformValue.js +0 -56
  682. package/lib/css/cssom/CSSTranslate.d.ts +0 -15
  683. package/lib/css/cssom/CSSTranslate.js +0 -53
  684. package/lib/css/cssom/index.d.ts +0 -19
  685. package/lib/css/cssom/index.js +0 -148
  686. package/lib/css/cssom/types.d.ts +0 -86
  687. package/lib/css/cssom/types.js +0 -130
  688. package/lib/css/index.d.ts +0 -11
  689. package/lib/css/index.js +0 -109
  690. package/lib/css/interfaces.d.ts +0 -116
  691. package/lib/css/interfaces.js +0 -87
  692. package/lib/css/layout/FragmentResult.d.ts +0 -32
  693. package/lib/css/layout/FragmentResult.js +0 -51
  694. package/lib/css/layout/LayoutChildren.d.ts +0 -23
  695. package/lib/css/layout/LayoutChildren.js +0 -72
  696. package/lib/css/layout/LayoutContext.d.ts +0 -35
  697. package/lib/css/layout/LayoutContext.js +0 -49
  698. package/lib/css/layout/LayoutDefinition.d.ts +0 -20
  699. package/lib/css/layout/LayoutDefinition.js +0 -16
  700. package/lib/css/layout/LayoutEdges.d.ts +0 -24
  701. package/lib/css/layout/LayoutEdges.js +0 -56
  702. package/lib/css/layout/LayoutEngine.d.ts +0 -41
  703. package/lib/css/layout/LayoutEngine.js +0 -345
  704. package/lib/css/layout/LayoutFragment.d.ts +0 -26
  705. package/lib/css/layout/LayoutFragment.js +0 -44
  706. package/lib/css/layout/LayoutObject.d.ts +0 -46
  707. package/lib/css/layout/LayoutObject.js +0 -182
  708. package/lib/css/layout/LayoutRegistry.d.ts +0 -16
  709. package/lib/css/layout/LayoutRegistry.js +0 -87
  710. package/lib/css/layout/LayoutWorkTask.d.ts +0 -14
  711. package/lib/css/layout/LayoutWorkTask.js +0 -5
  712. package/lib/css/layout/index.d.ts +0 -11
  713. package/lib/css/layout/index.js +0 -148
  714. package/lib/css/layout/types.d.ts +0 -104
  715. package/lib/css/layout/types.js +0 -74
  716. package/lib/css/parser/color.d.ts +0 -6
  717. package/lib/css/parser/color.js +0 -260
  718. package/lib/css/parser/dimension.d.ts +0 -37
  719. package/lib/css/parser/dimension.js +0 -175
  720. package/lib/css/parser/filter.d.ts +0 -7
  721. package/lib/css/parser/filter.js +0 -56
  722. package/lib/css/parser/index.d.ts +0 -15
  723. package/lib/css/parser/index.js +0 -122
  724. package/lib/css/parser/numeric.d.ts +0 -19
  725. package/lib/css/parser/numeric.js +0 -81
  726. package/lib/css/parser/path.d.ts +0 -5
  727. package/lib/css/parser/path.js +0 -221
  728. package/lib/css/parser/points.d.ts +0 -12
  729. package/lib/css/parser/points.js +0 -69
  730. package/lib/css/parser/transform-origin.d.ts +0 -6
  731. package/lib/css/parser/transform-origin.js +0 -54
  732. package/lib/css/parser/transform.d.ts +0 -13
  733. package/lib/css/parser/transform.js +0 -303
  734. package/lib/css/parser/types.d.ts +0 -2
  735. package/lib/css/parser/types.js +0 -5
  736. package/lib/css/properties/CSSPropertyClipPath.d.ts +0 -22
  737. package/lib/css/properties/CSSPropertyClipPath.js +0 -66
  738. package/lib/css/properties/CSSPropertyColor.d.ts +0 -14
  739. package/lib/css/properties/CSSPropertyColor.js +0 -40
  740. package/lib/css/properties/CSSPropertyFilter.d.ts +0 -6
  741. package/lib/css/properties/CSSPropertyFilter.js +0 -25
  742. package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +0 -20
  743. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +0 -105
  744. package/lib/css/properties/CSSPropertyLengthOrPercentage12.d.ts +0 -15
  745. package/lib/css/properties/CSSPropertyLengthOrPercentage12.js +0 -48
  746. package/lib/css/properties/CSSPropertyLengthOrPercentage14.d.ts +0 -25
  747. package/lib/css/properties/CSSPropertyLengthOrPercentage14.js +0 -52
  748. package/lib/css/properties/CSSPropertyLocalPosition.d.ts +0 -13
  749. package/lib/css/properties/CSSPropertyLocalPosition.js +0 -96
  750. package/lib/css/properties/CSSPropertyOffsetDistance.d.ts +0 -9
  751. package/lib/css/properties/CSSPropertyOffsetDistance.js +0 -44
  752. package/lib/css/properties/CSSPropertyOffsetPath.d.ts +0 -5
  753. package/lib/css/properties/CSSPropertyOffsetPath.js +0 -39
  754. package/lib/css/properties/CSSPropertyOpacity.d.ts +0 -10
  755. package/lib/css/properties/CSSPropertyOpacity.js +0 -29
  756. package/lib/css/properties/CSSPropertyPath.d.ts +0 -27
  757. package/lib/css/properties/CSSPropertyPath.js +0 -70
  758. package/lib/css/properties/CSSPropertyPoints.d.ts +0 -18
  759. package/lib/css/properties/CSSPropertyPoints.js +0 -40
  760. package/lib/css/properties/CSSPropertyShadowBlur.d.ts +0 -4
  761. package/lib/css/properties/CSSPropertyShadowBlur.js +0 -32
  762. package/lib/css/properties/CSSPropertyText.d.ts +0 -7
  763. package/lib/css/properties/CSSPropertyText.js +0 -39
  764. package/lib/css/properties/CSSPropertyTextTransform.d.ts +0 -5
  765. package/lib/css/properties/CSSPropertyTextTransform.js +0 -38
  766. package/lib/css/properties/CSSPropertyTransform.d.ts +0 -38
  767. package/lib/css/properties/CSSPropertyTransform.js +0 -138
  768. package/lib/css/properties/CSSPropertyTransformOrigin.d.ts +0 -11
  769. package/lib/css/properties/CSSPropertyTransformOrigin.js +0 -30
  770. package/lib/css/properties/CSSPropertyVisibility.d.ts +0 -13
  771. package/lib/css/properties/CSSPropertyVisibility.js +0 -32
  772. package/lib/css/properties/CSSPropertyZIndex.d.ts +0 -8
  773. package/lib/css/properties/CSSPropertyZIndex.js +0 -42
  774. package/lib/css/properties/index.d.ts +0 -18
  775. package/lib/css/properties/index.js +0 -239
  776. package/lib/display-objects/Circle.d.ts +0 -17
  777. package/lib/display-objects/Circle.js +0 -42
  778. package/lib/display-objects/CustomElement.d.ts +0 -26
  779. package/lib/display-objects/CustomElement.js +0 -109
  780. package/lib/display-objects/DisplayObject.d.ts +0 -274
  781. package/lib/display-objects/DisplayObject.js +0 -910
  782. package/lib/display-objects/Ellipse.d.ts +0 -19
  783. package/lib/display-objects/Ellipse.js +0 -43
  784. package/lib/display-objects/Group.d.ts +0 -29
  785. package/lib/display-objects/Group.js +0 -50
  786. package/lib/display-objects/HTML.d.ts +0 -41
  787. package/lib/display-objects/HTML.js +0 -111
  788. package/lib/display-objects/Image.d.ts +0 -23
  789. package/lib/display-objects/Image.js +0 -42
  790. package/lib/display-objects/Line.d.ts +0 -30
  791. package/lib/display-objects/Line.js +0 -75
  792. package/lib/display-objects/Path.d.ts +0 -48
  793. package/lib/display-objects/Path.js +0 -142
  794. package/lib/display-objects/Polygon.d.ts +0 -16
  795. package/lib/display-objects/Polygon.js +0 -39
  796. package/lib/display-objects/Polyline.d.ts +0 -21
  797. package/lib/display-objects/Polyline.js +0 -84
  798. package/lib/display-objects/Rect.d.ts +0 -24
  799. package/lib/display-objects/Rect.js +0 -42
  800. package/lib/display-objects/Text.d.ts +0 -91
  801. package/lib/display-objects/Text.js +0 -126
  802. package/lib/display-objects/index.d.ts +0 -13
  803. package/lib/display-objects/index.js +0 -174
  804. package/lib/dom/Animation.d.ts +0 -132
  805. package/lib/dom/Animation.js +0 -511
  806. package/lib/dom/AnimationEffectTiming.d.ts +0 -58
  807. package/lib/dom/AnimationEffectTiming.js +0 -75
  808. package/lib/dom/AnimationEvent.d.ts +0 -11
  809. package/lib/dom/AnimationEvent.js +0 -42
  810. package/lib/dom/AnimationTimeline.d.ts +0 -40
  811. package/lib/dom/AnimationTimeline.js +0 -228
  812. package/lib/dom/CustomElementRegistry.d.ts +0 -15
  813. package/lib/dom/CustomElementRegistry.js +0 -50
  814. package/lib/dom/CustomEvent.d.ts +0 -16
  815. package/lib/dom/CustomEvent.js +0 -42
  816. package/lib/dom/Document.d.ts +0 -72
  817. package/lib/dom/Document.js +0 -329
  818. package/lib/dom/Element.d.ts +0 -187
  819. package/lib/dom/Element.js +0 -619
  820. package/lib/dom/EventTarget.d.ts +0 -40
  821. package/lib/dom/EventTarget.js +0 -171
  822. package/lib/dom/FederatedEvent.d.ts +0 -145
  823. package/lib/dom/FederatedEvent.js +0 -229
  824. package/lib/dom/FederatedMouseEvent.d.ts +0 -52
  825. package/lib/dom/FederatedMouseEvent.js +0 -133
  826. package/lib/dom/FederatedPointerEvent.d.ts +0 -75
  827. package/lib/dom/FederatedPointerEvent.js +0 -69
  828. package/lib/dom/FederatedTouchEvent.d.ts +0 -15
  829. package/lib/dom/FederatedTouchEvent.js +0 -27
  830. package/lib/dom/FederatedWheelEvent.d.ts +0 -20
  831. package/lib/dom/FederatedWheelEvent.js +0 -35
  832. package/lib/dom/KeyframeEffect.d.ts +0 -47
  833. package/lib/dom/KeyframeEffect.js +0 -192
  834. package/lib/dom/KeyframeList.d.ts +0 -2
  835. package/lib/dom/KeyframeList.js +0 -183
  836. package/lib/dom/MutationEvent.d.ts +0 -15
  837. package/lib/dom/MutationEvent.js +0 -37
  838. package/lib/dom/MutationObserver.d.ts +0 -36
  839. package/lib/dom/MutationObserver.js +0 -426
  840. package/lib/dom/MutationRecord.d.ts +0 -14
  841. package/lib/dom/MutationRecord.js +0 -38
  842. package/lib/dom/Node.d.ts +0 -138
  843. package/lib/dom/Node.js +0 -397
  844. package/lib/dom/index.d.ts +0 -20
  845. package/lib/dom/index.js +0 -265
  846. package/lib/dom/interfaces.d.ts +0 -372
  847. package/lib/dom/interfaces.js +0 -64
  848. package/lib/global-module.d.ts +0 -1
  849. package/lib/global-module.js +0 -170
  850. package/lib/index.d.ts +0 -18
  851. package/lib/index.js +0 -198
  852. package/lib/plugins/CullingPlugin.d.ts +0 -17
  853. package/lib/plugins/CullingPlugin.js +0 -69
  854. package/lib/plugins/DirtyCheckPlugin.d.ts +0 -10
  855. package/lib/plugins/DirtyCheckPlugin.js +0 -63
  856. package/lib/plugins/EventPlugin.d.ts +0 -30
  857. package/lib/plugins/EventPlugin.js +0 -382
  858. package/lib/plugins/FrustumCullingStrategy.d.ts +0 -21
  859. package/lib/plugins/FrustumCullingStrategy.js +0 -121
  860. package/lib/plugins/PrepareRendererPlugin.d.ts +0 -7
  861. package/lib/plugins/PrepareRendererPlugin.js +0 -87
  862. package/lib/services/ContextService.d.ts +0 -13
  863. package/lib/services/ContextService.js +0 -15
  864. package/lib/services/EventService.d.ts +0 -73
  865. package/lib/services/EventService.js +0 -1263
  866. package/lib/services/OffscreenCanvasCreator.d.ts +0 -13
  867. package/lib/services/OffscreenCanvasCreator.js +0 -66
  868. package/lib/services/RenderingContext.d.ts +0 -26
  869. package/lib/services/RenderingContext.js +0 -24
  870. package/lib/services/RenderingService.d.ts +0 -102
  871. package/lib/services/RenderingService.js +0 -244
  872. package/lib/services/SceneGraphSelector.d.ts +0 -23
  873. package/lib/services/SceneGraphSelector.js +0 -114
  874. package/lib/services/SceneGraphService.d.ts +0 -153
  875. package/lib/services/SceneGraphService.js +0 -875
  876. package/lib/services/TextService.d.ts +0 -36
  877. package/lib/services/TextService.js +0 -359
  878. package/lib/services/aabb/CircleUpdater.d.ts +0 -8
  879. package/lib/services/aabb/CircleUpdater.js +0 -40
  880. package/lib/services/aabb/EllipseUpdater.d.ts +0 -8
  881. package/lib/services/aabb/EllipseUpdater.js +0 -41
  882. package/lib/services/aabb/LineUpdater.d.ts +0 -8
  883. package/lib/services/aabb/LineUpdater.js +0 -47
  884. package/lib/services/aabb/PathUpdater.d.ts +0 -8
  885. package/lib/services/aabb/PathUpdater.js +0 -179
  886. package/lib/services/aabb/PolylineUpdater.d.ts +0 -8
  887. package/lib/services/aabb/PolylineUpdater.js +0 -56
  888. package/lib/services/aabb/RectUpdater.d.ts +0 -8
  889. package/lib/services/aabb/RectUpdater.js +0 -84
  890. package/lib/services/aabb/TextUpdater.d.ts +0 -21
  891. package/lib/services/aabb/TextUpdater.js +0 -149
  892. package/lib/services/aabb/index.d.ts +0 -8
  893. package/lib/services/aabb/index.js +0 -84
  894. package/lib/services/aabb/interfaces.d.ts +0 -15
  895. package/lib/services/aabb/interfaces.js +0 -16
  896. package/lib/services/index.d.ts +0 -10
  897. package/lib/services/index.js +0 -122
  898. package/lib/shapes/AABB.d.ts +0 -35
  899. package/lib/shapes/AABB.js +0 -248
  900. package/lib/shapes/BoundingSphere.d.ts +0 -8
  901. package/lib/shapes/BoundingSphere.js +0 -41
  902. package/lib/shapes/Frustum.d.ts +0 -16
  903. package/lib/shapes/Frustum.js +0 -96
  904. package/lib/shapes/Plane.d.ts +0 -14
  905. package/lib/shapes/Plane.js +0 -51
  906. package/lib/shapes/Point.d.ts +0 -11
  907. package/lib/shapes/Point.js +0 -38
  908. package/lib/shapes/Ray.d.ts +0 -24
  909. package/lib/shapes/Ray.js +0 -169
  910. package/lib/shapes/Rectangle.d.ts +0 -12
  911. package/lib/shapes/Rectangle.js +0 -27
  912. package/lib/shapes/index.d.ts +0 -7
  913. package/lib/shapes/index.js +0 -96
  914. package/lib/types.d.ts +0 -289
  915. package/lib/types.js +0 -69
  916. package/lib/utils/animation.d.ts +0 -15
  917. package/lib/utils/animation.js +0 -275
  918. package/lib/utils/assert.d.ts +0 -9
  919. package/lib/utils/assert.js +0 -56
  920. package/lib/utils/bezier-easing.d.ts +0 -20
  921. package/lib/utils/bezier-easing.js +0 -128
  922. package/lib/utils/canvas.d.ts +0 -6
  923. package/lib/utils/canvas.js +0 -27
  924. package/lib/utils/custom-easing.d.ts +0 -64
  925. package/lib/utils/custom-easing.js +0 -392
  926. package/lib/utils/deferred.d.ts +0 -43
  927. package/lib/utils/deferred.js +0 -131
  928. package/lib/utils/dom.d.ts +0 -2
  929. package/lib/utils/dom.js +0 -17
  930. package/lib/utils/event.d.ts +0 -45
  931. package/lib/utils/event.js +0 -17
  932. package/lib/utils/index.d.ts +0 -10
  933. package/lib/utils/index.js +0 -135
  934. package/lib/utils/interpolation.d.ts +0 -4
  935. package/lib/utils/interpolation.js +0 -229
  936. package/lib/utils/math.d.ts +0 -29
  937. package/lib/utils/math.js +0 -273
  938. package/lib/utils/path.d.ts +0 -15
  939. package/lib/utils/path.js +0 -409
  940. package/lib/utils/string.d.ts +0 -2
  941. package/lib/utils/string.js +0 -27
  942. package/lib/utils/text.d.ts +0 -2
  943. package/lib/utils/text.js +0 -39
@@ -1,31 +1,17 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G=e():t.G=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=67)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NON_CUSTOM_TAG_KEYS=e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct",e.NON_CUSTOM_TAG_KEYS=[e.INJECT_TAG,e.MULTI_INJECT_TAG,e.NAME_TAG,e.UNMANAGED_TAG,e.NAMED_TAG,e.OPTIONAL_TAG]},function(t,e,n){"use strict";e.__esModule=!0,e.SyncHook=n(54),e.SyncBailHook=n(55),e.SyncWaterfallHook=n(56),e.SyncLoopHook=n(57),e.AsyncParallelHook=n(58),e.AsyncParallelBailHook=n(59),e.AsyncSeriesHook=n(60),e.AsyncSeriesBailHook=n(61),e.AsyncSeriesLoopHook=n(62),e.AsyncSeriesWaterfallHook=n(63),e.HookMap=n(64),e.MultiHook=n(65)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0;var r=n(0);e.METADATA_KEY=r;var i=n(28);Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return i.Container}});var o=n(7);Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return o.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return o.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return o.TargetTypeEnum}});var a=n(44);Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return a.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return a.ContainerModule}});var s=n(45);Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return s.injectable}});var u=n(46);Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return u.tagged}});var c=n(47);Object.defineProperty(e,"named",{enumerable:!0,get:function(){return c.named}});var l=n(19);Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return l.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return l.LazyServiceIdentifer}});var h=n(48);Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return h.optional}});var f=n(49);Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return f.unmanaged}});var p=n(50);Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return p.multiInject}});var d=n(51);Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return d.targetName}});var y=n(52);Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return y.postConstruct}});var v=n(17);Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return v.MetadataReader}});var g=n(10);Object.defineProperty(e,"id",{enumerable:!0,get:function(){return g.id}});var m=n(8);Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return m.decorate}});var b=n(22);Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return b.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return b.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return b.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return b.typeConstraint}});var T=n(11);Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return T.getServiceIdentifierAsString}});var E=n(53);Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return E.multiBindToService}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]};e.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},e.STACK_OVERFLOW="Maximum call stack size exceeded"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var r=n(0),i=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},t}();e.Metadata=i},function(t,e,n){"use strict";const r=n(23).deprecate(()=>{},"Hook.context is deprecated and will be removed"),i=function(...t){return this.call=this._createCall("sync"),this.call(...t)},o=function(...t){return this.callAsync=this._createCall("async"),this.callAsync(...t)},a=function(...t){return this.promise=this._createCall("promise"),this.promise(...t)};class s{constructor(t=[],e){this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=i,this.call=i,this._callAsync=o,this.callAsync=o,this._promise=a,this.promise=a,this._x=void 0,this.compile=this.compile,this.tap=this.tap,this.tapAsync=this.tapAsync,this.tapPromise=this.tapPromise}compile(t){throw new Error("Abstract: should be overridden")}_createCall(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})}_tap(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");void 0!==e.context&&r(),e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)}tap(t,e){this._tap("sync",t,e)}tapAsync(t,e){this._tap("async",t,e)}tapPromise(t,e){this._tap("promise",t,e)}_runRegisterInterceptors(t){for(const e of this.interceptors)if(e.register){const n=e.register(t);void 0!==n&&(t=n)}return t}withOptions(t){const e=e=>Object.assign({},t,"string"==typeof e?{name:e}:e);return{name:this.name,tap:(t,n)=>this.tap(e(t),n),tapAsync:(t,n)=>this.tapAsync(e(t),n),tapPromise:(t,n)=>this.tapPromise(e(t),n),intercept:t=>this.intercept(t),isUsed:()=>this.isUsed(),withOptions:t=>this.withOptions(e(t))}}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(t){if(this._resetCompilation(),this.interceptors.push(Object.assign({},t)),t.register)for(let e=0;e<this.taps.length;e++)this.taps[e]=t.register(this.taps[e])}_resetCompilation(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise}_insert(t){let e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let n=0;"number"==typeof t.stage&&(n=t.stage);let r=this.taps.length;for(;r>0;){r--;const t=this.taps[r];this.taps[r+1]=t;const i=t.stage||0;if(e){if(e.has(t.name)){e.delete(t.name);continue}if(e.size>0)continue}if(!(i>n)){r++;break}}this.taps[r]=t}}Object.setPrototypeOf(s.prototype,null),t.exports=s},function(t,e,n){"use strict";t.exports=class{constructor(t){this.config=t,this.options=void 0,this._args=void 0}create(t){let e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`throw ${t};\n`,onResult:t=>`return ${t};\n`,resultReturns:!0,onDone:()=>"",rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`_callback(${t});\n`,onResult:t=>`_callback(null, ${t});\n`,onDone:()=>"_callback();\n"}));break;case"promise":let t=!1;const n=this.contentWithInterceptors({onError:e=>(t=!0,`_error(${e});\n`),onResult:t=>`_resolve(${t});\n`,onDone:()=>"_resolve();\n"});let r="";r+='"use strict";\n',r+=this.header(),r+="return new Promise((function(_resolve, _reject) {\n",t&&(r+="var _sync = true;\n",r+="function _error(_err) {\n",r+="if(_sync)\n",r+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",r+="else\n",r+="_reject(_err);\n",r+="};\n"),r+=n,t&&(r+="_sync = false;\n"),r+="}));\n",e=new Function(this.args(),r)}return this.deinit(),e}setup(t,e){t._x=e.taps.map(t=>t.fn)}init(t){this.options=t,this._args=t.args.slice()}deinit(){this.options=void 0,this._args=void 0}contentWithInterceptors(t){if(this.options.interceptors.length>0){const e=t.onError,n=t.onResult,r=t.onDone;let i="";for(let t=0;t<this.options.interceptors.length;t++){const e=this.options.interceptors[t];e.call&&(i+=`${this.getInterceptor(t)}.call(${this.args({before:e.context?"_context":void 0})});\n`)}return i+=this.content(Object.assign(t,{onError:e&&(t=>{let n="";for(let e=0;e<this.options.interceptors.length;e++){this.options.interceptors[e].error&&(n+=`${this.getInterceptor(e)}.error(${t});\n`)}return n+=e(t),n}),onResult:n&&(t=>{let e="";for(let n=0;n<this.options.interceptors.length;n++){this.options.interceptors[n].result&&(e+=`${this.getInterceptor(n)}.result(${t});\n`)}return e+=n(t),e}),onDone:r&&(()=>{let t="";for(let e=0;e<this.options.interceptors.length;e++){this.options.interceptors[e].done&&(t+=this.getInterceptor(e)+".done();\n")}return t+=r(),t})})),i}return this.content(t)}header(){let t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t}needContext(){for(const t of this.options.taps)if(t.context)return!0;return!1}callTap(t,{onError:e,onResult:n,onDone:r,rethrowIfPossible:i}){let o="",a=!1;for(let e=0;e<this.options.interceptors.length;e++){const n=this.options.interceptors[e];n.tap&&(a||(o+=`var _tap${t} = ${this.getTap(t)};\n`,a=!0),o+=`${this.getInterceptor(e)}.tap(${n.context?"_context, ":""}_tap${t});\n`)}o+=`var _fn${t} = ${this.getTapFn(t)};\n`;const s=this.options.taps[t];switch(s.type){case"sync":i||(o+=`var _hasError${t} = false;\n`,o+="try {\n"),o+=n?`var _result${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`:`_fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,i||(o+="} catch(_err) {\n",o+=`_hasError${t} = true;\n`,o+=e("_err"),o+="}\n",o+=`if(!_hasError${t}) {\n`),n&&(o+=n("_result"+t)),r&&(o+=r()),i||(o+="}\n");break;case"async":let a="";a+=n?`(function(_err${t}, _result${t}) {\n`:`(function(_err${t}) {\n`,a+=`if(_err${t}) {\n`,a+=e("_err"+t),a+="} else {\n",n&&(a+=n("_result"+t)),r&&(a+=r()),a+="}\n",a+="})",o+=`_fn${t}(${this.args({before:s.context?"_context":void 0,after:a})});\n`;break;case"promise":o+=`var _hasResult${t} = false;\n`,o+=`var _promise${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,o+=`if (!_promise${t} || !_promise${t}.then)\n`,o+=` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${t} + ')');\n`,o+=`_promise${t}.then((function(_result${t}) {\n`,o+=`_hasResult${t} = true;\n`,n&&(o+=n("_result"+t)),r&&(o+=r()),o+=`}), function(_err${t}) {\n`,o+=`if(_hasResult${t}) throw _err${t};\n`,o+=e("_err"+t),o+="});\n"}return o}callTapsSeries({onError:t,onResult:e,resultReturns:n,onDone:r,doneReturns:i,rethrowIfPossible:o}){if(0===this.options.taps.length)return r();const a=this.options.taps.findIndex(t=>"sync"!==t.type),s=n||i;let u="",c=r,l=0;for(let n=this.options.taps.length-1;n>=0;n--){const i=n;c!==r&&("sync"!==this.options.taps[i].type||l++>20)&&(l=0,u+=`function _next${i}() {\n`,u+=c(),u+="}\n",c=()=>`${s?"return ":""}_next${i}();\n`);const h=c,f=t=>t?"":r(),p=this.callTap(i,{onError:e=>t(i,e,h,f),onResult:e&&(t=>e(i,t,h,f)),onDone:!e&&h,rethrowIfPossible:o&&(a<0||i<a)});c=()=>p}return u+=c(),u}callTapsLooping({onError:t,onDone:e,rethrowIfPossible:n}){if(0===this.options.taps.length)return e();const r=this.options.taps.every(t=>"sync"===t.type);let i="";r||(i+="var _looper = (function() {\n",i+="var _loopAsync = false;\n"),i+="var _loop;\n",i+="do {\n",i+="_loop = false;\n";for(let t=0;t<this.options.interceptors.length;t++){const e=this.options.interceptors[t];e.loop&&(i+=`${this.getInterceptor(t)}.loop(${this.args({before:e.context?"_context":void 0})});\n`)}return i+=this.callTapsSeries({onError:t,onResult:(t,e,n,i)=>{let o="";return o+=`if(${e} !== undefined) {\n`,o+="_loop = true;\n",r||(o+="if(_loopAsync) _looper();\n"),o+=i(!0),o+="} else {\n",o+=n(),o+="}\n",o},onDone:e&&(()=>{let t="";return t+="if(!_loop) {\n",t+=e(),t+="}\n",t}),rethrowIfPossible:n&&r}),i+="} while(_loop);\n",r||(i+="_loopAsync = true;\n",i+="});\n",i+="_looper();\n"),i}callTapsParallel({onError:t,onResult:e,onDone:n,rethrowIfPossible:r,onTap:i=((t,e)=>e())}){if(this.options.taps.length<=1)return this.callTapsSeries({onError:t,onResult:e,onDone:n,rethrowIfPossible:r});let o="";o+="do {\n",o+=`var _counter = ${this.options.taps.length};\n`,n&&(o+="var _done = (function() {\n",o+=n(),o+="});\n");for(let a=0;a<this.options.taps.length;a++){const s=()=>n?"if(--_counter === 0) _done();\n":"--_counter;",u=t=>t||!n?"_counter = 0;\n":"_counter = 0;\n_done();\n";o+="if(_counter <= 0) break;\n",o+=i(a,()=>this.callTap(a,{onError:e=>{let n="";return n+="if(_counter > 0) {\n",n+=t(a,e,s,u),n+="}\n",n},onResult:e&&(t=>{let n="";return n+="if(_counter > 0) {\n",n+=e(a,t,s,u),n+="}\n",n}),onDone:!e&&(()=>s()),rethrowIfPossible:r}),s,u)}return o+="} while(false);\n",o}args({before:t,after:e}={}){let n=this._args;return t&&(n=[t].concat(n)),e&&(n=n.concat(e)),0===n.length?"":n.join(", ")}getTapFn(t){return`_x[${t}]`}getTap(t){return`_taps[${t}]`}getInterceptor(t){return`_interceptors[${t}]`}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=void 0;e.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};e.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};e.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagProperty=e.tagParameter=e.decorate=void 0;var r=n(3),i=n(0);function o(t,e,n,i,o){var a={},s="number"==typeof o,u=void 0!==o&&s?o.toString():n;if(s&&void 0!==n)throw new Error(r.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(t,e)&&(a=Reflect.getMetadata(t,e));var c=a[u];if(Array.isArray(c))for(var l=0,h=c;l<h.length;l++){var f=h[l];if(f.key===i.key)throw new Error(r.DUPLICATED_METADATA+" "+f.key.toString())}else c=[];c.push(i),a[u]=c,Reflect.defineMetadata(t,a,e)}function a(t,e){Reflect.decorate(t,e)}function s(t,e){return function(n,r){e(n,r,t)}}e.tagParameter=function(t,e,n,r){o(i.TAGGED,t,e,r,n)},e.tagProperty=function(t,e,n){o(i.TAGGED_PROP,t.constructor,e,n)},e.decorate=function(t,e,n){"number"==typeof n?a([s(n,t)],e):"string"==typeof n?Reflect.decorate([t],e,n):a([t],e)}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},c.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r<o;r++)a[r]=n[r].fn;return a},c.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},c.prototype.emit=function(t,e,n,r,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,o),!0;case 6:return l.fn.call(l.context,e,n,r,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,r);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},c.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},c.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},c.prototype.removeListener=function(t,e,n,r){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return u(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||u(this,o);else{for(var s=0,c=[],l=a.length;s<l;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&c.push(a[s]);c.length?this._events[o]=1===c.length?c[0]:c:u(this,o)}return this},c.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&u(this,e)):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var r=0;e.id=function(){return r++}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.circularDependencyToException=e.listMetadataForTarget=e.listRegisteredBindingsForServiceIdentifier=e.getServiceIdentifierAsString=e.getFunctionName=void 0;var r=n(3);function i(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function o(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}e.getServiceIdentifierAsString=i,e.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="",i=n(t,e);return 0!==i.length&&(r="\nRegistered bindings:",i.forEach((function(t){var e="Object";null!==t.implementationType&&(e=o(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)}))),r},e.circularDependencyToException=function t(e){e.childRequests.forEach((function(e){if(function t(e,n){return null!==e.parentRequest&&(e.parentRequest.serviceIdentifier===n||t(e.parentRequest,n))}(e,e.serviceIdentifier)){var n=function(t){return function t(e,n){void 0===n&&(n=[]);var r=i(e.serviceIdentifier);return n.push(r),null!==e.parentRequest?t(e.parentRequest,n):n}(t).reverse().join(" --\x3e ")}(e);throw new Error(r.CIRCULAR_DEPENDENCY+" "+n)}t(e)}))},e.listMetadataForTarget=function(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(t){n+=t.toString()+"\n"}))," "+t+"\n "+t+" - "+n}return" "+t},e.getFunctionName=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingOnSyntax=void 0;var r=n(13),i=function(){function t(t){this._binding=t}return t.prototype.onActivation=function(t){return this._binding.onActivation=t,new r.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenSyntax=void 0;var r=n(12),i=n(22),o=function(){function t(t){this._binding=t}return t.prototype.when=function(t){return this._binding.constraint=t,new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=i.namedConstraint(t),new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=i.taggedConstraint(t)(e),new r.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return i.typeConstraint(t)(e.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return i.namedConstraint(t)(e.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return i.taggedConstraint(t)(e)(n.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,i.typeConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,i.typeConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,i.namedConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,i.namedConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return i.traverseAncerstors(n,i.taggedConstraint(t)(e))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!i.traverseAncerstors(n,i.taggedConstraint(t)(e))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,t)},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,t)},new r.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=o},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}));let i=1;const o="object"==typeof self&&self.self==self?self:"object"==typeof t&&t.global==t?t:{},a=Date.now();let s={},u=Date.now();const c=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-u,r=n>16?0:16-n,c=i++;return s[c]=t,Object.keys(s).length>1||setTimeout(()=>{u=e;const t=s;s={},Object.keys(t).forEach(e=>t[e](o.performance&&"function"==typeof o.performance.now?o.performance.now():Date.now()-a))},r),c},l=t=>{delete s[t]},h=t=>"string"!=typeof t?c:""===t?o.requestAnimationFrame:o[t+"RequestAnimationFrame"],f=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!h(t)),p=h(f),d="string"!=typeof(y=f)?l:""===y?o.cancelAnimationFrame:o[y+"CancelAnimationFrame"]||o[y+"CancelRequestAnimationFrame"];var y;o.requestAnimationFrame=p,o.cancelAnimationFrame=d,r.exports&&(r.exports={requestAnimationFrame:p,cancelAnimationFrame:d})}).call(this,n(16),n(66)(t))},function(t,e,n){(function(t,e){
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G={})}(this,(function(t){"use strict";var e,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}
2
2
  /*! *****************************************************************************
3
- Copyright (C) Microsoft. All rights reserved.
4
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
- this file except in compliance with the License. You may obtain a copy of the
6
- License at http://www.apache.org/licenses/LICENSE-2.0
3
+ Copyright (C) Microsoft. All rights reserved.
4
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
+ this file except in compliance with the License. You may obtain a copy of the
6
+ License at http://www.apache.org/licenses/LICENSE-2.0
7
7
 
8
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11
- MERCHANTABLITY OR NON-INFRINGEMENT.
8
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11
+ MERCHANTABLITY OR NON-INFRINGEMENT.
12
12
 
13
- See the Apache Version 2.0 License for specific language governing permissions
14
- and limitations under the License.
15
- ***************************************************************************** */
16
- var n;!function(n){!function(r){var i="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=a(n);function a(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===i.Reflect?i.Reflect=n:o=a(i.Reflect,o),function(e){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,u=!a&&!s,c={create:a?function(){return I(Object.create(null))}:s?function(){return I({__proto__:null})}:function(){return I({})},has:u?function(t,e){return n.call(t,e)}:function(t,e){return e in t},get:u?function(t,e){return n.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},l=Object.getPrototypeOf(Function),h="object"==typeof t&&t.env&&"true"===t.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var n=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,i)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function i(t,e){return e}function a(t,e){return[t,e]}}():Map,p=h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new f}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}():Set,d=new(h||"function"!=typeof WeakMap?function(){var t=c.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=i(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+a()}while(c.has(t,e));return t[e]=!0,e}function i(t,r){if(!n.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function o(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}function a(){var t,e=(t=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<16;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}():WeakMap);function y(t,e,n){var r=d.get(t);if(E(r)){if(!n)return;r=new f,d.set(t,r)}var i=r.get(e);if(E(i)){if(!n)return;i=new f,r.set(e,i)}return i}function v(t,e,n){var r=y(e,n,!1);return!E(r)&&!!r.has(t)}function g(t,e,n){var r=y(e,n,!1);if(!E(r))return r.get(t)}function m(t,e,n,r){y(n,r,!0).set(t,e)}function b(t,e){var n=[],r=y(t,e,!1);if(E(r))return n;for(var i=function(t){var e=_(t,o);if(!x(e))throw new TypeError;var n=e.call(t);if(!M(n))throw new TypeError;return n}(r.keys()),a=0;;){var s=A(i);if(!s)return n.length=a,n;var u=s.value;try{n[a]=u}catch(t){try{O(i)}finally{throw t}}a++}}function T(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function E(t){return void 0===t}function w(t){return null===t}function M(t){return"object"==typeof t?null!==t:"function"==typeof t}function k(t,e){switch(T(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",r=_(t,i);if(void 0!==r){var o=r.call(t,n);if(M(o))throw new TypeError;return o}return function(t,e){if("string"===e){var n=t.toString;if(x(n))if(!M(i=n.call(t)))return i;if(x(r=t.valueOf))if(!M(i=r.call(t)))return i}else{var r;if(x(r=t.valueOf))if(!M(i=r.call(t)))return i;var i,o=t.toString;if(x(o))if(!M(i=o.call(t)))return i}throw new TypeError}(t,"default"===n?"number":n)}function S(t){var e=k(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function P(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function x(t){return"function"==typeof t}function N(t){return"function"==typeof t}function _(t,e){var n=t[e];if(null!=n){if(!x(n))throw new TypeError;return n}}function A(t){var e=t.next();return!e.done&&e}function O(t){var e=t.return;e&&e.call(t)}function C(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===l)return e;if(e!==l)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function I(t){return t.__=void 0,delete t.__,t}e("decorate",(function(t,e,n,r){if(E(n)){if(!P(t))throw new TypeError;if(!N(e))throw new TypeError;return function(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!E(r)&&!w(r)){if(!N(r))throw new TypeError;e=r}}return e}(t,e)}if(!P(t))throw new TypeError;if(!M(e))throw new TypeError;if(!M(r)&&!E(r)&&!w(r))throw new TypeError;return w(r)&&(r=void 0),function(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!E(o)&&!w(o)){if(!M(o))throw new TypeError;r=o}}return r}(t,e,n=S(n),r)})),e("metadata",(function(t,e){return function(n,r){if(!M(n))throw new TypeError;if(!E(r)&&!function(t){switch(T(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;m(t,e,n,r)}})),e("defineMetadata",(function(t,e,n,r){if(!M(n))throw new TypeError;return E(r)||(r=S(r)),m(t,e,n,r)})),e("hasMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=S(n)),function t(e,n,r){if(v(e,n,r))return!0;var i=C(n);return!w(i)&&t(e,i,r)}(t,e,n)})),e("hasOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=S(n)),v(t,e,n)})),e("getMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=S(n)),function t(e,n,r){if(v(e,n,r))return g(e,n,r);var i=C(n);return w(i)?void 0:t(e,i,r)}(t,e,n)})),e("getOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=S(n)),g(t,e,n)})),e("getMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return E(e)||(e=S(e)),function t(e,n){var r=b(e,n),i=C(e);if(null===i)return r;var o=t(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new p,s=[],u=0,c=r;u<c.length;u++){var l=c[u];a.has(l)||(a.add(l),s.push(l))}for(var h=0,f=o;h<f.length;h++){l=f[h];a.has(l)||(a.add(l),s.push(l))}return s}(t,e)})),e("getOwnMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return E(e)||(e=S(e)),b(t,e)})),e("deleteMetadata",(function(t,e,n){if(!M(e))throw new TypeError;E(n)||(n=S(n));var r=y(e,n,!1);if(E(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}))}(o)}()}(n||(n={}))}).call(this,n(27),n(16))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var r=n(0),i=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(r.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(r.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(r.TAGGED_PROP,t)||[]},t}();e.MetadataReader=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0;var r=n(3);e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===r.STACK_OVERFLOW}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var r=n(3),i=n(0),o=n(4),a=n(8),s=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=s,e.inject=function(t){return function(e,n,s){if(void 0===t)throw new Error(r.UNDEFINED_INJECT_ANNOTATION(e.name));var u=new o.Metadata(i.INJECT_TAG,t);"number"==typeof s?a.tagParameter(e,n,s,u):a.tagProperty(e,n,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var r=n(0),i=n(10),o=n(4),a=n(35),s=function(){function t(t,e,n,s){this.id=i.id(),this.type=t,this.serviceIdentifier=n,this.name=new a.QueryableString(e||""),this.metadata=new Array;var u=null;"string"==typeof s?u=new o.Metadata(r.NAMED_TAG,s):s instanceof o.Metadata&&(u=s),null!==u&&this.metadata.push(u)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;e<n.length;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(r.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(r.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(r.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(r.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===r.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(r.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;r<i.length;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var r=n(12),i=n(13),o=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new r.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var r=n(0),i=n(4),o=function(t,e){var n=t.parentRequest;return null!==n&&(!!e(n)||o(n,e))};e.traverseAncerstors=o;var a=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new i.Metadata(t,e),n}};e.taggedConstraint=a;var s=a(r.NAMED_TAG);e.namedConstraint=s;e.typeConstraint=function(t){return function(e){var n=null;if(null!==e){if(n=e.bindings[0],"string"==typeof t)return n.serviceIdentifier===t;var r=e.bindings[0].implementationType;return t===r}return!1}}},function(t,e,n){"use strict";e.deprecate=(t,e)=>{let n=!0;return function(){return n&&(console.warn("DeprecationWarning: "+e),n=!1),t.apply(this,arguments)}}},,,,function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=s(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var a=n(29),s=n(3),u=n(7),c=n(0),l=n(17),h=n(30),f=n(37),p=n(39),d=n(10),y=n(11),v=n(42),g=n(43),m=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+s.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=u.BindingScopeEnum.Transient;else if(e.defaultScope!==u.BindingScopeEnum.Singleton&&e.defaultScope!==u.BindingScopeEnum.Transient&&e.defaultScope!==u.BindingScopeEnum.Request)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=d.id(),this._bindingDictionary=new g.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var a=new t,s=o([e,n],r).map((function(t){return h.getBindingDictionary(t)})),u=h.getBindingDictionary(a);function c(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return s.forEach((function(t){c(t,u)})),a},t.prototype.load=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return n<r.length?(o=r[n],a=e(o.id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=this.options.defaultScope||u.BindingScopeEnum.Transient,n=new a.Binding(t,e);return this._bindingDictionary.add(t,n),new p.BindingToSyntax(n)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(s.CANNOT_UNBIND+" "+y.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new g.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,c.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=h.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(v.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(s.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,u.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,u.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,c.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,u.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,u.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,c.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,u={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(u)))throw new Error(s.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(u);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=h.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),f.resolve(n)}},t}();e.Container=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var r=n(7),i=n(10),o=function(){function t(t,e){this.id=i.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=r.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===r.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0;var r=n(31),i=n(3),o=n(7),a=n(0),s=n(18),u=n(11),c=n(32),l=n(4),h=n(33),f=n(34),p=n(36),d=n(20);function y(t){return t._bindingDictionary}function v(t,e,n,o,a){var s=g(n.container,a.serviceIdentifier),c=[];return s.length===r.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof a.serviceIdentifier&&t.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(a.serviceIdentifier).toSelf(),s=g(n.container,a.serviceIdentifier)),c=e?s:s.filter((function(t){var e=new p.Request(t.serviceIdentifier,n,o,t,a);return t.constraint(e)})),function(t,e,n,o){switch(e.length){case r.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var a=u.getServiceIdentifierAsString(t),s=i.NOT_REGISTERED;throw s+=u.listMetadataForTarget(a,n),s+=u.listRegisteredBindingsForServiceIdentifier(o,a,g),new Error(s);case r.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;case r.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return e;a=u.getServiceIdentifierAsString(t),s=i.AMBIGUOUS_MATCH+" "+a;throw s+=u.listRegisteredBindingsForServiceIdentifier(o,a,g),new Error(s)}}(a.serviceIdentifier,c,a,n.container),c}function g(t,e){var n=[],r=y(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=g(t.parent,e)),n}e.getBindingDictionary=y,e.plan=function(t,e,n,r,y,g,m,b){void 0===b&&(b=!1);var T=new c.Context(e),E=function(t,e,n,r,i,o){var s=t?a.MULTI_INJECT_TAG:a.INJECT_TAG,u=new l.Metadata(s,n),c=new d.Target(e,r,n,u);if(void 0!==i){var h=new l.Metadata(i,o);c.metadata.push(h)}return c}(n,r,y,"",g,m);try{return function t(e,n,r,a,s,u){var c,l;if(null===s){c=v(e,n,a,null,u),l=new p.Request(r,a,null,c,u);var d=new h.Plan(a,l);a.addPlan(d)}else c=v(e,n,a,s,u),l=s.addChildRequest(u.serviceIdentifier,c,u);c.forEach((function(n){var r=null;if(u.isArray())r=l.addChildRequest(n.serviceIdentifier,n,u);else{if(n.cache)return;r=l}if(n.type===o.BindingTypeEnum.Instance&&null!==n.implementationType){var s=f.getDependencies(e,n.implementationType);if(!a.container.options.skipBaseClassChecks){var c=f.getBaseClassDependencyCount(e,n.implementationType);if(s.length<c){var h=i.ARGUMENTS_LENGTH_MISMATCH(f.getFunctionName(n.implementationType));throw new Error(h)}}s.forEach((function(n){t(e,!1,n.serviceIdentifier,a,r,n)}))}}))}(t,b,y,T,null,E),T}catch(t){throw s.isStackOverflowExeption(t)&&T.plan&&u.circularDependencyToException(T.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new d.Target(o.TargetTypeEnum.Variable,"",e,new l.Metadata(n,r)),a=new c.Context(t);return new p.Request(e,a,null,[],i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var r=n(10),i=function(){function t(t){this.id=r.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0;var r=function(t,e){this.parentContext=t,this.rootRequest=e};e.Plan=r},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0;var i=n(19),o=n(3),a=n(7),s=n(0),u=n(11);Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return u.getFunctionName}});var c=n(20);function l(t,e,n,i){var s=t.getConstructorMetadata(n),u=s.compilerGeneratedMetadata;if(void 0===u){var l=o.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(l)}var p=s.userGeneratedMetadata,d=Object.keys(p),y=0===n.length&&d.length>0,v=d.length>n.length,g=function(t,e,n,r,i){for(var o=[],a=0;a<i;a++){var s=h(a,t,e,n,r);null!==s&&o.push(s)}return o}(i,e,u,p,y||v?d.length:n.length),m=function t(e,n){for(var i=e.getPropertiesMetadata(n),o=[],s=Object.keys(i),u=0,l=s;u<l.length;u++){var h=l[u],p=i[h],d=f(i[h]),y=d.targetName||h,v=d.inject||d.multiInject,g=new c.Target(a.TargetTypeEnum.ClassProperty,y,v);g.metadata=p,o.push(g)}var m=Object.getPrototypeOf(n.prototype).constructor;if(m!==Object){var b=t(e,m);o=r(r([],o),b)}return o}(t,n);return r(r([],g),m)}function h(t,e,n,r,s){var u=s[t.toString()]||[],l=f(u),h=!0!==l.unmanaged,p=r[t],d=l.inject||l.multiInject;if((p=d||p)instanceof i.LazyServiceIdentifer&&(p=p.unwrap()),h){if(!e&&(p===Object||p===Function||void 0===p)){var y=o.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".";throw new Error(y)}var v=new c.Target(a.TargetTypeEnum.ConstructorArgument,l.targetName,p);return v.metadata=u,v}return null}function f(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[s.INJECT_TAG],multiInject:e[s.MULTI_INJECT_TAG],targetName:e[s.NAME_TAG],unmanaged:e[s.UNMANAGED_TAG]}}e.getDependencies=function(t,e){return l(t,u.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var i=l(e,u.getFunctionName(r),r,!0),o=i.map((function(t){return t.metadata.filter((function(t){return t.key===s.UNMANAGED_TAG}))})),a=[].concat.apply([],o).length,c=i.length-a;return c>0?c:t(e,r)}return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var r=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var r=n(10),i=function(){function t(t,e,n,i,o){this.id=r.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var r=n(3),i=n(7),o=n(18),a=n(11),s=n(38),u=function(t,e,n){try{return n()}catch(n){throw o.isStackOverflowExeption(n)?new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},c=function(t){return function(e){e.parentContext.setCurrentRequest(e);var n=e.bindings,o=e.childRequests,l=e.target&&e.target.isArray(),h=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(l&&h)return o.map((function(e){return c(t)(e)}));var f=null;if(!e.target.isOptional()||0!==n.length){var p=n[0],d=p.scope===i.BindingScopeEnum.Singleton,y=p.scope===i.BindingScopeEnum.Request;if(d&&p.activated)return p.cache;if(y&&null!==t&&t.has(p.id))return t.get(p.id);if(p.type===i.BindingTypeEnum.ConstantValue)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Function)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Constructor)f=p.implementationType;else if(p.type===i.BindingTypeEnum.DynamicValue&&null!==p.dynamicValue)f=u("toDynamicValue",p.serviceIdentifier,(function(){return p.dynamicValue(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Factory&&null!==p.factory)f=u("toFactory",p.serviceIdentifier,(function(){return p.factory(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Provider&&null!==p.provider)f=u("toProvider",p.serviceIdentifier,(function(){return p.provider(e.parentContext)}));else{if(p.type!==i.BindingTypeEnum.Instance||null===p.implementationType){var v=a.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+v)}f=s.resolveInstance(p.implementationType,o,c(t))}return"function"==typeof p.onActivation&&(f=p.onActivation(e.parentContext,f)),d&&(p.cache=f,p.activated=!0),y&&null!==t&&!t.has(p.id)&&t.set(p.id,f),f}}};e.resolve=function(t){return c(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0;var i=n(3),o=n(7),a=n(0);e.resolveInstance=function(t,e,n){var s,u,c=null;if(e.length>0){var l=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ConstructorArgument})).map(n);u=l,c=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value();var o=i[n];t[r]=o})),t}(c=new((s=t).bind.apply(s,r([void 0],u))),e,n)}else c=new t;return function(t,e){if(Reflect.hasMetadata(a.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(a.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(i.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,c),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var r=n(3),i=n(7),o=n(40),a=n(21),s=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=t,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+r.INVALID_TO_SELF_VALUE);var t=this._binding.serviceIdentifier;return this.to(t)},t.prototype.toConstantValue=function(t){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(r.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=i.BindingTypeEnum.Function,this._binding.scope=i.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var r=n(41),i=n(12),o=n(13),a=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var r=n(7),i=n(21),o=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var r=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var r=n(3),i=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(r.NULL_ARGUMENT);if(null==e)throw new Error(r.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(r.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(r.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0;var r=n(10),i=function(t){this.id=r.id(),this.registry=t};e.ContainerModule=i;var o=function(t){this.id=r.id(),this.registry=t};e.AsyncContainerModule=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0;var r=n(3),i=n(0);e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(i.PARAM_TYPES,t))throw new Error(r.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(i.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(i.PARAM_TYPES,e,t),t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0;var r=n(4),i=n(8);e.tagged=function(t,e){return function(n,o,a){var s=new r.Metadata(t,e);"number"==typeof a?i.tagParameter(n,o,a,s):i.tagProperty(n,o,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0;var r=n(0),i=n(4),o=n(8);e.named=function(t){return function(e,n,a){var s=new i.Metadata(r.NAMED_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,s):o.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0;var r=n(0),i=n(4),o=n(8);e.optional=function(){return function(t,e,n){var a=new i.Metadata(r.OPTIONAL_TAG,!0);"number"==typeof n?o.tagParameter(t,e,n,a):o.tagProperty(t,e,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0;var r=n(0),i=n(4),o=n(8);e.unmanaged=function(){return function(t,e,n){var a=new i.Metadata(r.UNMANAGED_TAG,!0);o.tagParameter(t,e,n,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0;var r=n(0),i=n(4),o=n(8);e.multiInject=function(t){return function(e,n,a){var s=new i.Metadata(r.MULTI_INJECT_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,s):o.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0;var r=n(0),i=n(4),o=n(8);e.targetName=function(t){return function(e,n,a){var s=new i.Metadata(r.NAME_TAG,t);o.tagParameter(e,n,a,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0;var r=n(3),i=n(0),o=n(4);e.postConstruct=function(){return function(t,e,n){var a=new o.Metadata(i.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(i.POST_CONSTRUCT,t.constructor))throw new Error(r.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(i.POST_CONSTRUCT,a,t.constructor)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsSeries({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},a=()=>{throw new Error("tapAsync is not supported on a SyncHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,onDone:r,rethrowIfPossible:i}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,n,r)=>`if(${n} !== undefined) {\n${e(n)};\n} else {\n${r()}}\n`,resultReturns:n,onDone:r,rethrowIfPossible:i})}},a=()=>{throw new Error("tapAsync is not supported on a SyncBailHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncBailHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,rethrowIfPossible:r}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,e,n)=>{let r="";return r+=`if(${e} !== undefined) {\n`,r+=`${this._args[0]} = ${e};\n`,r+="}\n",r+=n(),r},onDone:()=>e(this._args[0]),doneReturns:n,rethrowIfPossible:r})}},a=()=>{throw new Error("tapAsync is not supported on a SyncWaterfallHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncWaterfallHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){if(t.length<1)throw new Error("Waterfall hooks must have at least one argument");const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsLooping({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},a=()=>{throw new Error("tapAsync is not supported on a SyncLoopHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncLoopHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsParallel({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,onDone:n}){let r="";return r+=`var _results = new Array(${this.options.taps.length});\n`,r+="var _checkDone = function() {\n",r+="for(var i = 0; i < _results.length; i++) {\n",r+="var item = _results[i];\n",r+="if(item === undefined) return false;\n",r+="if(item.result !== undefined) {\n",r+=e("item.result"),r+="return true;\n",r+="}\n",r+="if(item.error) {\n",r+=t("item.error"),r+="return true;\n",r+="}\n",r+="}\n",r+="return false;\n",r+="}\n",r+=this.callTapsParallel({onError:(t,e,n,r)=>{let i="";return i+=`if(${t} < _results.length && ((_results.length = ${t+1}), (_results[${t}] = { error: ${e} }), _checkDone())) {\n`,i+=r(!0),i+="} else {\n",i+=n(),i+="}\n",i},onResult:(t,e,n,r)=>{let i="";return i+=`if(${t} < _results.length && (${e} !== undefined && (_results.length = ${t+1}), (_results[${t}] = { result: ${e} }), _checkDone())) {\n`,i+=r(!0),i+="} else {\n",i+=n(),i+="}\n",i},onTap:(t,e,n,r)=>{let i="";return t>0&&(i+=`if(${t} >= _results.length) {\n`,i+=n(),i+="} else {\n"),i+=e(),t>0&&(i+="}\n"),i},onDone:n}),r}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,onDone:r}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onResult:(t,n,r)=>`if(${n} !== undefined) {\n${e(n)}\n} else {\n${r()}}\n`,resultReturns:n,onDone:r})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsLooping({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,onDone:n}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onResult:(t,e,n)=>{let r="";return r+=`if(${e} !== undefined) {\n`,r+=`${this._args[0]} = ${e};\n`,r+="}\n",r+=n(),r},onDone:()=>e(this._args[0])})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){if(t.length<1)throw new Error("Waterfall hooks must have at least one argument");const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(23),i=(t,e)=>e;class o{constructor(t,e){this._map=new Map,this.name=e,this._factory=t,this._interceptors=[]}get(t){return this._map.get(t)}for(t){const e=this.get(t);if(void 0!==e)return e;let n=this._factory(t);const r=this._interceptors;for(let e=0;e<r.length;e++)n=r[e].factory(t,n);return this._map.set(t,n),n}intercept(t){this._interceptors.push(Object.assign({factory:i},t))}}o.prototype.tap=r.deprecate((function(t,e,n){return this.for(t).tap(e,n)}),"HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."),o.prototype.tapAsync=r.deprecate((function(t,e,n){return this.for(t).tapAsync(e,n)}),"HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."),o.prototype.tapPromise=r.deprecate((function(t,e,n){return this.for(t).tapPromise(e,n)}),"HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."),t.exports=o},function(t,e,n){"use strict";n(5);class r{constructor(t,e){this.hooks=t,this.name=e}tap(t,e){for(const n of this.hooks)n.tap(t,e)}tapAsync(t,e){for(const n of this.hooks)n.tapAsync(t,e)}tapPromise(t,e){for(const n of this.hooks)n.tapPromise(t,e)}isUsed(){for(const t of this.hooks)if(t.isUsed())return!0;return!1}intercept(t){for(const e of this.hooks)e.intercept(t)}withOptions(t){return new r(this.hooks.map(e=>e.withOptions(t)),this.name)}}t.exports=r},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n.r(e),n.d(e,"ManaSyringe",(function(){return r})),n.d(e,"layoutEngine",(function(){return pp})),n.d(e,"Shape",(function(){return fa})),n.d(e,"LineCap",(function(){return pa})),n.d(e,"LineJoin",(function(){return da})),n.d(e,"TextTransform",(function(){return ya})),n.d(e,"TextAlign",(function(){return va})),n.d(e,"CanvasConfig",(function(){return ka})),n.d(e,"PropertySyntax",(function(){return Bo})),n.d(e,"StyleValueRegistry",(function(){return ga})),n.d(e,"UnitType",(function(){return Zs})),n.d(e,"UnitCategory",(function(){return Js})),n.d(e,"ValueRange",(function(){return Qs})),n.d(e,"Nested",(function(){return tu})),n.d(e,"ParenLess",(function(){return eu})),n.d(e,"CSSColorValue",(function(){return du})),n.d(e,"CSSKeywordValue",(function(){return yu})),n.d(e,"CSSMathOperator",(function(){return hu})),n.d(e,"isComparison",(function(){return vu})),n.d(e,"BaseType",(function(){return fu})),n.d(e,"unitTypeToBaseType",(function(){return gu})),n.d(e,"baseTypeToString",(function(){return mu})),n.d(e,"CSSNumericValueType",(function(){return bu})),n.d(e,"CSSNumericValue",(function(){return Tu})),n.d(e,"CSSUnitValue",(function(){return Pu})),n.d(e,"CSSMathValue",(function(){return xu})),n.d(e,"CSSMathInvert",(function(){return Nu})),n.d(e,"CSSMathNegate",(function(){return _u})),n.d(e,"typeCheck",(function(){return Au})),n.d(e,"CSSMathVariadic",(function(){return Cu})),n.d(e,"CSSMathMin",(function(){return Iu})),n.d(e,"CSSMathMax",(function(){return Ru})),n.d(e,"CSSMathSum",(function(){return Du})),n.d(e,"CSSMathProduct",(function(){return Lu})),n.d(e,"Opx",(function(){return Fu})),n.d(e,"Odeg",(function(){return Vu})),n.d(e,"CSSRGB",(function(){return Bu})),n.d(e,"GradientPatternType",(function(){return Ou})),n.d(e,"CSSGradientValue",(function(){return Gu})),n.d(e,"CSSStyleValueType",(function(){return cu})),n.d(e,"CSSStyleValue",(function(){return pu})),n.d(e,"CSSTransformValue",(function(){return Uu})),n.d(e,"CSSTranslate",(function(){return zu})),n.d(e,"parseColor",(function(){return wc})),n.d(e,"mergeColors",(function(){return Mc})),n.d(e,"parseDimension",(function(){return kc})),n.d(e,"parseLength",(function(){return Sc})),n.d(e,"parserPercentage",(function(){return Pc})),n.d(e,"parseLengthOrPercentage",(function(){return xc})),n.d(e,"parseAngle",(function(){return Nc})),n.d(e,"mergeDimensions",(function(){return _c})),n.d(e,"convertAngleUnit",(function(){return Ac})),n.d(e,"parseDimensionArray",(function(){return Oc})),n.d(e,"mergeDimensionList",(function(){return Cc})),n.d(e,"convertPercentUnit",(function(){return Ic})),n.d(e,"numberToString",(function(){return Rc})),n.d(e,"parseNumber",(function(){return Dc})),n.d(e,"parseNumberList",(function(){return Lc})),n.d(e,"mergeNumbers",(function(){return Fc})),n.d(e,"clampedMergeNumbers",(function(){return Vc})),n.d(e,"mergeNumberLists",(function(){return Bc})),n.d(e,"parsePath",(function(){return Ml})),n.d(e,"mergePaths",(function(){return kl})),n.d(e,"parsePoints",(function(){return Sl})),n.d(e,"parseParam",(function(){return Al})),n.d(e,"parseFilter",(function(){return Cl})),n.d(e,"parseTransform",(function(){return uh})),n.d(e,"mergeTransforms",(function(){return hh})),n.d(e,"parseTransformOrigin",(function(){return fh})),n.d(e,"CSSPropertyLengthOrPercentage",(function(){return vh})),n.d(e,"CSSPropertyLocalPosition",(function(){return gh})),n.d(e,"CSSPropertyOpacity",(function(){return mh})),n.d(e,"CSSPropertyColor",(function(){return bh})),n.d(e,"CSSPropertyFilter",(function(){return Th})),n.d(e,"CSSPropertyLengthOrPercentage12",(function(){return Eh})),n.d(e,"CSSPropertyLengthOrPercentage14",(function(){return wh})),n.d(e,"CSSPropertyShadowBlur",(function(){return Mh})),n.d(e,"CSSPropertyOffsetPath",(function(){return kh})),n.d(e,"CSSPropertyOffsetDistance",(function(){return Sh})),n.d(e,"CSSPropertyZIndex",(function(){return Ph})),n.d(e,"CSSPropertyTransform",(function(){return xh})),n.d(e,"CSSPropertyTransformOrigin",(function(){return Nh})),n.d(e,"CSSPropertyPath",(function(){return _h})),n.d(e,"CSSPropertyPoints",(function(){return Ah})),n.d(e,"CSSPropertyClipPath",(function(){return Oh})),n.d(e,"CSSPropertyText",(function(){return Ch})),n.d(e,"CSSPropertyTextTransform",(function(){return Ih})),n.d(e,"FragmentResultFactory",(function(){return Bl})),n.d(e,"FragmentResultOptions",(function(){return jl})),n.d(e,"ContextNode",(function(){return Gl})),n.d(e,"FragmentResult",(function(){return Ul})),n.d(e,"LayoutChildrenFactory",(function(){return zl})),n.d(e,"LayoutChildrenOptions",(function(){return Hl})),n.d(e,"LayoutChildren",(function(){return Wl})),n.d(e,"LayoutContextFactory",(function(){return Dl})),n.d(e,"LayoutContextOptions",(function(){return Ll})),n.d(e,"LayoutContext",(function(){return Vl})),n.d(e,"AbstractLayoutDefinition",(function(){return ql})),n.d(e,"LayoutEdgesFactory",(function(){return Yl})),n.d(e,"LayoutEdgesOptions",(function(){return Xl})),n.d(e,"LayoutEdges",(function(){return $l})),n.d(e,"LayoutEngine",(function(){return Ql})),n.d(e,"LayoutFragmentFactory",(function(){return th})),n.d(e,"LayoutFragmentOptions",(function(){return eh})),n.d(e,"LayoutFragment",(function(){return nh})),n.d(e,"LayoutRegistry",(function(){return Zl})),n.d(e,"LayoutObject",(function(){return Rl})),n.d(e,"LayoutTaskType",(function(){return Pl})),n.d(e,"PropertyName",(function(){return _l})),n.d(e,"CSS",(function(){return rh})),n.d(e,"PROPERTY_HANDLERS",(function(){return $h})),n.d(e,"BUILT_IN_PROPERTIES",(function(){return Zh})),n.d(e,"DefaultStyleValueRegistry",(function(){return Jh})),n.d(e,"ElementEvent",(function(){return So})),n.d(e,"DELEGATION_SPLITTER",(function(){return Ea})),n.d(e,"EventTarget",(function(){return wa})),n.d(e,"Node",(function(){return Sa})),n.d(e,"Element",(function(){return Ca})),n.d(e,"Document",(function(){return Rh})),n.d(e,"FederatedEvent",(function(){return jo})),n.d(e,"FederatedMouseEvent",(function(){return Dh})),n.d(e,"FederatedPointerEvent",(function(){return Lh})),n.d(e,"FederatedWheelEvent",(function(){return Fh})),n.d(e,"Animation",(function(){return Da})),n.d(e,"AnimationEvent",(function(){return Ia})),n.d(e,"AnimationEffectTiming",(function(){return ws})),n.d(e,"CustomEvent",(function(){return Ta})),n.d(e,"MutationEvent",(function(){return Go})),n.d(e,"Registration",(function(){return Gh})),n.d(e,"MutationObserver",(function(){return Uh})),n.d(e,"MutationRecord",(function(){return Vh})),n.d(e,"makeTiming",(function(){return Ps})),n.d(e,"normalizeTimingInput",(function(){return xs})),n.d(e,"numericTimingToObject",(function(){return Ns})),n.d(e,"KeyframeEffect",(function(){return _s})),n.d(e,"normalizeKeyframes",(function(){return Ms})),n.d(e,"compareAnimations",(function(){return La})),n.d(e,"AnimationTimeline",(function(){return Fa})),n.d(e,"CustomElementRegistry",(function(){return Kh})),n.d(e,"DefaultCamera",(function(){return $f})),n.d(e,"CameraType",(function(){return xf})),n.d(e,"CameraTrackingMode",(function(){return Nf})),n.d(e,"CameraProjectionMode",(function(){return _f})),n.d(e,"CameraEvent",(function(){return Jf})),n.d(e,"Camera",(function(){return ep})),n.d(e,"DisplayObject",(function(){return Os})),n.d(e,"CustomElement",(function(){return Cs})),n.d(e,"Circle",(function(){return Is})),n.d(e,"Ellipse",(function(){return Rs})),n.d(e,"Group",(function(){return Ds})),n.d(e,"Image",(function(){return Ls})),n.d(e,"Line",(function(){return nu})),n.d(e,"Path",(function(){return ru})),n.d(e,"Polygon",(function(){return iu})),n.d(e,"Polyline",(function(){return ou})),n.d(e,"Rect",(function(){return au})),n.d(e,"Text",(function(){return su})),n.d(e,"HTML",(function(){return uu})),n.d(e,"Geometry",(function(){return Pa})),n.d(e,"Renderable",(function(){return xa})),n.d(e,"Transform",(function(){return Na})),n.d(e,"Strategy",(function(){return Ma})),n.d(e,"Cullable",(function(){return _a})),n.d(e,"Sortable",(function(){return Aa})),n.d(e,"AbstractRenderer",(function(){return np})),n.d(e,"CanvasEvent",(function(){return Zf})),n.d(e,"Canvas",(function(){return fp})),n.d(e,"DisplayObjectPool",(function(){return Et})),n.d(e,"sortByZIndex",(function(){return Ef})),n.d(e,"dirtifyToRoot",(function(){return wf})),n.d(e,"SceneGraphService",(function(){return kf})),n.d(e,"DefaultSceneGraphService",(function(){return Sf})),n.d(e,"ContextService",(function(){return Pf})),n.d(e,"RenderReason",(function(){return Mf})),n.d(e,"RenderingContext",(function(){return Af})),n.d(e,"RenderingPluginContribution",(function(){return Cf})),n.d(e,"RenderingService",(function(){return If})),n.d(e,"EventService",(function(){return Df})),n.d(e,"SceneGraphSelectorFactory",(function(){return Do})),n.d(e,"SceneGraphSelector",(function(){return Lo})),n.d(e,"DefaultSceneGraphSelector",(function(){return Vo})),n.d(e,"TextService",(function(){return Gf})),n.d(e,"OffscreenCanvasCreator",(function(){return Lf})),n.d(e,"GeometryUpdaterFactory",(function(){return ma})),n.d(e,"GeometryAABBUpdater",(function(){return ba})),n.d(e,"CircleUpdater",(function(){return Uf})),n.d(e,"EllipseUpdater",(function(){return zf})),n.d(e,"RectUpdater",(function(){return Hf})),n.d(e,"TextUpdater",(function(){return Wf})),n.d(e,"LineUpdater",(function(){return qf})),n.d(e,"PolylineUpdater",(function(){return Yf})),n.d(e,"PathUpdater",(function(){return Xf})),n.d(e,"AABB",(function(){return Eo})),n.d(e,"BoundingSphere",(function(){return Mo})),n.d(e,"Mask",(function(){return ho})),n.d(e,"Frustum",(function(){return Po})),n.d(e,"Plane",(function(){return ko})),n.d(e,"Ray",(function(){return Co})),n.d(e,"Point",(function(){return Io})),n.d(e,"Rectangle",(function(){return Ro})),n.d(e,"DCHECK",(function(){return Uo})),n.d(e,"DCHECK_EQ",(function(){return zo})),n.d(e,"DCHECK_NE",(function(){return Ho})),n.d(e,"isUndefined",(function(){return Wo})),n.d(e,"isNil",(function(){return qo})),n.d(e,"isNumber",(function(){return Yo})),n.d(e,"isFunction",(function(){return Xo})),n.d(e,"isBoolean",(function(){return Ko})),n.d(e,"isObject",(function(){return $o})),n.d(e,"clamp",(function(){return Zo})),n.d(e,"getAngle",(function(){return Jo})),n.d(e,"createVec3",(function(){return Qo})),n.d(e,"deg2rad",(function(){return ta})),n.d(e,"rad2deg",(function(){return ea})),n.d(e,"grad2deg",(function(){return na})),n.d(e,"deg2turn",(function(){return ra})),n.d(e,"turn2deg",(function(){return ia})),n.d(e,"getScaling",(function(){return oa})),n.d(e,"getTranslation",(function(){return aa})),n.d(e,"getRotationInRadians",(function(){return sa})),n.d(e,"getEuler",(function(){return ua})),n.d(e,"fromRotationTranslationScale",(function(){return ca})),n.d(e,"makePerspective",(function(){return la})),n.d(e,"decompose",(function(){return ha})),n.d(e,"convertEffectInput",(function(){return ef})),n.d(e,"formatAttribute",(function(){return sf})),n.d(e,"equalizeSegments",(function(){return dl})),n.d(e,"getDrawDirection",(function(){return yl})),n.d(e,"getPathArea",(function(){return gl})),n.d(e,"reverseCurve",(function(){return ml})),n.d(e,"clonePath",(function(){return bl})),n.d(e,"getRotatedCurve",(function(){return Tl})),n.d(e,"convertToPath",(function(){return wl})),n.d(e,"toFontString",(function(){return cf})),n.d(e,"camelCase",(function(){return Qh})),n.d(e,"isString",(function(){return tf})),n.d(e,"MOUSE_POINTER_ID",(function(){return lf})),n.d(e,"TOUCH_TO_POINTER",(function(){return hf})),n.d(e,"cleanExistedCanvas",(function(){return df})),n.d(e,"isBrowser",(function(){return yf})),n.d(e,"makeQuerablePromise",(function(){return vf})),n.d(e,"Deferred",(function(){return gf})),n.d(e,"equalSet",(function(){return mf})),n.d(e,"ObjectTyped",(function(){return bf})),n.d(e,"setDOMSize",(function(){return Tf}));var r={};n.r(r),n.d(r,"injectable",(function(){return N})),n.d(r,"singleton",(function(){return _})),n.d(r,"transient",(function(){return A})),n.d(r,"inject",(function(){return O})),n.d(r,"named",(function(){return C})),n.d(r,"postConstruct",(function(){return f.postConstruct})),n.d(r,"optional",(function(){return f.optional})),n.d(r,"unmanaged",(function(){return f.unmanaged})),n.d(r,"decorate",(function(){return f.decorate})),n.d(r,"Container",(function(){return it})),n.d(r,"GlobalContainer",(function(){return ot})),n.d(r,"register",(function(){return at})),n.d(r,"SyringeModule",(function(){return Z})),n.d(r,"isSyringeModule",(function(){return J})),n.d(r,"Module",(function(){return Q})),n.d(r,"Provider",(function(){return j})),n.d(r,"DefaultContributionProvider",(function(){return Y})),n.d(r,"contrib",(function(){return st})),n.d(r,"Contribution",(function(){return et})),n.d(r,"Syringe",(function(){return l})),n.d(r,"Utils",(function(){return h})),n.d(r,"OptionSymbol",(function(){return I})),n.d(r,"registerSideOption",(function(){return R}));var i={};n.r(i),n.d(i,"create",(function(){return St})),n.d(i,"fromMat4",(function(){return Pt})),n.d(i,"clone",(function(){return xt})),n.d(i,"copy",(function(){return Nt})),n.d(i,"fromValues",(function(){return _t})),n.d(i,"set",(function(){return At})),n.d(i,"identity",(function(){return Ot})),n.d(i,"transpose",(function(){return Ct})),n.d(i,"invert",(function(){return It})),n.d(i,"adjoint",(function(){return Rt})),n.d(i,"determinant",(function(){return Dt})),n.d(i,"multiply",(function(){return Lt})),n.d(i,"translate",(function(){return Ft})),n.d(i,"rotate",(function(){return Vt})),n.d(i,"scale",(function(){return Bt})),n.d(i,"fromTranslation",(function(){return jt})),n.d(i,"fromRotation",(function(){return Gt})),n.d(i,"fromScaling",(function(){return Ut})),n.d(i,"fromMat2d",(function(){return zt})),n.d(i,"fromQuat",(function(){return Ht})),n.d(i,"normalFromMat4",(function(){return Wt})),n.d(i,"projection",(function(){return qt})),n.d(i,"str",(function(){return Yt})),n.d(i,"frob",(function(){return Xt})),n.d(i,"add",(function(){return Kt})),n.d(i,"subtract",(function(){return $t})),n.d(i,"multiplyScalar",(function(){return Zt})),n.d(i,"multiplyScalarAndAdd",(function(){return Jt})),n.d(i,"exactEquals",(function(){return Qt})),n.d(i,"equals",(function(){return te})),n.d(i,"mul",(function(){return ee})),n.d(i,"sub",(function(){return ne}));var o={};n.r(o),n.d(o,"create",(function(){return re})),n.d(o,"clone",(function(){return ie})),n.d(o,"copy",(function(){return oe})),n.d(o,"fromValues",(function(){return ae})),n.d(o,"set",(function(){return se})),n.d(o,"identity",(function(){return ue})),n.d(o,"transpose",(function(){return ce})),n.d(o,"invert",(function(){return le})),n.d(o,"adjoint",(function(){return he})),n.d(o,"determinant",(function(){return fe})),n.d(o,"multiply",(function(){return pe})),n.d(o,"translate",(function(){return de})),n.d(o,"scale",(function(){return ye})),n.d(o,"rotate",(function(){return ve})),n.d(o,"rotateX",(function(){return ge})),n.d(o,"rotateY",(function(){return me})),n.d(o,"rotateZ",(function(){return be})),n.d(o,"fromTranslation",(function(){return Te})),n.d(o,"fromScaling",(function(){return Ee})),n.d(o,"fromRotation",(function(){return we})),n.d(o,"fromXRotation",(function(){return Me})),n.d(o,"fromYRotation",(function(){return ke})),n.d(o,"fromZRotation",(function(){return Se})),n.d(o,"fromRotationTranslation",(function(){return Pe})),n.d(o,"fromQuat2",(function(){return xe})),n.d(o,"getTranslation",(function(){return Ne})),n.d(o,"getScaling",(function(){return _e})),n.d(o,"getRotation",(function(){return Ae})),n.d(o,"fromRotationTranslationScale",(function(){return Oe})),n.d(o,"fromRotationTranslationScaleOrigin",(function(){return Ce})),n.d(o,"fromQuat",(function(){return Ie})),n.d(o,"frustum",(function(){return Re})),n.d(o,"perspectiveNO",(function(){return De})),n.d(o,"perspective",(function(){return Le})),n.d(o,"perspectiveZO",(function(){return Fe})),n.d(o,"perspectiveFromFieldOfView",(function(){return Ve})),n.d(o,"orthoNO",(function(){return Be})),n.d(o,"ortho",(function(){return je})),n.d(o,"orthoZO",(function(){return Ge})),n.d(o,"lookAt",(function(){return Ue})),n.d(o,"targetTo",(function(){return ze})),n.d(o,"str",(function(){return He})),n.d(o,"frob",(function(){return We})),n.d(o,"add",(function(){return qe})),n.d(o,"subtract",(function(){return Ye})),n.d(o,"multiplyScalar",(function(){return Xe})),n.d(o,"multiplyScalarAndAdd",(function(){return Ke})),n.d(o,"exactEquals",(function(){return $e})),n.d(o,"equals",(function(){return Ze})),n.d(o,"mul",(function(){return Je})),n.d(o,"sub",(function(){return Qe}));var a={};n.r(a),n.d(a,"create",(function(){return tn})),n.d(a,"clone",(function(){return en})),n.d(a,"length",(function(){return nn})),n.d(a,"fromValues",(function(){return rn})),n.d(a,"copy",(function(){return on})),n.d(a,"set",(function(){return an})),n.d(a,"add",(function(){return sn})),n.d(a,"subtract",(function(){return un})),n.d(a,"multiply",(function(){return cn})),n.d(a,"divide",(function(){return ln})),n.d(a,"ceil",(function(){return hn})),n.d(a,"floor",(function(){return fn})),n.d(a,"min",(function(){return pn})),n.d(a,"max",(function(){return dn})),n.d(a,"round",(function(){return yn})),n.d(a,"scale",(function(){return vn})),n.d(a,"scaleAndAdd",(function(){return gn})),n.d(a,"distance",(function(){return mn})),n.d(a,"squaredDistance",(function(){return bn})),n.d(a,"squaredLength",(function(){return Tn})),n.d(a,"negate",(function(){return En})),n.d(a,"inverse",(function(){return wn})),n.d(a,"normalize",(function(){return Mn})),n.d(a,"dot",(function(){return kn})),n.d(a,"cross",(function(){return Sn})),n.d(a,"lerp",(function(){return Pn})),n.d(a,"hermite",(function(){return xn})),n.d(a,"bezier",(function(){return Nn})),n.d(a,"random",(function(){return _n})),n.d(a,"transformMat4",(function(){return An})),n.d(a,"transformMat3",(function(){return On})),n.d(a,"transformQuat",(function(){return Cn})),n.d(a,"rotateX",(function(){return In})),n.d(a,"rotateY",(function(){return Rn})),n.d(a,"rotateZ",(function(){return Dn})),n.d(a,"angle",(function(){return Ln})),n.d(a,"zero",(function(){return Fn})),n.d(a,"str",(function(){return Vn})),n.d(a,"exactEquals",(function(){return Bn})),n.d(a,"equals",(function(){return jn})),n.d(a,"sub",(function(){return Un})),n.d(a,"mul",(function(){return zn})),n.d(a,"div",(function(){return Hn})),n.d(a,"dist",(function(){return Wn})),n.d(a,"sqrDist",(function(){return qn})),n.d(a,"len",(function(){return Yn})),n.d(a,"sqrLen",(function(){return Xn})),n.d(a,"forEach",(function(){return Kn}));var s={};n.r(s),n.d(s,"create",(function(){return $n})),n.d(s,"clone",(function(){return Zn})),n.d(s,"fromValues",(function(){return Jn})),n.d(s,"copy",(function(){return Qn})),n.d(s,"set",(function(){return tr})),n.d(s,"add",(function(){return er})),n.d(s,"subtract",(function(){return nr})),n.d(s,"multiply",(function(){return rr})),n.d(s,"divide",(function(){return ir})),n.d(s,"ceil",(function(){return or})),n.d(s,"floor",(function(){return ar})),n.d(s,"min",(function(){return sr})),n.d(s,"max",(function(){return ur})),n.d(s,"round",(function(){return cr})),n.d(s,"scale",(function(){return lr})),n.d(s,"scaleAndAdd",(function(){return hr})),n.d(s,"distance",(function(){return fr})),n.d(s,"squaredDistance",(function(){return pr})),n.d(s,"length",(function(){return dr})),n.d(s,"squaredLength",(function(){return yr})),n.d(s,"negate",(function(){return vr})),n.d(s,"inverse",(function(){return gr})),n.d(s,"normalize",(function(){return mr})),n.d(s,"dot",(function(){return br})),n.d(s,"cross",(function(){return Tr})),n.d(s,"lerp",(function(){return Er})),n.d(s,"random",(function(){return wr})),n.d(s,"transformMat4",(function(){return Mr})),n.d(s,"transformQuat",(function(){return kr})),n.d(s,"zero",(function(){return Sr})),n.d(s,"str",(function(){return Pr})),n.d(s,"exactEquals",(function(){return xr})),n.d(s,"equals",(function(){return Nr})),n.d(s,"sub",(function(){return _r})),n.d(s,"mul",(function(){return Ar})),n.d(s,"div",(function(){return Or})),n.d(s,"dist",(function(){return Cr})),n.d(s,"sqrDist",(function(){return Ir})),n.d(s,"len",(function(){return Rr})),n.d(s,"sqrLen",(function(){return Dr})),n.d(s,"forEach",(function(){return Lr}));var u={};n.r(u),n.d(u,"create",(function(){return Fr})),n.d(u,"identity",(function(){return Vr})),n.d(u,"setAxisAngle",(function(){return Br})),n.d(u,"getAxisAngle",(function(){return jr})),n.d(u,"getAngle",(function(){return Gr})),n.d(u,"multiply",(function(){return Ur})),n.d(u,"rotateX",(function(){return zr})),n.d(u,"rotateY",(function(){return Hr})),n.d(u,"rotateZ",(function(){return Wr})),n.d(u,"calculateW",(function(){return qr})),n.d(u,"exp",(function(){return Yr})),n.d(u,"ln",(function(){return Xr})),n.d(u,"pow",(function(){return Kr})),n.d(u,"slerp",(function(){return $r})),n.d(u,"random",(function(){return Zr})),n.d(u,"invert",(function(){return Jr})),n.d(u,"conjugate",(function(){return Qr})),n.d(u,"fromMat3",(function(){return ti})),n.d(u,"fromEuler",(function(){return ei})),n.d(u,"str",(function(){return ni})),n.d(u,"clone",(function(){return ci})),n.d(u,"fromValues",(function(){return li})),n.d(u,"copy",(function(){return hi})),n.d(u,"set",(function(){return fi})),n.d(u,"add",(function(){return pi})),n.d(u,"mul",(function(){return di})),n.d(u,"scale",(function(){return yi})),n.d(u,"dot",(function(){return vi})),n.d(u,"lerp",(function(){return gi})),n.d(u,"length",(function(){return mi})),n.d(u,"len",(function(){return bi})),n.d(u,"squaredLength",(function(){return Ti})),n.d(u,"sqrLen",(function(){return Ei})),n.d(u,"normalize",(function(){return wi})),n.d(u,"exactEquals",(function(){return Mi})),n.d(u,"equals",(function(){return ki})),n.d(u,"rotationTo",(function(){return Si})),n.d(u,"sqlerp",(function(){return Pi})),n.d(u,"setAxes",(function(){return xi}));var c={};n.r(c),n.d(c,"create",(function(){return Ni})),n.d(c,"clone",(function(){return _i})),n.d(c,"fromValues",(function(){return Ai})),n.d(c,"copy",(function(){return Oi})),n.d(c,"set",(function(){return Ci})),n.d(c,"add",(function(){return Ii})),n.d(c,"subtract",(function(){return Ri})),n.d(c,"multiply",(function(){return Di})),n.d(c,"divide",(function(){return Li})),n.d(c,"ceil",(function(){return Fi})),n.d(c,"floor",(function(){return Vi})),n.d(c,"min",(function(){return Bi})),n.d(c,"max",(function(){return ji})),n.d(c,"round",(function(){return Gi})),n.d(c,"scale",(function(){return Ui})),n.d(c,"scaleAndAdd",(function(){return zi})),n.d(c,"distance",(function(){return Hi})),n.d(c,"squaredDistance",(function(){return Wi})),n.d(c,"length",(function(){return qi})),n.d(c,"squaredLength",(function(){return Yi})),n.d(c,"negate",(function(){return Xi})),n.d(c,"inverse",(function(){return Ki})),n.d(c,"normalize",(function(){return $i})),n.d(c,"dot",(function(){return Zi})),n.d(c,"cross",(function(){return Ji})),n.d(c,"lerp",(function(){return Qi})),n.d(c,"random",(function(){return to})),n.d(c,"transformMat2",(function(){return eo})),n.d(c,"transformMat2d",(function(){return no})),n.d(c,"transformMat3",(function(){return ro})),n.d(c,"transformMat4",(function(){return io})),n.d(c,"rotate",(function(){return oo})),n.d(c,"angle",(function(){return ao})),n.d(c,"zero",(function(){return so})),n.d(c,"str",(function(){return uo})),n.d(c,"exactEquals",(function(){return co})),n.d(c,"equals",(function(){return lo})),n.d(c,"len",(function(){return fo})),n.d(c,"sub",(function(){return po})),n.d(c,"mul",(function(){return yo})),n.d(c,"div",(function(){return vo})),n.d(c,"dist",(function(){return go})),n.d(c,"sqrDist",(function(){return mo})),n.d(c,"sqrLen",(function(){return bo})),n.d(c,"forEach",(function(){return To}));n(15);var l,h,f=n(2);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){return e.lifecycle===l.Lifecycle.singleton?function(t){return t.inSingletonScope()}(t):function(t){return t.inTransientScope()}(t)}function b(t,e){t.whenTargetNamed(w(e))}function T(t,e){return e.bind(M(t))}function E(t,e){if(e.isBound(M(t)))try{return e.rebind(M(t))}catch(n){return e.bind(M(t))}return e.bind(M(t))}function w(t){return h.isDefinedToken(t)?t.symbol:t}function M(t){return h.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=y((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===p(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(l||(l={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===p(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==p(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===p(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(h||(h={}));var k=new f.Container;function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(f.injectable)();return function(n){Reflect.defineMetadata(l.ClassOptionSymbol,P(P({},t),{},{target:n}),n),e(n)}}function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(P(P({},t),{},{lifecycle:l.Lifecycle.singleton}))}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(P(P({},t),{},{lifecycle:l.Lifecycle.transient}))}function O(t){return Object(f.inject)(M(t))}function C(t){return Object(f.named)(w(t))}var I=Symbol("SyringeOptionSymbol"),R=function(t,e){Reflect.defineMetadata(I,t,e)};function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){F(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function F(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function V(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var B=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=e,this.token=n,this.option=r,this.rawToken=h.isNamedToken(n)?n.token:n,this.named=h.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||h.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var e,n,r;return e=t,r=[{key:"resolveTarget",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var i=Reflect.getMetadata(I,n);i&&t.resolveOption(e,i)}catch(t){}if(h.isClass(n))if(r.useClass){var o=h.toArray(r.useClass);o.unshift(n),r.useClass=o}else r.useClass=[n];var a;try{a=Reflect.getMetadata(l.ClassOptionSymbol,n)}catch(t){}if((a=L(L({},a||{}),r)).token){var s=h.toArray(a.token);s.unshift(n),a.token=s}else a.token=[n];t.resolveOption(e,a)}catch(t){}}},{key:"resolveOption",value:function(e,n){var r,i,o,a,s,u,c,f,p=(r=L(L({},t.globalConfig),n),i=h.toArray(r.token),o=h.toArray(r.useClass),a=h.toArray(r.useDynamic),s=h.toArray(r.useFactory),u=h.toArray(r.contrib),c=r.lifecycle||l.Lifecycle.transient,f={token:i,useClass:o,lifecycle:u.length>0?l.Lifecycle.singleton:c,contrib:u,useDynamic:a,useFactory:s},"useValue"in r&&(f.useValue=r.useValue),f);(0!==p.useClass.length||0!==p.useDynamic.length||0!==p.useFactory.length||"useValue"in p)&&p.token.forEach((function(n){new t(e,n,L({},p)).resolve()}))}}],(n=[{key:"resolve",value:function(){var t=this,e=this.register;(function(t){return t&&"object"===g(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(e)&&(this.mutiple?this.resolveMutilple(e):(this.resolveMono(e),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(n){h.isMultipleEnabled(n)?T(n,e).toService(t.generalToken):E(n,e).toService(t.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return E(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return m(E(this.generalToken,t).toDynamicValue((function(t){var n=it.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return E(this.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return m(E(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return m(T(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return m(T(e.generalToken,t).toDynamicValue((function(t){var e=it.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return T(e.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?T(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&b(t,e.named)})),r.forEach((function(t){return e.named&&b(t,e.named)})),i.forEach((function(t){return e.named&&b(t,e.named)})),o&&b(o,this.named))}}])&&V(e.prototype,n),r&&V(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();B.globalConfig=l.DefaultOption;var j=l.defineToken("ContributionProvider");function G(t){return function(t){if(Array.isArray(t))return U(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function H(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){W(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function W(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Y=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=H(H({},this.option),r))}var e,n,r;return e=t,(n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,G(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=H(H({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}])&&q(e.prototype,n),r&&q(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function X(t,e){return{token:{token:j,named:t},useDynamic:function(n){return new Y(t,n.container,e)},lifecycle:l.Lifecycle.singleton}}function K(t,e,n){t({token:{token:j,named:e},useDynamic:function(t){return new Y(e,t.container,n)},lifecycle:l.Lifecycle.singleton})}function $(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Z=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,r,i){var o={bind:t,unbind:e,isBound:r,rebind:i},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?B.resolveOption(o,t):B.resolveTarget(o,t,e)};n.baseRegistry&&n.baseRegistry(a),n.optionCollection&&n.optionCollection.forEach((function(t){return a(t)}))},this.baseRegistry=e,this.inversifyModule=new f.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,r;return e=t,(n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(X(e))})),this}}])&&$(e.prototype,n),r&&$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function J(t){return t&&"inversifyModule"in t}function Q(t){return new Z(t)}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var et,nt,rt=new Map,it=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new f.Container,t.setContainer(this.container,this)}var e,n,r;return e=t,r=[{key:"setContainer",value:function(t,e){return rt.set(t.id,e)}},{key:"getContainer",value:function(e){var n=rt.get(e.id);if(!n){var r=new t(e);return t.setContainer(e,r),r}return n}},{key:"config",value:function(t){B.globalConfig=t}}],(n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(J(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){J(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(M(t))}},{key:"get",value:function(t){return this.container.get(M(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(M(t),w(e))}},{key:"getAll",value:function(t){return this.container.getAll(M(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(M(t),w(e))}},{key:"isBound",value:function(t){return this.container.isBound(M(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(M(t),w(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?B.resolveOption(this.container,t):B.resolveTarget(this.container,t,e)}}])&&tt(e.prototype,n),r&&tt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ot=new it(k),at=ot.register.bind(ot),st=function(t){return function(e,n,r){C(t)(e,n,r),O(j)(e,n,r)}};(nt=et||(et={})).Provider=j,nt.register=K;
17
- /*! *****************************************************************************
18
- Copyright (c) Microsoft Corporation.
19
-
20
- Permission to use, copy, modify, and/or distribute this software for any
21
- purpose with or without fee is hereby granted.
22
-
23
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
24
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
25
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
26
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
27
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
28
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29
- PERFORMANCE OF THIS SOFTWARE.
30
- ***************************************************************************** */
31
- var ut=function(t,e){return(ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function ct(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ut(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var lt=function(){return(lt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function ht(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function ft(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function pt(t,e){return function(n,r){e(n,r,t)}}function dt(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function yt(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function vt(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function gt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function mt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function bt(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;var Tt=n(9),Et=function(){function t(){this.pool={}}return t.prototype.getByEntity=function(t){return this.pool[t]},t.prototype.add=function(t,e){this.pool[t]=e},t.prototype.remove=function(t){delete this.pool[t]},t=ft([_()],t)}(),wt=1e-6,Mt="undefined"!=typeof Float32Array?Float32Array:Array,kt=Math.random;Math.PI;function St(){var t=new Mt(9);return Mt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Pt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function xt(t){var e=new Mt(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Nt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function _t(t,e,n,r,i,o,a,s,u){var c=new Mt(9);return c[0]=t,c[1]=e,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=s,c[8]=u,c}function At(t,e,n,r,i,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t}function Ot(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ct(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function It(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,f=-l*o+s*u,p=c*o-a*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*a)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*o)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(a*n-r*o)*d,t):null}function Rt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*a,t[3]=s*u-o*l,t[4]=n*l-i*u,t[5]=i*o-n*s,t[6]=o*c-a*u,t[7]=r*u-n*c,t[8]=n*a-r*o,t}function Dt(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*i+a*s)+r*(u*i-o*s)}function Lt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],y=n[3],v=n[4],g=n[5],m=n[6],b=n[7],T=n[8];return t[0]=f*r+p*a+d*c,t[1]=f*i+p*s+d*l,t[2]=f*o+p*u+d*h,t[3]=y*r+v*a+g*c,t[4]=y*i+v*s+g*l,t[5]=y*o+v*u+g*h,t[6]=m*r+b*a+T*c,t[7]=m*i+b*s+T*l,t[8]=m*o+b*u+T*h,t}function Ft(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+p*a+c,t[7]=f*i+p*s+l,t[8]=f*o+p*u+h,t}function Vt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*a,t[1]=p*i+f*s,t[2]=p*o+f*u,t[3]=p*a-f*r,t[4]=p*s-f*i,t[5]=p*u-f*o,t[6]=c,t[7]=l,t[8]=h,t}function Bt(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function jt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function Gt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ut(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function zt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function Ht(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-d,t[3]=l-g,t[6]=f+v,t[1]=l+g,t[4]=1-c-d,t[7]=p-y,t[2]=f-v,t[5]=p+y,t[8]=1-c-h,t}function Wt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,E=r*u-i*s,w=r*c-o*s,M=i*c-o*u,k=l*y-h*d,S=l*v-f*d,P=l*g-p*d,x=h*v-f*y,N=h*g-p*y,_=f*g-p*v,A=m*_-b*N+T*x+E*P-w*S+M*k;return A?(A=1/A,t[0]=(s*_-u*N+c*x)*A,t[1]=(u*P-a*_-c*S)*A,t[2]=(a*N-s*P+c*k)*A,t[3]=(i*N-r*_-o*x)*A,t[4]=(n*_-i*P+o*S)*A,t[5]=(r*P-n*N-o*k)*A,t[6]=(y*M-v*w+g*E)*A,t[7]=(v*T-d*M-g*b)*A,t[8]=(d*w-y*T+g*m)*A,t):null}function qt(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function Yt(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Xt(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Kt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t}function $t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function Zt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function Jt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function Qt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function te(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=e[0],f=e[1],p=e[2],d=e[3],y=e[4],v=e[5],g=e[6],m=e[7],b=e[8];return Math.abs(n-h)<=wt*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-f)<=wt*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-p)<=wt*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-d)<=wt*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-y)<=wt*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-v)<=wt*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-g)<=wt*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-m)<=wt*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-b)<=wt*Math.max(1,Math.abs(l),Math.abs(b))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ee=Lt,ne=$t;function re(){var t=new Mt(16);return Mt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ie(t){var e=new Mt(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ae(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y){var v=new Mt(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=a,v[7]=s,v[8]=u,v[9]=c,v[10]=l,v[11]=h,v[12]=f,v[13]=p,v[14]=d,v[15]=y,v}function se(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y,v){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=p,t[13]=d,t[14]=y,t[15]=v,t}function ue(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ce(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function le(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,E=r*u-i*s,w=r*c-o*s,M=i*c-o*u,k=l*y-h*d,S=l*v-f*d,P=l*g-p*d,x=h*v-f*y,N=h*g-p*y,_=f*g-p*v,A=m*_-b*N+T*x+E*P-w*S+M*k;return A?(A=1/A,t[0]=(s*_-u*N+c*x)*A,t[1]=(i*N-r*_-o*x)*A,t[2]=(y*M-v*w+g*E)*A,t[3]=(f*w-h*M-p*E)*A,t[4]=(u*P-a*_-c*S)*A,t[5]=(n*_-i*P+o*S)*A,t[6]=(v*T-d*M-g*b)*A,t[7]=(l*M-f*T+p*b)*A,t[8]=(a*N-s*P+c*k)*A,t[9]=(r*P-n*N-o*k)*A,t[10]=(d*w-y*T+g*m)*A,t[11]=(h*T-l*w-p*m)*A,t[12]=(s*S-a*x-u*k)*A,t[13]=(n*x-r*S+i*k)*A,t[14]=(y*b-d*E-v*m)*A,t[15]=(l*E-h*b+f*m)*A,t):null}function he(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15];return t[0]=s*(f*g-p*v)-h*(u*g-c*v)+y*(u*p-c*f),t[1]=-(r*(f*g-p*v)-h*(i*g-o*v)+y*(i*p-o*f)),t[2]=r*(u*g-c*v)-s*(i*g-o*v)+y*(i*c-o*u),t[3]=-(r*(u*p-c*f)-s*(i*p-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-p*v)-l*(u*g-c*v)+d*(u*p-c*f)),t[5]=n*(f*g-p*v)-l*(i*g-o*v)+d*(i*p-o*f),t[6]=-(n*(u*g-c*v)-a*(i*g-o*v)+d*(i*c-o*u)),t[7]=n*(u*p-c*f)-a*(i*p-o*f)+l*(i*c-o*u),t[8]=a*(h*g-p*y)-l*(s*g-c*y)+d*(s*p-c*h),t[9]=-(n*(h*g-p*y)-l*(r*g-o*y)+d*(r*p-o*h)),t[10]=n*(s*g-c*y)-a*(r*g-o*y)+d*(r*c-o*s),t[11]=-(n*(s*p-c*h)-a*(r*p-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*v-f*y)-l*(s*v-u*y)+d*(s*f-u*h)),t[13]=n*(h*v-f*y)-l*(r*v-i*y)+d*(r*f-i*h),t[14]=-(n*(s*v-u*y)-a*(r*v-i*y)+d*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t}function fe(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],p=t[12],d=t[13],y=t[14],v=t[15];return(e*a-n*o)*(h*v-f*y)-(e*s-r*o)*(l*v-f*d)+(e*u-i*o)*(l*y-h*d)+(n*s-r*a)*(c*v-f*p)-(n*u-i*a)*(c*y-h*p)+(r*u-i*s)*(c*d-l*p)}function pe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],g=e[14],m=e[15],b=n[0],T=n[1],E=n[2],w=n[3];return t[0]=b*r+T*s+E*h+w*y,t[1]=b*i+T*u+E*f+w*v,t[2]=b*o+T*c+E*p+w*g,t[3]=b*a+T*l+E*d+w*m,b=n[4],T=n[5],E=n[6],w=n[7],t[4]=b*r+T*s+E*h+w*y,t[5]=b*i+T*u+E*f+w*v,t[6]=b*o+T*c+E*p+w*g,t[7]=b*a+T*l+E*d+w*m,b=n[8],T=n[9],E=n[10],w=n[11],t[8]=b*r+T*s+E*h+w*y,t[9]=b*i+T*u+E*f+w*v,t[10]=b*o+T*c+E*p+w*g,t[11]=b*a+T*l+E*d+w*m,b=n[12],T=n[13],E=n[14],w=n[15],t[12]=b*r+T*s+E*h+w*y,t[13]=b*i+T*u+E*f+w*v,t[14]=b*o+T*c+E*p+w*g,t[15]=b*a+T*l+E*d+w*m,t}function de(t,e,n){var r,i,o,a,s,u,c,l,h,f,p,d,y=n[0],v=n[1],g=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*g+e[12],t[13]=e[1]*y+e[5]*v+e[9]*g+e[13],t[14]=e[2]*y+e[6]*v+e[10]*g+e[14],t[15]=e[3]*y+e[7]*v+e[11]*g+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=p,t[11]=d,t[12]=r*y+s*v+h*g+e[12],t[13]=i*y+u*v+f*g+e[13],t[14]=o*y+c*v+p*g+e[14],t[15]=a*y+l*v+d*g+e[15]),t}function ye(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ve(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d,y,v,g,m,b,T,E,w,M,k,S,P,x,N=r[0],_=r[1],A=r[2],O=Math.hypot(N,_,A);return O<wt?null:(N*=O=1/O,_*=O,A*=O,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],u=e[1],c=e[2],l=e[3],h=e[4],f=e[5],p=e[6],d=e[7],y=e[8],v=e[9],g=e[10],m=e[11],b=N*N*a+o,T=_*N*a+A*i,E=A*N*a-_*i,w=N*_*a-A*i,M=_*_*a+o,k=A*_*a+N*i,S=N*A*a+_*i,P=_*A*a-N*i,x=A*A*a+o,t[0]=s*b+h*T+y*E,t[1]=u*b+f*T+v*E,t[2]=c*b+p*T+g*E,t[3]=l*b+d*T+m*E,t[4]=s*w+h*M+y*k,t[5]=u*w+f*M+v*k,t[6]=c*w+p*M+g*k,t[7]=l*w+d*M+m*k,t[8]=s*S+h*P+y*x,t[9]=u*S+f*P+v*x,t[10]=c*S+p*P+g*x,t[11]=l*S+d*P+m*x,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function ge(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function me(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function be(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t}function Te(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Ee(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function we(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return c<wt?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function Me(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ke(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Se(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,p=i*u,d=i*c,y=o*c,v=a*s,g=a*u,m=a*c;return t[0]=1-(p+y),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+y),t[6]=d+v,t[7]=0,t[8]=f+g,t[9]=d-v,t[10]=1-(l+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function xe(t,e){var n=new Mt(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+l*r+u*o-c*i)/h,n[1]=2*(u*a+l*i+c*r-s*o)/h,n[2]=2*(c*a+l*o+s*i-u*r)/h):(n[0]=2*(s*a+l*r+u*o-c*i),n[1]=2*(u*a+l*i+c*r-s*o),n[2]=2*(c*a+l*o+s*i-u*r)),Pe(t,e,n),t}function Ne(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function _e(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(u,c,l),t}function Ae(t,e){var n=new Mt(3);_e(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,p=e[9]*i,d=e[10]*o,y=a+l+d,v=0;return y>0?(v=2*Math.sqrt(y+1),t[3]=.25*v,t[0]=(h-p)/v,t[1]=(f-u)/v,t[2]=(s-c)/v):a>l&&a>d?(v=2*Math.sqrt(1+a-l-d),t[3]=(h-p)/v,t[0]=.25*v,t[1]=(s+c)/v,t[2]=(f+u)/v):l>d?(v=2*Math.sqrt(1+l-a-d),t[3]=(f-u)/v,t[0]=(s+c)/v,t[1]=.25*v,t[2]=(h+p)/v):(v=2*Math.sqrt(1+d-a-l),t[3]=(s-c)/v,t[0]=(f+u)/v,t[1]=(h+p)/v,t[2]=.25*v),t}function Oe(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,p=i*l,d=o*c,y=o*l,v=a*l,g=s*u,m=s*c,b=s*l,T=r[0],E=r[1],w=r[2];return t[0]=(1-(d+v))*T,t[1]=(f+b)*T,t[2]=(p-m)*T,t[3]=0,t[4]=(f-b)*E,t[5]=(1-(h+v))*E,t[6]=(y+g)*E,t[7]=0,t[8]=(p+m)*w,t[9]=(y-g)*w,t[10]=(1-(h+d))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ce(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,p=o*l,d=o*h,y=a*l,v=a*h,g=s*h,m=u*c,b=u*l,T=u*h,E=r[0],w=r[1],M=r[2],k=i[0],S=i[1],P=i[2],x=(1-(y+g))*E,N=(p+T)*E,_=(d-b)*E,A=(p-T)*w,O=(1-(f+g))*w,C=(v+m)*w,I=(d+b)*M,R=(v-m)*M,D=(1-(f+y))*M;return t[0]=x,t[1]=N,t[2]=_,t[3]=0,t[4]=A,t[5]=O,t[6]=C,t[7]=0,t[8]=I,t[9]=R,t[10]=D,t[11]=0,t[12]=n[0]+k-(x*k+A*S+I*P),t[13]=n[1]+S-(N*k+O*S+R*P),t[14]=n[2]+P-(_*k+C*S+D*P),t[15]=1,t}function Ie(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-d,t[1]=l+g,t[2]=f-v,t[3]=0,t[4]=l-g,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=f+v,t[9]=p-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Re(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}function De(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var Le=De;function Fe(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function Ve(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Be(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t}var je=Be;function Ge(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t}function Ue(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d=e[0],y=e[1],v=e[2],g=r[0],m=r[1],b=r[2],T=n[0],E=n[1],w=n[2];return Math.abs(d-T)<wt&&Math.abs(y-E)<wt&&Math.abs(v-w)<wt?ue(t):(l=d-T,h=y-E,f=v-w,i=m*(f*=p=1/Math.hypot(l,h,f))-b*(h*=p),o=b*(l*=p)-g*f,a=g*h-m*l,(p=Math.hypot(i,o,a))?(i*=p=1/p,o*=p,a*=p):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(p=Math.hypot(s,u,c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*d+o*y+a*v),t[13]=-(s*d+u*y+c*v),t[14]=-(l*d+h*y+f*v),t[15]=1,t)}function ze(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],p=l*l+h*h+f*f;p>0&&(l*=p=1/Math.sqrt(p),h*=p,f*=p);var d=u*f-c*h,y=c*l-s*f,v=s*h-u*l;return(p=d*d+y*y+v*v)>0&&(d*=p=1/Math.sqrt(p),y*=p,v*=p),t[0]=d,t[1]=y,t[2]=v,t[3]=0,t[4]=h*v-f*y,t[5]=f*d-l*v,t[6]=l*y-h*d,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function He(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function We(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function qe(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function Ye(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Xe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Ke(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function $e(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function Ze(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],p=t[11],d=t[12],y=t[13],v=t[14],g=t[15],m=e[0],b=e[1],T=e[2],E=e[3],w=e[4],M=e[5],k=e[6],S=e[7],P=e[8],x=e[9],N=e[10],_=e[11],A=e[12],O=e[13],C=e[14],I=e[15];return Math.abs(n-m)<=wt*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=wt*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-T)<=wt*Math.max(1,Math.abs(i),Math.abs(T))&&Math.abs(o-E)<=wt*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(a-w)<=wt*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-M)<=wt*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-k)<=wt*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(c-S)<=wt*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(l-P)<=wt*Math.max(1,Math.abs(l),Math.abs(P))&&Math.abs(h-x)<=wt*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(f-N)<=wt*Math.max(1,Math.abs(f),Math.abs(N))&&Math.abs(p-_)<=wt*Math.max(1,Math.abs(p),Math.abs(_))&&Math.abs(d-A)<=wt*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(y-O)<=wt*Math.max(1,Math.abs(y),Math.abs(O))&&Math.abs(v-C)<=wt*Math.max(1,Math.abs(v),Math.abs(C))&&Math.abs(g-I)<=wt*Math.max(1,Math.abs(g),Math.abs(I))}var Je=pe,Qe=Ye;function tn(){var t=new Mt(3);return Mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function en(t){var e=new Mt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function nn(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function rn(t,e,n){var r=new Mt(3);return r[0]=t,r[1]=e,r[2]=n,r}function on(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function an(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function sn(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function un(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function cn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function ln(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function hn(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function fn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function pn(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function dn(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function yn(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function vn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function gn(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function mn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function bn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function Tn(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function En(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function wn(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Mn(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function kn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Sn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Pn(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function xn(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t}function Nn(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,h=3*u*a,f=u*o;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t}function _n(t,e){e=e||1;var n=2*kt()*Math.PI,r=2*kt()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function An(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function On(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function Cn(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*s-r*c,f=r*u-i*s,p=i*f-o*h,d=o*l-r*f,y=r*h-i*l,v=2*a;return l*=v,h*=v,f*=v,p*=2,d*=2,y*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+y,t}function In(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Rn(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Dn(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Ln(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),c=u&&kn(t,e)/u;return Math.acos(Math.min(Math.max(c,-1),1))}function Fn(t){return t[0]=0,t[1]=0,t[2]=0,t}function Vn(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Bn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function jn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=wt*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=wt*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=wt*Math.max(1,Math.abs(i),Math.abs(s))}var Gn,Un=un,zn=cn,Hn=ln,Wn=mn,qn=bn,Yn=nn,Xn=Tn,Kn=(Gn=tn(),function(t,e,n,r,i,o){var a,s;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a<s;a+=e)Gn[0]=t[a],Gn[1]=t[a+1],Gn[2]=t[a+2],i(Gn,Gn,o),t[a]=Gn[0],t[a+1]=Gn[1],t[a+2]=Gn[2];return t});function $n(){var t=new Mt(4);return Mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zn(t){var e=new Mt(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Jn(t,e,n,r){var i=new Mt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Qn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function tr(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function er(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function nr(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function rr(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function ir(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function or(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function ar(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function sr(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function ur(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function cr(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function lr(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function hr(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}function fr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function pr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function dr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function yr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function vr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function gr(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function mr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function br(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Tr(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],u=n[1]*r[3]-n[3]*r[1],c=n[2]*r[3]-n[3]*r[2],l=e[0],h=e[1],f=e[2],p=e[3];return t[0]=h*c-f*u+p*s,t[1]=-l*c+f*a-p*o,t[2]=l*u-h*a+p*i,t[3]=-l*s+h*o-f*i,t}function Er(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function wr(t,e){var n,r,i,o,a,s;e=e||1;do{a=(n=2*kt()-1)*n+(r=2*kt()-1)*r}while(a>=1);do{s=(i=2*kt()-1)*i+(o=2*kt()-1)*o}while(s>=1);var u=Math.sqrt((1-a)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*u,t[3]=e*o*u,t}function Mr(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function kr(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],l=c*r+s*o-u*i,h=c*i+u*r-a*o,f=c*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=l*c+p*-a+h*-u-f*-s,t[1]=h*c+p*-s+f*-a-l*-u,t[2]=f*c+p*-u+l*-s-h*-a,t[3]=e[3],t}function Sr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function Pr(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function xr(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function Nr(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],c=e[3];return Math.abs(n-a)<=wt*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=wt*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=wt*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=wt*Math.max(1,Math.abs(o),Math.abs(c))}var _r=nr,Ar=rr,Or=ir,Cr=fr,Ir=pr,Rr=dr,Dr=yr,Lr=function(){var t=$n();return function(e,n,r,i,o,a){var s,u;for(n||(n=4),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();function Fr(){var t=new Mt(4);return Mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Vr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Br(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function jr(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>wt?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Gr(t,e){var n=vi(t,e);return Math.acos(2*n*n-1)}function Ur(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function zr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t}function Hr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t}function Wr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t}function qr(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function Yr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),u=a>0?s*Math.sin(a)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=s*Math.cos(a),t}function Xr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Kr(t,e,n){return Xr(t,e),yi(t,t,n),Yr(t,t),t}function $r(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],p=n[0],d=n[1],y=n[2],v=n[3];return(o=c*p+l*d+h*y+f*v)<0&&(o=-o,p=-p,d=-d,y=-y,v=-v),1-o>wt?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*p,t[1]=s*l+u*d,t[2]=s*h+u*y,t[3]=s*f+u*v,t}function Zr(t){var e=kt(),n=kt(),r=kt(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function Jr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function Qr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function ti(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function ei(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}function ni(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var ri,ii,oi,ai,si,ui,ci=Zn,li=Jn,hi=Qn,fi=tr,pi=er,di=Ur,yi=lr,vi=br,gi=Er,mi=dr,bi=mi,Ti=yr,Ei=Ti,wi=mr,Mi=xr,ki=Nr,Si=(ri=tn(),ii=rn(1,0,0),oi=rn(0,1,0),function(t,e,n){var r=kn(e,n);return r<-.999999?(Sn(ri,ii,e),Yn(ri)<1e-6&&Sn(ri,oi,e),Mn(ri,ri),Br(t,ri,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Sn(ri,e,n),t[0]=ri[0],t[1]=ri[1],t[2]=ri[2],t[3]=1+r,wi(t,t))}),Pi=(ai=Fr(),si=Fr(),function(t,e,n,r,i,o){return $r(ai,e,i,o),$r(si,n,r,o),$r(t,ai,si,2*o*(1-o)),t}),xi=(ui=St(),function(t,e,n,r){return ui[0]=n[0],ui[3]=n[1],ui[6]=n[2],ui[1]=r[0],ui[4]=r[1],ui[7]=r[2],ui[2]=-e[0],ui[5]=-e[1],ui[8]=-e[2],wi(t,ti(t,ui))});function Ni(){var t=new Mt(2);return Mt!=Float32Array&&(t[0]=0,t[1]=0),t}function _i(t){var e=new Mt(2);return e[0]=t[0],e[1]=t[1],e}function Ai(t,e){var n=new Mt(2);return n[0]=t,n[1]=e,n}function Oi(t,e){return t[0]=e[0],t[1]=e[1],t}function Ci(t,e,n){return t[0]=e,t[1]=n,t}function Ii(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Ri(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Di(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function Li(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Fi(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function Vi(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function Bi(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ji(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function Gi(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function Ui(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function zi(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function Hi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function Wi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function qi(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function Yi(t){var e=t[0],n=t[1];return e*e+n*n}function Xi(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Ki(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function $i(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function Zi(t,e){return t[0]*e[0]+t[1]*e[1]}function Ji(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function Qi(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function to(t,e){e=e||1;var n=2*kt()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function eo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function no(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function ro(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function io(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function oo(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t}function ao(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function so(t){return t[0]=0,t[1]=0,t}function uo(t){return"vec2("+t[0]+", "+t[1]+")"}function co(t,e){return t[0]===e[0]&&t[1]===e[1]}function lo(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=wt*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=wt*Math.max(1,Math.abs(r),Math.abs(o))}var ho,fo=qi,po=Ri,yo=Di,vo=Li,go=Hi,mo=Wi,bo=Yi,To=function(){var t=Ni();return function(e,n,r,i,o,a){var s,u;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],o(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}}(),Eo=function(){function t(t,e){this.min=a.create(),this.max=a.create(),this.update(t,e)}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){this.center=a.copy(a.create(),t||a.create()),this.halfExtents=a.copy(a.create(),e||a.fromValues(0,0,0)),this.min=a.sub(this.min,this.center,this.halfExtents),this.max=a.add(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){a.add(this.center,e,t),a.scale(this.center,this.center,.5),a.sub(this.halfExtents,e,t),a.scale(this.halfExtents,this.halfExtents,.5),a.copy(this.min,t),a.copy(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=r-s,h=r+s,f=i-u,p=i+u,d=o-c,y=o+c,v=e.center,g=v[0],m=v[1],b=v[2],T=e.halfExtents,E=T[0],w=T[1],M=T[2],k=g-E,S=g+E,P=m-w,x=m+w,N=b-M,_=b+M;k<l&&(l=k),S>h&&(h=S),P<f&&(f=P),x>p&&(p=x),N<d&&(d=N),_>y&&(y=_),n[0]=.5*(l+h),n[1]=.5*(f+p),n[2]=.5*(d+y),a[0]=.5*(h-l),a[1]=.5*(p-f),a[2]=.5*(y-d),this.min[0]=l,this.min[1]=f,this.min[2]=d,this.max[0]=h,this.max[1]=p,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,s=e[0],u=e[4],c=e[8],l=e[1],h=e[5],f=e[9],p=e[2],d=e[6],y=e[10],v=Math.abs(s),g=Math.abs(u),m=Math.abs(c),b=Math.abs(l),T=Math.abs(h),E=Math.abs(f),w=Math.abs(p),M=Math.abs(d),k=Math.abs(y);a.set(n,e[12]+s*i[0]+u*i[1]+c*i[2],e[13]+l*i[0]+h*i[1]+f*i[2],e[14]+p*i[0]+d*i[1]+y*i[2]),a.set(r,v*o[0]+g*o[1]+m*o[2],b*o[0]+T*o[1]+E*o[2],w*o[0]+M*o[1]+k*o[2]),this.min=a.sub(this.min,n,r),this.max=a.add(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n=new t,r=a.max(a.create(),this.getMin(),e.getMin()),i=a.min(a.create(),this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.prototype.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.min):272===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):a.fromValues(this.max[0],this.max[1],this.max[2])},t.prototype.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.max):272===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):a.fromValues(this.min[0],this.min[1],this.min[2])},t}(),wo=a.create(),Mo=function(){function t(t,e){this.center=t||a.create(),this.radius=e||.5}return t.prototype.containsPoint=function(t){return a.sub(wo,t,this.center),a.length(wo)<this.radius*this.radius},t.prototype.intersects=function(t){a.sub(wo,t.center,this.center);var e=t.radius+this.radius;return a.length(wo)<=e*e},t}(),ko=function(){function t(t,e){this.distance=t||0,this.normal=e||a.fromValues(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return a.dot(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/a.len(this.normal);a.scale(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&a.lerp(n,t,e,i),o},t}();!function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"}(ho||(ho={}));var So,Po=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new ko)}return t.prototype.extractFromVPMatrix=function(t){var e=mt(t,16),n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],g=e[14],m=e[15];a.set(this.planes[0].normal,o-n,l-s,d-h),this.planes[0].distance=m-y,a.set(this.planes[1].normal,o+n,l+s,d+h),this.planes[1].distance=m+y,a.set(this.planes[2].normal,o+r,l+u,d+f),this.planes[2].distance=m+v,a.set(this.planes[3].normal,o-r,l-u,d-f),this.planes[3].distance=m-v,a.set(this.planes[4].normal,o-i,l-c,d-p),this.planes[4].distance=m-g,a.set(this.planes[5].normal,o+i,l+c,d+p),this.planes[5].distance=m+g,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),xo=a.create(),No=a.create(),_o=a.create(),Ao=a.create(),Oo=a.create(),Co=function(){function t(t,e){this.origin=t||a.create(),this.direction=e||a.fromValues(0,0,-1)}return t.prototype.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},t.prototype.intersectsSphere=function(t,e){var n=a.sub(xo,this.origin,t.center);a.normalize(No,a.copy(No,this.direction));var r=a.dot(n,No),i=a.dot(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(o<0)return!1;var s=Math.abs(-r-Math.sqrt(o));return e&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,s)),!0},t.prototype.intersectsPlane=function(t,e){var n=(t.distance-a.dot(t.normal,this.origin))/a.dot(t.normal,this.direction),r=n>=0;return r&&e&&a.scaleAndAdd(e,this.origin,this.direction,n),r},t.prototype.intersectsAABBWithoutIntersection=function(t){var e=xo,n=No,r=_o,i=Ao,o=Oo,s=this.direction;return a.sub(e,this.origin,t.center),a.set(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),a.mul(r,e,s),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(a.set(o,Math.abs(s[0]),Math.abs(s[1]),Math.abs(s[2])),a.cross(n,s,e),a.set(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},t.prototype.intersectAABBWithIntersection=function(t,e){var n=a.copy(a.create(),t.getMin());a.sub(n,n,this.origin);var r=a.copy(a.create(),t.getMax());a.sub(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=n[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=r[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=n[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=r[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=n[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=r[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=a.set(_o,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),s=a.set(Ao,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),u=Math.min(Math.min(s[0],s[1]),s[2]),c=Math.max(Math.max(o[0],o[1]),o[2]),l=u>=c&&c>=0;return l&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,c)),l},t}(),Io=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Ro=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),Do=l.defineToken("SceneGraphSelectorFactory"),Lo=l.defineToken("SceneGraphSelector",{multiple:!1}),Fo=/\[\s*name=(.*)\s*\]/,Vo=function(){function t(){}return t.prototype.selectOne=function(t,e){if(t.startsWith("."))return e.find((function(e){return e.className===t.substring(1)}));if(t.startsWith("#"))return e.find((function(e){return e.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Fo);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.find((function(t){return e!==t&&t.name===r}))}return null}return e.find((function(n){return e!==n&&n.nodeName===t}))},t.prototype.selectAll=function(t,e){if(t.startsWith("."))return e.findAll((function(n){return e!==n&&n.className===t.substring(1)}));if(t.startsWith("#"))return e.findAll((function(n){return e!==n&&n.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Fo);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.findAll((function(t){return e!==t&&t.name===r}))}return[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},t.prototype.is=function(){return!0},t=ft([_({token:Lo})],t)}();!function(t){t.DESTROY="destroy",t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.CHILD_INSERTED="child-inserted",t.REMOVED="removed",t.CHILD_REMOVED="child-removed",t.MOUNTED="DOMNodeInsertedIntoDocument",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.BOUNDS_CHANGED="bounds-changed",t.GEOMETRY_BOUNDS_CHANGED="geometry-bounds-changed",t.RENDER_ORDER_CHANGED="render-order-changed"}(So||(So={}));var Bo,jo=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Io,this.page=new Io,this.canvas=new Io,this.viewport=new Io,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t}(),Go=function(t){function e(e,n,r,i,o,a,s,u){var c=t.call(this,null)||this;return c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return ct(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(jo);function Uo(t){if(!t)throw new Error}function zo(t,e){if(t!==e)throw new Error}function Ho(t,e){if(t===e)throw new Error}function Wo(t){return void 0===t}function qo(t){return null==t}function Yo(t){return"number"==typeof t}function Xo(t){return"function"==typeof t}function Ko(t){return"boolean"==typeof t}function $o(t){return"[object Object]"===Object.prototype.toString.call(t)}function Zo(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function Jo(t){return void 0===t?0:t>360||t<-360?t%360:t}function Qo(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Yo(t)?a.fromValues(t,e,n):Array.isArray(t)&&3===t.length?a.clone(t):a.fromValues(t[0],t[1]||e,t[2]||n)}function ta(t){return t*(Math.PI/180)}function ea(t){return t*(180/Math.PI)}function na(t){return(t%=400)<0&&(t+=400),t/400*360}function ra(t){return t/360}function ia(t){return 360*t}function oa(t,e){var n=e[0],r=e[1],i=e[3],o=e[4];return t[0]=Math.hypot(n,r),t[1]=Math.hypot(i,o),t}function aa(t,e){return t[0]=e[6],t[1]=e[7],t}function sa(t){return Math.atan2(t[1],t[4])}function ua(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,s=mt(o.getScaling(a.create(),e),3),u=s[0],c=s[1],l=s[2],h=Math.asin(-e[2]/u);return h<i?h>-i?(n=Math.atan2(e[6]/c,e[10]/l),r=Math.atan2(e[1]/u,e[0]/u)):(r=0,n=-Math.atan2(e[4]/c,e[5]/c)):(r=0,n=Math.atan2(e[4]/c,e[5]/c)),t[0]=n,t[1]=h,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,u=o*o,c=n*n+a+s+u,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):l<-.499995*c?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+u)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function ca(t,e,n,r,o){var a=Math.cos(t),s=Math.sin(t);return i.fromValues(r*a,o*s,0,-r*s,o*a,0,e,n,1)}function la(t,e,n,r,i,o,a){var s=2*o/(n-e),u=2*o/(r-i),c=(n+e)/(n-e),l=(r+i)/(r-i),h=-(a+o)/(a-o),f=-2*a*o/(a-o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=c,t[9]=l,t[10]=h,t[11]=-1,t[12]=0,t[13]=0,t[14]=f,t[15]=0,t}function ha(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var s=ea(Math.atan2(n,e));return[t[6],t[7],o,a,s]}!function(t){t.COORDINATE="<coordinate>",t.COLOR="<color>",t.PAINT="<paint>",t.NUMBER="<number>",t.OPACITY_VALUE="<opacity-value>",t.SHADOW_BLUR="<shadow-blur>",t.LENGTH="<length>",t.PERCENTAGE="<percentage>",t.LENGTH_PERCENTAGE="<length> | <percentage>",t.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",t.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",t.LIST_OF_POINTS="<list-of-points>",t.PATH="<path>",t.FILTER="<filter>",t.Z_INDEX="<z-index>",t.OFFSET_PATH="<offset-path>",t.OFFSET_DISTANCE="<offset-distance>",t.CLIP_PATH="<clip-path>",t.TRANSFORM="<transform>",t.TRANSFORM_ORIGIN="<transform-origin>",t.TEXT="<text>",t.TEXT_TRANSFORM="<text-transform>"}(Bo||(Bo={}));var fa,pa,da,ya,va,ga=l.defineToken("StyleValueRegistry"),ma=l.defineToken("GeometryUpdaterFactory"),ba=l.defineToken("GeometryAABBUpdater"),Ta=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return ct(e,t),e}(jo),Ea=":",wa=function(){function t(){this.emitter=new Tt.EventEmitter}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=Ko(n)&&n||$o(n)&&n.capture,i=$o(n)&&n.once,o=Xo(e)?void 0:e,a=!1,s="";if(t.indexOf(Ea)>-1){var u=mt(t.split(Ea),2),c=u[0];t=u[1],s=c,a=!0}if(t=r?"".concat(t,"capture"):t,e=Xo(e)?e:e.handleEvent,a){var l=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null===(t=e[0].target)||void 0===t?void 0:t.name)===s&&l.apply(void 0,bt([],mt(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=Ko(n)&&n||$o(n)&&n.capture,i=Xo(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=Xo(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new Ta(t,e))},t.prototype.dispatchEvent=function(t){var e,n;if(!(t instanceof jo))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var r=this.ownerDocument||this.document;return r&&(t.manager=(null===(e=r.defaultView)||void 0===e?void 0:e.getEventService())||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t)),!t.defaultPrevented},t}();!function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html",t.MESH="mesh"}(fa||(fa={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(pa||(pa={})),function(t){t.BEVEL="bevel",t.ROUND="round",t.MITER="miter"}(da||(da={})),function(t){t.CAPITALIZE="capitalize",t.UPPERCASE="uppercase",t.LOWERCASE="lowercase",t.NONE="none"}(ya||(ya={})),function(t){t.START="start",t.CENTER="center",t.END="end",t.LEFT="left",t.RIGHT="right"}(va||(va={}));var Ma,ka=l.defineToken("CanvasConfig"),Sa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return ct(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===fa.TEXT&&(n+=this.style.text);try{for(var r=gt(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===fa.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach((function(t){e.removeChild(t,!0)})),this.nodeName===fa.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},e.prototype.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},e.prototype.lookupPrefix=function(t){throw new Error("Method not implemented.")},e.prototype.normalize=function(){throw new Error("Method not implemented.")},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){var n;if(t===this)return 0;if(!(t instanceof e))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var s=o.length>a.length?o:a,u=s===o?a:o;if(s[s.length-u.length]===u[0])return s===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],f=s[c+l];if(f!==h){var p=h.parentNode.childNodes;return p.indexOf(h)<p.indexOf(f)?u===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:s===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(wa),Pa=function(){function t(){}return t.tag="c-geometry",t}(),xa=function(){function t(){this.boundsDirty=!0,this.renderBoundsDirty=!0,this.dirty=!1}return t.tag="c-renderable",t}(),Na=function(){function t(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=a.fromValues(0,0,0),this.localRotation=u.fromValues(0,0,0,1),this.localScale=a.fromValues(1,1,1),this.localTransform=o.create(),this.position=a.fromValues(0,0,0),this.rotation=u.fromValues(0,0,0,1),this.scaling=a.fromValues(1,1,1),this.worldTransform=o.create(),this.origin=a.fromValues(0,0,0)}return t.tag="c-transform",t}();!function(t){t[t.Standard=0]="Standard"}(Ma||(Ma={}));var _a=function(){function t(){this.strategy=Ma.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return t.prototype.isCulled=function(){return this.enable&&!this.visible},t.tag="c-cullable",t}(),Aa=function(){function t(){this.dirty=!1,this.renderOrder=0}return t.tag="c-sortable",t}(),Oa=0,Ca=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sceneGraphService=ot.get(kf),e.entity=Oa++,e.renderable=new xa,e.cullable=new _a,e.transformable=new Na,e.sortable=new Aa,e.geometry=new Pa,e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return ct(e,t),e.isElement=function(t){return!!t.getAttribute},Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter((function(t){return""!==t}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),this.emit(So.CHILD_INSERTED,{child:t}),t.dispatchEvent(new Go(So.INSERTED,this,"","","",0,"","")),t},e.prototype.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),t.dispatchEvent(new Go(So.REMOVED,this,"","","",0,"","")),e&&(t.emit(So.DESTROY,{}),t.destroyed=!0),this.emit(So.CHILD_REMOVED,{child:t}),this.sceneGraphService.detach(t),e&&t.emitter.removeAllListeners(),t},e.prototype.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},e.prototype.matches=function(t){return this.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return this.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach((function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)}))}},e.prototype.before=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this),i=mt(e),o=i[0],a=i.slice(1);this.parentNode.appendChild(o,r),(t=o).after.apply(t,bt([],mt(a),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,bt([],mt(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){return t.appendChild(e)}))},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e,n){return t.appendChild(e,n)}))},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,bt([],mt(t),!1))},e.prototype.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},e.prototype.destroy=function(){this.emit(So.DESTROY,{}),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return this.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){var e=mt(sf(t.toString(),""),1)[0],n=this.attributes[e];return qo(n)?null:n},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){void 0===n&&(n=!1),this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.getAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.setAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},e.prototype.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},e}(Sa),Ia=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return ct(e,t),e}(jo),Ra=0,Da=function(){function t(t,e){this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(Ra++),this._inEffect=!!this.effect.update(0),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this.totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this.totalDuration:0,this._startTime=this.totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this.totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this.totalDuration}},t.prototype.persist=function(){throw new Error("Method not implemented.")},t.prototype.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.dispatchEvent=function(t){throw new Error("Method not implemented.")},t.prototype.commitStyles=function(){throw new Error("Method not implemented.")},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this.totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new Ia(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new Ia(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}();function La(t,e){return Number(t.id)-Number(e.id)}var Fa=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(La),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t){var e=new Da(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(La),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?u.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,bt([],mt(a),!1)),(i=this.pendingEffects).push.apply(i,bt([],mt(s),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),Va="function"==typeof Float32Array,Ba=function(t,e){return 1-3*e+3*t},ja=function(t,e){return 3*e-6*t},Ga=function(t){return 3*t},Ua=function(t,e,n){return((Ba(e,n)*t+ja(e,n))*t+Ga(e))*t},za=function(t,e,n){return 3*Ba(e,n)*t*t+2*ja(e,n)*t+Ga(e)},Ha=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=Va?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=Ua(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;--o;var a=r+.1*((e-i[o])/(i[o+1]-i[o])),s=za(a,t,n);return s>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=za(e,n,r);if(0===o)return e;e-=(Ua(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=Ua(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:Ua(a(t),e,r)}},Wa=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?t.substr(1):t},qa=function(t,e,n){return Math.min(Math.max(t,e),n)},Ya=function(t){return Math.pow(t,2)},Xa=function(t){return Math.pow(t,3)},Ka=function(t){return Math.pow(t,4)},$a=function(t){return Math.pow(t,5)},Za=function(t){return Math.pow(t,6)},Ja=function(t){return 1-Math.cos(t*Math.PI/2)},Qa=function(t){return 1-Math.sqrt(1-t*t)},ts=function(t){return t*t*(3*t-2)},es=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},ns=function(t,e){void 0===e&&(e=[]);var n=mt(e,2),r=n[0],i=void 0===r?1:r,o=n[1],a=void 0===o?.5:o,s=qa(Number(i),1,10),u=qa(Number(a),.1,2);return 0===t||1===t?t:-s*Math.pow(2,10*(t-1))*Math.sin((t-1-u/(2*Math.PI)*Math.asin(1/s))*(2*Math.PI)/u)},rs=function(t,e,n){void 0===e&&(e=[]);var r=mt(e,4),i=r[0],o=void 0===i?1:i,a=r[1],s=void 0===a?100:a,u=r[2],c=void 0===u?10:u,l=r[3],h=void 0===l?0:l;o=qa(o,.1,1e3),s=qa(s,.1,1e3),c=qa(c,.1,1e3),h=qa(h,.1,1e3);var f=Math.sqrt(s/o),p=c/(2*Math.sqrt(s*o)),d=p<1?f*Math.sqrt(1-p*p):0,y=p<1?(p*f-h)/d:-h+f,v=n?n*t/1e3:t;return v=p<1?Math.exp(-v*p*f)*(1*Math.cos(d*v)+y*Math.sin(d*v)):(1+y*v)*Math.exp(-v*f),0===t||1===t?t:1-v},is=(new Map,function(t,e){void 0===e&&(e=[]);var n=mt(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(qa(t,0,1)*i)/i}),os=function(t,e){void 0===e&&(e=[]);var n=mt(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return Ha(r,i,o,a)(t)},as=Ha(.42,0,1,1),ss=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},us=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},cs=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},ls={steps:is,"step-start":function(t){return is(t,[1,"start"])},"step-end":function(t){return is(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":os,ease:function(t){return os(t,[.25,.1,.25,1])},in:as,out:ss(as),"in-out":us(as),"out-in":cs(as),"in-quad":Ya,"out-quad":ss(Ya),"in-out-quad":us(Ya),"out-in-quad":cs(Ya),"in-cubic":Xa,"out-cubic":ss(Xa),"in-out-cubic":us(Xa),"out-in-cubic":cs(Xa),"in-quart":Ka,"out-quart":ss(Ka),"in-out-quart":us(Ka),"out-in-quart":cs(Ka),"in-quint":$a,"out-quint":ss($a),"in-out-quint":us($a),"out-in-quint":cs($a),"in-expo":Za,"out-expo":ss(Za),"in-out-expo":us(Za),"out-in-expo":cs(Za),"in-sine":Ja,"out-sine":ss(Ja),"in-out-sine":us(Ja),"out-in-sine":cs(Ja),"in-circ":Qa,"out-circ":ss(Qa),"in-out-circ":us(Qa),"out-in-circ":cs(Qa),"in-back":ts,"out-back":ss(ts),"in-out-back":us(ts),"out-in-back":cs(ts),"in-bounce":es,"out-bounce":ss(es),"in-out-bounce":us(es),"out-in-bounce":cs(es),"in-elastic":ns,"out-elastic":ss(ns),"in-out-elastic":us(ns),"out-in-elastic":cs(ns),spring:rs,"spring-in":rs,"spring-out":ss(rs),"spring-in-out":us(rs),"spring-out-in":cs(rs)},hs=function(t){return ls[function(t){return Wa(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||ls.linear},fs=function(t){return t};function ps(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var ds="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",ys=new RegExp("cubic-bezier\\("+ds+","+ds+","+ds+","+ds+"\\)"),vs=/steps\(\s*(\d+)\s*\)/,gs=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function ms(t){var e=ys.exec(t);if(e)return Ha.apply(void 0,bt([],mt(e.slice(1).map(Number)),!1));var n=vs.exec(t);if(n)return ps(Number(n[1]),0);var r=gs.exec(t);return r?ps(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):hs(t)}function bs(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function Ts(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),u=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}var Es={in:"ease-in",out:"ease-out","in-out":"ease-in-out","in-sine":"cubic-bezier(0.47, 0, 0.745, 0.715)","out-sine":"cubic-bezier(0.39, 0.575, 0.565, 1)","in-out-sine":"cubic-bezier(0.445, 0.05, 0.55, 0.95)","in-quad":"cubic-bezier(0.55, 0.085, 0.68, 0.53)","out-quad":"cubic-bezier(0.25, 0.46, 0.45, 0.94)","in-out-quad":"cubic-bezier(0.455, 0.03, 0.515, 0.955)","in-cubic":"cubic-bezier(0.55, 0.055, 0.675, 0.19)","out-cubic":"cubic-bezier(0.215, 0.61, 0.355, 1)","in-out-cubic":"cubic-bezier(0.645, 0.045, 0.355, 1)","in-quart":"cubic-bezier(0.895, 0.03, 0.685, 0.22)","out-quart":"cubic-bezier(0.165, 0.84, 0.44, 1)","in-out-quart":"cubic-bezier(0.77, 0, 0.175, 1)","in-quint":"cubic-bezier(0.755, 0.05, 0.855, 0.06)","out-quint":"cubic-bezier(0.23, 1, 0.32, 1)","in-out-quint":"cubic-bezier(0.86, 0, 0.07, 1)","in-expo":"cubic-bezier(0.95, 0.05, 0.795, 0.035)","out-expo":"cubic-bezier(0.19, 1, 0.22, 1)","in-out-expo":"cubic-bezier(1, 0, 0, 1)","in-circ":"cubic-bezier(0.6, 0.04, 0.98, 0.335)","out-circ":"cubic-bezier(0.075, 0.82, 0.165, 1)","in-out-circ":"cubic-bezier(0.785, 0.135, 0.15, 0.86)","in-back":"cubic-bezier(0.6, -0.28, 0.735, 0.045)","out-back":"cubic-bezier(0.175, 0.885, 0.32, 1.275)","in-out-back":"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},ws=(Object.keys(Es),function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=fs,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=ms(t),this._easing=t},enumerable:!1,configurable:!0}),t}());function Ms(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(null!=a){if(a<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}else r=!1}return n=n.filter((function(t){return Number(t.offset)>=0&&Number(t.offset)<=1})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var s=Number(n[a].computedOffset);if(null!=s&&null!=o){for(var u=1;u<a-i;u++)n[i+u].computedOffset=o+(s-o)*u/(a-i);i=a,o=s}}}(),n}var ks="backwards|forwards|both|none".split("|"),Ss="reverse|alternate|alternate-reverse".split("|");function Ps(t,e){var n=new ws;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(void 0!==t[e]&&null!==t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===ks.indexOf(t[e]))return;if("direction"===e&&-1===Ss.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function xs(t,e){return Ps(t=Ns(null!=t?t:{duration:"auto"}),e)}function Ns(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var _s=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=xs(n,!1),this.timing.effect=this,this.timing.activeDuration=bs(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Ms(e,this.timing),this.interpolations=ef(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=Ts(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=Ms(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),As={anchor:[0,0],opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"0",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:""},Os=function(t){function e(e){var n,r,i,o=this;return(o=t.call(this)||this).styleValueRegistry=ot.get(ga),o.activeAnimations=[],o.config=e,o.config.interactive=null!==(n=o.config.capture)&&void 0!==n?n:o.config.interactive,o.id=o.config.id||"",o.name=o.config.name||"",(o.config.className||o.config.class)&&(o.className=o.config.className||o.config.class),o.nodeName=o.config.type||fa.GROUP,o.config.style=lt(lt(lt(lt({},As),{zIndex:null!==(r=o.config.zIndex)&&void 0!==r?r:0,interactive:null===(i=o.config.interactive)||void 0===i||i}),o.config.style),o.config.attrs),null!=o.config.visible&&(o.config.style.visibility=!1===o.config.visible?"hidden":"visible"),null!=o.config.interactive&&(o.config.style.pointerEvents=!1===o.config.interactive?"none":"auto"),o.style=new Proxy(lt(lt({},o.attributes),{setProperty:function(t,e){o.setAttribute(t,e)},getPropertyValue:function(t){return o.getAttribute(t)},removeProperty:function(t){o.removeAttribute(t)},item:function(){return""}}),{get:function(t,e){return e in t?t[e]:o.getAttribute(e)},set:function(t,e,n){return o.setAttribute(e,n),!0}}),o.initAttributes(o.config.style),ot.get(Et).add(o.entity,o),o}return ct(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),ot.get(Et).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},e.prototype.cloneNode=function(t){var e=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:lt({},this.attributes)});return t&&this.children.forEach((function(n){var r=n.cloneNode(t);e.appendChild(r)})),e},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t),e.dirty=!0},e.prototype.setAttribute=function(e,n,r){void 0===r&&(r=!1);var i=mt(sf(e,n),2),o=i[0],a=i[1];Wo(n)||(r||a!=this.attributes[o])&&(this.internalSetAttribute(o,a),t.prototype.setAttribute.call(this,o,a))},e.prototype.internalSetAttribute=function(t,e,n){var r,i=this;void 0===n&&(n={});var o=this.renderable,a=this.attributes[t],s=this.parsedStyle[t];this.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&this.attributes.clipPathTargets.forEach((function(t){wf(t),t.dispatchEvent(new Go(So.ATTR_MODIFIED,t,i,i,"clipPath",Go.MODIFICATION,i,i))})),o.dirty=!0,this.dispatchEvent(new Go(So.ATTR_MODIFIED,this,a,e,t,Go.MODIFICATION,s,this.parsedStyle[t]))},e.prototype.getBBox=function(){var t=this.getBounds(),e=mt(t.getMin(),2),n=e[0],r=e[1],i=mt(t.getMax(),2),o=i[0],a=i[1];return new Ro(n,r,o-n,a-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,Qo(t,e,n)),this},e.prototype.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,Qo(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,Qo(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,Qo(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,Qo(t,e,n)),this},e.prototype.getPosition=function(){return this.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Qo(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Qo(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return this.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var t=mt(ua(a.create(),this.sceneGraphService.getWorldTransform(this)),3);t[0],t[1];return ea(t[2])},e.prototype.getLocalEulerAngles=function(){var t=mt(ua(a.create(),this.sceneGraphService.getLocalRotation(this)),3);t[0],t[1];return ea(t[2])},e.prototype.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return qo(e)&&qo(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return qo(e)&&qo(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.getRotation=function(){return this.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return this.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&(i=null===(r=this.attributes.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return delete this.parsedStyle.transform,i?i.play(new _s(this,t,e)):null},e.prototype.show=function(){this.style.visibility="visible"},e.prototype.hide=function(){this.style.visibility="hidden"},e.prototype.isVisible=function(){var t,e;return"visible"===(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)||void 0===e?void 0:e.value)},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t,e;return"none"!==(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)||void 0===e?void 0:e.value)},e.prototype.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,bt([],mt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,bt([],mt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))-1),this},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.getClip=function(){return this.style.clipPath||null},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=mt(e,2),i=r[0],o=r[1];return i?$o(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e.prototype.getMatrix=function(t){var e=t||this.getWorldTransform(),n=mt(o.getTranslation(a.create(),e),2),r=n[0],i=n[1],s=mt(o.getScaling(a.create(),e),2),c=s[0],l=s[1],h=o.getRotation(u.create(),e),f=mt(ua(a.create(),h),3),p=f[0],d=(f[1],f[2]);return ca(p||d,r,i,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=mt(ha(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=mt(ha(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e}(Ca),Cs=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ht(e,["style"]);return(n=t.call(this,lt({style:lt({x:"",y:""},r)},i))||this).handleMounted=function(t){t.target===t.currentTarget&&n.connectedCallback&&n.connectedCallback()},n.handleUnmounted=function(t){t.target===t.currentTarget&&n.disconnectedCallback&&n.disconnectedCallback()},n.handleAttributeChanged=function(t){if(t.target===n){var e=t.attrName,r=t.prevValue,i=t.newValue;n.attributeChangedCallback&&n.attributeChangedCallback(e,r,i)}},n.attributeChangedCallback&&n.addEventListener(So.ATTR_MODIFIED,n.handleAttributeChanged),n.connectedCallback&&n.addEventListener(So.MOUNTED,n.handleMounted),n.disconnectedCallback&&n.addEventListener(So.UNMOUNTED,n.handleUnmounted),n}return ct(e,t),e}(Os),Is=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.CIRCLE,style:lt({cx:"",cy:"",r:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return ct(e,t),e}(Os),Rs=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.ELLIPSE,style:lt({cx:"",cy:"",rx:"",ry:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return ct(e,t),e}(Os),Ds=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.GROUP,style:lt({x:"",y:"",width:"",height:""},n)},r))||this}return ct(e,t),e}(Os),Ls=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.IMAGE,style:lt({x:"",y:"",img:"",width:"",height:"",lineWidth:"0"},n)},r))||this}return ct(e,t),e}(Os);function Fs(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Vs(t,e){return Math.abs(t-e)<.001}function Bs(t,e){var n=Math.min.apply(Math,bt([],mt(t),!1)),r=Math.min.apply(Math,bt([],mt(e),!1));return{x:n,y:r,width:Math.max.apply(Math,bt([],mt(t),!1))-n,height:Math.max.apply(Math,bt([],mt(e),!1))-r}}function js(t){return(t+2*Math.PI)%(2*Math.PI)}var Gs={box:function(t,e,n,r){return Bs([t,n],[e,r])},length:function(t,e,n,r){return Fs(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Fs(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Fs(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(c.exactEquals(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];c.normalize(s,s);var u=[i-t,o-e];return Math.abs(c.dot(u,s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Us(t,e,n,r,i,o){var a=-1,s=1/0,u=[n,r],c=20;o&&o>200&&(c=o/10);for(var l=1/c,h=l/10,f=0;f<=c;f++){var p=f*l,d=[i.apply(void 0,bt([],mt(t.concat([p])),!1)),i.apply(void 0,bt([],mt(e.concat([p])),!1))];(m=Fs(u[0],u[1],d[0],d[1]))<s&&(a=p,s=m)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}s=1/0;for(f=0;f<32&&!(h<1e-4);f++){var v=a-h,g=a+h,m=(d=[i.apply(void 0,bt([],mt(t.concat([v])),!1)),i.apply(void 0,bt([],mt(e.concat([v])),!1))],Fs(u[0],u[1],d[0],d[1]));if(v>=0&&m<s)a=v,s=m;else{var b=[i.apply(void 0,bt([],mt(t.concat([g])),!1)),i.apply(void 0,bt([],mt(e.concat([g])),!1))],T=Fs(u[0],u[1],b[0],b[1]);g<=1&&T<s?(a=g,s=T):h*=.5}}return{x:i.apply(void 0,bt([],mt(t.concat([a])),!1)),y:i.apply(void 0,bt([],mt(e.concat([a])),!1))}}function zs(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function Hs(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function Ws(t,e,n,r){var i,o,a,s=-3*t+9*e-9*n+3*r,u=6*t-12*e+6*n,c=3*e-3*t,l=[];if(Vs(s,0))Vs(u,0)||(i=-c/u)>=0&&i<=1&&l.push(i);else{var h=u*u-4*s*c;Vs(h,0)?l.push(-u/(2*s)):h>0&&(o=(-u-(a=Math.sqrt(h)))/(2*s),(i=(-u+a)/(2*s))>=0&&i<=1&&l.push(i),o>=0&&o<=1&&l.push(o))}return l}function qs(t,e,n,r,i,o,a,s,u){var c=zs(t,n,i,a,u),l=zs(e,r,o,s,u),h=Gs.pointAt(t,e,n,r,u),f=Gs.pointAt(n,r,i,o,u),p=Gs.pointAt(i,o,a,s,u),d=Gs.pointAt(h.x,h.y,f.x,f.y,u),y=Gs.pointAt(f.x,f.y,p.x,p.y,u);return[[t,e,h.x,h.y,d.x,d.y,c,l],[c,l,y.x,y.y,p.x,p.y,a,s]]}function Ys(t,e,n,r,i,o,a,s,u){if(0===u)return function(t,e){for(var n=0,r=t.length,i=0;i<r;i++){n+=Fs(t[i],e[i],t[(i+1)%r],e[(i+1)%r])}return n/2}([t,n,i,a],[e,r,o,s]);var c=qs(t,e,n,r,i,o,a,s,.5),l=bt(bt([],mt(c[0]),!1),[u-1],!1),h=bt(bt([],mt(c[1]),!1),[u-1],!1);return Ys.apply(void 0,bt([],mt(l),!1))+Ys.apply(void 0,bt([],mt(h),!1))}var Xs={extrema:Ws,box:function(t,e,n,r,i,o,a,s){for(var u=[t,a],c=[e,s],l=Ws(t,n,i,a),h=Ws(e,r,o,s),f=0;f<l.length;f++)u.push(zs(t,n,i,a,l[f]));for(f=0;f<h.length;f++)c.push(zs(e,r,o,s,h[f]));return Bs(u,c)},length:function(t,e,n,r,i,o,a,s){return Ys(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,u,c,l){return Us([t,n,i,a],[e,r,o,s],u,c,zs,l)},pointDistance:function(t,e,n,r,i,o,a,s,u,c,l){var h=this.nearestPoint(t,e,n,r,i,o,a,s,u,c,l);return Fs(h.x,h.y,u,c)},interpolationAt:zs,pointAt:function(t,e,n,r,i,o,a,s,u){return{x:zs(t,n,i,a,u),y:zs(e,r,o,s,u)}},divide:function(t,e,n,r,i,o,a,s,u){return qs(t,e,n,r,i,o,a,s,u)},tangentAngle:function(t,e,n,r,i,o,a,s,u){var c=Hs(t,n,i,a,u),l=Hs(e,r,o,s,u);return js(Math.atan2(l,c))}};function Ks(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=Fs(r[0],r[1],i[0],i[1])}return e}var $s=function(t){return Ks(t)};var Zs,Js,Qs,tu,eu,nu=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.LINE,style:lt({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,lineWidth:1,isBillboard:!1},n)},r))||this}return ct(e,t),e.prototype.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=Gs.pointAt(n.value,r.value,i.value,o.value,t);return new Io(a.x,a.y)},e.prototype.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,i=t.y2;return Gs.length(e.value,n.value,r.value,i.value)},e}(Os),ru=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.PATH,style:lt({path:"",lineWidth:1,miterLimit:4},n)},r))||this}return ct(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.path.totalLength},e.prototype.getPoint=function(t){var e=0,n=0,r=this.parsedStyle.path.curve;if(!this.parsedStyle.path.curveSegments.length)return r?new Io(r[0][1],r[0][2]):null;this.parsedStyle.path.curveSegments.forEach((function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var i=r[n];if(qo(i)||qo(n))return null;var o=i.length,a=r[n+1],s=Xs.pointAt(i[o-2],i[o-1],a[1],a[2],a[3],a[4],a[5],a[6],e),u=s.x,c=s.y;return new Io(u,c)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},e}(Os),iu=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.POLYGON,style:lt({points:"",miterLimit:4,lineWidth:1},n)},r))||this}return ct(e,t),e}(Os),ou=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.POLYLINE,style:lt({points:"",lineWidth:1,miterLimit:4},n)},r))||this}return ct(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPoint=function(t){var e=this.parsedStyle.points,n=e.points,r=e.segments,i=0,o=0;r.forEach((function(e,n){t>=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),o=n)}));var a=Gs.pointAt(n[o][0],n[o][1],n[o+1][0],n[o+1][1],i),s=a.x,u=a.y;return new Io(s,u)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(Os),au=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ht(e,["style"]);return t.call(this,lt({type:fa.RECT,style:lt({x:"",y:"",width:"",height:"",radius:"",lineWidth:"0"},n)},r))||this}return ct(e,t),e}(Os),su=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ht(e,["style"]);return(n=t.call(this,lt({type:fa.TEXT,style:lt({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",stroke:"black",letterSpacing:0,lineHeight:0,lineWidth:0,miterLimit:10,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},r)},i))||this).LENGTHADJUST_SPACING=1,n.LENGTHADJUST_SPACINGANDGLYPHS=2,n.LENGTHADJUST_UNKNOWN=0,n}return ct(e,t),e.prototype.getCharNumAtPosition=function(t){throw new Error("Method not implemented.")},e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getEndPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getExtentOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getNumberOfChars=function(){throw new Error("Method not implemented.")},e.prototype.getRotationOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getStartPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getSubStringLength=function(t,e){throw new Error("Method not implemented.")},e.prototype.selectSubString=function(t,e){throw new Error("Method not implemented.")},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e}(Os),uu=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ht(e,["style"]);return(n=t.call(this,lt({type:fa.HTML,style:lt({x:"",y:"",width:"",height:"",innerHTML:""},r)},i))||this).cullable.enable=!1,n}return ct(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,s=new Eo;return s.setMinMax(a.fromValues(i,o,0),a.fromValues(i+n.width,o+n.height,0)),s}return null},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=o.invert(o.create(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Eo.isEmpty(e)){var n=new Eo;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(Os);!function(t){t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kExs=4]="kExs",t[t.kPixels=5]="kPixels",t[t.kCentimeters=6]="kCentimeters",t[t.kMillimeters=7]="kMillimeters",t[t.kInches=8]="kInches",t[t.kPoints=9]="kPoints",t[t.kPicas=10]="kPicas",t[t.kQuarterMillimeters=11]="kQuarterMillimeters",t[t.kViewportWidth=12]="kViewportWidth",t[t.kViewportHeight=13]="kViewportHeight",t[t.kViewportInlineSize=14]="kViewportInlineSize",t[t.kViewportBlockSize=15]="kViewportBlockSize",t[t.kViewportMin=16]="kViewportMin",t[t.kViewportMax=17]="kViewportMax",t[t.kSmallViewportWidth=18]="kSmallViewportWidth",t[t.kSmallViewportHeight=19]="kSmallViewportHeight",t[t.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",t[t.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",t[t.kSmallViewportMin=22]="kSmallViewportMin",t[t.kSmallViewportMax=23]="kSmallViewportMax",t[t.kLargeViewportWidth=24]="kLargeViewportWidth",t[t.kLargeViewportHeight=25]="kLargeViewportHeight",t[t.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",t[t.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",t[t.kLargeViewportMin=28]="kLargeViewportMin",t[t.kLargeViewportMax=29]="kLargeViewportMax",t[t.kDynamicViewportWidth=30]="kDynamicViewportWidth",t[t.kDynamicViewportHeight=31]="kDynamicViewportHeight",t[t.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",t[t.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",t[t.kDynamicViewportMin=34]="kDynamicViewportMin",t[t.kDynamicViewportMax=35]="kDynamicViewportMax",t[t.kContainerWidth=36]="kContainerWidth",t[t.kContainerHeight=37]="kContainerHeight",t[t.kContainerInlineSize=38]="kContainerInlineSize",t[t.kContainerBlockSize=39]="kContainerBlockSize",t[t.kContainerMin=40]="kContainerMin",t[t.kContainerMax=41]="kContainerMax",t[t.kRems=42]="kRems",t[t.kChs=43]="kChs",t[t.kUserUnits=44]="kUserUnits",t[t.kDegrees=45]="kDegrees",t[t.kRadians=46]="kRadians",t[t.kGradians=47]="kGradians",t[t.kTurns=48]="kTurns",t[t.kMilliseconds=49]="kMilliseconds",t[t.kSeconds=50]="kSeconds",t[t.kHertz=51]="kHertz",t[t.kKilohertz=52]="kKilohertz",t[t.kDotsPerPixel=53]="kDotsPerPixel",t[t.kDotsPerInch=54]="kDotsPerInch",t[t.kDotsPerCentimeter=55]="kDotsPerCentimeter",t[t.kFraction=56]="kFraction",t[t.kInteger=57]="kInteger",t[t.kQuirkyEms=58]="kQuirkyEms"}(Zs||(Zs={})),function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUFrequency=5]="kUFrequency",t[t.kUResolution=6]="kUResolution",t[t.kUOther=7]="kUOther"}(Js||(Js={})),function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"}(Qs||(Qs={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(tu||(tu={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(eu||(eu={}));var cu,lu=[{name:"em",unit_type:Zs.kEms},{name:"px",unit_type:Zs.kPixels},{name:"deg",unit_type:Zs.kDegrees},{name:"rad",unit_type:Zs.kRadians},{name:"grad",unit_type:Zs.kGradians},{name:"ms",unit_type:Zs.kMilliseconds},{name:"s",unit_type:Zs.kSeconds},{name:"rem",unit_type:Zs.kRems},{name:"turn",unit_type:Zs.kTurns}];!function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"}(cu||(cu={}));var hu,fu,pu=function(){function t(){}return t.parse=function(t,e){return[][0]},t.parseAll=function(t,e){return[]},t.unitFromName=function(t){return t?"number"===t?Zs.kNumber:"percent"===t||"%"===t?Zs.kPercentage:this.stringToUnitType(t):Zs.kUnknown},t.unitTypeToUnitCategory=function(t){switch(t){case Zs.kNumber:case Zs.kInteger:return Js.kUNumber;case Zs.kPercentage:return Js.kUPercent;case Zs.kPixels:case Zs.kCentimeters:case Zs.kMillimeters:case Zs.kQuarterMillimeters:case Zs.kInches:case Zs.kPoints:case Zs.kPicas:case Zs.kUserUnits:return Js.kULength;case Zs.kMilliseconds:case Zs.kSeconds:return Js.kUTime;case Zs.kDegrees:case Zs.kRadians:case Zs.kGradians:case Zs.kTurns:return Js.kUAngle;case Zs.kHertz:case Zs.kKilohertz:return Js.kUFrequency;case Zs.kDotsPerPixel:case Zs.kDotsPerInch:case Zs.kDotsPerCentimeter:return Js.kUResolution;default:return Js.kUOther}},t.unitTypeToString=function(t){switch(t){case Zs.kNumber:case Zs.kInteger:case Zs.kUserUnits:return"";case Zs.kPercentage:return"%";case Zs.kEms:case Zs.kQuirkyEms:return"em";case Zs.kRems:return"rem";case Zs.kPixels:return"px";case Zs.kDegrees:return"deg";case Zs.kRadians:return"rad";case Zs.kGradians:return"grad";case Zs.kMilliseconds:return"ms";case Zs.kSeconds:return"s";case Zs.kTurns:return"turn"}return""},t.stringToUnitType=function(t){return lu.find((function(e){return e.name===t})).unit_type},t.canonicalUnitTypeForCategory=function(t){switch(t){case Js.kUNumber:return Zs.kNumber;case Js.kULength:return Zs.kPixels;case Js.kUPercent:return Zs.kUnknown;case Js.kUTime:return Zs.kSeconds;case Js.kUAngle:return Zs.kDegrees;case Js.kUFrequency:return Zs.kHertz;case Js.kUResolution:return Zs.kDotsPerPixel;default:return Zs.kUnknown}},t.conversionToCanonicalUnitsScaleFactor=function(t){var e=1;switch(t){case Zs.kPixels:case Zs.kUserUnits:case Zs.kDegrees:case Zs.kSeconds:case Zs.kHertz:break;case Zs.kMilliseconds:e=.001;break;case Zs.kCentimeters:case Zs.kDotsPerCentimeter:case Zs.kMillimeters:case Zs.kQuarterMillimeters:case Zs.kInches:case Zs.kDotsPerInch:case Zs.kPoints:case Zs.kPicas:break;case Zs.kRadians:e=180/Math.PI;break;case Zs.kGradians:e=.9;break;case Zs.kTurns:e=360;break;case Zs.kKilohertz:e=1e3}return e},t.isAngle=function(t){return t===Zs.kDegrees||t===Zs.kRadians||t===Zs.kGradians||t===Zs.kTurns},t.isViewportPercentageLength=function(t){return t>=Zs.kViewportWidth&&t<=Zs.kDynamicViewportMax},t.isContainerPercentageLength=function(t){return t>=Zs.kContainerWidth&&t<=Zs.kContainerMax},t.isLength=function(t){return t>=Zs.kEms&&t<=Zs.kUserUnits||t==Zs.kQuirkyEms},t.isRelativeUnit=function(t){return t===Zs.kPercentage||t===Zs.kEms||t===Zs.kExs||t===Zs.kRems||t===Zs.kChs||this.isViewportPercentageLength(t)||this.isContainerPercentageLength(t)},t.isTime=function(t){return t===Zs.kSeconds||t===Zs.kMilliseconds},t.isFrequency=function(t){return t==Zs.kHertz||t==Zs.kKilohertz},t.isResolution=function(t){return t>=Zs.kDotsPerPixel&&t<=Zs.kDotsPerCentimeter},t.isFlex=function(t){return t===Zs.kFraction},t.prototype.toString=function(){return this.buildCSSText(tu.kNo,eu.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=cu.kUnitType&&this.getType()<=cu.kClampType},t}(),du=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return ct(e,t),e.prototype.getType=function(){return cu.kColorType},e.prototype.to=function(t){return this},e}(pu),yu=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return ct(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return cu.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(pu);function vu(t){return t===hu.kMin||t===hu.kMax||t===hu.kClamp}function gu(t){switch(Ho(t,Zs.kNumber),t){case Zs.kEms:case Zs.kExs:case Zs.kPixels:case Zs.kCentimeters:case Zs.kMillimeters:case Zs.kQuarterMillimeters:case Zs.kInches:case Zs.kPoints:case Zs.kPicas:case Zs.kUserUnits:case Zs.kViewportWidth:case Zs.kViewportHeight:case Zs.kViewportInlineSize:case Zs.kViewportBlockSize:case Zs.kViewportMin:case Zs.kViewportMax:case Zs.kSmallViewportWidth:case Zs.kSmallViewportHeight:case Zs.kSmallViewportInlineSize:case Zs.kSmallViewportBlockSize:case Zs.kSmallViewportMin:case Zs.kSmallViewportMax:case Zs.kLargeViewportWidth:case Zs.kLargeViewportHeight:case Zs.kLargeViewportInlineSize:case Zs.kLargeViewportBlockSize:case Zs.kLargeViewportMin:case Zs.kLargeViewportMax:case Zs.kDynamicViewportWidth:case Zs.kDynamicViewportHeight:case Zs.kDynamicViewportInlineSize:case Zs.kDynamicViewportBlockSize:case Zs.kDynamicViewportMin:case Zs.kDynamicViewportMax:case Zs.kContainerWidth:case Zs.kContainerHeight:case Zs.kContainerInlineSize:case Zs.kContainerBlockSize:case Zs.kContainerMin:case Zs.kContainerMax:case Zs.kRems:case Zs.kChs:return fu.kLength;case Zs.kMilliseconds:case Zs.kSeconds:return fu.kTime;case Zs.kDegrees:case Zs.kRadians:case Zs.kGradians:case Zs.kTurns:return fu.kAngle;case Zs.kHertz:case Zs.kKilohertz:return fu.kFrequency;case Zs.kDotsPerPixel:case Zs.kDotsPerInch:case Zs.kDotsPerCentimeter:return fu.kResolution;case Zs.kFraction:return fu.kFlex;case Zs.kPercentage:return fu.kPercent;default:return fu.kLength}}function mu(t){switch(t){case fu.kLength:return"length";case fu.kAngle:return"angle";case fu.kTime:return"time";case fu.kFrequency:return"frequency";case fu.kResolution:return"resolution";case fu.kFlex:return"flex";case fu.kPercent:return"percent"}return""}!function(t){t.kAdd="+",t.kSubtract="-",t.kMultiply="*",t.kDivide="/",t.kMin="min",t.kMax="max",t.kClamp="clamp",t.kInvalid=""}(hu||(hu={})),function(t){t[t.kLength=0]="kLength",t[t.kAngle=1]="kAngle",t[t.kTime=2]="kTime",t[t.kFrequency=3]="kFrequency",t[t.kResolution=4]="kResolution",t[t.kFlex=5]="kFlex",t[t.kPercent=6]="kPercent",t[t.kNumBaseTypes=7]="kNumBaseTypes"}(fu||(fu={}));var bu=function(){function t(t,e){void 0===t&&(t=Zs.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=fu.kPercent,this.hasPercentHint=!1,this.exponents=new Array(fu.kNumBaseTypes).fill(0),t!==Zs.kNumber&&this.setExponent(gu(t),e)}return t.prototype.applyPercentHint=function(t){Ho(t,fu.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(fu.kPercent)),this.setExponent(fu.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},t.prototype.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},t.prototype.isOnlyNonZeroEntry=function(t,e){return Ho(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},t.prototype.exponent=function(t){return this.exponents[t]},t.prototype.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},t.prototype.matchesBaseType=function(t){return Ho(t,fu.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},t.prototype.matchesPercentage=function(){return this.isOnlyNonZeroEntry(fu.kPercent,1)},t.prototype.matchesBaseTypePercentage=function(t){return Ho(t,fu.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(fu.kPercent,1)},t.prototype.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},t.prototype.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(fu.kPercent,1)},t.add=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint),zo(t.percentHint,e.percentHint);for(var r=0;r<fu.kNumBaseTypes;++r){var i=r;if(t.exponents[r]!==e.exponents[r]&&(i!==fu.kPercent&&(t.applyPercentHint(i),e.applyPercentHint(i)),t.exponents[r]!==e.exponents[r]))return!0,t}return!1,t},t.multiply=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<fu.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}return!1,t},t}(),Tu=function(t){function e(e){var n=t.call(this)||this;return n.type_=e,n}return ct(e,t),e.fromNumberish=function(t){return"number"==typeof t?new Pu(t,Zs.kNumber):t},e.fromPercentish=function(t){return"number"==typeof t?new Pu(100*t,Zs.kPercentage):t},e.prototype.getType=function(){return cu.kUnknownType},e.prototype.equals=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Eu(e);return r.every((function(e){return t.equals(e)}))},e.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Eu(t);wu(cu.kSumType,n,this);var r=ku(n,hu.kAdd);return r||Du.create(n)},e.prototype.sub=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Eu(t);n=n.map((function(t){return t.negate()})),wu(cu.kSumType,n,this);var r=ku(n,hu.kAdd);return r||Du.create(n)},e.prototype.mul=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Eu(t);wu(cu.kProductType,n,this);var r=Su(n);return r||Lu.create(n)},e.prototype.div=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Eu(t);n=n.map((function(t){return t.invert()})),wu(cu.kProductType,n,this);var r=Su(n);return r||Lu.create(n)},e.prototype.min=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Eu(t);wu(cu.kMinType,n,this);var r=ku(n,hu.kMin);return r||Iu.create(n)},e.prototype.max=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Eu(t);wu(cu.kMaxType,n,this);var r=ku(n,hu.kMax);return r||Ru.create(n)},e.prototype.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=Mu(e[0]);return r?(n="string"==typeof t?Pu.unitFromName(t):t,r.convertTo(n)):null},e.prototype.toSum=function(){for(var t,n,r,i,o,a,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];try{for(var c=gt(s),l=c.next();!l.done;l=c.next()){var h=l.value;if(!e.isValidUnit(e.unitFromName(h)))return null}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}var f=this.sumValue();if(!f.length)return null;var p=[];try{for(var d=gt(f),y=d.next();!y.done;y=d.next()){var v=y.value,g=Mu(v);if(!g)return null;p.push(g)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}if(0===s.length){p.sort((function(t,e){return t.unit-e.unit}));var m=Du.create(p);return Uo(!!m),m}var b=[],T=function(t){var n=e.unitFromName(t);Uo(e.isValidUnit(n));var r=p.reduce((function(t,e,r){if(e){var i=e.convertTo(n);i&&(t+=i.value,p[r]=null)}return t}),0);b.push(new Pu(r,n))};try{for(var E=gt(s),w=E.next();!w.done;w=E.next()){T(h=w.value)}}catch(t){o={error:t}}finally{try{w&&!w.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}if(p.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return Du.create(b)},e.prototype.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(fu.kLength);return e&&(t.length=e),(e=this.type_.exponent(fu.kAngle))&&(t.angle=e),(e=this.type_.exponent(fu.kTime))&&(t.time=e),(e=this.type_.exponent(fu.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(fu.kResolution))&&(t.resolution=e),(e=this.type_.exponent(fu.kFlex))&&(t.flex=e),(e=this.type_.exponent(fu.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=mu(this.type_.percentHint)),t},e.isValidUnit=function(t){return t!==Zs.kUserUnits&&!!(t===Zs.kNumber||t==Zs.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t)||this.isFrequency(t)||this.isResolution(t)||this.isFlex(t))},e.prototype.negate=function(){return _u.create(this)},e.prototype.invert=function(){return Nu.create(this)},e}(pu);function Eu(t){return t.map(Tu.fromNumberish)}function wu(t,e,n){Uo(!!n),n.getType()===t?e.unshift.apply(e,bt([],mt(n.numericValues()),!1)):e.unshift(n)}function Mu(t){return 0===Object.keys(t.units).length?new Pu(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Pu(t.value,Number(Object.keys(t.units)[0])):null}function ku(t,e){Uo(!!t.length);var n=t[0]instanceof Pu?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof Pu?t[i]:null;if(!o||o.unit!==n.unit)return null;e===hu.kAdd?r+=o.value:e===hu.kMax?r=Math.max(r,o.value):e===hu.kMin&&(r=Math.min(r,o.value))}return new Pu(r,n.unit)}function Su(t){Uo(!!t.length);for(var e=Zs.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Pu?t[r]:null;if(!i)return null;if(i.unit!==Zs.kNumber){if(e!==Zs.kNumber)return null;e=i.unit}n*=i.value}return new Pu(n,e)}var Pu=function(t){function e(n,r){void 0===r&&(r=Zs.kNumber);var i,o=this;return i="string"==typeof r?e.unitFromName(r):r,Uo(e.isValidUnit(i)),(o=t.call(this,new bu(i))||this).unit=i,o.value=n,o}return ct(e,t),e.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},e.toCanonicalUnitIfPossible=function(t){var e=this.toCanonicalUnit(t);return e===Zs.kUnknown?t:e},e.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Uo(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},e.formatNumber=function(t,e){return void 0===e&&(e=""),t+e},e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=e.toCanonicalUnit(this.unit);if(n!==e.toCanonicalUnit(t)||n===Zs.kUnknown)return null;var r=pu.conversionToCanonicalUnitsScaleFactor(this.unit)/pu.conversionToCanonicalUnitsScaleFactor(t);return new e(this.value*r,t)},e.prototype.equals=function(t){var e=t;return this.value===e.value&&this.unit===e.unit},e.prototype.getType=function(){return cu.kUnitType},e.prototype.sumValue=function(){var t=[],n={};return this.unit!==Zs.kNumber&&(n[e.toCanonicalUnitIfPossible(this.unit)]=1),t.push({value:this.value*pu.conversionToCanonicalUnitsScaleFactor(this.unit),units:n}),t},e.prototype.negate=function(){return new e(-this.value,this.unit)},e.prototype.invert=function(){return this.unit===Zs.kNumber?0===this.value?null:new e(1/this.value,this.unit):Nu.create(this)},e.prototype.buildCSSText=function(t,n,r){var i;switch(this.unit){case Zs.kUnknown:break;case Zs.kInteger:i=Number(this.value).toFixed(0);break;case Zs.kNumber:case Zs.kPercentage:case Zs.kEms:case Zs.kQuirkyEms:case Zs.kExs:case Zs.kRems:case Zs.kChs:case Zs.kPixels:case Zs.kCentimeters:case Zs.kDotsPerPixel:case Zs.kDotsPerInch:case Zs.kDotsPerCentimeter:case Zs.kMillimeters:case Zs.kQuarterMillimeters:case Zs.kInches:case Zs.kPoints:case Zs.kPicas:case Zs.kUserUnits:case Zs.kDegrees:case Zs.kRadians:case Zs.kGradians:case Zs.kMilliseconds:case Zs.kSeconds:case Zs.kHertz:case Zs.kKilohertz:case Zs.kTurns:case Zs.kFraction:case Zs.kViewportWidth:case Zs.kViewportHeight:case Zs.kViewportInlineSize:case Zs.kViewportBlockSize:case Zs.kViewportMin:case Zs.kViewportMax:case Zs.kSmallViewportWidth:case Zs.kSmallViewportHeight:case Zs.kSmallViewportInlineSize:case Zs.kSmallViewportBlockSize:case Zs.kSmallViewportMin:case Zs.kSmallViewportMax:case Zs.kLargeViewportWidth:case Zs.kLargeViewportHeight:case Zs.kLargeViewportInlineSize:case Zs.kLargeViewportBlockSize:case Zs.kLargeViewportMin:case Zs.kLargeViewportMax:case Zs.kDynamicViewportWidth:case Zs.kDynamicViewportHeight:case Zs.kDynamicViewportInlineSize:case Zs.kDynamicViewportBlockSize:case Zs.kDynamicViewportMin:case Zs.kDynamicViewportMax:case Zs.kContainerWidth:case Zs.kContainerHeight:case Zs.kContainerInlineSize:case Zs.kContainerBlockSize:case Zs.kContainerMin:case Zs.kContainerMax:var o=this.value,a=e.unitTypeToString(this.unit);if(o<-999999||o>999999){var s=e.unitTypeToString(this.unit);i=!Number.isFinite(o)||Number.isNaN(o)?e.formatInfinityOrNaN(o,s):e.formatNumber(o,s)}else i="".concat(o).concat(a)}return r+=i},e}(Tu),xu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ct(e,t),e.prototype.isUnitValue=function(){return!1},e}(Tu),Nu=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="invert",r}return ct(e,t),e.create=function(t){return new e(t,bu.negateExponents(t.type_))},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return cu.kInvertType},e.prototype.equals=function(t){if(t.getType()!==cu.kInvertType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},e.prototype.buildCSSText=function(t,e,n){return e==eu.kNo&&(n+=t===tu.kYes?"(":"calc("),n+="1 / ",n=this.value.buildCSSText(tu.kYes,eu.kNo,n),e===eu.kNo&&(n+=")"),n},e}(xu),_u=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="negate",r}return ct(e,t),e.create=function(t){return new e(t,t.type_)},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return cu.kNegateType},e.prototype.equals=function(t){if(t.getType()!==cu.kNegateType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},e.prototype.buildCSSText=function(t,e,n){return e==eu.kNo&&(n+=t===tu.kYes?"(":"calc("),n+="-",n=this.value.buildCSSText(tu.kYes,eu.kNo,n),e===eu.kNo&&(n+=")"),n},e}(xu);function Au(t,e,n){for(var r=t[0].type_,i=1;i<t.length;i++)r=e(r,t[i].type_,!1);return r}var Ou,Cu=function(t){function e(e,n){var r=t.call(this,n)||this;return r.values=e,r}return ct(e,t),e.prototype.numericValues=function(){return this.values},e.prototype.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(xu),Iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="min",e}return ct(e,t),e.create=function(t){return new e(t,Au(t,bu.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return cu.kMinType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=gt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="min(";var o=!0;try{for(var a=gt(this.numericValues()),s=a.next();!s.done;s=a.next()){var u=s.value;o||(n+=", "),o=!1,n=u.buildCSSText(tu.kYes,eu.kYes,n)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Cu),Ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="max",e}return ct(e,t),e.create=function(t){return new e(t,Au(t,bu.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return cu.kMaxType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=gt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="max(";var o=!0;try{for(var a=gt(this.numericValues()),s=a.next();!s.done;s=a.next()){var u=s.value;o||(n+=", "),o=!1,n=u.buildCSSText(tu.kYes,eu.kYes,n)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Cu),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="sum",e}return ct(e,t),e.create=function(t){return new e(t,Au(t,bu.add))},e.numericTypeFromUnitMap=function(t){var e=new bu;return Object.keys(t).forEach((function(n){var r=t[n];e=bu.multiply(e,new bu(Number(n),r),!1),Uo(!0)})),e},e.canCreateNumericTypeFromSumValue=function(t){var e=this;Uo(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return bu.add(n,e.numericTypeFromUnitMap(t.units),!1),!0}))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return cu.kSumType},e.prototype.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(lt({},e)):t[n].value+=e.value}))})),e.canCreateNumericTypeFromSumValue(t)?t:null},e.prototype.buildCSSText=function(t,e,n){e==eu.kNo&&(n+=t===tu.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(tu.kYes,eu.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===cu.kNegateType?(n+=" - ",n=o.value.buildCSSText(tu.kYes,eu.kNo,n)):(n+=" + ",n=o.buildCSSText(tu.kYes,eu.kNo,n))}return e===eu.kNo&&(n+=")"),n},e}(Cu),Lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="product",e}return ct(e,t),e.create=function(t){return new e(t,Au(t,bu.multiply))},e.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Ho(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return cu.kProductType},e.prototype.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(n){var r=n.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(n){i.push({value:t.value*n.value,units:e.multiplyUnitMaps(t.units,n.units)})}))})),t=i})),t},e.prototype.buildCSSText=function(t,e,n){e==eu.kNo&&(n+=t===tu.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(tu.kYes,eu.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===cu.kInvertType?(n+=" / ",n=o.value.buildCSSText(tu.kYes,eu.kNo,n)):(n+=" * ",n=o.buildCSSText(tu.kYes,eu.kNo,n))}return e===eu.kNo&&(n+=")"),n},e}(Cu),Fu=new Pu(0,"px"),Vu=new Pu(0,"deg"),Bu=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return ct(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(du);!function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t[t.Pattern=3]="Pattern"}(Ou||(Ou={}));var ju,Gu=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return ct(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){var r="";return this.type===Ou.LinearGradient?r="linear-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Ou.RadialGradient?r="radial-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Ou.Pattern&&(r="url(".concat(this.value.src,")")),n+r},e.prototype.getType=function(){return cu.kColorType},e}(pu),Uu=function(t){function e(e){var n=t.call(this)||this;return n.transforms=e,n.is2D=e.every((function(t){return t.is2D})),n.length=e.length,n}return ct(e,t),e.prototype.clone=function(){return new e(this.transforms)},e.prototype.getType=function(){return cu.kTransformType},e.prototype.buildCSSText=function(t,e,n){return n+""},e.prototype.toMatrix=function(){},e}(pu);!function(t){t[t.kMatrixType=0]="kMatrixType",t[t.kPerspectiveType=1]="kPerspectiveType",t[t.kRotationType=2]="kRotationType",t[t.kScaleType=3]="kScaleType",t[t.kSkewType=4]="kSkewType",t[t.kSkewXType=5]="kSkewXType",t[t.kSkewYType=6]="kSkewYType",t[t.kTranslationType=7]="kTranslationType"}(ju||(ju={}));var zu=function(t){function e(e,n,r,i){var o=t.call(this,i)||this;return o.x=e,o.y=n,o.z=r,o}return ct(e,t),e.prototype.toMatrix=function(){return null},e}((function(t){this.is2D=t})),Hu=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Wu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function qu(){}var Yu="\\s*([+-]?\\d+)\\s*",Xu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ku="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$u=/^#([0-9a-f]{3,8})$/,Zu=new RegExp("^rgb\\("+[Yu,Yu,Yu]+"\\)$"),Ju=new RegExp("^rgb\\("+[Ku,Ku,Ku]+"\\)$"),Qu=new RegExp("^rgba\\("+[Yu,Yu,Yu,Xu]+"\\)$"),tc=new RegExp("^rgba\\("+[Ku,Ku,Ku,Xu]+"\\)$"),ec=new RegExp("^hsl\\("+[Xu,Ku,Ku]+"\\)$"),nc=new RegExp("^hsla\\("+[Xu,Ku,Ku,Xu]+"\\)$"),rc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ic(){return this.rgb().formatHex()}function oc(){return this.rgb().formatRgb()}function ac(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=$u.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?sc(e):3===n?new lc(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?uc(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?uc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Zu.exec(t))?new lc(e[1],e[2],e[3],1):(e=Ju.exec(t))?new lc(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Qu.exec(t))?uc(e[1],e[2],e[3],e[4]):(e=tc.exec(t))?uc(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ec.exec(t))?dc(e[1],e[2]/100,e[3]/100,1):(e=nc.exec(t))?dc(e[1],e[2]/100,e[3]/100,e[4]):rc.hasOwnProperty(t)?sc(rc[t]):"transparent"===t?new lc(NaN,NaN,NaN,0):null}function sc(t){return new lc(t>>16&255,t>>8&255,255&t,1)}function uc(t,e,n,r){return r<=0&&(t=e=n=NaN),new lc(t,e,n,r)}function cc(t){return t instanceof qu||(t=ac(t)),t?new lc((t=t.rgb()).r,t.g,t.b,t.opacity):new lc}function lc(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hc(){return"#"+pc(this.r)+pc(this.g)+pc(this.b)}function fc(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function pc(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function dc(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vc(t,e,n,r)}function yc(t){if(t instanceof vc)return new vc(t.h,t.s,t.l,t.opacity);if(t instanceof qu||(t=ac(t)),!t)return new vc;if(t instanceof vc)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new vc(a,s,u,t.opacity)}function vc(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function gc(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Hu(qu,ac,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ic,formatHex:ic,formatHsl:function(){return yc(this).formatHsl()},formatRgb:oc,toString:oc}),Hu(lc,(function(t,e,n,r){return 1===arguments.length?cc(t):new lc(t,e,n,null==r?1:r)}),Wu(qu,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new lc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new lc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hc,formatHex:hc,formatRgb:fc,toString:fc})),Hu(vc,(function(t,e,n,r){return 1===arguments.length?yc(t):new vc(t,e,n,null==r?1:r)}),Wu(qu,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new lc(gc(t>=240?t-240:t+120,i,r),gc(t,i,r),gc(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var mc=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,bc=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Tc=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Ec=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function wc(t){if(qo(t)&&(t=""),"transparent"===t)return new Bu(0,0,0,0);"currentColor"===t&&(t="black");var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=function(t){var e,n=mc.exec(t);if(n){var r=parseFloat(n[1])%360*(Math.PI/180),i=(null===(e=n[2].match(Ec))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[],o=mt([1,1],2),a=o[0],s=o[1],u=mt([0,0],2),c=u[0],l=u[1],h=void 0,f=void 0;r>=0&&r<.5*Math.PI?(h={x:c,y:l},f={x:a,y:s}):.5*Math.PI<=r&&r<Math.PI?(h={x:a,y:l},f={x:c,y:s}):Math.PI<=r&&r<1.5*Math.PI?(h={x:a,y:s},f={x:c,y:l}):(h={x:c,y:s},f={x:a,y:l});var p=Math.tan(r),d=p*p,y=(f.x-h.x+p*(f.y-h.y))/(d+1)+h.x,v=p*(f.x-h.x+p*(f.y-h.y))/(d+1)+h.y;return{x0:h.x,y0:h.y,x1:y,y1:v,steps:i,hash:t}}return null}(t);if(n)return new Gu(Ou.LinearGradient,n)}else if("r"===e){var r=function(t){var e,n=bc.exec(t);if(n){var r=parseFloat(n[1]),i=parseFloat(n[2]),o=parseFloat(n[3]),a=(null===(e=n[4].match(Ec))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[];if(0===o){var s=n[4].match(Ec);return s[s.length-1].split(":")[1]}return{x0:r,y0:i,r0:0,x1:.5,y1:.5,r1:o,steps:a,hash:t}}return null}(t);if(r){if(!tf(r))return new Gu(Ou.RadialGradient,r);t=r}}else if("p"===e){var i=function(t){var e=Tc.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{src:r,repetition:n,hash:t}}return null}(t);if(i)return new Gu(Ou.Pattern,i)}var o=ac(t),a=[0,0,0,0];return null!==o&&(a[0]=o.r||0,a[1]=o.g||0,a[2]=o.b||0,a[3]=o.opacity),new(Bu.bind.apply(Bu,bt([void 0],mt(a),!1)))}function Mc(t,e){if(t instanceof Bu&&e instanceof Bu)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(Zo(e[n],0,255));return e[3]=Zo(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function kc(t,e){if(qo(e))return new Pu(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))&&"px".search(t)>=0)return new Pu(Number(e),"px");var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return new Pu(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var Sc=kc.bind(null,new RegExp("px","g")),Pc=kc.bind(null,new RegExp("%","g")),xc=kc.bind(null,new RegExp("px|%|em","g")),Nc=kc.bind(null,new RegExp("deg|rad|grad|turn","g"));function _c(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0;return(Pu.isLength(t.unit)||Pu.isLength(e.unit))&&(a=Ic(t,i,n),s=Ic(e,i,n),o="px"),(Pu.isAngle(t.unit)||Pu.isAngle(e.unit))&&(a=Ac(t),s=Ac(e),o="deg"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Ac(t){var e=0;return t.unit===Zs.kDegrees?e=t.value:t.unit===Zs.kRadians?e=ea(Number(t.value)):t.unit===Zs.kTurns&&(e=ia(Number(t.value))),e}function Oc(t){return tf(t)?t.split(" ").map((function(t){return xc(t)})):t.map((function(t){return xc(t.toString())}))}function Cc(t,e,n){if(t.length===e.length){var r=t[0].unit;return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t.map((function(t){return new Pu(t,r)})).join(" ")}]}}function Ic(t,e,n){if(t.unit===Zs.kPixels)return Number(t.value);if(t.unit===Zs.kPercentage&&n){var r=n.getGeometryBounds(),i=0;return Eo.isEmpty(r)||(i=2*r.halfExtents[e]),Number(t.value)/100*i}return 0}function Rc(t){return t.toString()}function Dc(t){return"number"==typeof t?new Pu(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new Pu(Number(t)):new Pu(0)}function Lc(t){return tf(t)?t.split(" ").map(Dc):t.map(Dc)}function Fc(t,e){return[t.value,e.value,Rc]}function Vc(t,e){return function(n,r){return[n.value,r.value,function(n){return Rc(Zo(n,t,e))}]}}function Bc(t,e){if(t.length==e.length)return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t}]}var jc="\t\n\v\f\r   ᠎              \u2028\u2029",Gc=new RegExp("([a-z])["+jc+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+jc+"]*,?["+jc+"]*)+)","ig"),Uc=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+jc+"]*,?["+jc+"]*","ig");var zc=/[a-z]/;function Hc(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Wc(t){var e=function(t){if(!t)return null;if(Array.isArray(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(Gc,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(Uc,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););return""})),n}(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r<e.length;r++){var i=e[r][0];if(zc.test(i)||["V","H","T","S"].indexOf(i)>=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,u=0,c=0,l=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(u=a=+h[1],c=s=+h[2],l++,o[0]=["M",a,s]);r=l;for(var f=e.length;r<f;r++){var p=e[r],d=o[r-1],y=[],v=(i=p[0]).toUpperCase();if(i!==v)switch(y[0]=v,v){case"A":y[1]=p[1],y[2]=p[2],y[3]=p[3],y[4]=p[4],y[5]=p[5],y[6]=+p[6]+a,y[7]=+p[7]+s;break;case"V":y[1]=+p[1]+s;break;case"H":y[1]=+p[1]+a;break;case"M":u=+p[1]+a,c=+p[2]+s,y[1]=u,y[2]=c;break;default:for(var g=1,m=p.length;g<m;g++)y[g]=+p[g]+(g%2?a:s)}else y=e[r];switch(v){case"Z":a=+u,s=+c;break;case"H":y=["L",a=y[1],s];break;case"V":y=["L",a,s=y[1]];break;case"T":a=y[1],s=y[2];var b=Hc([d[1],d[2]],[d[3],d[4]]);y=["Q",b[0],b[1],a,s];break;case"S":a=y[y.length-2],s=y[y.length-1];var T=d.length,E=Hc([d[T-4],d[T-3]],[d[T-2],d[T-1]]);y=["C",E[0],E[1],y[1],y[2],a,s];break;case"M":u=y[y.length-2],c=y[y.length-1];break;default:a=y[y.length-2],s=y[y.length-1]}o.push(y)}return o}var qc=2*Math.PI,Yc=function(t,e,n,r,i,o,a){var s=t.x,u=t.y;return{x:r*(s*=e)-i*(u*=n)+o,y:i*s+r*u+a}},Xc=function(t,e){var n=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),r=Math.cos(t),i=Math.sin(t),o=Math.cos(t+e),a=Math.sin(t+e);return[{x:r-i*n,y:i+r*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},Kc=function(t,e,n,r){var i=t*n+e*r;return i>1&&(i=1),i<-1&&(i=-1),(t*r-e*n<0?-1:1)*Math.acos(i)},$c=function(t){var e=t.px,n=t.py,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=t.xAxisRotation,u=void 0===s?0:s,c=t.largeArcFlag,l=void 0===c?0:c,h=t.sweepFlag,f=void 0===h?0:h,p=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];var d=Math.sin(u*qc/360),y=Math.cos(u*qc/360),v=y*(e-r)/2+d*(n-i)/2,g=-d*(e-r)/2+y*(n-i)/2;if(0===v&&0===g)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];o=Math.abs(o),a=Math.abs(a);var m=Math.pow(v,2)/Math.pow(o,2)+Math.pow(g,2)/Math.pow(a,2);m>1&&(o*=Math.sqrt(m),a*=Math.sqrt(m));var b=function(t,e,n,r,i,o,a,s,u,c,l,h){var f=Math.pow(i,2),p=Math.pow(o,2),d=Math.pow(l,2),y=Math.pow(h,2),v=f*p-f*y-p*d;v<0&&(v=0),v/=f*y+p*d;var g=(v=Math.sqrt(v)*(a===s?-1:1))*i/o*h,m=v*-o/i*l,b=c*g-u*m+(t+n)/2,T=u*g+c*m+(e+r)/2,E=(l-g)/i,w=(h-m)/o,M=(-l-g)/i,k=(-h-m)/o,S=Kc(1,0,E,w),P=Kc(E,w,M,k);return 0===s&&P>0&&(P-=qc),1===s&&P<0&&(P+=qc),[b,T,S,P]}(e,n,r,i,o,a,l,f,d,y,v,g),T=b[0],E=b[1],w=b[2],M=b[3],k=Math.abs(M)/(qc/4);Math.abs(1-k)<1e-7&&(k=1);var S=Math.max(Math.ceil(k),1);M/=S;for(var P=0;P<S;P++)p.push(Xc(w,M)),w+=M;return p.map((function(t){var e=Yc(t[0],o,a,y,d,T,E),n=e.x,r=e.y,i=Yc(t[1],o,a,y,d,T,E),s=i.x,u=i.y,c=Yc(t[2],o,a,y,d,T,E);return{x1:n,y1:r,x2:s,y2:u,x:c.x,y:c.y}}))};function Zc(t,e,n,r,i,o,a,s,u){return $c({px:t,py:e,cx:s,cy:u,rx:n,ry:r,xAxisRotation:i,largeArcFlag:o,sweepFlag:a}).reduce((function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.x,s=e.y;return t.push(n,r,i,o,a,s),t}),[])}function Jc(t,e,n,r,i,o){return[1/3*t+2/3*n,1/3*e+2/3*r,1/3*i+2/3*n,1/3*o+2/3*r,i,o]}function Qc(t,e,n,r){return[t,e,n,r,n,r]}function tl(t,e){"TQ".indexOf(t[0])<0&&(e.qx=null,e.qy=null);var n=t.slice(1),r=n[0],i=n[1];switch(t[0]){case"M":return e.x=r,e.y=i,t;case"A":return["C"].concat(Zc.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=r,e.qy=i,["C"].concat(Jc.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(Qc(e.x1,e.y1,t[1],t[2]));case"H":return["C"].concat(Qc(e.x1,e.y1,t[1],e.y1));case"V":return["C"].concat(Qc(e.x1,e.y1,e.x1,t[1]));case"Z":return["C"].concat(Qc(e.x1,e.y1,e.x,e.y))}return t}function el(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var nl=Math.PI/180;function rl(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function il(t,e){return rl(t)*rl(e)?(t[0]*e[0]+t[1]*e[1])/(rl(t)*rl(e)):1}function ol(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(il(t,e))}function al(t,e){return t[0]===e[0]&&t[1]===e[1]}function sl(t,e){var n,r,i=e[1],o=e[2],a=(n=function(t){return nl*t}(e[3]),r=2*Math.PI,(n%r+r)%r),s=e[4],u=e[5],c=t[0],l=t[1],h=e[6],f=e[7],p=Math.cos(a)*(c-h)/2+Math.sin(a)*(l-f)/2,d=-1*Math.sin(a)*(c-h)/2+Math.cos(a)*(l-f)/2,y=p*p/(i*i)+d*d/(o*o);y>1&&(i*=Math.sqrt(y),o*=Math.sqrt(y));var v=i*i*(d*d)+o*o*(p*p),g=v?Math.sqrt((i*i*(o*o)-v)/v):1;s===u&&(g*=-1),isNaN(g)&&(g=0);var m=o?g*i*d/o:0,b=i?g*-o*p/i:0,T=(c+h)/2+Math.cos(a)*m-Math.sin(a)*b,E=(l+f)/2+Math.sin(a)*m+Math.cos(a)*b,w=[(p-m)/i,(d-b)/o],M=[(-1*p-m)/i,(-1*d-b)/o],k=ol([1,0],w),S=ol(w,M);return il(w,M)<=-1&&(S=Math.PI),il(w,M)>=1&&(S=0),0===u&&S>0&&(S-=2*Math.PI),1===u&&S<0&&(S+=2*Math.PI),{cx:T,cy:E,rx:al(t,[h,f])?0:i,ry:al(t,[h,f])?0:o,startAngle:k,endAngle:k+S,xRotation:a,arcFlag:s,sweepFlag:u}}var ul=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,cl=/[^\s,]+/gi;function ll(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function hl(t){for(var e=[],n=null,r=null,i=null,o=0,a=(t=function(t){var e=t||[];return Array.isArray(e)?e:"string"==typeof e?((e=e.match(ul)).forEach((function(t,n){if((t=t.match(cl))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}t.forEach((function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}(t)).length,s=0;s<a;s++){var u=t[s];r=t[s+1];var c=u[0],l={command:c,prePoint:n,params:u,startTangent:null,endTangent:null};switch(c){case"M":i=[u[1],u[2]],o=s;break;case"A":var h=sl(n,u);l.arcParams=h}if("Z"===c)n=i,r=t[o+1];else{var f=u.length;n=[u[f-2],u[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),l.currentPoint=n,e[o]&&al(n,e[o].currentPoint)&&(e[o].prePoint=l.prePoint);var p=r?[r[r.length-2],r[r.length-1]]:null;l.nextPoint=p;var d=l.prePoint;if(["L","H","V"].includes(c))l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===c){var y=[u[1],u[2]];l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===c){y=ll((m=e[s-1]).currentPoint,d);"Q"===m.command?(l.command="Q",l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]):(l.command="TL",l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===c){var v=[u[1],u[2]],g=[u[3],u[4]];l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]],0===l.startTangent[0]&&0===l.startTangent[1]&&(l.startTangent=[v[0]-g[0],v[1]-g[1]]),0===l.endTangent[0]&&0===l.endTangent[1]&&(l.endTangent=[g[0]-v[0],g[1]-v[1]])}else if("S"===c){var m;v=ll((m=e[s-1]).currentPoint,d),g=[u[1],u[2]];"C"===m.command?(l.command="C",l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]]):(l.command="SQ",l.startTangent=[d[0]-g[0],d[1]-g[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]])}else if("A"===c){var b=.001,T=l.arcParams||{},E=T.cx,w=void 0===E?0:E,M=T.cy,k=void 0===M?0:M,S=T.rx,P=void 0===S?0:S,x=T.ry,N=void 0===x?0:x,_=T.sweepFlag,A=void 0===_?0:_,O=T.startAngle,C=void 0===O?0:O,I=T.endAngle,R=void 0===I?0:I;0===A&&(b*=-1);var D=P*Math.cos(C-b)+w,L=N*Math.sin(C-b)+k;l.startTangent=[D-i[0],L-i[1]];var F=P*Math.cos(C+R+b)+w,V=N*Math.sin(C+R-b)+k;l.endTangent=[d[0]-F,d[1]-V]}e.push(l)}return e}function fl(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function pl(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?Xs.length.apply(Xs,bt([],mt(r),!1)):0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=fl(n,r,e),s=fl(r,i,e),u=fl(i,o,e),c=fl(a,s,e),l=fl(s,u,e),h=fl(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function dl(t,e,n){var r=pl(t),i=pl(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),f=[c,l],p=[h-o,h-a],d=0,y=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d=n&&p[e]&&t.l>=f[e],p[e]-=d?1:0,d?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:dl(y[0],y[1],h)}function yl(t){return gl(t)>=0}function vl(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}function gl(t){var e=0,n=0,r=0,i=0,o=0;return t.map((function(t){var a;switch(t[0]){case"M":case"Z":return r="M"===t[0]?t[1]:r,i="M"===t[0]?t[2]:i,e=r,n=i,0;default:return o=vl.apply(0,[e,n].concat(t.slice(1))),a=mt(t.slice(-2),2),e=a[0],n=a[1],o}})).reduce((function(t,e){return t+e}),0)}function ml(t){var e=t.slice(1).map((function(e,n,r){return n?r[n-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map((function(t){return["C"].concat(t.slice(2))})))}function bl(t){return t.map((function(t){return Array.isArray(t)?bl(t):Number.isNaN(+t)?t:+t}))}function Tl(t,e){var n=t.length-1,r=[],i=0,o=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a,s=i+o;return 0===o||t[s]&&"M"===t[s][0]?(a=t[s],["M"].concat(a.slice(-2))):(s>=e&&(s-=n),t[s])}))}))}(t);return o.forEach((function(o,a){t.slice(1).forEach((function(r,o){i+=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}(t[(a+o)%n].slice(-2),e[o%n].slice(-2))})),r[a]=i,i=0})),o[r.indexOf(Math.min.apply(null,r))]}function El(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,u=n+t,c=r-e,l=r+e;return[["M",s,r],["C",s,r-a,n-o,c,n,c],["C",n+o,c,u,r-a,u,r],["C",u,r+a,n+o,l,n,l],["C",n-o,l,s,r+a,s,r],["Z"]]}function wl(t,e){void 0===e&&(e=!0);var n=[];switch(t.nodeName){case fa.LINE:var r=t.parsedStyle,i=r.x1,o=r.y1,s=r.x2,u=r.y2;n=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.value,o.value,s.value,u.value);break;case fa.CIRCLE:var c=t.parsedStyle,l=c.r,h=c.cx,f=c.cy;n=El(l.value,l.value,h.value,f.value);break;case fa.ELLIPSE:var p=t.parsedStyle,d=p.rx,y=p.ry;h=p.cx,f=p.cy;n=El(d.value,y.value,h.value,f.value);break;case fa.POLYLINE:case fa.POLYGON:var v=t.parsedStyle.points;n=function(t,e){var n=t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}));return e&&n.push(["Z"]),n}(v.points,t.nodeName===fa.POLYGON);break;case fa.RECT:var g=t.parsedStyle,m=g.width,b=g.height,T=g.x,E=g.y,w=g.radius,M=w&&w.some((function(t){return 0!==t.value}));n=function(t,e,n,r,i){if(i){var o=mt(i,4),a=o[0],s=o[1],u=o[2],c=o[3];return[["M",n,a+r],a?["A",a,a,0,0,1,a+n,r]:null,["L",t-s+n,r],s?["A",s,s,0,0,1,t+n,s+r]:null,["L",t+n,e-u+r],u?["A",u,u,0,0,1,t-u+n,e+r]:null,["L",c+n,e+r],c?["A",c,c,0,0,1,n,e-c+r]:null,["Z"]].filter((function(t){return t}))}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(m.value,b.value,T.value,E.value,M&&w.map((function(t){return t.value})));break;case fa.PATH:var k=t.parsedStyle.path,S=k.curve,P=k.zCommandIndexes;n=bt([],mt(S),!1),P.forEach((function(t,e){n.splice(t+e,1,["Z"])}))}if(n.length)return function(t,e,n){var r;void 0===n&&(n=!0),n&&(r=e.getLocalTransform());var i=e.parsedStyle,o=i.defX,s=void 0===o?0:o,u=i.defY,c=void 0===u?0:u;return t.reduce((function(t,e){var i="";if("M"===e[0]||"L"===e[0]){var o=a.fromValues(e[1]-s,e[2]-c,0);n&&a.transformMat4(o,o,r),i="".concat(e[0]).concat(o[0],",").concat(o[1])}else if("Z"===e[0])i=e[0];else if("C"===e[0]){var u=a.fromValues(e[1]-s,e[2]-c,0),l=a.fromValues(e[3]-s,e[4]-c,0),h=a.fromValues(e[5]-s,e[6]-c,0);n&&(a.transformMat4(u,u,r),a.transformMat4(l,l,r),a.transformMat4(h,h,r)),i="".concat(e[0]).concat(u[0],",").concat(u[1],",").concat(l[0],",").concat(l[1],",").concat(h[0],",").concat(h[1])}else if("A"===e[0]){var f=a.fromValues(e[6]-s,e[7]-c,0);n&&a.transformMat4(f,f,r),i="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(f[0],",").concat(f[1])}return t+i}),"")}(n,t,e)}function Ml(t,e){var n=Wc(t),r=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),i=n.slice(),o=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}r.length>0&&n.push(r);return{polygons:e,polylines:n}}(i),a=o.polygons,s=o.polylines,u=mt(function(t,e){void 0===e&&(e=!1);for(var n,r,i=Wc(t),o={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},a=[],s="",u=i.length,c=[],l=0;l<u;l+=1)i[l]&&(s=i[l][0]),a[l]=s,i[l]=tl(i[l],o),el(i,a,l),u=i.length,"Z"===s&&c.push(l),r=(n=i[l]).length,o.x1=+n[r-2],o.y1=+n[r-1],o.x2=+n[r-4]||o.x1,o.y2=+n[r-3]||o.y1;return e?[i,c]:i}(i,!0),2),c=u[0],l=u[1],h=hl(i),f=function(t){var e,n,r,i,o=0,a=0,s=[];if(!t)return{curveSegments:[],totalLength:o};if(t.forEach((function(e,n){r=t[n+1],i=e.length,r&&(o+=Xs.length(e[i-2],e[i-1],r[1],r[2],r[3],r[4],r[5],r[6])||0)})),0===o)return{curveSegments:[],totalLength:o};return t.forEach((function(u,c){r=t[c+1],i=u.length,r&&((e=[])[0]=a/o,n=Xs.length(u[i-2],u[i-1],r[1],r[2],r[3],r[4],r[5],r[6]),a+=n||0,e[1]=a/o,s.push(e))})),{curveSegments:s,totalLength:o}}(c),p=f.totalLength,d=f.curveSegments,y=function(t){var e=0,n=0,r=[],i=[];t.forEach((function(t){var o=mt(t.slice(-2),2),a=o[0],s=o[1];if("M"===t[0])e=a,n=s,r.push(a),i.push(s);else if("C"===t[0]){var u=Xs.box.apply(Xs,bt([],mt([e,n].concat(t.slice(1))),!1));r=r.concat(u.x,u.x+u.width),i=i.concat(u.y,u.y+u.height),e=a,n=s}}));var o=Math.min.apply(0,r),a=Math.min.apply(0,i),s=Math.max.apply(0,r),u=Math.max.apply(0,i);return new Ro(o,a,s-o,u-a)}(c);return e&&(e.parsedStyle.defX=y.x,e.parsedStyle.defY=y.y),{absolutePath:n,hasArc:r,segments:h,polygons:a,polylines:s,curve:c,totalLength:p,curveSegments:d,zCommandIndexes:l,rect:y}}function kl(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=dl(r,i));var a=yl(o[0])!==yl(o[1])?ml(o[0]):bl(o[0]);return[a,Tl(o[1],a),function(t){return t}]}function Sl(t,e){var n;n=tf(t)?t.split(" ").map((function(t){var e=mt(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]})):t;var r,i,o=[],a=0,s=$s(n);n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=Gs.length(t[0],t[1],n[e+1][0],n[e+1][1]),a+=i,r[1]=a/s,o.push(r))}));var u=Math.min.apply(Math,bt([],mt(n.map((function(t){return t[0]}))),!1)),c=Math.min.apply(Math,bt([],mt(n.map((function(t){return t[1]}))),!1));return e&&(e.parsedStyle.defX=u,e.parsedStyle.defY=c),{points:n,totalLength:s,segments:o}}var Pl,xl,Nl,_l,Al=kc.bind(null,/deg|rad|grad|turn|px|%/g),Ol=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Cl(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,Ol.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return Al(t)||wc(t)}))}),n.lastIndex===t.length)return r}return[]}!function(t){t.Layout="layout",t.IntrinsicSizes="intrinsic-sizes"}(Pl||(Pl={})),function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(xl||(xl={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(Nl||(Nl={})),function(t){t.LAYOUT="display",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom",t.RIGHT="right",t.WIDTH="width",t.HEIGHT="height",t.MIN_WIDTH="minWidth",t.MAX_WIDTH="maxWidth",t.MIN_HEIGHT="minHeight",t.MAX_HEIGHT="maxHeight",t.BOX_SIZING="boxSizing",t.PADDING="padding",t.PADDING_TOP="paddingTop",t.PADDING_BOTTOM="paddingBottom",t.PADDING_START="paddingLeft",t.PADDING_END="paddingRight",t.MARGIN="margin",t.MARGIN_TOP="marginTop",t.MARGIN_BOTTOM="marginBottom",t.MARGIN_START="marginLeft",t.MARGIN_END="marginRight",t.BORDER="border",t.BORDER_TOP="borderTop",t.BORDER_BOTTOM="borderBottom",t.BORDER_START="borderLeft",t.BORDER_END="borderRight",t.FLEX_DIRECTION="flexDirection",t.FLEX_WRAP="flexWrap",t.FLEX_FLOW="flexFlow",t.ALIGN_ITEMS="alignItems",t.ALIGN_CONTENT="alignContent",t.JUSTIFY_CONTENT="justifyContent",t.FLEX="flex",t.ALIGN_SELF="alignSelf",t.FLEX_SHRINK="flexShrink",t.FLEX_BASIS="flexBasis",t.FLEX_GROW="flexGrow",t.OFFSET_WIDTH="offsetWidth",t.OFFSET_HEIGHT="offsetHeight",t.ORDER="order"}(_l||(_l={}));var Il=1,Rl=function(){function t(t){void 0===t&&(t=new Map),this.id=Il++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}return Object.defineProperty(t.prototype,"intrisicSizes",{get:function(){return this.internalIntrisicSizes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childCount",{get:function(){return this.children.length},enumerable:!1,configurable:!0}),t.prototype.setMeasure=function(t){this.measureFn=t},t.prototype.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},t.prototype.addChild=function(t){var e;null===(e=this.children)||void 0===e||e.push(t)},t.prototype.insertChild=function(t,e){this.children.splice(t,0,e)},t.prototype.removeChild=function(t){var e,n=null===(e=this.children)||void 0===e?void 0:e.findIndex((function(e){return e.id===t.id}));this.removeChildAtIndex(n)},t.prototype.removeChildAtIndex=function(t){this.children.splice(t,1)},t.prototype.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},t.prototype.setStyle=function(t,e){this.style.set(t,e)},t.prototype.getStyle=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=new Map;return e.forEach((function(e){var n=t.style.get(e);n&&r.set(e,n)})),r},t.prototype.getAllStyle=function(){return this.style},t.prototype.markDirty=function(){this.dirty=!0},t.prototype.idDirty=function(){return this.dirty},t.prototype.getSize=function(){var t,e,n,r;return{width:null!==(e=null===(t=this.style.get(_l.WIDTH))||void 0===t?void 0:t.value)&&void 0!==e?e:0,height:null!==(r=null===(n=this.style.get(_l.HEIGHT))||void 0===n?void 0:n.value)&&void 0!==r?r:0}},t.prototype.computeLayout=function(){return yt(this,void 0,void 0,(function(){var t;return vt(this,(function(e){switch(e.label){case 0:return t=this.getSize(),[4,pp.computeLayout(this,{availableInlineSize:t.width,availableBlockSize:t.height,fixedInlineSize:t.width,fixedBlockSize:t.height,percentageInlineSize:t.width,percentageBlockSize:t.height,data:void 0})];case 1:return e.sent(),[2]}}))}))},t.prototype.setComputedLayout=function(t){this.computedLayout=t},t.prototype.getComputedLayout=function(){return this.computedLayout},t.prototype.getAllComputedLayout=function(){},t.prototype.toString=function(){return"LayoutObject ".concat(this.id)},t}(),Dl=l.defineToken("LayoutContextFactory"),Ll=l.defineToken("LayoutContextOptions"),Fl=0,Vl=function(){function t(t){this.options=t,this.workQueue=[],this.contextId="".concat(Fl++),this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}return t.prototype.appendWorkTask=function(t){this.workQueue.push(t)},t.prototype.clearWorkQueue=function(){this.workQueue=[]},t=ft([_(),pt(0,O(Ll)),dt("design:paramtypes",[Object])],t)}(),Bl=l.defineToken("FragmentResultFactory"),jl=l.defineToken("FragmentResultOptions"),Gl=l.defineToken("contextNode"),Ul=function(){function t(t,e,n){this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e}return t=ft([N(),pt(0,O(Vl)),pt(1,O(Gl)),pt(2,O(jl)),dt("design:paramtypes",[Vl,Rl,Object])],t)}(),zl=l.defineToken("LayoutChildrenFactory"),Hl=l.defineToken("LayoutChildrenOptions"),Wl=function(){function t(t,e){this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}return t.prototype.intrinsicSizes=function(){var t=new gf;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:Pl.IntrinsicSizes,deferred:t}),t.promise},t.prototype.layoutNextFragment=function(t){if(this.layoutContext.mode===Pl.IntrinsicSizes)throw new Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var e=new gf;return this.layoutContext.appendWorkTask({layoutConstraints:t,layoutChild:this,taskType:Pl.Layout,deferred:e}),e.promise},t=ft([N(),pt(0,O(Vl)),pt(1,O(Hl)),dt("design:paramtypes",[Vl,Object])],t)}(),ql=function(){},Yl=l.defineToken("LayoutEdgesFactory"),Xl=l.defineToken("LayoutEdgesOptions"),Kl=[0,0,0,0],$l=function(){function t(t){var e,n,r,i,o,a,s,u,c,l,h,f,p,d,y,v;this.options=t;var g=t.node.getAllStyle(),m=null!==(n=null===(e=g.get(_l.PADDING_TOP))||void 0===e?void 0:e.value)&&void 0!==n?n:0,b=null!==(i=null===(r=g.get(_l.PADDING_END))||void 0===r?void 0:r.value)&&void 0!==i?i:0,T=null!==(a=null===(o=g.get(_l.PADDING_BOTTOM))||void 0===o?void 0:o.value)&&void 0!==a?a:0,E=null!==(u=null===(s=g.get(_l.PADDING_START))||void 0===s?void 0:s.value)&&void 0!==u?u:0,w=null!==(l=null===(c=g.get(_l.PADDING_TOP))||void 0===c?void 0:c.value)&&void 0!==l?l:0,M=null!==(f=null===(h=g.get(_l.PADDING_END))||void 0===h?void 0:h.value)&&void 0!==f?f:0,k=null!==(d=null===(p=g.get(_l.PADDING_BOTTOM))||void 0===p?void 0:p.value)&&void 0!==d?d:0,S=null!==(v=null===(y=g.get(_l.PADDING_START))||void 0===y?void 0:y.value)&&void 0!==v?v:0;this.blockStart=m+Kl[0]+w,this.inlineStart=b+Kl[1]+M,this.blockEnd=T+Kl[2]+k,this.inlineEnd=E+Kl[3]+S,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd}return t=ft([N(),pt(0,O(Xl)),dt("design:paramtypes",[Object])],t)}(),Zl=function(){function t(){this.registry=new Map}var e;return e=t,Object.defineProperty(t.prototype,"size",{get:function(){return this.registry.size},enumerable:!1,configurable:!0}),t.prototype.hasLayout=function(t){return this.registry.has(t)},t.prototype.getLayout=function(t){if(void 0===t&&(t="absolute"),!this.hasLayout(t))throw new Error("invalid layout property: ".concat(t));return this.registry.get(t)},t.prototype.updateLayout=function(t,e){this.registry.set(t,e)},t.prototype.registerLayout=function(t,n){if(""===t)throw new TypeError("layout name cant't be empty");if(e.reservedLayout.includes(t))throw new Error("layout name '".concat(t,"' is a system reserved layout name, please use another name"));if(this.hasLayout(t))throw new Error("layout '".concat(t,"' already exist."));this.registry.set(t,n)},t.prototype.deleteLayout=function(t){this.registry.delete(t)},t.reservedLayout=[],t=e=ft([_()],t)}(),Jl=function(t){return void 0===t&&(t=0),new Promise((function(e){setTimeout((function(){e()}),t)}))},Ql=function(){function t(t,e,n){this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}return t.prototype.computeLayout=function(t,e){return yt(this,void 0,void 0,(function(){return vt(this,(function(n){switch(n.label){case 0:return[4,this.determineIntrinsicSizes(t,t.children)];case 1:return n.sent(),[4,this.calculateLayout(t,t.children,e)];case 2:return n.sent(),[2]}}))}))},t.prototype.determineAllIntrinsicSizes=function(t){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){return[2]}))}))},t.prototype.getLayoutDefinitionName=function(t){var e=t.getAllStyle().get(_l.LAYOUT);if(!e)throw new Error("layout property not found");return e.value},t.prototype.determineIntrinsicSizes=function(t,e){return yt(this,void 0,void 0,(function(){var n;return vt(this,(function(r){switch(r.label){case 0:return n=this.getLayoutDefinitionName(t),[4,this.invokeIntrinsicSizesCallback(n,t,e)];case 1:return r.sent(),[2]}}))}))},t.prototype.invokeIntrinsicSizesCallback=function(t,e,n){return yt(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,h,f,p;return vt(this,(function(d){switch(d.label){case 0:return r=this.layoutRegistry.getLayout(t),i=new r,o=this.layoutContextFactory({mode:Pl.IntrinsicSizes}),a=r.inputProperties,s=void 0===a?[]:a,u=[],n.forEach((function(t){var e=o.layoutChildrenFactory({node:t});u.push(e)})),c=this.layoutEdgesFactory({node:e}),l=e.getStyle.apply(e,bt([],mt(s),!1)),h=i.intrinsicSizes(u,c,l),(f=this.runWorkQueue(h,o.workQueue)).next(),[4,Jl()];case 1:return d.sent(),p=f.next().value,o.clearWorkQueue(),e.setIntrisicSizes(p),[2]}}))}))},t.prototype.calculateLayout=function(t,e,n){return yt(this,void 0,void 0,(function(){var r;return vt(this,(function(i){switch(i.label){case 0:return r=this.getLayoutDefinitionName(t),[4,this.invokeLayoutCallback(r,t,e,n)];case 1:return i.sent(),[2]}}))}))},t.prototype.invokeLayoutCallback=function(t,e,n,r){return yt(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,h,f,p,d,y,v;return vt(this,(function(g){switch(g.label){case 0:return i=this.layoutRegistry.getLayout(t),o=new i,a=this.layoutContextFactory({mode:Pl.Layout}),s=i.inputProperties,u=void 0===s?[]:s,c=[],n.forEach((function(t){var e=a.layoutChildrenFactory({node:t});c.push(e)})),l=this.layoutEdgesFactory({node:e}),h=e.getStyle.apply(e,bt([],mt(u),!1)),f=o.layout(c,l,r,h),(p=this.runWorkQueue(f,a.workQueue)).next(),[4,Jl()];case 1:return g.sent(),d=p.next().value,a.clearWorkQueue(),y=d instanceof Ul?d:a.fragmentResultFactory(d),v=a.layoutFragmentFactory({inlineSize:y.inlineSize,blockSize:y.blockSize,data:y.data}),e.setComputedLayout(v),n.forEach((function(t,e){t.setComputedLayout(y.childFragments[e])})),[2]}}))}))},t.prototype.runWorkQueue=function(t,e){var n,r=this;return vt(this,(function(i){switch(i.label){case 0:return n=vf(t),e.length>0&&n.isPending()&&e.forEach((function(t){if(t.taskType===Pl.IntrinsicSizes){var e=t.layoutChild,n=t.deferred,i=e.node;n.resolve(r.getNodeIntrisicSizes(i))}if(t.taskType===Pl.Layout){e=t.layoutChild,n=t.deferred;var o=t.layoutConstraints,a=(i=e.node,e.layoutContext),s=r.getNodeFragment(i,o);n.resolve(a.layoutFragmentFactory(s))}})),[4];case 1:if(i.sent(),!n.isFulfilled())throw new Error("promise not fullfilled!");return[2,n.getFullFilledValue()]}}))},t.prototype.getNodeIntrisicSizes=function(t){var e,n,r,i,o,a,s,u,c,l,h,f,p=t.getAllStyle();return{minContentInlineSize:(null===(e=p.get(_l.MIN_WIDTH))||void 0===e?void 0:e.value)||(null===(n=t.intrisicSizes)||void 0===n?void 0:n.minContentInlineSize)||(null===(r=p.get(_l.WIDTH))||void 0===r?void 0:r.value)||0,maxContentInlineSize:(null===(i=p.get(_l.MAX_WIDTH))||void 0===i?void 0:i.value)||(null===(o=t.intrisicSizes)||void 0===o?void 0:o.maxContentInlineSize)||(null===(a=p.get(_l.WIDTH))||void 0===a?void 0:a.value)||0,minContentBlockSize:(null===(s=p.get(_l.MIN_HEIGHT))||void 0===s?void 0:s.value)||(null===(u=t.intrisicSizes)||void 0===u?void 0:u.minContentBlockSize)||(null===(c=p.get(_l.HEIGHT))||void 0===c?void 0:c.value)||0,maxContentBlockSize:(null===(l=p.get(_l.MAX_HEIGHT))||void 0===l?void 0:l.value)||(null===(h=t.intrisicSizes)||void 0===h?void 0:h.maxContentBlockSize)||(null===(f=p.get(_l.HEIGHT))||void 0===f?void 0:f.value)||0}},t.prototype.getNodeFragment=function(t,e){var n,r,i,o,a,s;return{inlineSize:(null===(n=t.getComputedLayout())||void 0===n?void 0:n.inlineSize)||(null===(r=t.getAllStyle().get(_l.MIN_WIDTH))||void 0===r?void 0:r.value)||(null===(i=t.getAllStyle().get(_l.WIDTH))||void 0===i?void 0:i.value)||0,blockSize:(null===(o=t.getComputedLayout())||void 0===o?void 0:o.blockSize)||(null===(a=t.getAllStyle().get(_l.MIN_HEIGHT))||void 0===a?void 0:a.value)||(null===(s=t.getAllStyle().get(_l.HEIGHT))||void 0===s?void 0:s.value)||0,data:e.data}},t=ft([_(),pt(0,O(Zl)),pt(1,O(Dl)),pt(2,O(Yl)),dt("design:paramtypes",[Zl,Function,Function])],t)}(),th=l.defineToken("LayoutFragmentFactory"),eh=l.defineToken("LayoutFragmentOptions"),nh=function(){function t(t,e){this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data}return t=ft([N(),pt(0,O(Vl)),pt(1,O(eh)),dt("design:paramtypes",[Vl,Object])],t)}(),rh={number:function(t){return new Pu(t)},percent:function(t){return new Pu(t,"%")},px:function(t){return new Pu(t,"px")},em:function(t){return new Pu(t,"em")},deg:function(t){return new Pu(t,"deg")},grad:function(t){return new Pu(t,"grad")},rad:function(t){return new Pu(t,"rad")},turn:function(t){return new Pu(t,"turn")},s:function(t){return new Pu(t,"s")},ms:function(t){return new Pu(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;ot.get(ga).registerMetadata({name:e,inherited:n,interpolable:r,defaultValue:i,syntax:o})},registerLayout:function(t,e){ot.get(Zl).registerLayout(t,e)}},ih=null;function oh(t){return function(e){var n=0;return t.map((function(t){return t===ih?e[n++]:t}))}}function ah(t){return t}var sh={rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],scale:["Nn",oh([ih,ih,rh.number(1)]),ah],scalex:["N",oh([ih,rh.number(1),rh.number(1)]),oh([ih,rh.number(1)])],scaley:["N",oh([rh.number(1),ih,rh.number(1)]),oh([rh.number(1),ih])],scalez:["N",oh([rh.number(1),rh.number(1),ih])],scale3d:["NNN",ah],translate:["Tt",oh([ih,ih,Fu]),ah],translatex:["T",oh([ih,Fu,Fu]),oh([ih,Fu])],translatey:["T",oh([Fu,ih,Fu]),oh([Fu,ih])],translatez:["L",oh([Fu,Fu,ih])],translate3d:["TTL",ah]};function uh(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=sh[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(u.length<s.length)return[];for(var c=[],l=0;l<u.length;l++){var h=s[l],f=u[l],p=void 0;if(void 0===(p=h?{A:function(t){return"0"===t.trim()?Vu:Nc(t)},N:Dc,T:xc,L:Sc}[f.toUpperCase()](h):{a:Vu,n:c[0],t:Fu}[f]))return[];c.push(p)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function ch(t){return t.replace(/[xy]/,"")}function lh(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function hh(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substr(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?new Pu(a):new Pu(a,t.unit)}))})},o=0;o<t.length;o++)i(o)}var a,s,u=[],c=[],l=[];if(t.length!==e.length);else for(o=0;o<t.length;o++){var h=t[o].t,f=e[o].t,p=t[o].d,d=e[o].d,y=sh[h],v=sh[f],g=void 0;if(s=f,("perspective"!==(a=h)||"perspective"!==s)&&("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){if(h===f)g=h;else if(y[2]&&v[2]&&ch(h)===ch(f))g=ch(h),p=y[2](p),d=v[2](d);else{if(!y[1]||!v[1]||lh(h)!==lh(f))break;g=lh(h),p=y[1](p),d=v[1](d)}for(var m=[],b=[],T=[],E=0;E<p.length;E++){var w=(p[E].unit===Zs.kNumber?Fc:_c)(p[E],d[E],n,!1,E);m[E]=w[0],b[E]=w[1],T.push(w[2])}u.push(m),c.push(b),l.push([g,T])}}if(r){var M=u;u=c,c=M}return[u,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),l[e][0]+"("+n+")"})).join(" ")}]}function fh(t){if(tf(t)){var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[xc(ph(e[0])),xc(ph(e[1]))]}return[new Pu(t[0]||0,"px"),new Pu(t[1]||0,"px")]}function ph(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var dh,yh,vh=function(){function t(){this.parser=xc,this.mixer=_c}return t.prototype.calculator=function(t,e,n,r,i){var o;return Pu.isRelativeUnit(n.unit)?n.unit===Zs.kPercentage?new Pu(0,"px"):n.unit===Zs.kEms?r.parentNode?this.getFontSize(r.parentNode):new Pu(0,"px"):n.unit===Zs.kRems?(null===(o=null==r?void 0:r.ownerDocument)||void 0===o?void 0:o.documentElement)?this.getFontSize(r.ownerDocument.documentElement):new Pu(0,"px"):void 0:n.clone()},t.prototype.getFontSize=function(t){var e=t.parsedStyle.fontSize;return e&&!Pu.isRelativeUnit(e.unit)?e.clone():new Pu(0,"px")},t=ft([_()],t)}(),gh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ct(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case fa.CIRCLE:case fa.ELLIPSE:var i=t.parsedStyle,o=i.cx,a=i.cy;qo(o)||(e=o.value),qo(a)||(n=a.value);break;case fa.LINE:var s=t.parsedStyle,u=s.x1,c=s.x2,l=s.y1,h=s.y2;e=Math.min(u.value,c.value),n=Math.min(l.value,h.value),r=0;break;default:qo(t.parsedStyle.x)||(e=t.parsedStyle.x.value),qo(t.parsedStyle.y)||(n=t.parsedStyle.y.value)}t.parsedStyle.defX=e||0,t.parsedStyle.defY=n||0;var f=mt(t.getLocalPosition(),3),p=f[0],d=f[1],y=f[2];t.setLocalPosition(qo(e)?p:e,qo(n)?d:n,qo(r)?y:r)},e=ft([_()],e)}(vh),mh=function(){function t(){this.parser=Dc,this.mixer=Vc(0,1)}return t=ft([_()],t)}(),bh=function(){function t(){this.parser=wc,this.mixer=Mc}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof yu?new Bu(0,0,0,0,"none"===n.value):n},t=ft([_()],t)}(),Th=function(){function t(){this.parser=Cl}return t=ft([_()],t)}(),Eh=function(){function t(){this.mixer=Cc}return t.prototype.parser=function(t){var e=Oc(Yo(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},t=ft([_()],t)}(),wh=function(){function t(){this.mixer=Cc}return t.prototype.parser=function(t){var e=Oc(Yo(t)?[t]:t);return 1===e.length?[e[0],e[0],e[0],e[0]]:2===e.length?[e[0],e[1],e[0],e[1]]:3===e.length?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]},t=ft([_()],t)}(),Mh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mixer=Vc(0,1/0),e}return ct(e,t),e=ft([_()],e)}(vh),kh=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t=ft([_()],t)}(),Sh=function(){function t(){this.parser=Dc,this.mixer=Vc(0,1)}return t.prototype.postProcessor=function(t){if(t.attributes.offsetPath){var e=t.attributes.offsetPath.nodeName;if(e===fa.LINE||e===fa.PATH||e===fa.POLYLINE){var n=t.attributes.offsetPath.getPoint(t.parsedStyle.offsetDistance.value);n&&t.setLocalPosition(n.x,n.y)}}},t=ft([_()],t)}(),Ph=function(){function t(){this.parser=Dc}return t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t=ft([_()],t)}(),xh=function(){function t(){this.parser=uh,this.mixer=hh}return t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.transform,r=e.defX,i=e.defY;n&&n.length&&(t.resetLocalTransform(),t.setLocalPosition(r,i),n.forEach((function(e){var n=e.t,r=e.d;if("scale"===n){var i=r.map((function(t){return t.value}))||[1,1];t.scaleLocal(i[0],i[1],1)}else if("scalex"===n){i=r.map((function(t){return t.value}))||[1];t.scaleLocal(i[0],1,1)}else if("scaley"===n){i=r.map((function(t){return t.value}))||[1];t.scaleLocal(1,i[0],1)}else if("scalez"===n){i=r.map((function(t){return t.value}))||[1];t.scaleLocal(1,1,i[0])}else if("scale3d"===n){i=r.map((function(t){return t.value}))||[1,1,1];t.scaleLocal(i[0],i[1],i[2])}else if("translate"===n){var o=r||[Fu,Fu];t.translateLocal(o[0].value,o[1].value,0)}else if("translatex"===n){o=r||[Fu];t.translateLocal(o[0].value,0,0)}else if("translatey"===n){o=r||[Fu];t.translateLocal(0,o[0].value,0)}else if("translatez"===n){o=r||[Fu];t.translateLocal(0,0,o[0].value)}else if("translate3d"===n){o=r||[Fu,Fu,Fu];t.translateLocal(o[0].value,o[1].value,o[2].value)}else if("rotate"===n){var a=r||[Vu];t.rotateLocal(0,0,a[0].value)}else if("rotatex"===n){a=r||[Vu];t.rotateLocal(a[0].value,0,0)}else if("rotatey"===n){a=r||[Vu];t.rotateLocal(0,a[0].value,0)}else if("rotatez"===n){a=r||[Vu];t.rotateLocal(0,0,a[0].value)}})))},t=ft([_()],t)}(),Nh=function(){function t(){this.parser=fh}return t=ft([_()],t)}(),_h=function(){function t(){this.parser=Ml,this.mixer=kl}return t.prototype.calculator=function(t,e,n){return n instanceof yu&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,curveSegments:[],zCommandIndexes:[],rect:new Ro(0,0,0,0)}:n},t.prototype.postProcessor=function(t){if(t.nodeName===fa.PATH){var e=t.parsedStyle,n=e.defX,r=void 0===n?0:n,i=e.defY,o=void 0===i?0:i;t.setLocalPosition(r,o)}},t=ft([_()],t)}(),Ah=function(){function t(){this.parser=Sl}return t.prototype.postProcessor=function(t){if(t.nodeName===fa.POLYGON||t.nodeName===fa.POLYLINE){var e=t.parsedStyle,n=e.defX,r=e.defY;t.setLocalPosition(n,r)}},t=ft([_()],t)}(),Oh=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof yu&&(n=null),e&&e!==n&&e.style.clipPathTargets){var i=e.style.clipPathTargets.indexOf(r);e.style.clipPathTargets.splice(i,1)}return n&&(n.style.clipPathTargets||(n.style.clipPathTargets=[]),n.style.clipPathTargets.push(r)),wf(r),n},t=ft([_()],t)}(),Ch=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof yu?"unset"===n.value?"":n.value:n},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t=ft([_()],t)}(),Ih=function(){function t(){}return t.prototype.postProcessor=function(t){if(t.nodeName===fa.TEXT){var e=t,n=e.parsedStyle.textTransform.value;n===ya.CAPITALIZE?e.style.text=e.style.text.charAt(0).toUpperCase()+e.style.text.slice(1):n===ya.LOWERCASE?e.style.text=e.style.text.toLowerCase():n===ya.UPPERCASE&&(e.style.text=e.style.text.toUpperCase())}},t=ft([_()],t)}(),Rh=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document",e.timeline=new Fa(e);var n={};return Zh.forEach((function(t){var e=t.name,r=t.inherited,i=t.defaultValue;r&&i&&(n[e]=i)})),e.documentElement=new Ds({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return ct(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){var n=this.defaultView.customElements.get(t);return n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?su:Ds),new n(e)},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},e.prototype.elementFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,s=o.height,r<0||i<0||r>a||i>s?[2,null]:(u=this.defaultView.viewport2Client({x:r,y:i}),c=u.x,l=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return[2,(h=f.sent().picked)&&h[0]||this.documentElement]}}))}))},e.prototype.elementsFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,s=o.height,r<0||i<0||r>a||i>s?[2,[]]:(u=this.defaultView.viewport2Client({x:r,y:i}),c=u.x,l=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return(h=f.sent().picked)[h.length-1]!==this.documentElement&&h.push(this.documentElement),[2,h]}}))}))},e.prototype.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},e.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(Sa),Dh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.client=new Io,e.movement=new Io,e.offset=new Io,e.global=new Io,e.screen=new Io,e}return ct(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw new Error("Method not implemented.")},e}(jo),Lh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return ct(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e}(Dh),Fh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return ct(e,t),e}(Dh),Vh=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),Bh=0,jh=new WeakMap,Gh=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:yh&&function(t){return t===yh||t===dh}(t)?yh:null}(n[r-1],t);if(i)return void(n[r-1]=i)}else e=this.observer,qh.push(e),Wh||(Wh=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(Yh):Yh());n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(So.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(So.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(So.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(So.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(So.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(So.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=jh.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}}),this)},t.prototype.handleEvent=function(t){var e,n;switch(t.stopImmediatePropagation(),t.type){case So.ATTR_MODIFIED:var r=t.attrName,i=t.relatedNode.namespaceURI;n=t.target,(e=zh("attributes",n)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===Go.ADDITION?null:t.prevValue;Hh(n,(function(t){var n;if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i)))return t.attributeOldValue?(n=o,yh||((yh=Vh.copy(dh)).oldValue=n,yh)):e}));break;case So.REMOVED:case So.INSERTED:n=t.relatedNode;var a=t.target,s=void 0,u=void 0;t.type===So.INSERTED?(s=[a],u=[]):(s=[],u=[a]);var c=a.previousSibling,l=a.nextSibling;(e=zh("childList",n)).addedNodes=s,e.removedNodes=u,e.previousSibling=c,e.nextSibling=l,Hh(n,(function(t){if(t.childList)return e}))}dh=yh=void 0},t}(),Uh=function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=Bh++}return t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=jh.get(t);r||jh.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new Gh(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=jh.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function zh(t,e){return dh=new Vh(t,e)}function Hh(t,e){for(var n=t;n;n=n.parentNode){var r=jh.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var Wh=!1,qh=[];function Yh(){Wh=!1;var t=qh;qh=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=jh.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&Yh()}var Xh,Kh=function(){function t(){this.registry={},this.define(fa.CIRCLE,Is),this.define(fa.ELLIPSE,Rs),this.define(fa.RECT,au),this.define(fa.IMAGE,Ls),this.define(fa.LINE,nu),this.define(fa.GROUP,Ds),this.define(fa.PATH,ru),this.define(fa.POLYGON,iu),this.define(fa.POLYLINE,ou),this.define(fa.TEXT,su),this.define(fa.HTML,uu)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),$h=((Xh={})[Bo.COORDINATE]=gh,Xh[Bo.COLOR]=bh,Xh[Bo.PAINT]=bh,Xh[Bo.OPACITY_VALUE]=mh,Xh[Bo.LENGTH_PERCENTAGE]=vh,Xh[Bo.LENGTH_PERCENTAGE_12]=Eh,Xh[Bo.LENGTH_PERCENTAGE_14]=wh,Xh[Bo.SHADOW_BLUR]=Mh,Xh[Bo.LIST_OF_POINTS]=Ah,Xh[Bo.PATH]=_h,Xh[Bo.FILTER]=Th,Xh[Bo.Z_INDEX]=Ph,Xh[Bo.OFFSET_PATH]=kh,Xh[Bo.OFFSET_DISTANCE]=Sh,Xh[Bo.CLIP_PATH]=Oh,Xh[Bo.TRANSFORM]=xh,Xh[Bo.TRANSFORM_ORIGIN]=Nh,Xh[Bo.TEXT]=Ch,Xh[Bo.TEXT_TRANSFORM]=Ih,Xh),Zh=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:Bo.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:Bo.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:Bo.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:Bo.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:Bo.PAINT},{name:"shadowColor",interpolable:!0,syntax:Bo.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,syntax:Bo.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,syntax:Bo.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,syntax:Bo.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:Bo.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:Bo.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:Bo.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:Bo.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:Bo.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:Bo.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:Bo.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:Bo.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:Bo.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,syntax:Bo.FILTER},{name:"clipPath",syntax:Bo.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:Bo.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:"left top",layoutDependent:!0,syntax:Bo.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,layoutDependent:!0,syntax:Bo.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:Bo.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:Bo.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:Bo.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:Bo.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:Bo.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:Bo.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:Bo.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:Bo.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:Bo.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:Bo.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:Bo.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:Bo.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:Bo.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:Bo.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:Bo.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:Bo.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:Bo.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:Bo.PATH},{name:"points",layoutDependent:!0,syntax:Bo.LIST_OF_POINTS},{name:"text",layoutDependent:!0,defaultValue:"",syntax:Bo.TEXT},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:Bo.TEXT_TRANSFORM},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:Bo.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0},{name:"letterSpacing",layoutDependent:!0},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0}],Jh=function(){function t(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.cascadeProperties={}}return t.prototype.init=function(){var t=this;Zh.forEach((function(e){t.registerMetadata(e)}))},t.prototype.registerMetadata=function(t){var e=this;bt([t.name],mt(t.alias||[]),!1).forEach((function(n){e.cache[n]=t}))},t.prototype.unregisterMetadata=function(t){delete this.cache[t]},t.prototype.getMetadata=function(t){return this.cache[t]},t.prototype.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1});var i=n.skipUpdateAttribute,o=n.skipParse,a=!1;Object.keys(e).forEach((function(n){var o,s=mt(sf(n,e[n]),2),u=s[0],c=s[1];i||(t.attributes[u]=c),!a&&(null===(o=r.getMetadata(u))||void 0===o?void 0:o.layoutDependent)&&(a=!0)}));var s=Object.keys(e).sort((function(t,e){var n,i;return((null===(n=r.getMetadata(t))||void 0===n?void 0:n.parsePriority)||0)-((null===(i=r.getMetadata(e))||void 0===i?void 0:i.parsePriority)||0)}));o||s.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t)}));var u=!1;s.forEach((function(e){e in t.computedStyle&&(u=r.computeProperty(e,t.computedStyle[e],t))})),u?this.dirty=!0:(a&&this.updateGeometry(t),s.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),s.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))})))},t.prototype.parseProperty=function(t,e,n){var r=this.getMetadata(t),i=e;if((""===e||qo(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)i=new yu(e);else if(r){var o=r.keywords,a=r.syntax,s=a&&$h[a];if(o&&o.indexOf(e)>-1)i=new yu(e);else if(s){var u=ot.get(s);u&&u.parser&&(i=u.parser(e,n))}}return i},t.prototype.computeProperty=function(t,e,n){var r=this.getMetadata(t),i="g-root"===n.id,o=e instanceof pu?e.clone():e;if(r){var a=r.syntax,s=r.inherited,u=r.defaultValue;if(e instanceof yu){var c=e.value;if("unset"===c&&(c=s&&!i?"inherit":"initial"),"initial"===c)qo(u)||(e=this.parseProperty(t,u,n));else if("inherit"===c){var l=this.tryToResolveProperty(n,t,{inherited:!0});return l?(n.parsedStyle[t]=l,!1):(this.addUnresolveProperty(n,t),!0)}}var h=a&&$h[a];if(h){var f=ot.get(h);if(f&&f.calculator){var p=n.parsedStyle[t];o=f.calculator(t,p,e,n,this)}else o=e}else o=e}return n.parsedStyle[t]=o,!1},t.prototype.postProcessProperty=function(t,e){var n=this.getMetadata(t);if(n&&n.syntax){var r=n.syntax&&$h[n.syntax],i=ot.get(r);i&&i.postProcessor&&i.postProcessor(e)}},t.prototype.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},t.prototype.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];return(!(r instanceof yu)||"unset"!==r.value&&"initial"!==r.value&&"inherit"!==r.value)&&(!(r instanceof Pu&&Pu.isRelativeUnit(r.unit))&&r)}return!1},t.prototype.recalc=function(t){var e=this.unresolvedProperties[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete this.unresolvedProperties[t.entity]}},t.prototype.updateGeometry=function(t){var e,n=ot.get(ma)(t.nodeName);if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new Eo),r.renderBounds||(r.renderBounds=new Eo);var i=t.parsedStyle,o=n.update(i,t),s=o.width,u=o.height,c=o.depth,l=void 0===c?0:c,h=o.offsetX,f=void 0===h?0:h,p=o.offsetY,d=void 0===p?0:p,y=o.offsetZ,v=void 0===y?0:y,g=a.fromValues(s/2,u/2,l/2),m=i,b=m.lineWidth,T=m.increasedLineWidthForHitTesting,E=m.shadowColor,w=m.filter,M=void 0===w?[]:w,k=m.transformOrigin,S=i.anchor;t.nodeName===fa.TEXT&&delete i.anchor;var P=a.fromValues((1-2*(S&&S[0].value||0))*g[0]+f,(1-2*(S&&S[1].value||0))*g[1]+d,(1-2*(S&&(null===(e=S[2])||void 0===e?void 0:e.value)||0))*g[2]+v);r.contentBounds.update(P,g);var x=(((null==b?void 0:b.value)||0)+((null==T?void 0:T.value)||0))/2;if(a.add(g,g,a.fromValues(x,x,0)),r.renderBounds.update(P,g),E){var N=r.renderBounds,_=N.min,A=N.max,O=i,C=O.shadowBlur,I=O.shadowOffsetX,R=O.shadowOffsetY,D=C&&C.value||0,L=I&&I.value||0,F=R&&R.value||0,V=_[0]-D+L,B=A[0]+D+L,j=_[1]-D+F,G=A[1]+D+F;_[0]=Math.min(_[0],V),A[0]=Math.max(A[0],B),_[1]=Math.min(_[1],j),A[1]=Math.max(A[1],G),r.renderBounds.setMinMax(_,A)}M.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,a.add(r.renderBounds.halfExtents,r.renderBounds.halfExtents,a.fromValues(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,s=n[1].value,u=n[2].value,c=r.renderBounds,l=c.min,h=c.max,f=l[0]-u+o,p=h[0]+u+o,d=l[1]-u+s,y=h[1]+u+s;l[0]=Math.min(l[0],f),h[0]=Math.max(h[0],p),l[1]=Math.min(l[1],d),h[1]=Math.max(h[1],y),r.renderBounds.setMinMax(l,h)}})),S=i.anchor;var U=Ic(k[0],0,t),z=Ic(k[1],1,t);U-=(S&&S[0].value||0)*r.contentBounds.halfExtents[0]*2,z-=(S&&S[1].value||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(U,z),t.emit(So.GEOMETRY_BOUNDS_CHANGED,{}),wf(t)}},t.prototype.isPropertyInheritable=function(t){var e=this.getMetadata(t);return!!e&&e.inherited},ft([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],t.prototype,"init",null),t=ft([_({token:ga})],t)}();function Qh(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}function tf(t){return!qo(t)&&"string"==typeof t}function ef(t,e,n){var r=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(nf(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:ms(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,s=o+1,u=i[a].computedOffset,c=i[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===i.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:of(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&e<t.applyTo})).forEach((function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.style[n.property]=n.interpolation(o)}));else for(var n in r)nf(n)&&(t.style[n]=null)}}function nf(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var rf=function(t,e,n){return function(r){return n(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r))}};function of(t,e,n,r){var i=e,o=n,a=ot.get(ga).getMetadata(t);if(a&&a.syntax&&a.interpolable&&$h[a.syntax]){var s=ot.get($h[a.syntax]);if(s){s.parser&&(i=s.parser(e,r),o=s.parser(n,r));var u=s.mixer(i,o,r);if(u){var c=rf.apply(void 0,bt([],mt(u),!1));return function(t){return 0===t?e:1===t?n:c(t)}}}}return rf(!1,!0,(function(t){return t?n:e}))}var af={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}};function sf(t,e){var n,r=Qh(t),i=af[r];return[r=(null==i?void 0:i.alias)||r,(null===(n=null==i?void 0:i.values)||void 0===n?void 0:n[e])||e]}var uf=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function cf(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Yo(e)?"".concat(e,"px"):e.toString(),s=tf(n)?n.split(","):[n.value],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&uf.indexOf(c)<0&&(c='"'.concat(c,'"')),s[u]=c}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(s.join(","))}var lf=1,hf={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},ff={},pf=0;function df(t,e){if(t){var n="string"==typeof t?t:t.id||pf++;ff[n]&&ff[n].destroy(),ff[n]=e}}var yf="undefined"!=typeof window&&void 0!==window.document,vf=function(t){if(t.isRejected||t.isFulfilled)return t;var e,n=!0,r=!1,i=!1,o=t.then((function(t){return i=!0,n=!1,e=t,t}),(function(t){throw r=!0,n=!1,t}));return o.isFulfilled=function(){return i},o.isPending=function(){return n},o.isRejected=function(){return r},o.getFullFilledValue=function(){return e},o},gf=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},mf=function(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=gt(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(!e.has(a))return!1}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0},bf={keys:Object.keys,values:Object.values,entries:Object.entries};function Tf(t,e,n){yf&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")}function Ef(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function wf(t,e){void 0===e&&(e=!1);for(var n=t;n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),n=n.parentNode}t.emit(So.BOUNDS_CHANGED,{affectChildren:e})}var Mf,kf=l.defineToken("SceneGraphService"),Sf=function(){function t(){var t,e,n,r,i,s=this;this.rotate=(t=u.create(),function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var c=u.create();u.fromEuler(c,n[0],n[1],n[2]);var l=s.getRotation(e),h=s.getRotation(e.parentNode);u.copy(t,h),u.invert(t,t),u.multiply(c,t,c),u.multiply(o.localRotation,c,l),u.normalize(o.localRotation,o.localRotation),s.dirtifyLocal(e,o)}else s.rotateLocal(e,n)}),this.rotateLocal=(e=u.create(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=t.transformable;u.fromEuler(e,n[0],n[1],n[2]),u.mul(o.localRotation,o.localRotation,e),s.dirtifyLocal(t,o)}),this.setEulerAngles=(n=u.create(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=a.fromValues(e,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){u.fromEuler(o.localRotation,e[0],e[1],e[2]);var c=s.getRotation(t.parentNode);u.copy(n,u.invert(u.create(),c)),u.mul(o.localRotation,o.localRotation,n),s.dirtifyLocal(t,o)}else s.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;a.equals(e,a.create())||(a.transformQuat(e,e,i.localRotation),a.add(i.localPosition,i.localPosition,e),s.dirtifyLocal(t,i))},this.setPosition=(r=o.create(),function(t,e){var n=t.transformable;if(e=a.fromValues(e[0],e[1],e[2]||0),!a.equals(s.getPosition(t),e)){if(n.position=e,null!==t.parentNode&&t.parentNode.transformable){var i=t.parentNode.transformable;o.copy(r,i.worldTransform),o.invert(r,r),a.transformMat4(n.localPosition,e,r)}else a.copy(n.localPosition,e);s.dirtifyLocal(t,n)}}),this.translate=(i=a.create(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r)),a.equals(e,a.create())||(a.add(i,s.getPosition(t),e),s.setPosition(t,i))}),this.setRotation=function(){var t=u.create();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=u.fromValues(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var c=s.getRotation(e.parentNode);u.copy(t,c),u.invert(t,t),u.multiply(a.localRotation,t,n),u.normalize(a.localRotation,a.localRotation),s.dirtifyLocal(e,a)}else s.setLocalRotation(e,n)}}}return t.prototype.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},t.prototype.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},t.prototype.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,qo(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0);var i=t.transformable;i&&this.dirtifyWorld(t,i),i.frozen&&this.unfreezeParentToRoot(t)},t.prototype.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var r=t.parentNode.childNodes.indexOf(t);r>-1&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;if(!a.equals(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;u.fromEuler(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.setLocalPosition=function(t,e){var n=t.transformable;e=a.fromValues(e[0],e[1],e[2]||0),a.equals(n.localPosition,e)||(a.copy(n.localPosition,e),this.dirtifyLocal(t,n))},t.prototype.scaleLocal=function(t,e){var n=t.transformable;a.multiply(n.localScale,n.localScale,a.fromValues(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=a.fromValues(e[0],e[1],e[2]||n.localScale[2]);a.equals(r,n.localScale)||(a.copy(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=u.fromValues(e,n,r,i));var o=t.transformable;u.copy(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),wf(t,!0)},t.prototype.getPosition=function(t){var e=t.transformable;return o.getTranslation(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return o.getRotation(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return o.getScaling(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=o.getTranslation(a.create(),e),r=o.getRotation(u.create(),e),i=o.getScaling(a.create(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0])},t.prototype.getTransformedGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(Eo.isEmpty(n))return null;var r=new Eo;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry,r=e?n.renderBounds:n.contentBounds||null;return r&&new Eo(r.center,r.halfExtents)||new Eo},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(i?i.add(r):(i=new Eo).update(r.center,r.halfExtents))}));var o=t.style.clipPath;if(o){var a=this.getTransformedGeometryBounds(o,!0),s=void 0;a&&(s=new Eo).setFromTransformedAABB(a,this.getWorldTransform(t)),i?s&&(i=s.intersection(i)):i=s}return i&&(e?r.renderBounds=i:r.bounds=i),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,i||new Eo},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=o.create();t.parentNode.transformable&&(e=o.invert(o.create(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Eo.isEmpty(n)){var r=new Eo;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);Eo.isEmpty(i)||(r=new Eo).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=mt(r.getMin(),2),s=a[0],u=a[1],c=mt(r.getMax(),2),l=c[0],h=c[1];return new Ro(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),l-s,h-u)}return new Ro((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),t.dispatchEvent(new Go(So.ATTR_MODIFIED,t,null,null,"modelMatrix",Go.MODIFICATION,null,null))}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?o.multiply(e.worldTransform,r.worldTransform,e.localTransform):o.copy(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},ft([O(Do),dt("design:type",Function)],t.prototype,"sceneGraphSelectorFactory",void 0),t=ft([_({token:kf})],t)}(),Pf=l.defineToken("ContextService",{multiple:!1});!function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"}(Mf||(Mf={}));var xf,Nf,_f,Af=l.defineToken("RenderingContext"),Of=n(1),Cf=l.defineToken("RenderingPluginContribution"),If=function(){function t(){this.inited=!1,this.stats={total:0,rendered:0,renderedOnscreen:0},this.zIndexCounter=0,this.hooks={init:new Of.AsyncParallelHook,dirtycheck:new Of.SyncWaterfallHook(["object"]),cull:new Of.SyncWaterfallHook(["object"]),beginFrame:new Of.SyncHook([]),beforeRender:new Of.SyncHook(["objectToRender"]),render:new Of.SyncHook(["objectToRender"]),afterRender:new Of.SyncHook(["objectToRender"]),endFrame:new Of.SyncHook([]),destroy:new Of.SyncHook([]),pick:new Of.AsyncSeriesWaterfallHook(["result"]),pointerDown:new Of.SyncHook(["event"]),pointerUp:new Of.SyncHook(["event"]),pointerMove:new Of.SyncHook(["event"]),pointerOut:new Of.SyncHook(["event"]),pointerOver:new Of.SyncHook(["event"]),pointerWheel:new Of.SyncHook(["event"]),pointerCancel:new Of.SyncHook(["event"])}}return t.prototype.init=function(){return yt(this,void 0,void 0,(function(){var t=this;return vt(this,(function(e){switch(e.label){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(e){e.apply(t)})),[4,this.hooks.init.promise()];case 1:return e.sent(),this.inited=!0,[2]}}))}))},t.prototype.getStats=function(){return this.stats},t.prototype.render=function(t){this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root),(this.renderingContext.dirty||t.renderer.getConfig().enableDirtyRectangleRendering&&1===this.stats.total)&&(this.renderingContext.dirty||this.hooks.beginFrame.call(),this.stats.renderedOnscreen=this.stats.rendered,this.hooks.endFrame.call(),this.renderingContext.dirty=!1),this.renderingContext.renderReasons.clear())},t.prototype.renderDisplayObject=function(t){var e=this;this.styleValueRegistry.recalc(t);var n=this.hooks.dirtycheck.call(t);n&&(this.hooks.cull.call(n),this.stats.rendered++,this.renderingContext.dirty||(this.renderingContext.dirty=!0,this.hooks.beginFrame.call()),this.hooks.beforeRender.call(n),this.hooks.render.call(n),this.hooks.afterRender.call(n),t.renderable.dirty=!1),t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var r=t.sortable,i=!1;r.dirty&&(r.sorted=t.childNodes.slice().sort(Ef),i=!0,r.dirty=!1),(r.sorted||t.childNodes).forEach((function(t){e.renderDisplayObject(t)})),i&&t.forEach((function(t){t.emit(So.RENDER_ORDER_CHANGED,{renderOrder:t.sortable.renderOrder})}))},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call()},t.prototype.dirtify=function(){this.renderingContext.renderReasons.add(Mf.DISPLAY_OBJECT_CHANGED)},ft([st(Cf),dt("design:type",Object)],t.prototype,"renderingPluginProvider",void 0),ft([O(Af),dt("design:type",Object)],t.prototype,"renderingContext",void 0),ft([O(kf),dt("design:type",Object)],t.prototype,"sceneGraphService",void 0),ft([O(ga),dt("design:type",Object)],t.prototype,"styleValueRegistry",void 0),t=ft([_()],t)}(),Rf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ct(e,t),e}(jo),Df=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.handleTouchEvent=function(t,n){return yt(e,void 0,void 0,(function(){var e,r,i,o,a,s,u,c,l,h,f,p,d,y;return vt(this,(function(v){switch(v.label){case 0:return[4,this.createTouchEvent(t)];case 1:e=v.sent(),r=[];try{for(i=gt(e.changedTouches),o=i.next();!o.done;o=i.next())a=o.value,-1===r.indexOf(a.target)&&r.push(a.target)}catch(t){f={error:t}}finally{try{o&&!o.done&&(p=i.return)&&p.call(i)}finally{if(f)throw f.error}}s=function(t){e.target=t,e.targetTouches=e.touches.filter((function(e){return e.target===t})),u.dispatchEvent(e,n),u.freeEvent(e)},u=this;try{for(c=gt(r),l=c.next();!l.done;l=c.next())h=l.value,s(h)}catch(t){d={error:t}}finally{try{l&&!l.done&&(y=c.return)&&y.call(c)}finally{if(d)throw d.error}}return[2]}}))}))},e.onTouchStart=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof Lh?(this.handleTouchEvent(t,"touchstart"),[2]):[2]}))}))},e.onTouchMove=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof Lh?(this.handleTouchEvent(t,"touchmove"),[2]):[2]}))}))},e.onTouchEnd=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof Lh?(this.handleTouchEvent(t,"touchend"),[2]):[2]}))}))},e.onTouchCancel=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof Lh?(this.handleTouchEvent(t,"touchcancel"),[2]):[2]}))}))},e.onPointerDown=function(t){return yt(e,void 0,void 0,(function(){var e,n;return vt(this,(function(r){switch(r.label){case 0:return t instanceof Lh?[4,this.createPointerEvent(t)]:[2];case 1:return e=r.sent(),this.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType||"mouse"!==e.pointerType&&"pen"!==e.pointerType||(n=2===e.button,this.dispatchEvent(e,n?"rightdown":"mousedown")),this.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerUp=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c;return vt(this,(function(l){switch(l.label){case 0:return t instanceof Lh?(e=performance.now(),[4,this.createPointerEvent(t)]):[2];case 1:if(n=l.sent(),this.dispatchEvent(n,"pointerup"),"touch"===n.pointerType||"mouse"!==n.pointerType&&"pen"!==n.pointerType||(s=2===n.button,this.dispatchEvent(n,s?"rightup":"mouseup")),r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[t.button]),o=i,i&&!n.composedPath().includes(i)){for(a=i;a&&!n.composedPath().includes(a);)n.currentTarget=a,this.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?this.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(s=2===n.button,this.notifyTarget(n,s?"rightupoutside":"mouseupoutside")),Sa.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[t.button],o=a}return o&&((u=this.clonePointerEvent(n,"click")).target=o,u.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:u.target,timeStamp:e}),(c=r.clicksByButton[t.button]).target===u.target&&e-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=u.target,c.timeStamp=e,u.detail=c.clickCount,"mouse"===u.pointerType||"touch"===u.pointerType?this.dispatchEvent(u,"click"):this.dispatchEvent(u,"pointertap"),this.freeEvent(u)),this.freeEvent(n),[2]}}))}))},e.onPointerMove=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return t instanceof Lh?[4,this.createPointerEvent(t)]:[2];case 1:return e=f.sent(),n="mouse"===e.pointerType||"pen"===e.pointerType,r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.overTargets),r.overTargets&&i!==e.target?(o="mousemove"===t.type?"mouseout":"pointerout",[4,this.createPointerEvent(t,o,i||void 0)]):[3,5];case 2:return a=f.sent(),this.dispatchEvent(a,"pointerout"),n&&this.dispatchEvent(a,"mouseout"),e.composedPath().includes(i)?[3,4]:[4,this.createPointerEvent(t,"pointerleave",i||void 0)];case 3:for((s=f.sent()).eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,this.notifyTarget(s),n&&this.notifyTarget(s,"mouseleave"),Sa.isNode(s.target)&&(s.target=s.target.parentNode);this.freeEvent(s),f.label=4;case 4:this.freeEvent(a),f.label=5;case 5:if(i!==e.target){for(u="mousemove"===t.type?"mouseover":"pointerover",c=this.clonePointerEvent(e,u),this.dispatchEvent(c,"pointerover"),n&&this.dispatchEvent(c,"mouseover"),l=i&&Sa.isNode(i)&&i.parentNode;l&&l!==(Sa.isNode(this.rootTarget)&&this.rootTarget.parentNode)&&l!==e.target;)l=l.parentNode;if(!l||l===(Sa.isNode(this.rootTarget)&&this.rootTarget.parentNode)){for((h=this.clonePointerEvent(e,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==i&&h.target!==(Sa.isNode(this.rootTarget)&&this.rootTarget.parentNode);)h.currentTarget=h.target,this.notifyTarget(h),n&&this.notifyTarget(h,"mouseenter"),Sa.isNode(h.target)&&(h.target=h.target.parentNode);this.freeEvent(h)}this.freeEvent(c)}return this.dispatchEvent(e,"pointermove"),n&&(this.dispatchEvent(e,"mousemove"),this.cursor=this.getCursor(e.target)),r.overTargets=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerOut=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return t instanceof Lh?(e=this.trackingData(t.pointerId)).overTargets?(n="mouse"===t.pointerType||"pen"===t.pointerType,r=this.findMountedTarget(e.overTargets),[4,this.createPointerEvent(t,"pointerout",r||void 0)]):[3,3]:[2];case 1:return i=a.sent(),this.dispatchEvent(i),n&&this.dispatchEvent(i,"mouseout"),[4,this.createPointerEvent(t,"pointerleave",r||void 0)];case 2:for((o=a.sent()).eventPhase=o.AT_TARGET;o.target&&o.target!==(Sa.isNode(this.rootTarget)&&this.rootTarget.parentNode);)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),Sa.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=null,this.freeEvent(i),this.freeEvent(o),a.label=3;case 3:return this.cursor=null,[2]}}))}))},e.onPointerOver=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof Lh?(e=this.trackingData(t.pointerId),[4,this.createPointerEvent(t)]):[2];case 1:for(n=o.sent(),r="mouse"===n.pointerType||"pen"===n.pointerType,this.dispatchEvent(n,"pointerover"),r&&this.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(this.cursor=this.getCursor(n.target)),(i=this.clonePointerEvent(n,"pointerenter")).eventPhase=i.AT_TARGET;i.target&&i.target!==(Sa.isNode(this.rootTarget)&&this.rootTarget.parentNode);)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,"mouseenter"),Sa.isNode(i.target)&&(i.target=i.target.parentNode);return e.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i),[2]}}))}))},e.onPointerUpOutside=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof Lh?(e=this.trackingData(t.pointerId),n=this.findMountedTarget(e.pressTargetsByButton[t.button]),[4,this.createPointerEvent(t)]):[2];case 1:if(r=o.sent(),n){for(i=n;i;)r.currentTarget=i,this.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType||"mouse"!==r.pointerType&&"pen"!==r.pointerType||this.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),Sa.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}return this.freeEvent(r),[2]}}))}))},e.onWheel=function(t){return yt(e,void 0,void 0,(function(){var e;return vt(this,(function(n){switch(n.label){case 0:return t instanceof Fh?[4,this.createWheelEvent(t)]:[2];case 1:return e=n.sent(),this.dispatchEvent(e),this.freeEvent(e),[2]}}))}))},e}return ct(e,t),e.prototype.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("touchstart",this.onTouchStart),this.addEventMapping("touchmove",this.onTouchMove),this.addEventMapping("touchend",this.onTouchEnd),this.addEventMapping("touchcancel",this.onTouchCancel)},e.prototype.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Io(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.prototype.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Io(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,s=i.width,u=i.height,c=r.getPerspectiveInverse(),l=r.getWorldTransform(),h=o.multiply(o.create(),l,c),f=a.fromValues(e/s*2-1,2*(1-n/u)-1,0);return a.transformMat4(f,f,h),new Io(f[0],f[1])},e.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=o.multiply(o.create(),n,r),s=a.fromValues(t.x,t.y,0);a.transformMat4(s,s,i);var u=this.canvasConfig,c=u.width,l=u.height;return new Io((s[0]+1)/2*c,(1-(s[1]+1)/2)*l)},e.prototype.setPickHandler=function(t){this.pickHandler=t},e.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},e.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},e.prototype.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},e.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)Sa.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.prototype.hitTest=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return e=t.viewportX,n=t.viewportY,r=this.canvasConfig,i=r.width,o=r.height,e<0||n<0||e>i||n>o?[2,null]:[4,this.pickHandler(t)];case 1:return[2,a.sent()||this.rootTarget||null]}}))}))},e.prototype.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},e.prototype.pickTarget=function(t){return yt(this,void 0,void 0,(function(){return vt(this,(function(e){return[2,this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})]}))}))},e.prototype.createPointerEvent=function(t,e,n){return yt(this,void 0,void 0,(function(){var r,i,o,a,s;return vt(this,(function(u){switch(u.label){case 0:return r=this.allocateEvent(Lh),this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,i=this.isNativeEventFromCanvas(r),r.originalEvent=t,o=r,null==n?[3,1]:(a=n,[3,4]);case 1:return(s=i)?[4,this.pickTarget(r)]:[3,3];case 2:s=u.sent(),u.label=3;case 3:a=s,u.label=4;case 4:return o.target=a,"string"==typeof e&&(r.type=e),[2,r]}}))}))},e.prototype.createTouchEvent=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u;return vt(this,(function(c){switch(c.label){case 0:(e=this.allocateEvent(Rf)).isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.nativeEvent=t.nativeEvent,e.originalEvent=t,this.copyTouchData(t,e),i=0,c.label=1;case 1:return i<t.changedTouches.length?(o=t.changedTouches[i],a=this.isNativeEventFromCanvas(t),n=o,(r=a)?[4,this.pickTarget(o)]:[3,3]):[3,5];case 2:r=c.sent(),c.label=3;case 3:n.target=r,c.label=4;case 4:return i++,[3,1];case 5:i=0,c.label=6;case 6:return i<t.touches.length?(o=t.touches[i],a=this.isNativeEventFromCanvas(t),s=o,(u=a)?[4,this.pickTarget(o)]:[3,8]):[3,10];case 7:u=c.sent(),c.label=8;case 8:s.target=u,c.label=9;case 9:return i++,[3,6];case 10:return e.touches=t.touches,e.changedTouches=t.changedTouches,[2,e]}}))}))},e.prototype.createWheelEvent=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return e=this.allocateEvent(Fh),this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,n=this.isNativeEventFromCanvas(e),r=e,(i=n)?[4,this.pickTarget(e)]:[3,2];case 1:i=o.sent(),o.label=2;case 2:return r.target=i,[2,e]}}))}))},e.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(Lh);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.prototype.copyPointerData=function(t,e){t instanceof Lh&&e instanceof Lh&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.prototype.copyMouseData=function(t,e){t instanceof Dh&&e instanceof Dh&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.prototype.copyTouchData=function(t,e){return yt(this,void 0,void 0,(function(){return vt(this,(function(n){return e.altKey=t.altKey,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,[2]}))}))},e.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},e.prototype.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||Sa.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.prototype.getCursor=function(t){for(var e=t;e;){var n=Ca.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Sa.isNode(e)&&e.parentNode}},ft([O(Af),dt("design:type",Object)],e.prototype,"renderingContext",void 0),ft([O(Pf),dt("design:type",Object)],e.prototype,"contextService",void 0),ft([O(ka),dt("design:type",Object)],e.prototype,"canvasConfig",void 0),ft([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],e.prototype,"init",null),e=ft([_()],e)}(Tt.EventEmitter),Lf=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t=ft([_()],t)}(),Ff={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Vf=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Bf=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),jf=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),Gf=function(){function t(){var t=this;this.cache={},this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!jf.exec(n)&&!Bf.exec(e))},this.trimByKinsokuShorui=function(t){var e=bt([],mt(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=Ff.MetricsString+Ff.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(Ff.BaselineSymbol).width),u=Ff.HeightMultiplier*s;s=s*Ff.BaselineMultiplier|0,r.width=a,r.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var c=i.getImageData(0,0,a||1,u||1).data,l=c.length,h=4*a,f=0,p=0,d=!1;for(f=0;f<s;++f){for(var y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p+=h}for(n.ascent=s-f,p=l-h,d=!1,f=u;f>s;--f){for(y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p-=h}return n.descent=f-s,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=void 0===o?0:o,s=e.lineWidth,u=e.textBaseline,c=e.textAlign,l=e.letterSpacing,h=void 0===l?0:l,f=e.leading,p=void 0===f?0:f,d=cf(e),y=this.measureFont(d,n);0===y.fontSize&&(y.fontSize=r.value,y.ascent=r.value);var v=this.offscreenCanvas.getOrCreateContext(n);v.font=d;for(var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),m=new Array(g.length),b=0,T=0;T<g.length;T++){var E=v.measureText(g[T]).width+(g[T].length-1)*h;m[T]=E,b=Math.max(b,E)}var w=b+s.value,M=a||y.fontSize+s.value,k=Math.max(M,y.fontSize+s.value)+(g.length-1)*(M+p);M+=p;var S=0;return"middle"===u.value?S=-k/2:"bottom"===u.value||"alphabetic"===u.value||"ideographic"===u.value?S=-k:"top"!==u.value&&"hanging"!==u.value||(S=0),{font:d,width:w,height:k,lines:g,lineWidths:m,lineHeight:M,maxLineWidth:b,fontProperties:y,lineMetrics:m.map((function(t,e){var n=0;return"center"===c.value?n-=t/2:"right"!==c.value&&"end"!==c.value||(n-=t),new Ro(n-s.value/2,S+e*M,t+s.value,M)}))}},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,s=void 0===a?0:a,u=this.offscreenCanvas.getOrCreateContext(n),c=o+s,l=[],h=0,f=0,p={},d=function(t){return r.getFromCache(t,s,p,u)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=d(e);if(r.isNewline(e))return h++,f=0,void(l[h]="");if(f>0&&f+a>c){if(h++,f=0,l[h]="",r.isBreakingSpace(e))return;r.canBreakInLastChar(e)||(l=r.trimToBreakable(l),f=r.sumTextWidthByCache(l[h]||"",p)),r.shouldBreakByKinsokuShorui(e,o)&&(l=r.trimByKinsokuShorui(l),f+=d(i||""))}f+=a,l[h]=(l[h]||"")+e})),l.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&Ff.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&Ff.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=bt([],mt(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+1,a=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(o,n.length),e[e.length-2]=n.slice(0,a),e},t.prototype.canBreakInLastChar=function(t){return!t||!Vf.test(t)},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!Vf.test(t[e]))return e;return-1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},ft([O(Lf),dt("design:type",Lf)],t.prototype,"offscreenCanvas",void 0),t=ft([_()],t)}(),Uf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n.value,height:2*n.value}},t=ft([_({token:{token:ba,named:fa.CIRCLE}})],t)}(),zf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry;return{width:2*n.value,height:2*r.value}},t=ft([_({token:{token:ba,named:fa.ELLIPSE}})],t)}(),Hf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=0,a=0;return r instanceof Pu&&r.unit===Zs.kPixels&&(o=r.value),i instanceof Pu&&i.unit===Zs.kPixels&&(a=i.value),n&&!tf(n)&&(o||(o=n.width),a||(a=n.height)),r instanceof Pu&&(r.value=o),i instanceof Pu&&(i.value=a),{width:o,height:a}},t=ft([_({token:[{token:ba,named:fa.RECT},{token:ba,named:fa.IMAGE},{token:ba,named:fa.GROUP}]})],t)}(),Wf=function(){function t(){}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,s=t.fontWeight,u=t.fontVariant;return n&&o&&a&&s&&u&&r&&i},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,s=t.lineWidth,u=t.textBaseline,c=t.dx,l=t.dy,h=((null===(r=null===(n=null==e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var f=this.textService.measureText(i,t,h);t.metrics=f;var p=f.width,d=f.height,y=f.lineHeight,v=f.fontProperties,g=a.fromValues(p/2,d/2,0),m=[0,1],b=0;"center"===o.value?(b=s.value/2,m=[.5,1]):"right"!==o.value&&"end"!==o.value||(b=s.value,m=[1,1]);var T=0;return"middle"===u.value?T=g[1]:"top"===u.value||"hanging"===u.value?T=2*g[1]:"alphabetic"===u.value?T=y-v.ascent:"bottom"!==u.value&&"ideographic"!==u.value||(T=0),c&&(b+=c.value),l&&(T+=l.value),t.anchor=[new Pu(m[0]),new Pu(m[1]),new Pu(0)],{width:2*g[0],height:2*g[1],offsetX:b,offsetY:T}},ft([O(Gf),dt("design:type",Gf)],t.prototype,"textService",void 0),t=ft([_({token:{token:ba,named:fa.TEXT}})],t)}(),qf=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e.value,r.value),a=Math.max(e.value,r.value),s=Math.min(n.value,i.value);return{width:a-o,height:Math.max(n.value,i.value)-s}},t=ft([_({token:{token:ba,named:fa.LINE}})],t)}(),Yf=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,bt([],mt(e.map((function(t){return t[0]}))),!1)),r=Math.max.apply(Math,bt([],mt(e.map((function(t){return t[0]}))),!1)),i=Math.min.apply(Math,bt([],mt(e.map((function(t){return t[1]}))),!1));return{width:r-n,height:Math.max.apply(Math,bt([],mt(e.map((function(t){return t[1]}))),!1))-i}},t=ft([_({token:[{token:ba,named:fa.POLYLINE},{token:ba,named:fa.POLYGON}]})],t)}(),Xf=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t=ft([_({token:{token:ba,named:fa.PATH}})],t)}(),Kf=Q((function(t){Object(f.decorate)(N(),Tt.EventEmitter),t(Et),t(Vo),t({token:Do,useFactory:function(t){return function(){return t.container.get(Lo)}}}),t(Sf),t(Lf),t(Gf),t(Uf),t(zf),t(Hf),t(Wf),t(qf),t(Yf),t(Xf),t({token:ma,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(ba,n)&&(e[n]=t.container.getNamed(ba,n)),e[n]}}}),t(Zl),t(Jh),t(vh),t(gh),t(mh),t(bh),t(Th),t(Eh),t(Mh),t(kh),t(Sh),t(Ph),t(xh),t(Nh),t(_h),t(Ah),t(Oh),t(Ch),t(Ih),t(wh),t(Ql),t($l),t({token:Yl,useFactory:function(t){return function(e){var n=t.container.createChild();return n.register({token:Xl,useValue:e}),n.get($l)}}}),t({token:Dl,useFactory:function(t){return function(e){var n=t.container.createChild();n.register(Vl),n.register(Wl),n.register({token:zl,useFactory:function(t){return function(e){var n=t.container.createChild();return n.register({token:Hl,useValue:e}),n.get(Wl)}}}),n.register(Ul),n.register({token:Bl,useFactory:function(t){return function(e,n){var r=t.container.createChild();return r.register({token:jl,useValue:e}),r.register({token:Gl,useValue:n}),r.get(Ul)}}}),n.register(nh),n.register({token:th,useFactory:function(t){return function(e){var n=t.container.createChild();return n.register({token:eh,useValue:e}),n.get(nh)}}});var r=n.get(zl),i=n.get(th),o=n.get(Bl);return n.register({token:Ll,useValue:lt(lt({},e),{layoutChildrenFactory:r,layoutFragmentFactory:i,fragmentResultFactory:o})}),n.get(Vl)}}})})),$f=l.defineToken("DefaultCamera");!function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"}(xf||(xf={})),function(t){t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC"}(Nf||(Nf={})),function(t){t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE"}(_f||(_f={}));var Zf,Jf={UPDATED:"updated"},Qf=Math.PI/180,tp=180/Math.PI,ep=function(t){function e(e,n){void 0===e&&(e=xf.EXPLORING),void 0===n&&(n=Nf.DEFAULT);var r=t.call(this)||this;return r.matrix=o.create(),r.right=a.fromValues(1,0,0),r.up=a.fromValues(0,1,0),r.forward=a.fromValues(0,0,1),r.position=a.fromValues(0,0,1),r.focalPoint=a.fromValues(0,0,0),r.distanceVector=a.fromValues(0,0,-1),r.distance=1,r.azimuth=0,r.elevation=0,r.roll=0,r.relAzimuth=0,r.relElevation=0,r.relRoll=0,r.dollyingStep=0,r.maxDistance=1/0,r.minDistance=-1/0,r.zoom=1,r.rotateWorld=!1,r.fov=30,r.near=.1,r.far=1e3,r.aspect=1,r.projectionMatrix=o.create(),r.projectionMatrixInverse=o.create(),r.jitteredProjectionMatrix=void 0,r.enableUpdate=!0,r.type=xf.EXPLORING,r.trackingMode=Nf.DEFAULT,r.projectionMode=_f.PERSPECTIVE,r.frustum=new Po,r.landmarks=[],r.orthoMatrix=o.create(),r.setType(e,n),r}return ct(e,t),e.prototype.isOrtho=function(){return this.projectionMode===_f.ORTHOGRAPHIC},e.prototype.getProjectionMode=function(){return this.projectionMode},e.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.prototype.getFrustum=function(){return this.frustum},e.prototype.getPosition=function(){return this.position},e.prototype.getFocalPoint=function(){return this.focalPoint},e.prototype.getDollyingStep=function(){return this.dollyingStep},e.prototype.getNear=function(){return this.near},e.prototype.getFar=function(){return this.far},e.prototype.getZoom=function(){return this.zoom},e.prototype.getOrthoMatrix=function(){return this.orthoMatrix},e.prototype.getView=function(){return this.view},e.prototype.setEnableUpdate=function(t){this.enableUpdate=t},e.prototype.setType=function(t,e){return this.type=t,this.type===xf.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===xf.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},e.prototype.setTrackingMode=function(t){if(this.type!==xf.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.prototype.getViewTransform=function(){return o.invert(o.create(),this.matrix)},e.prototype.getWorldTransform=function(){return this.matrix},e.prototype.jitterProjectionMatrix=function(t,e){var n=o.fromTranslation(o.create(),[t,e,0]);this.jitteredProjectionMatrix=o.multiply(o.create(),n,this.projectionMatrix)},e.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},e.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.prototype.setNear=function(t){return this.projectionMode===_f.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.prototype.setFar=function(t){return this.projectionMode===_f.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===_f.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===_f.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===_f.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===_f.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.prototype.setPerspective=function(t,e,n,r){var i;this.projectionMode=_f.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var s=this.near*Math.tan(.5*Qf*this.fov)/this.zoom,u=2*s,c=this.aspect*u,l=-.5*c;if(null===(i=this.view)||void 0===i?void 0:i.enabled){var h=this.view.fullWidth,f=this.view.fullHeight;l+=this.view.offsetX*c/h,s-=this.view.offsetY*u/f,c*=this.view.width/h,u*=this.view.height/f}return la(this.projectionMatrix,l,l+c,s,s-u,t,this.far),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.prototype.setOrthographic=function(t,e,n,r,i,s){var u;this.projectionMode=_f.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=s;var c=(this.rright-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),h=(this.rright+this.left)/2,f=(this.top+this.bottom)/2,p=h-c,d=h+c,y=f+l,v=f-l;if(null===(u=this.view)||void 0===u?void 0:u.enabled){var g=(this.rright-this.left)/this.view.fullWidth/this.zoom,m=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(p+=g*this.view.offsetX)+g*this.view.width,v=(y-=m*this.view.offsetY)-m*this.view.height}return o.ortho(this.projectionMatrix,p,d,v,y,i,s),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=Qo(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=a.fromValues(0,1,0);if(this.focalPoint=Qo(t,e,n),this.trackingMode===Nf.CINEMATIC){var i=a.subtract(a.create(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var s=a.length(i),u=Math.asin(e/s)*tp,c=90+Math.atan2(n,t)*tp,l=o.create();o.rotateY(l,l,c*Qf),o.rotateX(l,l,u*Qf),r=a.transformMat4(a.create(),[0,1,0],l)}return o.invert(this.matrix,o.lookAt(o.create(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.prototype.getDistance=function(){return this.distance},e.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=a.create();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},e.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},e.prototype.setMinDistance=function(t){return this.minDistance=t,this},e.prototype.setAzimuth=function(t){return this.azimuth=Jo(t),this.computeMatrix(),this._getAxes(),this.type===xf.ORBITING||this.type===xf.EXPLORING?this._getPosition():this.type===xf.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getAzimuth=function(){return this.azimuth},e.prototype.setElevation=function(t){return this.elevation=Jo(t),this.computeMatrix(),this._getAxes(),this.type===xf.ORBITING||this.type===xf.EXPLORING?this._getPosition():this.type===xf.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getElevation=function(){return this.elevation},e.prototype.setRoll=function(t){return this.roll=Jo(t),this.computeMatrix(),this._getAxes(),this.type===xf.ORBITING||this.type===xf.EXPLORING?this._getPosition():this.type===xf.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getRoll=function(){return this.roll},e.prototype.rotate=function(t,e,n){if(this.relElevation=Jo(e),this.relAzimuth=Jo(t),this.relRoll=Jo(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===xf.EXPLORING){var r=u.setAxisAngle(u.create(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*Qf),i=u.setAxisAngle(u.create(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*Qf),a=u.setAxisAngle(u.create(),[0,0,1],this.relRoll*Qf),s=u.multiply(u.create(),i,r);s=u.multiply(u.create(),s,a);var c=o.fromQuat(o.create(),s);o.translate(this.matrix,this.matrix,[0,0,-this.distance]),o.multiply(this.matrix,this.matrix,c),o.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===xf.ORBITING||this.type===xf.EXPLORING?this._getPosition():this.type===xf.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=Qo(t,e,0),r=a.clone(this.position);return a.add(r,r,a.scale(a.create(),this.right,n[0])),a.add(r,r,a.scale(a.create(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=a.clone(this.position),r=this.dollyingStep,i=this.distance+t*this.dollyingStep;return r=Math.max(Math.min(i,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===xf.ORBITING||this.type===xf.EXPLORING?this._getDistance():this.type===xf.TRACKING&&a.add(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.createLandmark=function(t,n){void 0===n&&(n={});var r=n.position,i=void 0===r?this.position:r,s=n.focalPoint,u=void 0===s?this.focalPoint:s,c=n.roll,l=n.zoom,h=new e;h.setType(this.type,void 0),h.setPosition(i[0],i[1]||this.position[1],i[2]||this.position[2]),h.setFocalPoint(u[0],u[1]||this.focalPoint[1],u[2]||this.focalPoint[2]),h.setRoll(c||this.roll),h.setZoom(l||this.zoom);var f={name:t,matrix:o.clone(h.matrix),right:a.clone(h.right),up:a.clone(h.up),forward:a.clone(h.forward),position:a.clone(h.position),focalPoint:a.clone(h.focalPoint),distanceVector:a.clone(h.distanceVector),distance:h.distance,dollyingStep:h.dollyingStep,azimuth:h.azimuth,elevation:h.elevation,roll:h.roll,relAzimuth:h.relAzimuth,relElevation:h.relElevation,relRoll:h.relRoll,zoom:h.zoom};return this.landmarks.push(f),f},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=tf(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Yo(e)?{duration:e}:e,o=i.easing,s=void 0===o?"linear":o,u=i.duration,c=void 0===u?100:u,l=i.easingFunction,h=void 0===l?void 0:l,f=i.onfinish,p=void 0===f?void 0:f;if(0===c)return this.syncFromLandmark(r),void(p&&p());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,y=r.position,v=r.focalPoint,g=r.zoom,m=r.roll,b=h||ms(s),T=function(){n.setFocalPoint(v),n.setPosition(y),n.setRoll(m),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),p&&p()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var r=e-d;if(r>c)T();else{var i,o,s=b(r/c),u=a.create(),l=a.create();a.lerp(u,n.focalPoint,v,s),a.lerp(l,n.position,y,s),o=n.roll*(1-s)+m*s,i=n.zoom*(1-s)+g*s,n.setFocalPoint(u),n.setPosition(l),n.setRoll(o),n.setZoom(i),a.dist(u,v)+a.dist(l,y)<=.01?T():(n.computeMatrix(),n.triggerUpdate(),r<c&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t)))}}))}},e.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.prototype.computeMatrix=function(){var t=u.setAxisAngle(u.create(),[0,0,1],this.roll*Qf);o.identity(this.matrix);var e=u.setAxisAngle(u.create(),[1,0,0],(this.rotateWorld&&this.type!==xf.TRACKING||this.type===xf.TRACKING?1:-1)*this.elevation*Qf),n=u.setAxisAngle(u.create(),[0,1,0],(this.rotateWorld&&this.type!==xf.TRACKING||this.type===xf.TRACKING?1:-1)*this.azimuth*Qf),r=u.multiply(u.create(),n,e);r=u.multiply(u.create(),r,t);var i=o.fromQuat(o.create(),r);this.type===xf.ORBITING||this.type===xf.EXPLORING?(o.translate(this.matrix,this.matrix,this.focalPoint),o.multiply(this.matrix,this.matrix,i),o.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===xf.TRACKING&&(o.translate(this.matrix,this.matrix,this.position),o.multiply(this.matrix,this.matrix,i))},e.prototype._setPosition=function(t,e,n){this.position=Qo(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},e.prototype._getAxes=function(){a.copy(this.right,Qo(s.transformMat4(s.create(),[1,0,0,0],this.matrix))),a.copy(this.up,Qo(s.transformMat4(s.create(),[0,1,0,0],this.matrix))),a.copy(this.forward,Qo(s.transformMat4(s.create(),[0,0,1,0],this.matrix))),a.normalize(this.right,this.right),a.normalize(this.up,this.up),a.normalize(this.forward,this.forward)},e.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=a.length(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===xf.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*tp,this.azimuth=Math.atan2(-t,-n)*tp):(this.elevation=-Math.asin(e/r)*tp,this.azimuth=-Math.atan2(-t,-n)*tp)},e.prototype._getPosition=function(){a.copy(this.position,Qo(s.transformMat4(s.create(),[0,0,0,1],this.matrix))),this._getDistance()},e.prototype._getFocalPoint=function(){a.transformMat3(this.distanceVector,[0,0,-this.distance],i.fromMat4(i.create(),this.matrix)),a.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e.prototype._getDistance=function(){this.distanceVector=a.subtract(a.create(),this.focalPoint,this.position),this.distance=a.length(this.distanceVector),this.dollyingStep=this.distance/100},e.prototype._getOrthoMatrix=function(){if(this.projectionMode===_f.ORTHOGRAPHIC){var t=this.position,e=u.setAxisAngle(u.create(),[0,0,1],-this.roll*Math.PI/180);o.fromRotationTranslationScaleOrigin(this.orthoMatrix,e,a.fromValues((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),a.fromValues(this.zoom,this.zoom,1),t)}},e.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=o.multiply(o.create(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(Jf.UPDATED)}},e.prototype.syncFromLandmark=function(t){this.matrix=o.copy(this.matrix,t.matrix),this.right=a.copy(this.right,t.right),this.up=a.copy(this.up,t.up),this.forward=a.copy(this.forward,t.forward),this.position=a.copy(this.position,t.position),this.focalPoint=a.copy(this.focalPoint,t.focalPoint),this.distanceVector=a.copy(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(Tt.EventEmitter),np=function(){function t(t){this.plugins=[],this.config=lt({enableDirtyCheck:!0,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}return t.prototype.registerPlugin=function(t){this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex((function(e){return e===t}));e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find((function(e){return e.name===t}))},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}(),rp=n(14),ip=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this;t.hooks.dirtycheck.tap(e.tag,(function(t){if(t){var e=n.canvasConfig.renderer.getConfig().enableDirtyCheck,r=t.renderable,i=n.renderingContext.renderReasons.has(Mf.CAMERA_CHANGED),o=n.renderingContext.dirty;return r.dirty||i||!e&&o?t:null}return t}))},t.tag="DirtyCheck",ft([O(ka),dt("design:type",Object)],t.prototype,"canvasConfig",void 0),ft([O(Af),dt("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=ft([_({contrib:Cf})],t)}(),op=l.defineToken("CullingStrategyContribution"),ap=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this.strategyProvider.getContributions();t.hooks.cull.tap(e.tag,(function(t){if(t){var e=t.cullable;return 0===n.length?e.visible=!0:e.visible=n.every((function(e){return e.isVisible(t)})),!e.isCulled()&&t.isVisible()?t:null}return t})),t.hooks.afterRender.tap(e.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},t.tag="Culling",ft([st(op),dt("design:type",Object)],t.prototype,"strategyProvider",void 0),t=e=ft([_({contrib:Cf})],t)}(),sp=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(e){e.target.renderable.dirty=!0,t.dirtify()},i=function(){t.dirtify()},o=function(e){var r=e.target;n.styleValueRegistry.recalc(r),wf(r),t.dirtify()},a=function(e){wf(e.target),t.dirtify()};t.hooks.init.tapPromise(e.tag,(function(){return yt(n,void 0,void 0,(function(){return vt(this,(function(t){return this.renderingContext.root.addEventListener(So.MOUNTED,o),this.renderingContext.root.addEventListener(So.UNMOUNTED,a),this.renderingContext.root.addEventListener(So.ATTR_MODIFIED,r),this.renderingContext.root.addEventListener(So.BOUNDS_CHANGED,i),[2]}))}))})),t.hooks.destroy.tap(e.tag,(function(){n.renderingContext.root.removeEventListener(So.MOUNTED,o),n.renderingContext.root.removeEventListener(So.UNMOUNTED,a),n.renderingContext.root.removeEventListener(So.ATTR_MODIFIED,r),n.renderingContext.root.removeEventListener(So.BOUNDS_CHANGED,i)}))},t.tag="Prepare",ft([O(Af),dt("design:type",Object)],t.prototype,"renderingContext",void 0),ft([O(ga),dt("design:type",Object)],t.prototype,"styleValueRegistry",void 0),t=e=ft([_({contrib:Cf})],t)}(),up=[fa.CIRCLE,fa.ELLIPSE,fa.IMAGE,fa.RECT,fa.LINE,fa.POLYLINE,fa.POLYGON,fa.TEXT,fa.PATH,fa.HTML],cp=function(){function t(){}return t.prototype.isVisible=function(t){var e,n,r=t.cullable;if(!r.enable)return!0;var i=t.getRenderBounds();if(Eo.isEmpty(i))return!1;var o=this.camera.getFrustum(),a=null===(n=null===(e=t.parentNode)||void 0===e?void 0:e.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,i,a||ho.INDETERMINATE,o.planes),r.visible=r.visibilityPlaneMask!==ho.OUTSIDE,r.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===ho.OUTSIDE||n===ho.INSIDE)return n;for(var i=ho.INSIDE,o=up.indexOf(t.nodeName)>-1,s=0,u=r.length;s<u;++s){var c=1<<s;if(0!=(n&c)&&(!o||4!==s&&5!==s)){var l=r[s],h=l.normal,f=l.distance;if(a.dot(h,e.getPositiveFarPoint(r[s]))+f<0)return ho.OUTSIDE;a.dot(h,e.getNegativeFarPoint(r[s]))+f<0&&(i|=c)}}return i},ft([O($f),dt("design:type",ep)],t.prototype,"camera",void 0),t=ft([_({contrib:op})],t)}(),lp=function(){function t(){var t=this;this.autoPreventDefault=!0,this.rootPointerEvent=new Lh(null),this.rootWheelEvent=new Fh(null),this.onPointerMove=function(e){var n,r,i=null===(r=null===(n=t.renderingContext.root)||void 0===n?void 0:n.ownerDocument)||void 0===r?void 0:r.defaultView;if(!i.supportTouchEvent||"touch"!==e.pointerType){var o=t.normalizeToPointerEvent(e,i),a=t.bootstrapEvent(t.rootPointerEvent,o,i);t.eventService.mapEvent(a),t.setCursor(t.eventService.cursor)}}}var e;return e=t,t.prototype.apply=function(t){var n=this,r=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler((function(t){return yt(n,void 0,void 0,(function(){return vt(this,(function(e){switch(e.label){case 0:return[4,this.renderingService.hooks.pick.promise({position:t,picked:[],topmost:!0})];case 1:return[2,e.sent().picked[0]||null]}}))}))})),t.hooks.pointerWheel.tap(e.tag,(function(t){var e=n.normalizeWheelEvent(t);n.eventService.mapEvent(e)})),t.hooks.pointerDown.tap(e.tag,(function(t){if(!r.supportTouchEvent||"touch"!==t.pointerType){var e=n.normalizeToPointerEvent(t,r);if(n.autoPreventDefault&&e.isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();var i=n.bootstrapEvent(n.rootPointerEvent,e,r);n.eventService.mapEvent(i),n.setCursor(n.eventService.cursor)}})),t.hooks.pointerUp.tap(e.tag,(function(t){if(!r.supportTouchEvent||"touch"!==t.pointerType){var e=n.contextService.getDomElement(),i=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":"",o=n.normalizeToPointerEvent(t,r),a=n.bootstrapEvent(n.rootPointerEvent,o,r);a.type+=i,n.eventService.mapEvent(a),n.setCursor(n.eventService.cursor)}})),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove),t.hooks.pointerCancel.tap(e.tag,(function(t){if(!r.supportTouchEvent||"touch"!==t.pointerType){var e=n.normalizeToPointerEvent(t,r);if(n.autoPreventDefault&&e.isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();var i=n.bootstrapEvent(n.rootPointerEvent,e,r);n.eventService.mapEvent(i),n.setCursor(n.eventService.cursor)}}))},t.prototype.formatTouch=function(t){var e={nativeTouch:t,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY,viewportX:0,viewportY:0,canvasX:0,canvasY:0,x:0,y:0,target:void 0,force:t.force,identifier:t.identifier,pageX:t.pageX,pageY:t.pageY,radiusX:t.radiusX,radiusY:t.radiusY,rotationAngle:t.rotationAngle},n=this.eventService.client2Viewport(new Io(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewportX=r,e.viewportY=i;var o=this.eventService.viewport2Canvas({x:r,y:i}),a=o.x,s=o.y;return e.canvasX=a,e.canvasY=s,e.x=a,e.y=s,e},t.prototype.bootstrapEvent=function(t,e,n){if(t.pointerType=e.pointerType,"touch"!==t.pointerType){var r=t;r.view=n,r.originalEvent=null,r.nativeEvent=e,r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist,this.transferMouseData(r,e);var i=this.eventService.client2Viewport(new Io(e.clientX,e.clientY)),o=i.x,a=i.y;r.viewport.x=o,r.viewport.y=a;var s=this.eventService.viewport2Canvas(r.viewport),u=s.x,c=s.y;r.canvas.x=u,r.canvas.y=c,r.global.copyFrom(r.canvas),r.offset.copyFrom(r.canvas),r.isTrusted=e.isTrusted,"pointerleave"===r.type&&(r.type="pointerout"),r.type.startsWith("mouse")&&(r.type=r.type.replace("mouse","pointer"))}else{var l=t,h=e,f=[],p=[];if(h.changedTouches)for(var d=0;d<h.changedTouches.length;d++)f.push(this.formatTouch(h.changedTouches[d]));if(h.touches)for(d=0;d<h.touches.length;d++)p.push(this.formatTouch(h.touches[d]));l.nativeEvent=e,l.isTrusted=e.isTrusted,l.timeStamp=performance.now(),l.type=e.type,l.altKey=e.altKey,l.metaKey=e.metaKey,l.shiftKey=e.shiftKey,l.ctrlKey=e.ctrlKey,l.changedTouches=f,l.touches=p,l.targetTouches=[]}return t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new Io(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.eventService.viewport2Canvas(e.viewport),a=o.x,s=o.y;return e.canvas.x=a,e.canvas.y=s,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){if(e.isTouchEvent(t))return t.isNormalized=!0,t.pointerType="touch",t;if(e.isMouseEvent(t)){var n=t;return Wo(n.isPrimary)&&(n.isPrimary=!0),Wo(n.width)&&(n.width=1),Wo(n.height)&&(n.height=1),Wo(n.tiltX)&&(n.tiltX=0),Wo(n.tiltY)&&(n.tiltY=0),Wo(n.pointerType)&&(n.pointerType="mouse"),Wo(n.pointerId)&&(n.pointerId=lf),Wo(n.pressure)&&(n.pressure=.5),Wo(n.twist)&&(n.twist=0),Wo(n.tangentialPressure)&&(n.tangentialPressure=0),n.isNormalized=!0,n}return t},t.tag="Event",ft([O(ka),dt("design:type",Object)],t.prototype,"canvasConfig",void 0),ft([O(Pf),dt("design:type",Object)],t.prototype,"contextService",void 0),ft([O(If),dt("design:type",If)],t.prototype,"renderingService",void 0),ft([O(Af),dt("design:type",Object)],t.prototype,"renderingContext",void 0),ft([O(Df),dt("design:type",Df)],t.prototype,"eventService",void 0),t=e=ft([_({contrib:Cf})],t)}(),hp=Q((function(t){et.register(t,Cf,{cache:!1}),et.register(t,op,{cache:!1}),t(If),t(Df),t(lp),t(sp),t(ip),t(ap),t(cp)}));!function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize"}(Zf||(Zf={}));var fp=function(t){function e(e){var n=t.call(this)||this;n.container=ot.createChild(),n.Element=Os,n.inited=!1,n.document=new Rh,n.document.defaultView=n,n.customElements=new Kh;var r=e.container,i=e.canvas,o=e.offscreenCanvas,a=e.width,s=e.height,u=e.devicePixelRatio,c=e.renderer,l=e.background,h=e.requestAnimationFrame,f=e.cancelAnimationFrame,p=e.createImage,d=e.supportPointerEvent,y=e.supportTouchEvent,v=e.isTouchEvent,g=e.isMouseEvent;df(r,n);var m=a,b=s,T=u;return i&&(T=(T=u||yf&&window.devicePixelRatio||1)>=1?Math.ceil(T):1,m=a||i.width/T,b=s||i.height/T),n.devicePixelRatio=T,n.requestAnimationFrame=null!=h?h:rp.b.bind(globalThis),n.cancelAnimationFrame=null!=f?f:rp.a.bind(globalThis),n.supportTouchEvent=null!=y?y:"ontouchstart"in globalThis,n.supportPointerEvent=null!=d?d:!!globalThis.PointerEvent,n.isTouchEvent=null!=v?v:function(t){return n.supportTouchEvent&&t instanceof globalThis.TouchEvent},n.isMouseEvent=null!=g?g:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!n.supportPointerEvent||!(t instanceof globalThis.PointerEvent))},n.initRenderingContext({container:r,canvas:i,width:m,height:b,renderer:c,offscreenCanvas:o,devicePixelRatio:T,cursor:"default",background:l,createImage:p}),n.initDefaultCamera(m,b),n.initRenderer(c),n}return ct(e,t),e.prototype.initRenderingContext=function(t){var e=this;this.container.register({token:ka,useValue:t}),this.container.register({token:Af,useValue:{root:this.document.documentElement,renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(So.CHILD_INSERTED,(function(t){e.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(So.CHILD_REMOVED,(function(t){e.unmountChildren(t.detail.child)}))},e.prototype.initDefaultCamera=function(t,e){var n=(new ep).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3);n.canvas=this;var r=this.container.get(Af);n.on(Jf.UPDATED,(function(){r.renderReasons.add(Mf.CAMERA_CHANGED)})),this.container.register({token:$f,useValue:n})},e.prototype.getConfig=function(){return this.container.get(ka)},e.prototype.getContainer=function(){return this.container},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.container.get($f)},e.prototype.getContextService=function(){return this.container.get(Pf)},e.prototype.getEventService=function(){return this.eventService},e.prototype.getRenderingService=function(){return this.renderingService},e.prototype.getRenderingContext=function(){return this.container.get(Af)},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t){(void 0===t&&(t=!0),this.emit(Zf.BEFORE_DESTROY,(function(){})),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var e=this.getRoot();this.unmountChildren(e),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),this.emit(Zf.AFTER_DESTROY,{})},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.container.get(ka);n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.container.get($f),i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===_f.ORTHOGRAPHIC?r.setOrthographic(t/-2,t/2,e/2,e/-2,r.getNear(),r.getFar()):r.setAspect(t/e),this.emit(Zf.RESIZE,{width:t,height:e})},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},e.prototype.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},e.prototype.render=function(){(this.emit(Zf.BEFORE_RENDER,{}),this.container.isBound(If))&&this.container.get(If).render(this.getConfig());this.emit(Zf.AFTER_RENDER,{})},e.prototype.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},e.prototype.initRenderer=function(t){var e=this;if(!t)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(t);var n=this.container.get(Pf);this.renderingService=this.container.get(If),this.eventService=this.container.get(Df),n.init(),this.renderingService.init().then((function(){e.emit(Zf.READY,{}),e.readyPromise&&e.resolveReadyPromise(),e.inited=!0})),t.getConfig().enableAutoRendering&&this.run(),this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot())},e.prototype.loadCommonContainerModule=function(){this.container.unload(hp),this.container.load(hp,!0)},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.init(e.container)}))},e.prototype.setRenderer=function(t){var e=this,n=this.getConfig();if(n.renderer!==t){var r=n.renderer;n.renderer=t,this.destroy(!1),null==r||r.getPlugins().reverse().forEach((function(t){t.destroy(e.container)})),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this,n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t.emit(So.UNMOUNTED,{}),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))},e.prototype.mountChildren=function(t){var e=this;t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.emit(So.MOUNTED,{}))}))},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(wa);ot.load(Kf);var pp=ot.get(Ql)}])}));
13
+ See the Apache Version 2.0 License for specific language governing permissions
14
+ and limitations under the License.
15
+ ***************************************************************************** */()}},n.exports),n.exports}!function(t){!function(e){var i="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=o(t);function o(t,e){return function(n,i){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:i}),e&&e(n,i)}}void 0===i.Reflect?i.Reflect=t:r=o(i.Reflect,r),function(t){var e=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,i=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",r=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return it(Object.create(null))}:a?function(){return it({__proto__:null})}:function(){return it({})},has:s?function(t,n){return e.call(t,n)}:function(t,e){return e in t},get:s?function(t,n){return e.call(t,n)?t[n]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,p=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?et():Set,d=new(l||"function"!=typeof WeakMap?nt():WeakMap);function f(t,e,n,i){if(D(n)){if(!z(t))throw new TypeError;if(!q(e))throw new TypeError;return P(t,e)}if(!z(t))throw new TypeError;if(!F(e))throw new TypeError;if(!F(i)&&!D(i)&&!L(i))throw new TypeError;return L(i)&&(i=void 0),x(t,e,n=H(n),i)}function y(t,e){function n(n,i){if(!F(n))throw new TypeError;if(!D(i)&&!Y(i))throw new TypeError;M(t,e,n,i)}return n}function v(t,e,n,i){if(!F(n))throw new TypeError;return D(i)||(i=H(i)),M(t,e,n,i)}function g(t,e,n){if(!F(e))throw new TypeError;return D(n)||(n=H(n)),N(t,e,n)}function m(t,e,n){if(!F(e))throw new TypeError;return D(n)||(n=H(n)),_(t,e,n)}function T(t,e,n){if(!F(e))throw new TypeError;return D(n)||(n=H(n)),C(t,e,n)}function b(t,e,n){if(!F(e))throw new TypeError;return D(n)||(n=H(n)),A(t,e,n)}function E(t,e){if(!F(t))throw new TypeError;return D(e)||(e=H(e)),O(t,e)}function S(t,e){if(!F(t))throw new TypeError;return D(e)||(e=H(e)),I(t,e)}function k(t,e,n){if(!F(e))throw new TypeError;D(n)||(n=H(n));var i=w(e,n,!1);if(D(i))return!1;if(!i.delete(t))return!1;if(i.size>0)return!0;var r=d.get(e);return r.delete(n),r.size>0||d.delete(e),!0}function P(t,e){for(var n=t.length-1;n>=0;--n){var i=(0,t[n])(e);if(!D(i)&&!L(i)){if(!q(i))throw new TypeError;e=i}}return e}function x(t,e,n,i){for(var r=t.length-1;r>=0;--r){var o=(0,t[r])(e,n,i);if(!D(o)&&!L(o)){if(!F(o))throw new TypeError;i=o}}return i}function w(t,e,n){var i=d.get(t);if(D(i)){if(!n)return;i=new h,d.set(t,i)}var r=i.get(e);if(D(r)){if(!n)return;r=new h,i.set(e,r)}return r}function N(t,e,n){if(_(t,e,n))return!0;var i=Q(e);return!L(i)&&N(t,i,n)}function _(t,e,n){var i=w(e,n,!1);return!D(i)&&G(i.has(t))}function C(t,e,n){if(_(t,e,n))return A(t,e,n);var i=Q(e);return L(i)?void 0:C(t,i,n)}function A(t,e,n){var i=w(e,n,!1);if(!D(i))return i.get(t)}function M(t,e,n,i){w(n,i,!0).set(t,e)}function O(t,e){var n=I(t,e),i=Q(t);if(null===i)return n;var r=O(i,e);if(0>=r.length)return n;if(0>=n.length)return r;for(var o=new p,a=[],s=0,u=n;u.length>s;s++){o.has(h=u[s])||(o.add(h),a.push(h))}for(var c=0,l=r;l.length>c;c++){var h;o.has(h=l[c])||(o.add(h),a.push(h))}return a}function I(t,e){var n=[],i=w(t,e,!1);if(D(i))return n;for(var r=K(i.keys()),o=0;;){var a=Z(r);if(!a)return n.length=o,n;var s=$(a);try{n[o]=s}catch(t){try{J(r)}finally{throw t}}o++}}function R(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function D(t){return void 0===t}function L(t){return null===t}function U(t){return"symbol"==typeof t}function F(t){return"object"==typeof t?null!==t:"function"==typeof t}function B(t,e){switch(R(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",r=X(t,i);if(void 0!==r){var o=r.call(t,n);if(F(o))throw new TypeError;return o}return V(t,"default"===n?"number":n)}function V(t,e){if("string"===e){var n=t.toString;if(W(n))if(!F(r=n.call(t)))return r;if(W(i=t.valueOf))if(!F(r=i.call(t)))return r}else{var i;if(W(i=t.valueOf))if(!F(r=i.call(t)))return r;var r,o=t.toString;if(W(o))if(!F(r=o.call(t)))return r}throw new TypeError}function G(t){return!!t}function j(t){return""+t}function H(t){var e=B(t,3);return U(e)?e:j(e)}function z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function W(t){return"function"==typeof t}function q(t){return"function"==typeof t}function Y(t){switch(R(t)){case 3:case 4:return!0;default:return!1}}function X(t,e){var n=t[e];if(null!=n){if(!W(n))throw new TypeError;return n}}function K(t){var e=X(t,r);if(!W(e))throw new TypeError;var n=e.call(t);if(!F(n))throw new TypeError;return n}function $(t){return t.value}function Z(t){var e=t.next();return!e.done&&e}function J(t){var e=t.return;e&&e.call(t)}function Q(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var n=t.prototype,i=n&&Object.getPrototypeOf(n);if(null==i||i===Object.prototype)return e;var r=i.constructor;return"function"!=typeof r||r===t?e:r}function tt(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[r]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&this._keys.length>t){var n=this._selector(this._keys[t],this._values[t]);return this._keys.length>t+1?this._index++:(this._index=-1,this._keys=e,this._values=e),{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw 0>this._index||(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return 0>this._index||(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return 0>e?void 0:this._values[e]},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var i=this._keys.length,r=n+1;i>r;r++)this._keys[r-1]=this._keys[r],this._values[r-1]=this._values[r];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,i)},e.prototype.values=function(){return new n(this._keys,this._values,o)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[r]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),0>this._cacheIndex&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function i(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}function et(){return function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[r]=function(){return this.keys()},t}()}function nt(){var t=16,n=u.create(),i=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=o(t,!1);return void 0!==e&&u.has(e,this._key)},t.prototype.get=function(t){var e=o(t,!1);return void 0!==e?u.get(e,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=o(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var t;do{t="@@WeakMap@@"+c()}while(u.has(n,t));return n[t]=!0,t}function o(t,n){if(!e.call(t,i)){if(!n)return;Object.defineProperty(t,i,{value:u.create()})}return t[i]}function a(t,e){for(var n=0;e>n;++n)t[n]=255*Math.random()|0;return t}function s(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):a(new Uint8Array(t),t):a(Array(t),t)}function c(){var e=s(t);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",i=0;t>i;++i){var r=e[i];4!==i&&6!==i&&8!==i||(n+="-"),16>r&&(n+="0"),n+=r.toString(16).toLowerCase()}return n}}function it(t){return t.__=void 0,delete t.__,t}t("decorate",f),t("metadata",y),t("defineMetadata",v),t("hasMetadata",g),t("hasOwnMetadata",m),t("getMetadata",T),t("getOwnMetadata",b),t("getMetadataKeys",E),t("getOwnMetadataKeys",S),t("deleteMetadata",k)}(r)}()}(e||(e={}));var r,o,a=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.NON_CUSTOM_TAG_KEYS=e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct",e.NON_CUSTOM_TAG_KEYS=[e.INJECT_TAG,e.MULTI_INJECT_TAG,e.NAME_TAG,e.UNMANAGED_TAG,e.NAMED_TAG,e.OPTIONAL_TAG]})),s=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=void 0;e.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};e.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};e.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}})),u=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var n=0;e.id=function(){return n++}})),c=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var n=function(){function t(t,e){this.id=u.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=s.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===s.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=n})),l=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]};e.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},e.STACK_OVERFLOW="Maximum call stack size exceeded"})),h=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var n=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(a.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(a.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(a.TAGGED_PROP,t)||[]},t}();e.MetadataReader=n})),p=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}})),d=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0,e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===l.STACK_OVERFLOW}})),f=i((function(t,e){function n(t){return"function"==typeof t?t.name:"symbol"==typeof t?""+t:t}function i(t,e){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===e||i(t.parentRequest,e))}function r(t){if(t.name)return t.name;var e=""+t,n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}Object.defineProperty(e,"__esModule",{value:!0}),e.circularDependencyToException=e.listMetadataForTarget=e.listRegisteredBindingsForServiceIdentifier=e.getServiceIdentifierAsString=e.getFunctionName=void 0,e.getServiceIdentifierAsString=n,e.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var i="",o=n(t,e);return 0!==o.length&&(i="\nRegistered bindings:",o.forEach((function(t){var e="Object";null!==t.implementationType&&(e=r(t.implementationType)),i=i+"\n "+e,t.constraint.metaData&&(i=i+" - "+t.constraint.metaData)}))),i},e.circularDependencyToException=function t(e){e.childRequests.forEach((function(e){if(i(e,e.serviceIdentifier)){var r=function(t){return function t(e,i){void 0===i&&(i=[]);var r=n(e.serviceIdentifier);return i.push(r),null!==e.parentRequest?t(e.parentRequest,i):i}(t).reverse().join(" --\x3e ")}(e);throw Error(l.CIRCULAR_DEPENDENCY+" "+r)}t(e)}))},e.listMetadataForTarget=function(t,e){if(e.isTagged()||e.isNamed()){var n="",i=e.getNamedTag(),r=e.getCustomTags();return null!==i&&(n+=i+"\n"),null!==r&&r.forEach((function(t){n+=t+"\n"}))," "+t+"\n "+t+" - "+n}return" "+t},e.getFunctionName=r})),y=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var n=function(){function t(t){this.id=u.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=n})),v=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.toString=function(){return this.key===a.NAMED_TAG?"named: "+this.value+" ":"tagged: { key:"+this.key+", value: "+this.value+" }"},t}();e.Metadata=n})),g=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0,e.Plan=function(t,e){this.parentContext=t,this.rootRequest=e}})),m=i((function(t,e){function n(t,e,n,i,r){var o={},a="number"==typeof r,s=void 0!==r&&a?""+r:n;if(a&&void 0!==n)throw Error(l.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(t,e)&&(o=Reflect.getMetadata(t,e));var u=o[s];if(Array.isArray(u))for(var c=0,h=u;h.length>c;c++){var p=h[c];if(p.key===i.key)throw Error(l.DUPLICATED_METADATA+" "+p.key)}else u=[];u.push(i),o[s]=u,Reflect.defineMetadata(t,o,e)}function i(t,e){Reflect.decorate(t,e)}function r(t,e){return function(n,i){e(n,i,t)}}Object.defineProperty(e,"__esModule",{value:!0}),e.tagProperty=e.tagParameter=e.decorate=void 0,e.tagParameter=function(t,e,i,r){n(a.TAGGED,t,e,r,i)},e.tagProperty=function(t,e,i){n(a.TAGGED_PROP,t.constructor,e,i)},e.decorate=function(t,e,n){"number"==typeof n?i([r(n,t)],e):"string"==typeof n?Reflect.decorate([t],e,n):i([t],e)}})),T=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var n=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=n,e.inject=function(t){return function(e,n,i){if(void 0===t)throw Error(l.UNDEFINED_INJECT_ANNOTATION(e.name));var r=new v.Metadata(a.INJECT_TAG,t);"number"==typeof i?m.tagParameter(e,n,i,r):m.tagProperty(e,n,r)}}})),b=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var n=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=n})),E=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var n=function(){function t(t,e,n,i){this.id=u.id(),this.type=t,this.serviceIdentifier=n,this.name=new b.QueryableString(e||""),this.metadata=[];var r=null;"string"==typeof i?r=new v.Metadata(a.NAMED_TAG,i):i instanceof v.Metadata&&(r=i),null!==r&&this.metadata.push(r)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;n.length>e;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(a.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(a.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(a.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return a.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(a.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===a.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return a.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(a.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var i=0,r=e.metadata;r.length>i;i++){var o=r[i];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=n})),S=i((function(t,e){var i=n&&n.__spreadArray||function(t,e){for(var n=0,i=e.length,r=t.length;i>n;n++,r++)t[r]=e[n];return t};function r(t,e,n,r){var a=t.getConstructorMetadata(n),s=a.compilerGeneratedMetadata;if(void 0===s)throw Error(l.MISSING_INJECTABLE_ANNOTATION+" "+e+".");var c=a.userGeneratedMetadata,h=Object.keys(c),p=function(t,e,n,i,r){for(var a=[],s=0;r>s;s++){var u=o(s,t,e,n,i);null!==u&&a.push(u)}return a}(r,e,s,c,0===n.length&&h.length>0||h.length>n.length?h.length:n.length),d=u(t,n);return i(i([],p),d)}function o(t,e,n,i,r){var o=r[""+t]||[],a=c(o),u=!0!==a.unmanaged,h=i[t],p=a.inject||a.multiInject;if((h=p||h)instanceof T.LazyServiceIdentifer&&(h=h.unwrap()),u){if(!e&&(h===Object||h===Function||void 0===h))throw Error(l.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".");var d=new E.Target(s.TargetTypeEnum.ConstructorArgument,a.targetName,h);return d.metadata=o,d}return null}function u(t,e){for(var n=t.getPropertiesMetadata(e),r=[],o=0,a=Object.keys(n);a.length>o;o++){var l=a[o],h=n[l],p=c(n[l]),d=new E.Target(s.TargetTypeEnum.ClassProperty,p.targetName||l,p.inject||p.multiInject);d.metadata=h,r.push(d)}var f=Object.getPrototypeOf(e.prototype).constructor;if(f!==Object){var y=u(t,f);r=i(i([],r),y)}return r}function c(t){var e={};return t.forEach((function(t){e[""+t.key]=t.value})),{inject:e[a.INJECT_TAG],multiInject:e[a.MULTI_INJECT_TAG],targetName:e[a.NAME_TAG],unmanaged:e[a.UNMANAGED_TAG]}}Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0,Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return f.getFunctionName}}),e.getDependencies=function(t,e){return r(t,f.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var i=Object.getPrototypeOf(n.prototype).constructor;if(i!==Object){var o=r(e,f.getFunctionName(i),i,!0),s=o.map((function(t){return t.metadata.filter((function(t){return t.key===a.UNMANAGED_TAG}))})),u=[].concat.apply([],s).length,c=o.length-u;return c>0?c:t(e,i)}return 0}})),k=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var n=function(){function t(t,e,n,i,r){this.id=u.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=r,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,i){var r=new t(e,this.parentContext,this,n,i);return this.childRequests.push(r),r},t}();e.Request=n})),P=i((function(t,e){function n(t){return t._bindingDictionary}function i(t,e,n,i,r,o){var s=new v.Metadata(t?a.MULTI_INJECT_TAG:a.INJECT_TAG,n),u=new E.Target(e,i,n,s);if(void 0!==r){var c=new v.Metadata(r,o);u.metadata.push(c)}return u}function r(t,e,n,i,r){var o=u(n.container,r.serviceIdentifier),a=[];return o.length===p.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof r.serviceIdentifier&&t.getConstructorMetadata(r.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(r.serviceIdentifier).toSelf(),o=u(n.container,r.serviceIdentifier)),a=e?o:o.filter((function(t){var e=new k.Request(t.serviceIdentifier,n,i,t,r);return t.constraint(e)})),function(t,e,n,i){switch(e.length){case p.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var r=f.getServiceIdentifierAsString(t),o=l.NOT_REGISTERED;throw o+=f.listMetadataForTarget(r,n),o+=f.listRegisteredBindingsForServiceIdentifier(i,r,u),Error(o);case p.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;default:if(n.isArray())return e;r=f.getServiceIdentifierAsString(t),o=l.AMBIGUOUS_MATCH+" "+r;throw o+=f.listRegisteredBindingsForServiceIdentifier(i,r,u),Error(o)}}(r.serviceIdentifier,a,r,n.container),a}function o(t,e,n,i,a,u){var c,h;if(null===a){c=r(t,e,i,null,u),h=new k.Request(n,i,null,c,u);var p=new g.Plan(i,h);i.addPlan(p)}else c=r(t,e,i,a,u),h=a.addChildRequest(u.serviceIdentifier,c,u);c.forEach((function(e){var n=null;if(u.isArray())n=h.addChildRequest(e.serviceIdentifier,e,u);else{if(e.cache)return;n=h}if(e.type===s.BindingTypeEnum.Instance&&null!==e.implementationType){var r=S.getDependencies(t,e.implementationType);if(!i.container.options.skipBaseClassChecks)if(S.getBaseClassDependencyCount(t,e.implementationType)>r.length){var a=l.ARGUMENTS_LENGTH_MISMATCH(S.getFunctionName(e.implementationType));throw Error(a)}r.forEach((function(e){o(t,!1,e.serviceIdentifier,i,n,e)}))}}))}function u(t,e){var i=[],r=n(t);return r.hasKey(e)?i=r.get(e):null!==t.parent&&(i=u(t.parent,e)),i}Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0,e.getBindingDictionary=n,e.plan=function(t,e,n,r,a,s,u,c){void 0===c&&(c=!1);var l=new y.Context(e),h=i(n,r,a,"",s,u);try{return o(t,c,a,l,null,h),l}catch(t){throw d.isStackOverflowExeption(t)&&l.plan&&f.circularDependencyToException(l.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,i){var r=new E.Target(s.TargetTypeEnum.Variable,"",e,new v.Metadata(n,i)),o=new y.Context(t);return new k.Request(e,o,null,[],r)}})),x=i((function(t,e){var i=n&&n.__spreadArray||function(t,e){for(var n=0,i=e.length,r=t.length;i>n;n++,r++)t[r]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0,e.resolveInstance=function(t,e,n){var r,o=null;if(e.length>0){var u=e.filter((function(t){return null!==t.target&&t.target.type===s.TargetTypeEnum.ConstructorArgument})).map(n);o=function(t,e,n){var i=e.filter((function(t){return null!==t.target&&t.target.type===s.TargetTypeEnum.ClassProperty})),r=i.map(n);return i.forEach((function(e,n){var i;i=e.target.name.value(),t[i]=r[n]})),t}(o=new((r=t).bind.apply(r,i([void 0],u))),e,n)}else o=new t;return function(t,e){if(Reflect.hasMetadata(a.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(a.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw Error(l.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,o),o}})),w=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var n=function(t,e,n){try{return n()}catch(n){throw d.isStackOverflowExeption(n)?Error(l.CIRCULAR_DEPENDENCY_IN_FACTORY(t,""+e)):n}},i=function(t){return function(e){e.parentContext.setCurrentRequest(e);var r=e.bindings,o=e.childRequests,a=e.target&&e.target.isArray(),u=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(a&&u)return o.map((function(e){return i(t)(e)}));var c=null;if(!e.target.isOptional()||0!==r.length){var h=r[0],p=h.scope===s.BindingScopeEnum.Singleton,d=h.scope===s.BindingScopeEnum.Request;if(p&&h.activated)return h.cache;if(d&&null!==t&&t.has(h.id))return t.get(h.id);if(h.type===s.BindingTypeEnum.ConstantValue)c=h.cache,h.activated=!0;else if(h.type===s.BindingTypeEnum.Function)c=h.cache,h.activated=!0;else if(h.type===s.BindingTypeEnum.Constructor)c=h.implementationType;else if(h.type===s.BindingTypeEnum.DynamicValue&&null!==h.dynamicValue)c=n("toDynamicValue",h.serviceIdentifier,(function(){return h.dynamicValue(e.parentContext)}));else if(h.type===s.BindingTypeEnum.Factory&&null!==h.factory)c=n("toFactory",h.serviceIdentifier,(function(){return h.factory(e.parentContext)}));else if(h.type===s.BindingTypeEnum.Provider&&null!==h.provider)c=n("toProvider",h.serviceIdentifier,(function(){return h.provider(e.parentContext)}));else{if(h.type!==s.BindingTypeEnum.Instance||null===h.implementationType){var y=f.getServiceIdentifierAsString(e.serviceIdentifier);throw Error(l.INVALID_BINDING_TYPE+" "+y)}c=x.resolveInstance(h.implementationType,o,i(t))}return"function"==typeof h.onActivation&&(c=h.onActivation(e.parentContext,c)),p&&(h.cache=c,h.activated=!0),d&&null!==t&&!t.has(h.id)&&t.set(h.id,c),c}}};e.resolve=function(t){return i(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}})),N=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var n=function(t,e){var i=t.parentRequest;return null!==i&&(!!e(i)||n(i,e))};e.traverseAncerstors=n;var i=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new v.Metadata(t,e),n}};e.taggedConstraint=i;var r=i(a.NAMED_TAG);e.namedConstraint=r;e.typeConstraint=function(t){return function(e){return null!==e&&("string"==typeof t?e.bindings[0].serviceIdentifier===t:t===e.bindings[0].implementationType)}}})),_=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.when=function(t){return this._binding.constraint=t,new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=N.namedConstraint(t),new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=N.taggedConstraint(t)(e),new C.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return N.typeConstraint(t)(e.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return N.namedConstraint(t)(e.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return N.taggedConstraint(t)(e)(n.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.typeConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.typeConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.namedConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.namedConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,t)},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,t)},new C.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=n})),C=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingOnSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.onActivation=function(t){return this._binding.onActivation=t,new _.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=n})),A=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new _.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new C.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=n})),M=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=s.BindingScopeEnum.Request,new A.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=s.BindingScopeEnum.Singleton,new A.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=s.BindingScopeEnum.Transient,new A.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=n})),O=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new _.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new C.BindingOnSyntax(this._binding),this._bindingInSyntax=new M.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=n})),I=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=s.BindingTypeEnum.Instance,this._binding.implementationType=t,new O.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw Error(""+l.INVALID_TO_SELF_VALUE);return this.to(this._binding.serviceIdentifier)},t.prototype.toConstantValue=function(t){return this._binding.type=s.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=s.BindingScopeEnum.Singleton,new A.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=s.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new O.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=s.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=s.BindingScopeEnum.Singleton,new A.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=s.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=s.BindingScopeEnum.Singleton,new A.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw Error(l.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=s.BindingTypeEnum.Function,this._binding.scope=s.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=s.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=s.BindingScopeEnum.Singleton,new A.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=s.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=s.BindingScopeEnum.Singleton,new A.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=n})),R=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var n=function(){function t(){}return t.of=function(e,n){var i=new t;return i.bindings=e,i.middleware=n,i},t}();e.ContainerSnapshot=n})),D=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var n=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw Error(l.NULL_ARGUMENT);if(null==e)throw Error(l.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw Error(l.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw Error(l.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw Error(l.NULL_ARGUMENT);if(!this._map.delete(t))throw Error(l.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,i){var r=n.filter((function(e){return!t(e)}));r.length>0?e._map.set(i,r):e._map.delete(i)}))},t.prototype.hasKey=function(t){if(null==t)throw Error(l.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=n})),L=i((function(t,e){var i=n&&n.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))},r=n&&n.__generator||function(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&r[3]>o[1])){a.label=o[1];break}if(6===o[0]&&r[1]>a.label){a.label=r[1],r=o;break}if(r&&r[2]>a.label){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=n&&n.__spreadArray||function(t,e){for(var n=0,i=e.length,r=t.length;i>n;n++,r++)t[r]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var p=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw Error(""+l.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=s.BindingScopeEnum.Transient;else if(e.defaultScope!==s.BindingScopeEnum.Singleton&&e.defaultScope!==s.BindingScopeEnum.Transient&&e.defaultScope!==s.BindingScopeEnum.Request)throw Error(""+l.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw Error(""+l.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw Error(""+l.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=u.id(),this._bindingDictionary=new D.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new h.MetadataReader}return t.merge=function(e,n){for(var i=[],r=2;arguments.length>r;r++)i[r-2]=arguments[r];var a=new t,s=o([e,n],i).map((function(t){return P.getBindingDictionary(t)})),u=P.getBindingDictionary(a);function c(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return s.forEach((function(t){c(t,u)})),a},t.prototype.load=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),i=0,r=t;r.length>i;i++){var o=r[i],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,i,o,a;return r(this,(function(r){switch(r.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,i=t,r.label=1;case 1:return i.length>n?(a=e((o=i[n]).id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;arguments.length>n;n++)e[n]=arguments[n];var i=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=i(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=new c.Binding(t,this.options.defaultScope||s.BindingScopeEnum.Transient);return this._bindingDictionary.add(t,e),new I.BindingToSyntax(e)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw Error(l.CANNOT_UNBIND+" "+f.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new D.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,a.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var i=!1;if(this._bindingDictionary.hasKey(t)){var r=this._bindingDictionary.get(t),o=P.createMockRequest(this,t,e,n);i=r.some((function(t){return t.constraint(o)}))}return!i&&this.parent&&(i=this.parent.isBoundTagged(t,e,n)),i},t.prototype.snapshot=function(){this._snapshots.push(R.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw Error(l.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,s.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,s.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,a.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,s.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,s.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,a.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(i){var r=t.rebind.bind(t)(i);return e(r,n),r}};return function(i){return{bindFunction:(r=i,function(n){var i=t.bind.bind(t)(n);return e(i,r),i}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(i),unbindFunction:function(e){t.unbind.bind(t)(e)}};var r}},t.prototype._get=function(t,e,n,i,r,o){var a=null,s={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:r,serviceIdentifier:i,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(s)))throw Error(l.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(s);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=P.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),w.resolve(n)}},t}();e.Container=p})),U=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0,e.ContainerModule=function(t){this.id=u.id(),this.registry=t},e.AsyncContainerModule=function(t){this.id=u.id(),this.registry=t}})),F=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0,e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(a.PARAM_TYPES,t))throw Error(l.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(a.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(a.PARAM_TYPES,e,t),t}}})),B=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0,e.tagged=function(t,e){return function(n,i,r){var o=new v.Metadata(t,e);"number"==typeof r?m.tagParameter(n,i,r,o):m.tagProperty(n,i,o)}}})),V=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0,e.named=function(t){return function(e,n,i){var r=new v.Metadata(a.NAMED_TAG,t);"number"==typeof i?m.tagParameter(e,n,i,r):m.tagProperty(e,n,r)}}})),G=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0,e.optional=function(){return function(t,e,n){var i=new v.Metadata(a.OPTIONAL_TAG,!0);"number"==typeof n?m.tagParameter(t,e,n,i):m.tagProperty(t,e,i)}}})),j=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0,e.unmanaged=function(){return function(t,e,n){var i=new v.Metadata(a.UNMANAGED_TAG,!0);m.tagParameter(t,e,n,i)}}})),H=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0,e.multiInject=function(t){return function(e,n,i){var r=new v.Metadata(a.MULTI_INJECT_TAG,t);"number"==typeof i?m.tagParameter(e,n,i,r):m.tagProperty(e,n,r)}}})),z=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0,e.targetName=function(t){return function(e,n,i){var r=new v.Metadata(a.NAME_TAG,t);m.tagParameter(e,n,i,r)}}})),W=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0,e.postConstruct=function(){return function(t,e,n){var i=new v.Metadata(a.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(a.POST_CONSTRUCT,t.constructor))throw Error(l.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(a.POST_CONSTRUCT,i,t.constructor)}}})),q=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],i=0;arguments.length>i;i++)n[i]=arguments[i];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}})),Y=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0,e.METADATA_KEY=a,Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return L.Container}}),Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return s.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return s.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return s.TargetTypeEnum}}),Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return U.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return U.ContainerModule}}),Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return F.injectable}}),Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return B.tagged}}),Object.defineProperty(e,"named",{enumerable:!0,get:function(){return V.named}}),Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return T.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return T.LazyServiceIdentifer}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return G.optional}}),Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return j.unmanaged}}),Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return H.multiInject}}),Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return z.targetName}}),Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return W.postConstruct}}),Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return h.MetadataReader}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return u.id}}),Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return m.decorate}}),Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return N.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return N.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return N.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return N.typeConstraint}}),Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return f.getServiceIdentifierAsString}}),Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return q.multiBindToService}})}));function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function K(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function $(t,e,n){return e&&K(t.prototype,e),n&&K(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function Q(t,e){return e.lifecycle===r.Lifecycle.singleton?function(t){return t.inSingletonScope()}(t):function(t){return t.inTransientScope()}(t)}function tt(t,e){t.whenTargetNamed(it(e))}function et(t,e){return e.bind(rt(t))}function nt(t,e){if(e.isBound(rt(t)))try{return e.rebind(rt(t))}catch(n){return e.bind(rt(t))}return e.bind(rt(t))}function it(t){return o.isDefinedToken(t)?t.symbol:t}function rt(t){return o.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=$((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Z(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var i=n.multiple,r=void 0!==i&&i;this.name=e,this.symbol=Symbol(this.name),this.multiple=r}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===X(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(r||(r={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===X(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==X(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===X(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(o||(o={}));var ot=new Y.Container;function at(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function st(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?at(Object(n),!0).forEach((function(e){ut(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ct(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Y.injectable();return function(n){Reflect.defineMetadata(r.ClassOptionSymbol,st(st({},t),{},{target:n}),n),e(n)}}function lt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ct(st(st({},t),{},{lifecycle:r.Lifecycle.singleton}))}function ht(t){return Y.inject(rt(t))}function pt(t){return Y.named(it(t))}var dt=Symbol("SyringeOptionSymbol");function ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function yt(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(n),!0).forEach((function(e){vt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gt(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var mt=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=e,this.token=n,this.option=i,this.rawToken=o.isNamedToken(n)?n.token:n,this.named=o.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||o.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var e,n,i;return e=t,n=[{key:"resolve",value:function(){var t=this,e=this.register;(function(t){return t&&"object"===J(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(e)&&(this.mutiple?this.resolveMutilple(e):(this.resolveMono(e),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(n){o.isMultipleEnabled(n)?et(n,e).toService(t.generalToken):nt(n,e).toService(t.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return nt(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return Q(nt(this.generalToken,t).toDynamicValue((function(t){var n=Lt.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return nt(this.generalToken,t).toFactory((function(t){var e=Lt.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var i=this.option.useClass[this.option.useClass.length-1];return Q(nt(this.generalToken,t).to(i),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return Q(et(e.generalToken,t).to(n),e.option)})),i=this.option.useDynamic.map((function(n){return Q(et(e.generalToken,t).toDynamicValue((function(t){var e=Lt.getContainer(t.container);return n({container:e})})),e.option)})),r=this.option.useFactory.map((function(n){return et(e.generalToken,t).toFactory((function(t){var e=Lt.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?et(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&tt(t,e.named)})),i.forEach((function(t){return e.named&&tt(t,e.named)})),r.forEach((function(t){return e.named&&tt(t,e.named)})),o&&tt(o,this.named))}}],i=[{key:"resolveTarget",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var a=Reflect.getMetadata(dt,n);a&&t.resolveOption(e,a)}catch(t){}if(o.isClass(n))if(i.useClass){var s=o.toArray(i.useClass);s.unshift(n),i.useClass=s}else i.useClass=[n];var u;try{u=Reflect.getMetadata(r.ClassOptionSymbol,n)}catch(t){}if((u=yt(yt({},u||{}),i)).token){var c=o.toArray(u.token);c.unshift(n),u.token=c}else u.token=[n];t.resolveOption(e,u)}catch(t){}}},{key:"resolveOption",value:function(e,n){var i=function(t){var e=o.toArray(t.token),n=o.toArray(t.useClass),i=o.toArray(t.useDynamic),a=o.toArray(t.useFactory),s=o.toArray(t.contrib),u={token:e,useClass:n,lifecycle:s.length>0?r.Lifecycle.singleton:t.lifecycle||r.Lifecycle.transient,contrib:s,useDynamic:i,useFactory:a};return"useValue"in t&&(u.useValue=t.useValue),u}(yt(yt({},t.globalConfig),n));(0!==i.useClass.length||0!==i.useDynamic.length||0!==i.useFactory.length||"useValue"in i)&&i.token.forEach((function(n){new t(e,n,yt({},i)).resolve()}))}}],n&&gt(e.prototype,n),i&&gt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();mt.globalConfig=r.DefaultOption;var Tt=r.defineToken("ContributionProvider");function bt(t){return function(t){if(Array.isArray(t))return Et(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Et(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Et(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);e>n;n++)i[n]=t[n];return i}function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function kt(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?St(Object(n),!0).forEach((function(e){Pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Pt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xt(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var wt=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,i&&(this.option=kt(kt({},this.option),i))}var e,n,i;return e=t,n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var i=n.getAll(this.serviceIdentifier);e.push.apply(e,bt(i))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=kt(kt({},this.option),t),n=e.cache,i=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!i)),this.services}}],n&&xt(e.prototype,n),i&&xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Nt(t,e){return{token:{token:Tt,named:t},useDynamic:function(n){return new wt(t,n.container,e)},lifecycle:r.Lifecycle.singleton}}function _t(t,e,n){t({token:{token:Tt,named:e},useDynamic:function(t){return new wt(e,t.container,n)},lifecycle:r.Lifecycle.singleton})}function Ct(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var At=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,i,r){var a={bind:t,unbind:e,isBound:i,rebind:r},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o.isInjectOption(t)?mt.resolveOption(a,t):mt.resolveTarget(a,t,e)};n.baseRegistry&&n.baseRegistry(s),n.optionCollection&&n.optionCollection.forEach((function(t){return s(t)}))},this.baseRegistry=e,this.inversifyModule=new Y.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,i;return e=t,n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];return n.forEach((function(e){return t.options.push(Nt(e))})),this}}],n&&Ct(e.prototype,n),i&&Ct(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Mt(t){return t&&"inversifyModule"in t}function Ot(t){return new At(t)}function It(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Rt,Dt=new Map,Lt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new Y.Container,t.setContainer(this.container,this)}var e,n,i;return e=t,n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Mt(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){Mt(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(rt(t))}},{key:"get",value:function(t){return this.container.get(rt(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(rt(t),it(e))}},{key:"getAll",value:function(t){return this.container.getAll(rt(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(rt(t),it(e))}},{key:"isBound",value:function(t){return this.container.isBound(rt(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(rt(t),it(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o.isInjectOption(t)?mt.resolveOption(this.container,t):mt.resolveTarget(this.container,t,e)}}],i=[{key:"setContainer",value:function(t,e){return Dt.set(t.id,e)}},{key:"getContainer",value:function(e){var n=Dt.get(e.id);if(!n){var i=new t(e);return t.setContainer(e,i),i}return n}},{key:"config",value:function(t){mt.globalConfig=t}}],n&&It(e.prototype,n),i&&It(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ut=new Lt(ot),Ft=Ut.register.bind(Ut),Bt=function(t){return function(e,n,i){pt(t)(e,n,i),ht(Tt)(e,n,i)}};!function(t){t.Provider=Tt,t.register=_t}(Rt||(Rt={}));var Vt=Object.freeze({__proto__:null,postConstruct:Y.postConstruct,optional:Y.optional,unmanaged:Y.unmanaged,decorate:Y.decorate,injectable:ct,singleton:lt,transient:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ct(st(st({},t),{},{lifecycle:r.Lifecycle.transient}))},inject:ht,named:pt,Container:Lt,GlobalContainer:Ut,register:Ft,SyringeModule:At,isSyringeModule:Mt,Module:Ot,Provider:Tt,DefaultContributionProvider:wt,contrib:Bt,get Contribution(){return Rt},get Syringe(){return r},get Utils(){return o},OptionSymbol:dt,registerSideOption:function(t,e){Reflect.defineMetadata(dt,t,e)}});function Gt(){
16
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
17
+ Gt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new k(i||[]);return r._invoke=function(t,e,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return x()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var u=c(t,e,n);if("normal"===u.type){if(i=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i="completed",n.method="throw",n.arg=u.arg)}}}(t,n,o),r}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function p(){}function d(){}var f={};s(f,r,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(P([])));v&&v!==e&&n.call(v,r)&&(f=v);var g=d.prototype=h.prototype=Object.create(f);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function i(r,o,a,s){var u=c(t[r],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var r;this._invoke=function(t,n){function o(){return new e((function(e,r){i(t,n,e,r)}))}return r=r?r.then(o,o):o()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var i=c(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,l;var r=i.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return p.prototype=d,s(g,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(T.prototype),s(T.prototype,o,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var a=new T(u(e,n,i,r),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,r,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},t.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return a.type="throw",a.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return i(o.catchLoc,!0);if(o.finallyLoc>this.prev)return i(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(this.prev>=r.tryLoc&&n.call(r,"finallyLoc")&&r.finallyLoc>this.prev){var o=r;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;S(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function jt(t,e,n,i,r,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(i,r)}function Ht(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){jt(o,i,r,a,s,"next",t)}function s(t){jt(o,i,r,a,s,"throw",t)}a(void 0)}))}}function zt(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Wt(t,e,n){return e&&zt(t.prototype,e),n&&zt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function qt(){return qt=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qt.apply(this,arguments)}function Yt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xt(t,e)}function Xt(t,e){return Xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Xt(t,e)}function Kt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function $t(t,e,n){return $t=Kt()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&Xt(r,n.prototype),r},$t.apply(null,arguments)}function Zt(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;o.length>i;i++)0>e.indexOf(n=o[i])&&(r[n]=t[n]);return r}function Jt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);e>n;n++)i[n]=t[n];return i}function te(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return t.length>i?{done:!1,value:t[i++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ee,ne=i((function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,i,r=[];if(0===this._eventsCount)return r;for(i in t=this._events)e.call(t,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,r=e.length,o=Array(r);r>i;i++)o[i]=e[i].fn;return o},s.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},s.prototype.emit=function(t,e,i,r,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,i),!0;case 4:return l.fn.call(l.context,e,i,r),!0;case 5:return l.fn.call(l.context,e,i,r,o),!0;case 6:return l.fn.call(l.context,e,i,r,o,a),!0}for(c=1,u=Array(h-1);h>c;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var p,d=l.length;for(c=0;d>c;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,i);break;case 4:l[c].fn.call(l[c].context,e,i,r);break;default:if(!u)for(p=1,u=Array(h-1);h>p;p++)u[p-1]=arguments[p];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,i,r){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var u=0,c=[],l=s.length;l>u;u++)(s[u].fn!==e||r&&!s[u].once||i&&s[u].context!==i)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&a(this,e):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s}));function ie(t,e,n,i){var r,o=arguments.length,a=3>o?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(3>o?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function re(t,e){return function(n,i){e(n,i,t)}}function oe(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}(ee=t.Shape||(t.Shape={})).GROUP="g",ee.CIRCLE="circle",ee.ELLIPSE="ellipse",ee.IMAGE="image",ee.RECT="rect",ee.LINE="line",ee.POLYLINE="polyline",ee.POLYGON="polygon",ee.TEXT="text",ee.PATH="path",ee.HTML="html",ee.MESH="mesh";var ae=r.defineToken("CanvasConfig");t.DisplayObjectPool=function(){function e(){this.pool={},this.htmlPool=[]}var n=e.prototype;return n.getByEntity=function(t){return this.pool[t]},n.add=function(e,n){this.pool[e]=n,n.nodeName===t.Shape.HTML&&this.htmlPool.push(n)},n.remove=function(e){var n=this.pool[e];if(delete this.pool[e],n.nodeName===t.Shape.HTML){var i=this.htmlPool.indexOf(n);this.htmlPool.splice(i,1)}},n.getHTMLs=function(){return this.htmlPool},e}(),t.DisplayObjectPool=ie([lt()],t.DisplayObjectPool);var se=1e-6,ue="undefined"!=typeof Float32Array?Float32Array:Array;function ce(){var t=new ue(9);return ue!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function le(){var t=new ue(16);return ue!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function he(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function pe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function de(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],d=e[11],f=e[12],y=e[13],v=e[14],g=e[15],m=n*s-i*a,T=n*u-r*a,b=n*c-o*a,E=i*u-r*s,S=i*c-o*s,k=r*c-o*u,P=l*y-h*f,x=l*v-p*f,w=l*g-d*f,N=h*v-p*y,_=h*g-d*y,C=p*g-d*v,A=m*C-T*_+b*N+E*w-S*x+k*P;return A?(t[0]=(s*C-u*_+c*N)*(A=1/A),t[1]=(r*_-i*C-o*N)*A,t[2]=(y*k-v*S+g*E)*A,t[3]=(p*S-h*k-d*E)*A,t[4]=(u*w-a*C-c*x)*A,t[5]=(n*C-r*w+o*x)*A,t[6]=(v*b-f*k-g*T)*A,t[7]=(l*k-p*b+d*T)*A,t[8]=(a*_-s*w+c*P)*A,t[9]=(i*w-n*_-o*P)*A,t[10]=(f*S-y*b+g*m)*A,t[11]=(h*b-l*S-d*m)*A,t[12]=(s*x-a*N-u*P)*A,t[13]=(n*N-i*x+r*P)*A,t[14]=(y*T-f*E-v*m)*A,t[15]=(l*E-h*T+p*m)*A,t):null}function fe(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=e[9],d=e[10],f=e[11],y=e[12],v=e[13],g=e[14],m=e[15],T=n[0],b=n[1],E=n[2],S=n[3];return t[0]=T*i+b*s+E*h+S*y,t[1]=T*r+b*u+E*p+S*v,t[2]=T*o+b*c+E*d+S*g,t[3]=T*a+b*l+E*f+S*m,t[4]=(T=n[4])*i+(b=n[5])*s+(E=n[6])*h+(S=n[7])*y,t[5]=T*r+b*u+E*p+S*v,t[6]=T*o+b*c+E*d+S*g,t[7]=T*a+b*l+E*f+S*m,t[8]=(T=n[8])*i+(b=n[9])*s+(E=n[10])*h+(S=n[11])*y,t[9]=T*r+b*u+E*p+S*v,t[10]=T*o+b*c+E*d+S*g,t[11]=T*a+b*l+E*f+S*m,t[12]=(T=n[12])*i+(b=n[13])*s+(E=n[14])*h+(S=n[15])*y,t[13]=T*r+b*u+E*p+S*v,t[14]=T*o+b*c+E*d+S*g,t[15]=T*a+b*l+E*f+S*m,t}function ye(t,e,n){var i,r,o,a,s,u,c,l,h,p,d,f,y=n[0],v=n[1],g=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*g+e[12],t[13]=e[1]*y+e[5]*v+e[9]*g+e[13],t[14]=e[2]*y+e[6]*v+e[10]*g+e[14],t[15]=e[3]*y+e[7]*v+e[11]*g+e[15]):(r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=e[9],d=e[10],f=e[11],t[0]=i=e[0],t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=p,t[10]=d,t[11]=f,t[12]=i*y+s*v+h*g+e[12],t[13]=r*y+u*v+p*g+e[13],t[14]=o*y+c*v+d*g+e[14],t[15]=a*y+l*v+f*g+e[15]),t}function ve(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ge(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function me(t,e){var n=e[4],i=e[5],r=e[6],o=e[8],a=e[9],s=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(n,i,r),t[2]=Math.hypot(o,a,s),t}function Te(t,e){var n=new ue(3);me(n,e);var i=1/n[0],r=1/n[1],o=1/n[2],a=e[0]*i,s=e[1]*r,u=e[2]*o,c=e[4]*i,l=e[5]*r,h=e[6]*o,p=e[8]*i,d=e[9]*r,f=e[10]*o,y=a+l+f,v=0;return y>0?(t[3]=.25*(v=2*Math.sqrt(y+1)),t[0]=(h-d)/v,t[1]=(p-u)/v,t[2]=(s-c)/v):a>l&&a>f?(t[3]=(h-d)/(v=2*Math.sqrt(1+a-l-f)),t[0]=.25*v,t[1]=(s+c)/v,t[2]=(p+u)/v):l>f?(t[3]=(p-u)/(v=2*Math.sqrt(1+l-a-f)),t[0]=(s+c)/v,t[1]=.25*v,t[2]=(h+d)/v):(t[3]=(s-c)/(v=2*Math.sqrt(1+f-a-l)),t[0]=(p+u)/v,t[1]=(h+d)/v,t[2]=.25*v),t}function be(t,e,n,i,r){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,p=o*c,d=o*l,f=o*h,y=a*l,v=a*h,g=s*h,m=u*c,T=u*l,b=u*h,E=i[0],S=i[1],k=i[2],P=r[0],x=r[1],w=r[2],N=(1-(y+g))*E,_=(d+b)*E,C=(f-T)*E,A=(d-b)*S,M=(1-(p+g))*S,O=(v+m)*S,I=(f+T)*k,R=(v-m)*k,D=(1-(p+y))*k;return t[0]=N,t[1]=_,t[2]=C,t[3]=0,t[4]=A,t[5]=M,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=D,t[11]=0,t[12]=n[0]+P-(N*P+A*x+I*w),t[13]=n[1]+x-(_*P+M*x+R*w),t[14]=n[2]+w-(C*P+O*x+D*w),t[15]=1,t}function Ee(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,d=r*s,f=r*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-f,t[1]=l+g,t[2]=p-v,t[3]=0,t[4]=l-g,t[5]=1-c-f,t[6]=d+y,t[7]=0,t[8]=p+v,t[9]=d-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Se=function(t,e,n,i,r,o,a){var s=1/(e-n),u=1/(i-r),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(r+i)*u,t[14]=(a+o)*c,t[15]=1,t};function ke(){var t=new ue(3);return ue!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Pe(t){var e=new ue(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function xe(t){return Math.hypot(t[0],t[1],t[2])}function we(t,e,n){var i=new ue(3);return i[0]=t,i[1]=e,i[2]=n,i}function Ne(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _e(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}function Ce(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ae(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Me(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Oe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Ie(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}function Re(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function De(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Le(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=r*u-o*s,t[1]=o*a-i*u,t[2]=i*s-r*a,t}function Ue(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t}function Fe(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/(a=a||1),t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t}function Be(t,e){var n=t[0],i=t[1],r=t[2],o=e[0],a=e[1],s=e[2];return se*Math.max(1,Math.abs(n),Math.abs(o))>=Math.abs(n-o)&&se*Math.max(1,Math.abs(i),Math.abs(a))>=Math.abs(i-a)&&se*Math.max(1,Math.abs(r),Math.abs(s))>=Math.abs(r-s)}var Ve,Ge=Ae,je=Me,He=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},ze=xe;Ve=ke();function We(){var t=new ue(4);return ue!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function qe(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t}!function(){var t=We()}();function Ye(){var t=new ue(4);return ue!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Xe(t,e,n){var i=Math.sin(n*=.5);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t}function Ke(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=i*l+a*s+r*c-o*u,t[1]=r*l+a*u+o*s-i*c,t[2]=o*l+a*c+i*u-r*s,t[3]=a*l-i*s-r*u-o*c,t}function $e(t,e,n,i){var r,o,a,s,u,c=e[0],l=e[1],h=e[2],p=e[3],d=n[0],f=n[1],y=n[2],v=n[3];return 0>(o=c*d+l*f+h*y+p*v)&&(o=-o,d=-d,f=-f,y=-y,v=-v),1-o>se?(a=Math.sin(r=Math.acos(o)),s=Math.sin((1-i)*r)/a,u=Math.sin(i*r)/a):(s=1-i,u=i),t[0]=s*c+u*d,t[1]=s*l+u*f,t[2]=s*h+u*y,t[3]=s*p+u*v,t}function Ze(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-i*s,t[2]=-r*s,t[3]=o*s,t}function Je(t,e,n,i){var r=.5*Math.PI/180;n*=r,i*=r;var o=Math.sin(e*=r),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(i),l=Math.cos(i);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}var Qe,tn,en,nn,rn,on,an=function(t,e,n,i){var r=new ue(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r},sn=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},un=Ke,cn=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=i*a,t[2]=r*a,t[3]=o*a,t};Qe=ke(),tn=we(1,0,0),en=we(0,1,0),nn=Ye(),rn=Ye(),on=ce();!function(){var t,e=(t=new ue(2),ue!=Float32Array&&(t[0]=0,t[1]=0),t)}();var ln,hn=function(){function t(t,e){this.center=void 0,this.halfExtents=void 0,this.min=ke(),this.max=ke(),this.update(t,e)}t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var e=t.prototype;return e.update=function(t,e){this.center=Ne(ke(),t||ke()),this.halfExtents=Ne(ke(),e||we(0,0,0)),this.min=Ge(this.min,this.center,this.halfExtents),this.max=Ce(this.max,this.center,this.halfExtents)},e.setMinMax=function(t,e){Ce(this.center,e,t),Oe(this.center,this.center,.5),Ge(this.halfExtents,e,t),Oe(this.halfExtents,this.halfExtents,.5),Ne(this.min,t),Ne(this.max,e)},e.getMin=function(){return this.min},e.getMax=function(){return this.max},e.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,i=n[0],r=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=i-s,h=i+s,p=r-u,d=r+u,f=o-c,y=o+c,v=e.center,g=v[0],m=v[1],T=v[2],b=e.halfExtents,E=b[0],S=b[1],k=b[2],P=g-E,x=g+E,w=m-S,N=m+S,_=T-k,C=T+k;l>P&&(l=P),x>h&&(h=x),p>w&&(p=w),N>d&&(d=N),f>_&&(f=_),C>y&&(y=C),n[0]=.5*(l+h),n[1]=.5*(p+d),n[2]=.5*(f+y),a[0]=.5*(h-l),a[1]=.5*(d-p),a[2]=.5*(y-f),this.min[0]=l,this.min[1]=p,this.min[2]=f,this.max[0]=h,this.max[1]=d,this.max[2]=y}},e.setFromTransformedAABB=function(t,e){var n=this.center,i=this.halfExtents,r=t.center,o=t.halfExtents,a=e[0],s=e[4],u=e[8],c=e[1],l=e[5],h=e[9],p=e[2],d=e[6],f=e[10],y=Math.abs(a),v=Math.abs(s),g=Math.abs(u),m=Math.abs(c),T=Math.abs(l),b=Math.abs(h),E=Math.abs(p),S=Math.abs(d),k=Math.abs(f);_e(n,e[12]+a*r[0]+s*r[1]+u*r[2],e[13]+c*r[0]+l*r[1]+h*r[2],e[14]+p*r[0]+d*r[1]+f*r[2]),_e(i,y*o[0]+v*o[1]+g*o[2],m*o[0]+T*o[1]+b*o[2],E*o[0]+S*o[1]+k*o[2]),this.min=Ge(this.min,n,i),this.max=Ce(this.max,n,i)},e.intersects=function(t){var e=this.getMax(),n=this.getMin(),i=t.getMax(),r=t.getMin();return!(n[0]>i[0]||r[0]>e[0]||n[1]>i[1]||r[1]>e[1]||n[2]>i[2]||r[2]>e[2])},e.intersection=function(e){if(!this.intersects(e))return null;var n,i,r,o=new t,a=(n=ke(),i=this.getMin(),r=e.getMin(),n[0]=Math.max(i[0],r[0]),n[1]=Math.max(i[1],r[1]),n[2]=Math.max(i[2],r[2]),n),s=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}(ke(),this.getMax(),e.getMax());return o.setMinMax(a,s),o},e.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(e[0]>t[0]||t[0]>n[0]||e[1]>t[1]||t[1]>n[1]||e[2]>t[2]||t[2]>n[2])},e.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Ne(ke(),this.min):272===t.pnVertexFlag?we(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?we(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?we(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?we(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?we(this.max[0],this.min[1],this.max[2]):we(this.max[0],this.max[1],1===t.pnVertexFlag?this.min[2]:this.max[2])},e.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Ne(ke(),this.max):272===t.pnVertexFlag?we(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?we(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?we(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?we(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?we(this.min[0],this.max[1],this.min[2]):we(this.min[0],this.min[1],1===t.pnVertexFlag?this.max[2]:this.min[2])},t}(),pn=ke(),dn=function(){function t(t,e){this.center=void 0,this.radius=void 0,this.center=t||ke(),this.radius=e||.5}var e=t.prototype;return e.containsPoint=function(t){return Ge(pn,t,this.center),xe(pn)<this.radius*this.radius},e.intersects=function(t){Ge(pn,t.center,this.center);var e=t.radius+this.radius;return xe(pn)<=e*e},t}(),fn=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||we(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},e.distanceToPoint=function(t){return De(t,this.normal)-this.distance},e.normalize=function(){var t=1/ze(this.normal);Oe(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var i=this.distanceToPoint(t),r=i/(i-this.distanceToPoint(e)),o=r>=0&&1>=r;return o&&n&&Ue(n,t,e,r),o},t}();(ln=t.Mask||(t.Mask={}))[ln.OUTSIDE=4294967295]="OUTSIDE",ln[ln.INSIDE=0]="INSIDE",ln[ln.INDETERMINATE=2147483647]="INDETERMINATE";var yn,vn=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;6>e;e++)this.planes.push(new fn)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],p=t[11],d=t[12],f=t[13],y=t[14],v=t[15];_e(this.planes[0].normal,r-e,u-o,p-c),this.planes[0].distance=v-d,_e(this.planes[1].normal,r+e,u+o,p+c),this.planes[1].distance=v+d,_e(this.planes[2].normal,r+n,u+a,p+l),this.planes[2].distance=v+f,_e(this.planes[3].normal,r-n,u-a,p-l),this.planes[3].distance=v-f,_e(this.planes[4].normal,r-i,u-s,p-h),this.planes[4].distance=v-y,_e(this.planes[5].normal,r+i,u+s,p+h),this.planes[5].distance=v+y,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),gn=ke(),mn=ke(),Tn=ke(),bn=ke(),En=ke(),Sn=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||ke(),this.direction=e||we(0,0,-1)}var e=t.prototype;return e.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},e.intersectsSphere=function(t,e){var n=Ge(gn,this.origin,t.center);Re(mn,Ne(mn,this.direction));var i=De(n,mn),r=De(n,n)-t.radius*t.radius;if(r>0&&i>0)return null;var o=i*i-r;if(0>o)return!1;var a=Math.abs(-i-Math.sqrt(o));return e&&(Ne(e,this.direction),Ie(e,this.origin,e,a)),!0},e.intersectsPlane=function(t,e){var n=(t.distance-De(t.normal,this.origin))/De(t.normal,this.direction),i=n>=0;return i&&e&&Ie(e,this.origin,this.direction,n),i},e.intersectsAABBWithoutIntersection=function(t){var e=gn,n=mn,i=Tn,r=bn,o=En,a=this.direction;return Ge(e,this.origin,t.center),_e(r,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),je(i,e,a),!(r[0]>t.halfExtents[0]&&i[0]>=0||r[1]>t.halfExtents[1]&&i[1]>=0||r[2]>t.halfExtents[2]&&i[2]>=0)&&(_e(o,Math.abs(a[0]),Math.abs(a[1]),Math.abs(a[2])),Le(n,a,e),_e(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},e.intersectAABBWithIntersection=function(t,e){var n=Ne(ke(),t.getMin());Ge(n,n,this.origin);var i=Ne(ke(),t.getMax());Ge(i,i,this.origin);var r=this.direction;0===r[0]?(n[0]=0>n[0]?-Number.MAX_VALUE:Number.MAX_VALUE,i[0]=0>i[0]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=r[0],i[0]/=r[0]),0===r[1]?(n[1]=0>n[1]?-Number.MAX_VALUE:Number.MAX_VALUE,i[1]=0>i[1]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=r[1],i[1]/=r[1]),0===r[2]?(n[2]=0>n[2]?-Number.MAX_VALUE:Number.MAX_VALUE,i[2]=0>i[2]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=r[2],i[2]/=r[2]);var o=_e(Tn,Math.min(n[0],i[0]),Math.min(n[1],i[1]),Math.min(n[2],i[2])),a=_e(bn,Math.max(n[0],i[0]),Math.max(n[1],i[1]),Math.max(n[2],i[2])),s=Math.min(Math.min(a[0],a[1]),a[2]),u=Math.max(Math.max(o[0],o[1]),o[2]),c=s>=u&&u>=0;return c&&(Ne(e,this.direction),Ie(e,this.origin,e,u)),c},t}(),kn=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Pn=function(){function t(t,e,n,i){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=i,this.left=t,this.right=t+n,this.top=e,this.bottom=e+i}return t.prototype.toJSON=function(){},t}(),xn=r.defineToken("SceneGraphSelectorFactory"),wn=r.defineToken("SceneGraphSelector",{multiple:!1}),Nn=/\[\s*name=(.*)\s*\]/;t.DefaultSceneGraphSelector=function(){function t(){}var e=t.prototype;return e.selectOne=function(t,e){if(t.startsWith("."))return e.find((function(e){return e.className===t.substring(1)}));if(t.startsWith("#"))return e.find((function(e){return e.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Nn);if(n&&n.length>1){var i=n[1].replace(/"/g,"");return e.find((function(t){return e!==t&&t.name===i}))}return null}return e.find((function(n){return e!==n&&n.nodeName===t}))},e.selectAll=function(t,e){if(t.startsWith("."))return e.findAll((function(n){return e!==n&&n.className===t.substring(1)}));if(t.startsWith("#"))return e.findAll((function(n){return e!==n&&n.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Nn);if(n&&n.length>1){var i=n[1].replace(/"/g,"");return e.findAll((function(t){return e!==t&&t.name===i}))}return[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},e.is=function(){return!0},t}(),t.DefaultSceneGraphSelector=ie([lt({token:wn})],t.DefaultSceneGraphSelector),(yn=t.ElementEvent||(t.ElementEvent={})).DESTROY="destroy",yn.ATTR_MODIFIED="DOMAttrModified",yn.INSERTED="DOMNodeInserted",yn.CHILD_INSERTED="child-inserted",yn.REMOVED="removed",yn.CHILD_REMOVED="child-removed",yn.MOUNTED="DOMNodeInsertedIntoDocument",yn.UNMOUNTED="DOMNodeRemovedFromDocument",yn.BOUNDS_CHANGED="bounds-changed",yn.GEOMETRY_BOUNDS_CHANGED="geometry-bounds-changed",yn.RENDER_ORDER_CHANGED="render-order-changed";var _n,Cn=function(){function t(e){this.type=void 0,this.eventPhase=t.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new kn,this.page=new kn,this.canvas=new kn,this.viewport=new kn,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}var e=t.prototype;return e.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},e.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},e.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},e.stopPropagation=function(){this.propagationStopped=!0},e.initEvent=function(){},e.initUIEvent=function(){},Wt(t,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),t}(),An=function(t){function e(e,n,i,r,o,a,s,u){var c;return(c=t.call(this,null)||this).relatedNode=void 0,c.prevValue=void 0,c.newValue=void 0,c.attrName=void 0,c.attrChange=void 0,c.prevParsedValue=void 0,c.newParsedValue=void 0,c.relatedNode=n,c.prevValue=i,c.newValue=r,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return Yt(e,t),e}(Cn);function Mn(t){if(!t)throw Error()}function On(t,e){if(t!==e)throw Error()}function In(t,e){if(t===e)throw Error()}function Rn(t){return void 0===t}function Dn(t){return null==t}function Ln(t){return"number"==typeof t}function Un(t){return"function"==typeof t}function Fn(t){return"boolean"==typeof t}function Bn(t){return"[object Object]"===Object.prototype.toString.call(t)}function Vn(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function Gn(t){return void 0===t?0:t>360||-360>t?t%360:t}function jn(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Ln(t)?we(t,e,n):Array.isArray(t)&&3===t.length?Pe(t):we(t[0],t[1]||e,t[2]||n)}function Hn(t){return t*(180/Math.PI)}function zn(t){return 360*t}function Wn(t,e){return 16===e.length?function(t,e){var n,i,r=.5*Math.PI,o=me(ke(),e),a=o[0],s=o[1],u=o[2],c=Math.asin(-e[2]/a);return r>c?c>-r?(n=Math.atan2(e[6]/s,e[10]/u),i=Math.atan2(e[1]/a,e[0]/a)):(i=0,n=-Math.atan2(e[4]/s,e[5]/s)):(i=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=c,t[2]=i,t}(t,e):function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=i*i,s=r*r,u=o*o,c=n*n+a+s+u,l=n*o-i*r;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(i,n),t[2]=0):-.499995*c>l?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(i,n),t[2]=0):(t[0]=Math.asin(2*(n*r-o*i)),t[1]=Math.atan2(2*(n*o+i*r),1-2*(s+u)),t[2]=Math.atan2(2*(n*i+r*o),1-2*(a+s))),t}(t,e)}function qn(t,e,n,i,r){var o,a,s,u,c,l,h,p,d,f,y=Math.cos(t),v=Math.sin(t);return o=i*y,a=r*v,s=0,u=-i*v,c=r*y,l=0,h=e,p=n,d=1,(f=new ue(9))[0]=o,f[1]=a,f[2]=s,f[3]=u,f[4]=c,f[5]=l,f[6]=h,f[7]=p,f[8]=d,f}function Yn(t,e,n,i,r,o,a){var s=2*o/(i-r),u=(n+e)/(n-e),c=(i+r)/(i-r),l=-(a+o)/(a-o),h=-2*a*o/(a-o);return t[0]=2*o/(n-e),t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=l,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}function Xn(t){var e=t[0],n=t[1],i=t[3],r=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(i*i+r*r);0>e*r-n*i&&(r>e?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(i*=1/a,r*=1/a);var s=Hn(Math.atan2(n,e));return[t[6],t[7],o,a,s]}An.ADDITION=2,An.MODIFICATION=1,An.REMOVAL=3,(_n=t.PropertySyntax||(t.PropertySyntax={})).COORDINATE="<coordinate>",_n.COLOR="<color>",_n.PAINT="<paint>",_n.NUMBER="<number>",_n.OPACITY_VALUE="<opacity-value>",_n.SHADOW_BLUR="<shadow-blur>",_n.LENGTH="<length>",_n.PERCENTAGE="<percentage>",_n.LENGTH_PERCENTAGE="<length> | <percentage>",_n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",_n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",_n.LIST_OF_POINTS="<list-of-points>",_n.PATH="<path>",_n.FILTER="<filter>",_n.Z_INDEX="<z-index>",_n.OFFSET_PATH="<offset-path>",_n.OFFSET_DISTANCE="<offset-distance>",_n.CLIP_PATH="<clip-path>",_n.TRANSFORM="<transform>",_n.TRANSFORM_ORIGIN="<transform-origin>",_n.TEXT="<text>",_n.TEXT_TRANSFORM="<text-transform>";var Kn=r.defineToken("StyleValueRegistry"),$n=r.defineToken("GeometryUpdaterFactory"),Zn=r.defineToken("GeometryAABBUpdater"),Jn=function(t){function e(e,n){var i;return(i=t.call(this,null)||this).type=e,i.detail=n,Object.assign(Jt(i),n),i}return Yt(e,t),e}(Cn),Qn=function(){function t(){this.emitter=new ne.EventEmitter}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var i=Fn(n)&&n||Bn(n)&&n.capture,r=Bn(n)&&n.once,o=Un(e)?void 0:e,a=!1,s="";if(t.indexOf(":")>-1){var u=t.split(":");t=u[1],s=u[0],a=!0}if(t=i?t+"capture":t,e=Un(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];(null===(t=n[0].target)||void 0===t?void 0:t.name)===s&&c.apply(void 0,n)}}return r?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var i,r=Fn(n)&&n||Bn(n)&&n.capture,o=Un(e)?void 0:e;return t=r?t+"capture":t,e=Un(e)?e:null===(i=e)||void 0===i?void 0:i.handleEvent,this.emitter.off(t,e,o),this},e.emit=function(t,e){this.dispatchEvent(new Jn(t,e))},e.dispatchEvent=function(t){if(!(t instanceof Cn))throw Error("DisplayObject cannot propagate events outside of the Federated Events API");var e,n,i=this.ownerDocument||this.document;i&&(t.manager=(null===(e=i.defaultView)||void 0===e?void 0:e.getEventService())||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t));return!t.defaultPrevented},t}(),ti=function(e){function n(){for(var t,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}Yt(n,e),n.isNode=function(t){return!!t.childNodes};var i=n.prototype;return i.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},i.hasChildNodes=function(){return this.childNodes.length>0},i.isDefaultNamespace=function(t){throw Error("Method not implemented.")},i.lookupNamespaceURI=function(t){throw Error("Method not implemented.")},i.lookupPrefix=function(t){throw Error("Method not implemented.")},i.normalize=function(){throw Error("Method not implemented.")},i.isEqualNode=function(t){return this===t},i.isSameNode=function(t){return this.isEqualNode(t)},i.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof n))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=t,i=this,r=[e],o=[i];null!==(a=e.parentNode)&&void 0!==a?a:i.parentNode;){var a;e=e.parentNode?(r.push(e.parentNode),e.parentNode):e,i=i.parentNode?(o.push(i.parentNode),i.parentNode):i}if(e!==i)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var s=r.length>o.length?r:o,u=s===r?o:r;if(s[s.length-u.length]===u[0])return s===r?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],p=s[c+l];if(p!==h){var d=h.parentNode.childNodes;return d.indexOf(h)<d.indexOf(p)?u===r?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:s===r?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING},i.contain=function(t){return this.contains(t)},i.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},i.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},i.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},Wt(n,[{key:"textContent",get:function(){var e="";this.nodeName===t.Shape.TEXT&&(e+=this.style.text);for(var n,i=te(this.childNodes);!(n=i()).done;){var r=n.value;e+=r.nodeName===t.Shape.TEXT?r.nodeValue:r.textContent}return e},set:function(e){var n=this;this.childNodes.slice().forEach((function(t){n.removeChild(t,!0)})),this.nodeName===t.Shape.TEXT&&(this.style.text=""+e)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}}]),n}(Qn);ti.DOCUMENT_POSITION_DISCONNECTED=1,ti.DOCUMENT_POSITION_PRECEDING=2,ti.DOCUMENT_POSITION_FOLLOWING=4,ti.DOCUMENT_POSITION_CONTAINS=8,ti.DOCUMENT_POSITION_CONTAINED_BY=16,ti.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var ei=function(){this.contentBounds=void 0,this.renderBounds=void 0};ei.tag="c-geometry";var ni=function(){this.bounds=void 0,this.boundsDirty=!0,this.renderBounds=void 0,this.renderBoundsDirty=!0,this.dirtyRenderBounds=void 0,this.dirty=!1};ni.tag="c-renderable";var ii,ri=function(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=we(0,0,0),this.localRotation=an(0,0,0,1),this.localScale=we(1,1,1),this.localTransform=le(),this.position=we(0,0,0),this.rotation=an(0,0,0,1),this.scaling=we(1,1,1),this.worldTransform=le(),this.origin=we(0,0,0)};ri.tag="c-transform",(ii=t.Strategy||(t.Strategy={}))[ii.Standard=0]="Standard";var oi=function(){function e(){this.strategy=t.Strategy.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return e.prototype.isCulled=function(){return this.enable&&!this.visible},e}();oi.tag="c-cullable";var ai=function(){this.dirty=!1,this.sorted=void 0,this.lastSortedIndex=void 0,this.renderOrder=0};ai.tag="c-sortable";var si=0,ui=function(e){function n(){for(var t,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).sceneGraphService=Ut.get(Vu),t.entity=si++,t.renderable=new ni,t.cullable=new oi,t.transformable=new ri,t.sortable=new ai,t.geometry=new ei,t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={},t.parsedStyle={},t.attributes={},t}Yt(n,e),n.isElement=function(t){return!!t.getAttribute};var i=n.prototype;return i.cloneNode=function(t){throw Error("Method not implemented.")},i.appendChild=function(e,n){return this.sceneGraphService.attach(e,this,n),this.emit(t.ElementEvent.CHILD_INSERTED,{child:e}),e.dispatchEvent(new An(t.ElementEvent.INSERTED,this,"","","",0,"","")),e},i.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},i.replaceChild=function(t,e,n){var i=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,i),e},i.removeChild=function(e,n){return void 0===n&&(n=!0),e.dispatchEvent(new An(t.ElementEvent.REMOVED,this,"","","",0,"","")),n&&(e.emit(t.ElementEvent.DESTROY,{}),e.destroyed=!0),this.emit(t.ElementEvent.CHILD_REMOVED,{child:e}),this.sceneGraphService.detach(e),n&&e.emitter.removeAllListeners(),e},i.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},i.matches=function(t){return this.sceneGraphService.matches(t,this)},i.getElementById=function(t){return this.sceneGraphService.querySelector("#"+t,this)},i.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},i.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll("."+t,this)},i.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},i.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},i.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},i.find=function(t){var e=this,n=null;return this.forEach((function(i){return!(i===e||!t(i))&&(n=i,!0)})),n},i.findAll=function(t){var e=this,n=[];return this.forEach((function(i){i!==e&&t(i)&&n.push(i)})),n},i.after=function(){var t=this;if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];i.forEach((function(n,i){var r;return null===(r=t.parentNode)||void 0===r?void 0:r.appendChild(n,e+i+1)}))}},i.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=n[0],o=n.slice(1);this.parentNode.appendChild(r,t),r.after.apply(r,o)}},i.replaceWith=function(){this.after.apply(this,arguments),this.remove()},i.append=function(){for(var t=this,e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];n.forEach((function(e){return t.appendChild(e)}))},i.prepend=function(){for(var t=this,e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];n.forEach((function(e,n){return t.appendChild(e,n)}))},i.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},i.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},i.destroy=function(){this.emit(t.ElementEvent.DESTROY,{}),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},i.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},i.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},i.getBounds=function(){return this.sceneGraphService.getBounds(this)},i.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},i.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},i.getClientRects=function(){return[this.getBoundingClientRect()]},i.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},i.getAttributeNames=function(){return Object.keys(this.attributes)},i.getAttribute=function(t){var e=Nu(""+t,""),n=this.attributes[e[0]];return Dn(n)?null:n},i.hasAttribute=function(t){return this.getAttributeNames().includes(t)},i.hasAttributes=function(){return!!this.getAttributeNames().length},i.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},i.setAttribute=function(t,e,n){this.attributes[t]=e},i.getAttributeNS=function(t,e){throw Error("Method not implemented.")},i.getAttributeNode=function(t){throw Error("Method not implemented.")},i.getAttributeNodeNS=function(t,e){throw Error("Method not implemented.")},i.hasAttributeNS=function(t,e){throw Error("Method not implemented.")},i.removeAttributeNS=function(t,e){throw Error("Method not implemented.")},i.removeAttributeNode=function(t){throw Error("Method not implemented.")},i.setAttributeNS=function(t,e,n){throw Error("Method not implemented.")},i.setAttributeNode=function(t){throw Error("Method not implemented.")},i.setAttributeNodeNS=function(t){throw Error("Method not implemented.")},i.toggleAttribute=function(t,e){throw Error("Method not implemented.")},Wt(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter((function(t){return""!==t}))}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}}]),n}(ti),ci=function(t){function e(e,n,i,r){var o;return(o=t.call(this,e)||this).currentTime=void 0,o.timelineTime=void 0,o.currentTime=i,o.timelineTime=r,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=i,o.timelineTime=r,o}return Yt(e,t),e}(Cn),li=0,hi=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=t,t.animation=this,this.timeline=e,this.id=""+li++,this._inEffect=!!this.effect.update(0),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this.totalDuration:0,this._startTime=this.totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(this.playbackRate<0){if(this.totalDuration>=1/0)throw Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this.totalDuration}else this.currentTime=0},e.persist=function(){throw Error("Method not implemented.")},e.addEventListener=function(t,e,n){throw Error("Method not implemented.")},e.removeEventListener=function(t,e,n){throw Error("Method not implemented.")},e.dispatchEvent=function(t){throw Error("Method not implemented.")},e.commitStyles=function(){throw Error("Method not implemented.")},e.ensureAlive=function(){var t,e;0>this.playbackRate&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this.totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new ci(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var i=new ci(null,this,this.currentTime,t);this.onframe(i)}this._finishedFlag=!1}},Wt(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(!isNaN(t=Number(t))){var e;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate;this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),isNaN(t=Number(t)))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this.totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}();function pi(t,e){return Number(t.id)-Number(e.id)}var di,fi,yi,vi,gi,mi=function(){function t(t){var e=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],Number(e.currentTime)>t&&(t=Number(e.currentTime)),e.animations.sort(pi),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t){var e=new hi(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(pi),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},e.tick=function(t,e,n){var i,r,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var i=n._inEffect||n._needsTick;n._inTimeline=i,i?u.push(n):c.push(n)})),(i=this.pendingEffects).push.apply(i,a),(r=this.pendingEffects).push.apply(r,s),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}();(di=t.UnitType||(t.UnitType={}))[di.kUnknown=0]="kUnknown",di[di.kNumber=1]="kNumber",di[di.kPercentage=2]="kPercentage",di[di.kEms=3]="kEms",di[di.kExs=4]="kExs",di[di.kPixels=5]="kPixels",di[di.kCentimeters=6]="kCentimeters",di[di.kMillimeters=7]="kMillimeters",di[di.kInches=8]="kInches",di[di.kPoints=9]="kPoints",di[di.kPicas=10]="kPicas",di[di.kQuarterMillimeters=11]="kQuarterMillimeters",di[di.kViewportWidth=12]="kViewportWidth",di[di.kViewportHeight=13]="kViewportHeight",di[di.kViewportInlineSize=14]="kViewportInlineSize",di[di.kViewportBlockSize=15]="kViewportBlockSize",di[di.kViewportMin=16]="kViewportMin",di[di.kViewportMax=17]="kViewportMax",di[di.kSmallViewportWidth=18]="kSmallViewportWidth",di[di.kSmallViewportHeight=19]="kSmallViewportHeight",di[di.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",di[di.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",di[di.kSmallViewportMin=22]="kSmallViewportMin",di[di.kSmallViewportMax=23]="kSmallViewportMax",di[di.kLargeViewportWidth=24]="kLargeViewportWidth",di[di.kLargeViewportHeight=25]="kLargeViewportHeight",di[di.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",di[di.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",di[di.kLargeViewportMin=28]="kLargeViewportMin",di[di.kLargeViewportMax=29]="kLargeViewportMax",di[di.kDynamicViewportWidth=30]="kDynamicViewportWidth",di[di.kDynamicViewportHeight=31]="kDynamicViewportHeight",di[di.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",di[di.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",di[di.kDynamicViewportMin=34]="kDynamicViewportMin",di[di.kDynamicViewportMax=35]="kDynamicViewportMax",di[di.kContainerWidth=36]="kContainerWidth",di[di.kContainerHeight=37]="kContainerHeight",di[di.kContainerInlineSize=38]="kContainerInlineSize",di[di.kContainerBlockSize=39]="kContainerBlockSize",di[di.kContainerMin=40]="kContainerMin",di[di.kContainerMax=41]="kContainerMax",di[di.kRems=42]="kRems",di[di.kChs=43]="kChs",di[di.kUserUnits=44]="kUserUnits",di[di.kDegrees=45]="kDegrees",di[di.kRadians=46]="kRadians",di[di.kGradians=47]="kGradians",di[di.kTurns=48]="kTurns",di[di.kMilliseconds=49]="kMilliseconds",di[di.kSeconds=50]="kSeconds",di[di.kHertz=51]="kHertz",di[di.kKilohertz=52]="kKilohertz",di[di.kDotsPerPixel=53]="kDotsPerPixel",di[di.kDotsPerInch=54]="kDotsPerInch",di[di.kDotsPerCentimeter=55]="kDotsPerCentimeter",di[di.kFraction=56]="kFraction",di[di.kInteger=57]="kInteger",di[di.kQuirkyEms=58]="kQuirkyEms",(fi=t.UnitCategory||(t.UnitCategory={}))[fi.kUNumber=0]="kUNumber",fi[fi.kUPercent=1]="kUPercent",fi[fi.kULength=2]="kULength",fi[fi.kUAngle=3]="kUAngle",fi[fi.kUTime=4]="kUTime",fi[fi.kUFrequency=5]="kUFrequency",fi[fi.kUResolution=6]="kUResolution",fi[fi.kUOther=7]="kUOther",(yi=t.ValueRange||(t.ValueRange={}))[yi.kAll=0]="kAll",yi[yi.kNonNegative=1]="kNonNegative",yi[yi.kInteger=2]="kInteger",yi[yi.kNonNegativeInteger=3]="kNonNegativeInteger",yi[yi.kPositiveInteger=4]="kPositiveInteger",(vi=t.Nested||(t.Nested={}))[vi.kYes=0]="kYes",vi[vi.kNo=1]="kNo",(gi=t.ParenLess||(t.ParenLess={}))[gi.kYes=0]="kYes",gi[gi.kNo=1]="kNo";var Ti,bi=[{name:"em",unit_type:t.UnitType.kEms},{name:"px",unit_type:t.UnitType.kPixels},{name:"deg",unit_type:t.UnitType.kDegrees},{name:"rad",unit_type:t.UnitType.kRadians},{name:"grad",unit_type:t.UnitType.kGradians},{name:"ms",unit_type:t.UnitType.kMilliseconds},{name:"s",unit_type:t.UnitType.kSeconds},{name:"rem",unit_type:t.UnitType.kRems},{name:"turn",unit_type:t.UnitType.kTurns}];(Ti=t.CSSStyleValueType||(t.CSSStyleValueType={}))[Ti.kUnknownType=0]="kUnknownType",Ti[Ti.kUnparsedType=1]="kUnparsedType",Ti[Ti.kKeywordType=2]="kKeywordType",Ti[Ti.kUnitType=3]="kUnitType",Ti[Ti.kSumType=4]="kSumType",Ti[Ti.kProductType=5]="kProductType",Ti[Ti.kNegateType=6]="kNegateType",Ti[Ti.kInvertType=7]="kInvertType",Ti[Ti.kMinType=8]="kMinType",Ti[Ti.kMaxType=9]="kMaxType",Ti[Ti.kClampType=10]="kClampType",Ti[Ti.kTransformType=11]="kTransformType",Ti[Ti.kPositionType=12]="kPositionType",Ti[Ti.kURLImageType=13]="kURLImageType",Ti[Ti.kColorType=14]="kColorType",Ti[Ti.kUnsupportedColorType=15]="kUnsupportedColorType";var Ei,Si,ki=function(){function e(){}e.parse=function(t,e){return[][0]},e.parseAll=function(t,e){return[]},e.unitFromName=function(e){return e?"number"===e?t.UnitType.kNumber:"percent"===e||"%"===e?t.UnitType.kPercentage:this.stringToUnitType(e):t.UnitType.kUnknown},e.unitTypeToUnitCategory=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return t.UnitCategory.kUNumber;case t.UnitType.kPercentage:return t.UnitCategory.kUPercent;case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:return t.UnitCategory.kULength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.UnitCategory.kUTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.UnitCategory.kUAngle;case t.UnitType.kHertz:case t.UnitType.kKilohertz:return t.UnitCategory.kUFrequency;case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:return t.UnitCategory.kUResolution;default:return t.UnitCategory.kUOther}},e.unitTypeToString=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:case t.UnitType.kUserUnits:return"";case t.UnitType.kPercentage:return"%";case t.UnitType.kEms:case t.UnitType.kQuirkyEms:return"em";case t.UnitType.kRems:return"rem";case t.UnitType.kPixels:return"px";case t.UnitType.kDegrees:return"deg";case t.UnitType.kRadians:return"rad";case t.UnitType.kGradians:return"grad";case t.UnitType.kMilliseconds:return"ms";case t.UnitType.kSeconds:return"s";case t.UnitType.kTurns:return"turn"}return""},e.stringToUnitType=function(t){return bi.find((function(e){return e.name===t})).unit_type},e.canonicalUnitTypeForCategory=function(e){switch(e){case t.UnitCategory.kUNumber:return t.UnitType.kNumber;case t.UnitCategory.kULength:return t.UnitType.kPixels;case t.UnitCategory.kUPercent:return t.UnitType.kUnknown;case t.UnitCategory.kUTime:return t.UnitType.kSeconds;case t.UnitCategory.kUAngle:return t.UnitType.kDegrees;case t.UnitCategory.kUFrequency:return t.UnitType.kHertz;case t.UnitCategory.kUResolution:return t.UnitType.kDotsPerPixel;default:return t.UnitType.kUnknown}},e.conversionToCanonicalUnitsScaleFactor=function(e){var n=1;switch(e){case t.UnitType.kPixels:case t.UnitType.kUserUnits:case t.UnitType.kDegrees:case t.UnitType.kSeconds:case t.UnitType.kHertz:break;case t.UnitType.kMilliseconds:n=.001;break;case t.UnitType.kCentimeters:case t.UnitType.kDotsPerCentimeter:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kDotsPerInch:case t.UnitType.kPoints:case t.UnitType.kPicas:break;case t.UnitType.kRadians:n=180/Math.PI;break;case t.UnitType.kGradians:n=.9;break;case t.UnitType.kTurns:n=360;break;case t.UnitType.kKilohertz:n=1e3}return n},e.isAngle=function(e){return e===t.UnitType.kDegrees||e===t.UnitType.kRadians||e===t.UnitType.kGradians||e===t.UnitType.kTurns},e.isViewportPercentageLength=function(e){return e>=t.UnitType.kViewportWidth&&t.UnitType.kDynamicViewportMax>=e},e.isContainerPercentageLength=function(e){return e>=t.UnitType.kContainerWidth&&t.UnitType.kContainerMax>=e},e.isLength=function(e){return e>=t.UnitType.kEms&&t.UnitType.kUserUnits>=e||e==t.UnitType.kQuirkyEms},e.isRelativeUnit=function(e){return e===t.UnitType.kPercentage||e===t.UnitType.kEms||e===t.UnitType.kExs||e===t.UnitType.kRems||e===t.UnitType.kChs||this.isViewportPercentageLength(e)||this.isContainerPercentageLength(e)},e.isTime=function(e){return e===t.UnitType.kSeconds||e===t.UnitType.kMilliseconds},e.isFrequency=function(e){return e==t.UnitType.kHertz||e==t.UnitType.kKilohertz},e.isResolution=function(e){return e>=t.UnitType.kDotsPerPixel&&t.UnitType.kDotsPerCentimeter>=e},e.isFlex=function(e){return e===t.UnitType.kFraction};var n=e.prototype;return n.toString=function(){return this.buildCSSText(t.Nested.kNo,t.ParenLess.kNo,"")},n.isNumericValue=function(){return this.getType()>=t.CSSStyleValueType.kUnitType&&this.getType()<=t.CSSStyleValueType.kClampType},e}(),Pi=function(e){function n(t){var n;return(n=e.call(this)||this).colorSpace=void 0,n.colorSpace=t,n}Yt(n,e);var i=n.prototype;return i.getType=function(){return t.CSSStyleValueType.kColorType},i.to=function(t){return this},n}(ki),xi=function(e){function n(t){var n;return(n=e.call(this)||this).value=void 0,n.value=t,n}Yt(n,e);var i=n.prototype;return i.clone=function(){return new n(this.value)},i.getType=function(){return t.CSSStyleValueType.kKeywordType},i.buildCSSText=function(t,e,n){return n+this.value},n}(ki);function wi(e){switch(In(e,t.UnitType.kNumber),e){case t.UnitType.kEms:case t.UnitType.kExs:case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:case t.UnitType.kViewportWidth:case t.UnitType.kViewportHeight:case t.UnitType.kViewportInlineSize:case t.UnitType.kViewportBlockSize:case t.UnitType.kViewportMin:case t.UnitType.kViewportMax:case t.UnitType.kSmallViewportWidth:case t.UnitType.kSmallViewportHeight:case t.UnitType.kSmallViewportInlineSize:case t.UnitType.kSmallViewportBlockSize:case t.UnitType.kSmallViewportMin:case t.UnitType.kSmallViewportMax:case t.UnitType.kLargeViewportWidth:case t.UnitType.kLargeViewportHeight:case t.UnitType.kLargeViewportInlineSize:case t.UnitType.kLargeViewportBlockSize:case t.UnitType.kLargeViewportMin:case t.UnitType.kLargeViewportMax:case t.UnitType.kDynamicViewportWidth:case t.UnitType.kDynamicViewportHeight:case t.UnitType.kDynamicViewportInlineSize:case t.UnitType.kDynamicViewportBlockSize:case t.UnitType.kDynamicViewportMin:case t.UnitType.kDynamicViewportMax:case t.UnitType.kContainerWidth:case t.UnitType.kContainerHeight:case t.UnitType.kContainerInlineSize:case t.UnitType.kContainerBlockSize:case t.UnitType.kContainerMin:case t.UnitType.kContainerMax:case t.UnitType.kRems:case t.UnitType.kChs:return t.BaseType.kLength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.BaseType.kTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.BaseType.kAngle;case t.UnitType.kHertz:case t.UnitType.kKilohertz:return t.BaseType.kFrequency;case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:return t.BaseType.kResolution;case t.UnitType.kFraction:return t.BaseType.kFlex;case t.UnitType.kPercentage:return t.BaseType.kPercent;default:return t.BaseType.kLength}}function Ni(e){switch(e){case t.BaseType.kLength:return"length";case t.BaseType.kAngle:return"angle";case t.BaseType.kTime:return"time";case t.BaseType.kFrequency:return"frequency";case t.BaseType.kResolution:return"resolution";case t.BaseType.kFlex:return"flex";case t.BaseType.kPercent:return"percent"}return""}(Ei=t.CSSMathOperator||(t.CSSMathOperator={})).kAdd="+",Ei.kSubtract="-",Ei.kMultiply="*",Ei.kDivide="/",Ei.kMin="min",Ei.kMax="max",Ei.kClamp="clamp",Ei.kInvalid="",(Si=t.BaseType||(t.BaseType={}))[Si.kLength=0]="kLength",Si[Si.kAngle=1]="kAngle",Si[Si.kTime=2]="kTime",Si[Si.kFrequency=3]="kFrequency",Si[Si.kResolution=4]="kResolution",Si[Si.kFlex=5]="kFlex",Si[Si.kPercent=6]="kPercent",Si[Si.kNumBaseTypes=7]="kNumBaseTypes";var _i=function(){function e(e,n){void 0===e&&(e=t.UnitType.kNumber),void 0===n&&(n=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=t.BaseType.kPercent,this.hasPercentHint=!1,this.exponents=Array(t.BaseType.kNumBaseTypes).fill(0),e!==t.UnitType.kNumber&&this.setExponent(wi(e),n)}var n=e.prototype;return n.applyPercentHint=function(e){In(e,t.BaseType.kPercent),this.setExponent(e,this.exponent(e)+this.exponent(t.BaseType.kPercent)),this.setExponent(t.BaseType.kPercent,0),this.percentHint=e,this.hasPercentHint=!0},n.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},n.isOnlyNonZeroEntry=function(t,e){return In(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},n.exponent=function(t){return this.exponents[t]},n.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},e.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},n.matchesBaseType=function(e){return In(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)&&!this.hasPercentHint},n.matchesPercentage=function(){return this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesBaseTypePercentage=function(e){return In(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},n.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},e.add=function(e,n,i){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint),On(e.percentHint,n.percentHint);for(var r=0;t.BaseType.kNumBaseTypes>r;++r){var o=r;if(e.exponents[r]!==n.exponents[r]&&(o!==t.BaseType.kPercent&&(e.applyPercentHint(o),n.applyPercentHint(o)),e.exponents[r]!==n.exponents[r]))return e}return e},e.multiply=function(e,n,i){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint);for(var r=0;t.BaseType.kNumBaseTypes>r;++r){var o=r;e.setExponent(o,e.exponent(o)+n.exponent(o))}return e},e}(),Ci=function(e){function n(t){var n;return(n=e.call(this)||this).type_=void 0,n.type_=t,n}Yt(n,e),n.fromNumberish=function(e){return"number"==typeof e?new Di(e,t.UnitType.kNumber):e},n.fromPercentish=function(e){return"number"==typeof e?new Di(100*e,t.UnitType.kPercentage):e};var i=n.prototype;return i.getType=function(){return t.CSSStyleValueType.kUnknownType},i.equals=function(){for(var t=this,e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=Ai(n);return r.every((function(e){return t.equals(e)}))},i.add=function(){for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=Ai(n);Mi(t.CSSStyleValueType.kSumType,r,this);var o=Ii(r,t.CSSMathOperator.kAdd);return o||zi.create(r)},i.sub=function(){for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=Ai(n);r=r.map((function(t){return t.negate()})),Mi(t.CSSStyleValueType.kSumType,r,this);var o=Ii(r,t.CSSMathOperator.kAdd);return o||zi.create(r)},i.mul=function(){for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=Ai(n);Mi(t.CSSStyleValueType.kProductType,r,this);var o=Ri(r);return o||Wi.create(r)},i.div=function(){for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=Ai(n);r=r.map((function(t){return t.invert()})),Mi(t.CSSStyleValueType.kProductType,r,this);var o=Ri(r);return o||Wi.create(r)},i.min=function(){for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=Ai(n);Mi(t.CSSStyleValueType.kMinType,r,this);var o=Ii(r,t.CSSMathOperator.kMin);return o||ji.create(r)},i.max=function(){for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=Ai(n);Mi(t.CSSStyleValueType.kMaxType,r,this);var o=Ii(r,t.CSSMathOperator.kMax);return o||Hi.create(r)},i.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,i=Oi(e[0]);return i?(n="string"==typeof t?Di.unitFromName(t):t,i.convertTo(n)):null},i.toSum=function(){for(var t=arguments.length,e=Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var r=0,o=e;o.length>r;r++){var a=o[r];if(!n.isValidUnit(n.unitFromName(a)))return null}var s=this.sumValue();if(!s.length)return null;for(var u,c=[],l=te(s);!(u=l()).done;){var h=u.value,p=Oi(h);if(!p)return null;c.push(p)}if(0===e.length){c.sort((function(t,e){return t.unit-e.unit}));var d=zi.create(c);return Mn(!!d),d}for(var f=[],y=function(){var t=n.unitFromName(g[v]);Mn(n.isValidUnit(t));var e=c.reduce((function(e,n,i){if(n){var r=n.convertTo(t);r&&(e+=r.value,c[i]=null)}return e}),0);f.push(new Di(e,t))},v=0,g=e;g.length>v;v++)y();if(c.some((function(t){return!!t})))throw Error("There were leftover terms that were not converted");return zi.create(f)},i.type=function(){var e={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},n=this.type_.exponent(t.BaseType.kLength);return n&&(e.length=n),(n=this.type_.exponent(t.BaseType.kAngle))&&(e.angle=n),(n=this.type_.exponent(t.BaseType.kTime))&&(e.time=n),(n=this.type_.exponent(t.BaseType.kFrequency))&&(e.frequency=n),(n=this.type_.exponent(t.BaseType.kResolution))&&(e.resolution=n),(n=this.type_.exponent(t.BaseType.kFlex))&&(e.flex=n),(n=this.type_.exponent(t.BaseType.kPercent))&&(e.percent=n),this.type_.hasPercentHint&&(e.percentHint=Ni(this.type_.percentHint)),e},n.isValidUnit=function(e){return e!==t.UnitType.kUserUnits&&!!(e===t.UnitType.kNumber||e==t.UnitType.kPercentage||this.isLength(e)||this.isAngle(e)||this.isTime(e)||this.isFrequency(e)||this.isResolution(e)||this.isFlex(e))},i.negate=function(){return Fi.create(this)},i.invert=function(){return Ui.create(this)},n}(ki);function Ai(t){return t.map(Ci.fromNumberish)}function Mi(t,e,n){Mn(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Oi(t){return 0===Object.keys(t.units).length?new Di(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Di(t.value,Number(Object.keys(t.units)[0])):null}function Ii(e,n){Mn(!!e.length);var i=e[0]instanceof Di?e[0]:null;if(!i)return null;for(var r=i.value,o=1;e.length>o;o++){var a=e[o]instanceof Di?e[o]:null;if(!a||a.unit!==i.unit)return null;n===t.CSSMathOperator.kAdd?r+=a.value:n===t.CSSMathOperator.kMax?r=Math.max(r,a.value):n===t.CSSMathOperator.kMin&&(r=Math.min(r,a.value))}return new Di(r,i.unit)}function Ri(e){Mn(!!e.length);for(var n=t.UnitType.kNumber,i=1,r=0;e.length>r;r++){var o=e[r]instanceof Di?e[r]:null;if(!o)return null;if(o.unit!==t.UnitType.kNumber){if(n!==t.UnitType.kNumber)return null;n=o.unit}i*=o.value}return new Di(i,n)}var Di=function(e){function n(i,r){var o,a;return void 0===r&&(r=t.UnitType.kNumber),a="string"==typeof r?n.unitFromName(r):r,Mn(n.isValidUnit(a)),(o=e.call(this,new _i(a))||this).unit=void 0,o.value=void 0,o.unit=a,o.value=i,o}Yt(n,e),n.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},n.toCanonicalUnitIfPossible=function(e){var n=this.toCanonicalUnit(e);return n===t.UnitType.kUnknown?e:n},n.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Mn(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},n.formatNumber=function(t,e){return void 0===e&&(e=""),t+e};var i=n.prototype;return i.clone=function(){return new n(this.value,this.unit)},i.convertTo=function(e){if(this.unit===e)return new n(this.value,this.unit);var i=n.toCanonicalUnit(this.unit);if(i!==n.toCanonicalUnit(e)||i===t.UnitType.kUnknown)return null;var r=ki.conversionToCanonicalUnitsScaleFactor(this.unit)/ki.conversionToCanonicalUnitsScaleFactor(e);return new n(this.value*r,e)},i.equals=function(t){return this.value===t.value&&this.unit===t.unit},i.getType=function(){return t.CSSStyleValueType.kUnitType},i.sumValue=function(){var e=[],i={};return this.unit!==t.UnitType.kNumber&&(i[n.toCanonicalUnitIfPossible(this.unit)]=1),e.push({value:this.value*ki.conversionToCanonicalUnitsScaleFactor(this.unit),units:i}),e},i.negate=function(){return new n(-this.value,this.unit)},i.invert=function(){return this.unit===t.UnitType.kNumber?0===this.value?null:new n(1/this.value,this.unit):Ui.create(this)},i.buildCSSText=function(e,i,r){var o;switch(this.unit){case t.UnitType.kUnknown:break;case t.UnitType.kInteger:o=Number(this.value).toFixed(0);break;case t.UnitType.kNumber:case t.UnitType.kPercentage:case t.UnitType.kEms:case t.UnitType.kQuirkyEms:case t.UnitType.kExs:case t.UnitType.kRems:case t.UnitType.kChs:case t.UnitType.kPixels:case t.UnitType.kCentimeters:case t.UnitType.kDotsPerPixel:case t.UnitType.kDotsPerInch:case t.UnitType.kDotsPerCentimeter:case t.UnitType.kMillimeters:case t.UnitType.kQuarterMillimeters:case t.UnitType.kInches:case t.UnitType.kPoints:case t.UnitType.kPicas:case t.UnitType.kUserUnits:case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:case t.UnitType.kHertz:case t.UnitType.kKilohertz:case t.UnitType.kTurns:case t.UnitType.kFraction:case t.UnitType.kViewportWidth:case t.UnitType.kViewportHeight:case t.UnitType.kViewportInlineSize:case t.UnitType.kViewportBlockSize:case t.UnitType.kViewportMin:case t.UnitType.kViewportMax:case t.UnitType.kSmallViewportWidth:case t.UnitType.kSmallViewportHeight:case t.UnitType.kSmallViewportInlineSize:case t.UnitType.kSmallViewportBlockSize:case t.UnitType.kSmallViewportMin:case t.UnitType.kSmallViewportMax:case t.UnitType.kLargeViewportWidth:case t.UnitType.kLargeViewportHeight:case t.UnitType.kLargeViewportInlineSize:case t.UnitType.kLargeViewportBlockSize:case t.UnitType.kLargeViewportMin:case t.UnitType.kLargeViewportMax:case t.UnitType.kDynamicViewportWidth:case t.UnitType.kDynamicViewportHeight:case t.UnitType.kDynamicViewportInlineSize:case t.UnitType.kDynamicViewportBlockSize:case t.UnitType.kDynamicViewportMin:case t.UnitType.kDynamicViewportMax:case t.UnitType.kContainerWidth:case t.UnitType.kContainerHeight:case t.UnitType.kContainerInlineSize:case t.UnitType.kContainerBlockSize:case t.UnitType.kContainerMin:case t.UnitType.kContainerMax:var a=this.value,s=n.unitTypeToString(this.unit);if(-999999>a||a>999999){var u=n.unitTypeToString(this.unit);o=!Number.isFinite(a)||Number.isNaN(a)?n.formatInfinityOrNaN(a,u):n.formatNumber(a,u)}else o=""+a+s}return r+=o},n}(Ci),Li=function(t){function e(){return t.apply(this,arguments)||this}return Yt(e,t),e.prototype.isUnitValue=function(){return!1},e}(Ci),Ui=function(e){function n(t,n){var i;return(i=e.call(this,n)||this).value=void 0,i.operator="invert",i.value=t,i}Yt(n,e),n.create=function(t){return new n(t,_i.negateExponents(t.type_))};var i=n.prototype;return i.clone=function(){return new n(this.value,this.type_)},i.getType=function(){return t.CSSStyleValueType.kInvertType},i.equals=function(e){return e.getType()===t.CSSStyleValueType.kInvertType&&this.value.equals(e.value)},i.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},i.buildCSSText=function(e,n,i){return n==t.ParenLess.kNo&&(i+=e===t.Nested.kYes?"(":"calc("),i=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i+="1 / "),n===t.ParenLess.kNo&&(i+=")"),i},n}(Li),Fi=function(e){function n(t,n){var i;return(i=e.call(this,n)||this).value=void 0,i.operator="negate",i.value=t,i}Yt(n,e),n.create=function(t){return new n(t,t.type_)};var i=n.prototype;return i.clone=function(){return new n(this.value,this.type_)},i.getType=function(){return t.CSSStyleValueType.kNegateType},i.equals=function(e){return e.getType()===t.CSSStyleValueType.kNegateType&&this.value.equals(e.value)},i.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},i.buildCSSText=function(e,n,i){return n==t.ParenLess.kNo&&(i+=e===t.Nested.kYes?"(":"calc("),i=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i+="-"),n===t.ParenLess.kNo&&(i+=")"),i},n}(Li);function Bi(t,e,n){for(var i=t[0].type_,r=1;t.length>r;r++)i=e(i,t[r].type_,false);return i}var Vi,Gi=function(t){function e(e,n){var i;return(i=t.call(this,n)||this).values=void 0,i.values=e,i}Yt(e,t);var n=e.prototype;return n.numericValues=function(){return this.values},n.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Li),ji=function(e){function n(){for(var t,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).operator="min",t}Yt(n,e),n.create=function(t){return new n(t,Bi(t,_i.add))};var i=n.prototype;return i.clone=function(){return new n(this.values,this.type_)},i.getType=function(){return t.CSSStyleValueType.kMinType},i.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=te(this.numericValues());!(e=n()).done;){var i=e.value.sumValue();if(!i.length||JSON.stringify(i[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>i[0].value&&(t=i)}return t},i.buildCSSText=function(e,n,i){i+="min(";for(var r,o=!0,a=te(this.numericValues());!(r=a()).done;){o||(i+=", "),o=!1,i=r.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,i)}return i+=")"},n}(Gi),Hi=function(e){function n(){for(var t,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).operator="max",t}Yt(n,e),n.create=function(t){return new n(t,Bi(t,_i.add))};var i=n.prototype;return i.clone=function(){return new n(this.values,this.type_)},i.getType=function(){return t.CSSStyleValueType.kMaxType},i.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=te(this.numericValues());!(e=n()).done;){var i=e.value.sumValue();if(!i.length||JSON.stringify(i[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>i[0].value&&(t=i)}return t},i.buildCSSText=function(e,n,i){i+="max(";for(var r,o=!0,a=te(this.numericValues());!(r=a()).done;){o||(i+=", "),o=!1,i=r.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,i)}return i+=")"},n}(Gi),zi=function(e){function n(){for(var t,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).operator="sum",t}Yt(n,e),n.create=function(t){return new n(t,Bi(t,_i.add))},n.numericTypeFromUnitMap=function(t){var e=new _i;return Object.keys(t).forEach((function(n){var i=t[n];e=_i.multiply(e,new _i(Number(n),i),false),Mn(!0)})),e},n.canCreateNumericTypeFromSumValue=function(t){var e=this;Mn(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return _i.add(n,e.numericTypeFromUnitMap(t.units),false),!0}))};var i=n.prototype;return i.clone=function(){return new n(this.values,this.type_)},i.getType=function(){return t.CSSStyleValueType.kSumType},i.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(qt({},e)):t[n].value+=e.value}))})),n.canCreateNumericTypeFromSumValue(t)?t:null},i.buildCSSText=function(e,n,i){n==t.ParenLess.kNo&&(i+=e===t.Nested.kYes?"(":"calc(");var r=this.numericValues();i=r[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i);for(var o=1;r.length>o;o++){var a=r[o];i=a.getType()===t.CSSStyleValueType.kNegateType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i+=" - "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i+=" + ")}return n===t.ParenLess.kNo&&(i+=")"),i},n}(Gi),Wi=function(e){function n(){for(var t,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).operator="product",t}Yt(n,e),n.create=function(t){return new n(t,Bi(t,_i.multiply))},n.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){In(e[n].value,0);var i=n in t?t[n].value:0;i+e[n].value===0?delete t[n]:t[n]=i+e[n].value})),t};var i=n.prototype;return i.clone=function(){return new n(this.values,this.type_)},i.getType=function(){return t.CSSStyleValueType.kProductType},i.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(e){var i=e.sumValue();if(!i.length)return null;var r=[];t.forEach((function(t){i.forEach((function(e){r.push({value:t.value*e.value,units:n.multiplyUnitMaps(t.units,e.units)})}))})),t=r})),t},i.buildCSSText=function(e,n,i){n==t.ParenLess.kNo&&(i+=e===t.Nested.kYes?"(":"calc(");var r=this.numericValues();i=r[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i);for(var o=1;r.length>o;o++){var a=r[o];i=a.getType()===t.CSSStyleValueType.kInvertType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i+=" / "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,i+=" * ")}return n===t.ParenLess.kNo&&(i+=")"),i},n}(Gi),qi=new Di(0,"px"),Yi=new Di(0,"deg"),Xi=function(t){function e(e,n,i,r,o){var a;return void 0===r&&(r=1),void 0===o&&(o=!1),(a=t.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=e,a.g=n,a.b=i,a.alpha=r,a.isNone=o,a}Yt(e,t);var n=e.prototype;return n.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},n.buildCSSText=function(t,e,n){return n+"rgba("+this.r+","+this.g+","+this.b+","+this.alpha+")"},e}(Pi);(Vi=t.GradientPatternType||(t.GradientPatternType={}))[Vi.Constant=0]="Constant",Vi[Vi.LinearGradient=1]="LinearGradient",Vi[Vi.RadialGradient=2]="RadialGradient",Vi[Vi.Pattern=3]="Pattern";var Ki=function(e){function n(t,n){var i;return(i=e.call(this)||this).type=void 0,i.value=void 0,i.type=t,i.value=n,i}Yt(n,e);var i=n.prototype;return i.clone=function(){return new n(this.type,this.value)},i.buildCSSText=function(e,n,i){var r="";return this.type===t.GradientPatternType.LinearGradient?r="linear-gradient("+this.value.steps.map((function(t){return t.join(",")})).join(",")+")":this.type===t.GradientPatternType.RadialGradient?r="radial-gradient("+this.value.steps.map((function(t){return t.join(",")})).join(",")+")":this.type===t.GradientPatternType.Pattern&&(r="url("+this.value.src+")"),i+r},i.getType=function(){return t.CSSStyleValueType.kColorType},n}(ki);function $i(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Zi(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Ji(){}var Qi=.7,tr=1/Qi,er=/^#([0-9a-f]{3,8})$/,nr=/^rgb\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*\)$/,ir=/^rgb\(\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*\)$/,rr=/^rgba\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)\s*\)$/,or=/^rgba\(\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)\s*\)$/,ar=/^hsl\(\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*\)$/,sr=/^hsla\(\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)%\s*,\s*([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)\s*\)$/,ur={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function cr(){return this.rgb().formatHex()}function lr(){return this.rgb().formatRgb()}function hr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=er.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?pr(e):3===n?new yr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?dr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?dr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=nr.exec(t))?new yr(e[1],e[2],e[3],1):(e=ir.exec(t))?new yr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=rr.exec(t))?dr(e[1],e[2],e[3],e[4]):(e=or.exec(t))?dr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ar.exec(t))?Tr(e[1],e[2]/100,e[3]/100,1):(e=sr.exec(t))?Tr(e[1],e[2]/100,e[3]/100,e[4]):ur.hasOwnProperty(t)?pr(ur[t]):"transparent"===t?new yr(NaN,NaN,NaN,0):null}function pr(t){return new yr(t>>16&255,t>>8&255,255&t,1)}function dr(t,e,n,i){return i>0||(t=e=n=NaN),new yr(t,e,n,i)}function fr(t){return t instanceof Ji||(t=hr(t)),t?new yr((t=t.rgb()).r,t.g,t.b,t.opacity):new yr}function yr(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function vr(){return"#"+mr(this.r)+mr(this.g)+mr(this.b)}function gr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function mr(t){return(16>(t=Math.max(0,Math.min(255,Math.round(t)||0)))?"0":"")+t.toString(16)}function Tr(t,e,n,i){return i>0?n>0&&1>n?e>0||(t=NaN):t=e=NaN:t=e=n=NaN,new Er(t,e,n,i)}function br(t){if(t instanceof Er)return new Er(t.h,t.s,t.l,t.opacity);if(t instanceof Ji||(t=hr(t)),!t)return new Er;if(t instanceof Er)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(i>n):n===o?(i-e)/s+2:(e-n)/s+4,s/=.5>u?o+r:2-o-r,a*=60):s=u>0&&1>u?0:a,new Er(a,s,u,t.opacity)}function Er(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Sr(t,e,n){return 255*(60>t?e+(n-e)*t/60:180>t?n:240>t?e+(n-e)*(240-t)/60:e)}$i(Ji,hr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:cr,formatHex:cr,formatHsl:function(){return br(this).formatHsl()},formatRgb:lr,toString:lr}),$i(yr,(function(t,e,n,i){return 1===arguments.length?fr(t):new yr(t,e,n,null==i?1:i)}),Zi(Ji,{brighter:function(t){return new yr(this.r*(t=null==t?tr:Math.pow(tr,t)),this.g*t,this.b*t,this.opacity)},darker:function(t){return new yr(this.r*(t=null==t?Qi:Math.pow(Qi,t)),this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return this.r>=-.5&&255.5>this.r&&this.g>=-.5&&255.5>this.g&&this.b>=-.5&&255.5>this.b&&this.opacity>=0&&1>=this.opacity},hex:vr,formatHex:vr,formatRgb:gr,toString:gr})),$i(Er,(function(t,e,n,i){return 1===arguments.length?br(t):new Er(t,e,n,null==i?1:i)}),Zi(Ji,{brighter:function(t){return new Er(this.h,this.s,this.l*(t=null==t?tr:Math.pow(tr,t)),this.opacity)},darker:function(t){return new Er(this.h,this.s,this.l*(t=null==t?Qi:Math.pow(Qi,t)),this.opacity)},rgb:function(){var t=this.h%360+360*(0>this.h),e=this.l,n=e+(.5>e?e:1-e)*(isNaN(t)||isNaN(this.s)?0:this.s),i=2*e-n;return new yr(Sr(240>t?t+120:t-240,i,n),Sr(t,i,n),Sr(120>t?t+240:t-120,i,n),this.opacity)},displayable:function(){return(this.s>=0&&1>=this.s||isNaN(this.s))&&this.l>=0&&1>=this.l&&this.opacity>=0&&1>=this.opacity},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var kr=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Pr=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,xr=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,wr=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Nr(e){if(Dn(e)&&(e=""),"transparent"===e)return new Xi(0,0,0,0);"currentColor"===e&&(e="black");var n=e[0];if("("===e[1]||"("===e[2])if("l"===n){var i=function(t){var e=kr.exec(t);if(e){var n,i,r,o=parseFloat(e[1])%360*(Math.PI/180),a=(null===(n=e[2].match(wr))||void 0===n?void 0:n.map((function(t){return t.split(":")})))||[],s=1,u=1,c=0,l=0;o>=0&&.5*Math.PI>o?(i={x:c,y:l},r={x:s,y:u}):o>=.5*Math.PI&&Math.PI>o?(i={x:s,y:l},r={x:c,y:u}):o>=Math.PI&&1.5*Math.PI>o?(i={x:s,y:u},r={x:c,y:l}):(i={x:c,y:u},r={x:s,y:l});var h=Math.tan(o),p=h*h;return{x0:i.x,y0:i.y,x1:(r.x-i.x+h*(r.y-i.y))/(p+1)+i.x,y1:h*(r.x-i.x+h*(r.y-i.y))/(p+1)+i.y,steps:a,hash:t}}return null}(e);if(i)return new Ki(t.GradientPatternType.LinearGradient,i)}else if("r"===n){var r=function(t){var e=Pr.exec(t);if(e){var n,i=parseFloat(e[1]),r=parseFloat(e[2]),o=parseFloat(e[3]),a=(null===(n=e[4].match(wr))||void 0===n?void 0:n.map((function(t){return t.split(":")})))||[];if(0===o){var s=e[4].match(wr);return s[s.length-1].split(":")[1]}return{x0:i,y0:r,r0:0,x1:.5,y1:.5,r1:o,steps:a,hash:t}}return null}(e);if(r){if(!bu(r))return new Ki(t.GradientPatternType.RadialGradient,r);e=r}}else if("p"===n){var o=function(t){var e=xr.exec(t);if(e){var n=e[1],i=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{src:i,repetition:n,hash:t}}return null}(e);if(o)return new Ki(t.GradientPatternType.Pattern,o)}var a=hr(e),s=[0,0,0,0];return null!==a&&(s[0]=a.r||0,s[1]=a.g||0,s[2]=a.b||0,s[3]=a.opacity),$t(Xi,s)}function _r(t,e){if(t instanceof Xi&&e instanceof Xi)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;3>n;n++)e[n]=Math.round(Vn(e[n],0,255));return e[3]=Vn(e[3],0,1),"rgba("+e.join(",")+")"}]}function Cr(t,e){if(Dn(e))return new Di(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))&&"px".search(t)>=0)return new Di(Number(e),"px");var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var i="U("+t.source+")";return n.map((function(t){return new Di(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(i,"g"),"*0")),t)}))[0]}var Ar=Cr.bind(null,/px/g),Mr=Cr.bind(null,/%/g),Or=Cr.bind(null,/px|%|em|rem/g),Ir=Cr.bind(null,/deg|rad|grad|turn/g);function Rr(t,e,n,i,r){void 0===r&&(r=0);var o="",a=t.value||0,s=e.value||0;return(Di.isLength(t.unit)||Di.isLength(e.unit))&&(a=Fr(t,r,n),s=Fr(e,r,n),o="px"),(Di.isAngle(t.unit)||Di.isAngle(e.unit))&&(a=Dr(t),s=Dr(e),o="deg"),[a,s,function(t){return i&&(t=Math.max(t,0)),t+o}]}function Dr(e){var n=0;return e.unit===t.UnitType.kDegrees?n=e.value:e.unit===t.UnitType.kRadians?n=Hn(Number(e.value)):e.unit===t.UnitType.kTurns&&(n=zn(Number(e.value))),n}function Lr(t){return bu(t)?t.split(" ").map((function(t){return Or(t)})):t.map((function(t){return Or(""+t)}))}function Ur(t,e,n){if(t.length===e.length){var i=t[0].unit;return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t.map((function(t){return new Di(t,i)})).join(" ")}]}}function Fr(e,n,i){if(e.unit===t.UnitType.kPixels)return Number(e.value);if(e.unit===t.UnitType.kPercentage&&i){var r=i.getGeometryBounds(),o=0;return hn.isEmpty(r)||(o=2*r.halfExtents[n]),Number(e.value)/100*o}return 0}function Br(t){return""+t}function Vr(t){return new Di("number"==typeof t?t:/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Number(t):0)}function Gr(t,e){return[t.value,e.value,Br]}function jr(t,e){return function(n,i){return[n.value,i.value,function(n){return Br(Vn(n,t,e))}]}}var Hr=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,zr=/[^\s,]+/gi;var Wr=/[a-z]/;function qr(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Yr(t){var e=function(t){return t?Array.isArray(t)?t:[]:null}(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,i=0;e.length>i;i++){if(Wr.test(p=e[i][0])||["V","H","T","S"].indexOf(p)>=0){n=!0;break}}if(!n)return e;var r=[],o=0,a=0,s=0,u=0,c=0,l=e[0];"M"!==l[0]&&"m"!==l[0]||(s=o=+l[1],u=a=+l[2],c++,r[0]=["M",o,a]);i=c;for(var h=e.length;h>i;i++){var p,d=e[i],f=r[i-1],y=[],v=(p=d[0]).toUpperCase();if(p!==v)switch(y[0]=v,v){case"A":y[1]=d[1],y[2]=d[2],y[3]=d[3],y[4]=d[4],y[5]=d[5],y[6]=+d[6]+o,y[7]=+d[7]+a;break;case"V":y[1]=+d[1]+a;break;case"H":y[1]=+d[1]+o;break;case"M":u=+d[2]+a,y[1]=s=+d[1]+o,y[2]=u;break;default:for(var g=1,m=d.length;m>g;g++)y[g]=+d[g]+(g%2?o:a)}else y=e[i];switch(v){case"Z":o=+s,a=+u;break;case"H":y=["L",o=y[1],a];break;case"V":y=["L",o,a=y[1]];break;case"T":o=y[1],a=y[2];var T=qr([f[1],f[2]],[f[3],f[4]]);y=["Q",T[0],T[1],o,a];break;case"S":o=y[y.length-2],a=y[y.length-1];var b=f.length,E=qr([f[b-4],f[b-3]],[f[b-2],f[b-1]]);y=["C",E[0],E[1],y[1],y[2],o,a];break;case"M":s=y[y.length-2],u=y[y.length-1];break;default:o=y[y.length-2],a=y[y.length-1]}r.push(y)}return r}var Xr=2*Math.PI,Kr=function(t,e,n,i,r,o,a){var s=t.x,u=t.y;return{x:i*(s*=e)-r*(u*=n)+o,y:r*s+i*u+a}},$r=function(t,e){var n=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),i=Math.cos(t),r=Math.sin(t),o=Math.cos(t+e),a=Math.sin(t+e);return[{x:i-r*n,y:r+i*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},Zr=function(t,e,n,i){var r=t*n+e*i;return r>1&&(r=1),-1>r&&(r=-1),(0>t*i-e*n?-1:1)*Math.acos(r)},Jr=function(t){var e=t.px,n=t.py,i=t.cx,r=t.cy,o=t.rx,a=t.ry,s=t.xAxisRotation,u=void 0===s?0:s,c=t.largeArcFlag,l=void 0===c?0:c,h=t.sweepFlag,p=void 0===h?0:h,d=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:r}];var f=Math.sin(u*Xr/360),y=Math.cos(u*Xr/360),v=y*(e-i)/2+f*(n-r)/2,g=-f*(e-i)/2+y*(n-r)/2;if(0===v&&0===g)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:r}];o=Math.abs(o),a=Math.abs(a);var m=Math.pow(v,2)/Math.pow(o,2)+Math.pow(g,2)/Math.pow(a,2);m>1&&(o*=Math.sqrt(m),a*=Math.sqrt(m));var T=function(t,e,n,i,r,o,a,s,u,c,l,h){var p=Math.pow(r,2),d=Math.pow(o,2),f=Math.pow(l,2),y=Math.pow(h,2),v=p*d-p*y-d*f;0>v&&(v=0);var g=(v=Math.sqrt(v/=p*y+d*f)*(a===s?-1:1))*r/o*h,m=v*-o/r*l,T=c*g-u*m+(t+n)/2,b=u*g+c*m+(e+i)/2,E=(l-g)/r,S=(h-m)/o,k=(-l-g)/r,P=(-h-m)/o,x=Zr(1,0,E,S),w=Zr(E,S,k,P);return 0===s&&w>0&&(w-=Xr),1===s&&0>w&&(w+=Xr),[T,b,x,w]}(e,n,i,r,o,a,l,p,f,y,v,g),b=T[0],E=T[1],S=T[2],k=T[3],P=Math.abs(k)/(Xr/4);1e-7>Math.abs(1-P)&&(P=1);var x=Math.max(Math.ceil(P),1);k/=x;for(var w=0;x>w;w++)d.push($r(S,k)),S+=k;return d.map((function(t){var e=Kr(t[0],o,a,y,f,b,E),n=e.x,i=e.y,r=Kr(t[1],o,a,y,f,b,E),s=r.x,u=r.y,c=Kr(t[2],o,a,y,f,b,E);return{x1:n,y1:i,x2:s,y2:u,x:c.x,y:c.y}}))};function Qr(t,e,n,i,r,o,a,s,u){return Jr({px:t,py:e,cx:s,cy:u,rx:n,ry:i,xAxisRotation:r,largeArcFlag:o,sweepFlag:a}).reduce((function(t,e){return t.push(e.x1,e.y1,e.x2,e.y2,e.x,e.y),t}),[])}function to(t,e,n,i,r,o){var a=1/3,s=2/3;return[a*t+s*n,a*e+s*i,a*r+s*n,a*o+s*i,r,o]}function eo(t,e,n,i){return[t,e,n,i,n,i]}function no(t,e){0>"TQ".indexOf(t[0])&&(e.qx=null,e.qy=null);var n=t.slice(1),i=n[0],r=n[1];switch(t[0]){case"M":return e.x=i,e.y=r,t;case"A":return["C"].concat(Qr.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=i,e.qy=r,["C"].concat(to.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(eo(e.x1,e.y1,t[1],t[2]));case"H":return["C"].concat(eo(e.x1,e.y1,t[1],e.y1));case"V":return["C"].concat(eo(e.x1,e.y1,e.x1,t[1]));case"Z":return["C"].concat(eo(e.x1,e.y1,e.x,e.y))}return t}function io(t,e,n){if(t[n].length>7){t[n].shift();for(var i=t[n],r=n;i.length;)e[n]="A",t.splice(r+=1,0,["C"].concat(i.splice(0,6)));t.splice(n,1)}}function ro(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function oo(t,e){return ro(t)*ro(e)?(t[0]*e[0]+t[1]*e[1])/(ro(t)*ro(e)):1}function ao(t,e){return(t[1]*e[0]>t[0]*e[1]?-1:1)*Math.acos(oo(t,e))}function so(t,e){return t[0]===e[0]&&t[1]===e[1]}function uo(t,e){var n,i=e[1],r=e[2],o=(.017453292519943295*e[3]%(n=2*Math.PI)+n)%n,a=e[4],s=e[5],u=t[0],c=t[1],l=e[6],h=e[7],p=Math.cos(o)*(u-l)/2+Math.sin(o)*(c-h)/2,d=-1*Math.sin(o)*(u-l)/2+Math.cos(o)*(c-h)/2,f=p*p/(i*i)+d*d/(r*r);f>1&&(i*=Math.sqrt(f),r*=Math.sqrt(f));var y=i*i*(d*d)+r*r*(p*p),v=y?Math.sqrt((i*i*(r*r)-y)/y):1;a===s&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*i*d/r:0,m=i?v*-r*p/i:0,T=(u+l)/2+Math.cos(o)*g-Math.sin(o)*m,b=(c+h)/2+Math.sin(o)*g+Math.cos(o)*m,E=[(p-g)/i,(d-m)/r],S=[(-1*p-g)/i,(-1*d-m)/r],k=ao([1,0],E),P=ao(E,S);return oo(E,S)>-1||(P=Math.PI),1>oo(E,S)||(P=0),0===s&&P>0&&(P-=2*Math.PI),1===s&&0>P&&(P+=2*Math.PI),{cx:T,cy:b,rx:so(t,[l,h])?0:i,ry:so(t,[l,h])?0:r,startAngle:k,endAngle:k+P,xRotation:o,arcFlag:a,sweepFlag:s}}function co(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function lo(t){t=function(t){var e=t||[];return Array.isArray(e)?e:"string"==typeof e?((e=e.match(Hr)).forEach((function(t,n){if((t=t.match(zr))[0].length>1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}t.forEach((function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}(t);for(var e=[],n=null,i=null,r=null,o=0,a=t.length,s=0;a>s;s++){var u=t[s];i=t[s+1];var c=u[0],l={command:c,prePoint:n,params:u,startTangent:null,endTangent:null};switch(c){case"M":r=[u[1],u[2]],o=s;break;case"A":var h=uo(n,u);l.arcParams=h}if("Z"===c)n=r,i=t[o+1];else{var p=u.length;n=[u[p-2],u[p-1]]}i&&"Z"===i[0]&&(i=t[o],e[o]&&(e[o].prePoint=n)),l.currentPoint=n,e[o]&&so(n,e[o].currentPoint)&&(e[o].prePoint=l.prePoint),l.nextPoint=i?[i[i.length-2],i[i.length-1]]:null;var d=l.prePoint;if(["L","H","V"].includes(c))l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===c){l.startTangent=[d[0]-(f=[u[1],u[2]])[0],d[1]-f[1]],l.endTangent=[n[0]-f[0],n[1]-f[1]]}else if("T"===c){var f=co((v=e[s-1]).currentPoint,d);"Q"===v.command?(l.command="Q",l.startTangent=[d[0]-f[0],d[1]-f[1]],l.endTangent=[n[0]-f[0],n[1]-f[1]]):(l.command="TL",l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===c){var y=[u[3],u[4]];l.startTangent=[d[0]-(g=[u[1],u[2]])[0],d[1]-g[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]],0===l.startTangent[0]&&0===l.startTangent[1]&&(l.startTangent=[g[0]-y[0],g[1]-y[1]]),0===l.endTangent[0]&&0===l.endTangent[1]&&(l.endTangent=[y[0]-g[0],y[1]-g[1]])}else if("S"===c){var v,g=co((v=e[s-1]).currentPoint,d);y=[u[1],u[2]];"C"===v.command?(l.command="C",l.startTangent=[d[0]-g[0],d[1]-g[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]):(l.command="SQ",l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]])}else if("A"===c){var m=.001,T=l.arcParams||{},b=T.cx,E=void 0===b?0:b,S=T.cy,k=void 0===S?0:S,P=T.rx,x=void 0===P?0:P,w=T.ry,N=void 0===w?0:w,_=T.sweepFlag,C=T.startAngle,A=void 0===C?0:C,M=T.endAngle,O=void 0===M?0:M;0===(void 0===_?0:_)&&(m*=-1),l.startTangent=[x*Math.cos(A-m)+E-r[0],N*Math.sin(A-m)+k-r[1]],l.endTangent=[d[0]-(x*Math.cos(A+O+m)+E),d[1]-(N*Math.sin(A+O-m)+k)]}e.push(l)}return e}function ho(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)}function po(t,e){return.001>Math.abs(t-e)}function fo(t,e){var n=Math.min.apply(Math,t),i=Math.min.apply(Math,e);return{x:n,y:i,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-i}}var yo={box:function(t,e,n,i){return fo([t,n],[e,i])},length:function(t,e,n,i){return ho(t,e,n,i)},pointAt:function(t,e,n,i,r){return{x:(1-r)*t+r*n,y:(1-r)*e+r*i}},pointDistance:function(t,e,n,i,r,o){var a=(n-t)*(r-t)+(i-e)*(o-e);return 0>a?ho(t,e,r,o):a>(n-t)*(n-t)+(i-e)*(i-e)?ho(n,i,r,o):this.pointToLine(t,e,n,i,r,o)},pointToLine:function(t,e,n,i,r,o){var a=[n-t,i-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((r-t)*(r-t)+(o-e)*(o-e));var s=[-a[1],a[0]];return function(t,e){var n=e[0],i=e[1],r=n*n+i*i;r>0&&(r=1/Math.sqrt(r)),t[0]=e[0]*r,t[1]=e[1]*r}(s,s),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([r-t,o-e],s))},tangentAngle:function(t,e,n,i){return Math.atan2(i-e,n-t)}};function vo(t,e,n,i,r){var o=1-r;return o*o*o*t+3*e*r*o*o+3*n*r*r*o+i*r*r*r}function go(t,e,n,i,r){var o=1-r;return 3*(o*o*(e-t)+2*o*r*(n-e)+r*r*(i-n))}function mo(t,e,n,i){var r,o,a,s=-3*t+9*e-9*n+3*i,u=6*t-12*e+6*n,c=3*e-3*t,l=[];if(po(s,0))po(u,0)||0>(r=-c/u)||r>1||l.push(r);else{var h=u*u-4*s*c;po(h,0)?l.push(-u/(2*s)):h>0&&(o=(-u-(a=Math.sqrt(h)))/(2*s),0>(r=(-u+a)/(2*s))||r>1||l.push(r),0>o||o>1||l.push(o))}return l}function To(t,e,n,i,r,o,a,s,u){var c=vo(t,n,r,a,u),l=vo(e,i,o,s,u),h=yo.pointAt(t,e,n,i,u),p=yo.pointAt(n,i,r,o,u),d=yo.pointAt(r,o,a,s,u),f=yo.pointAt(h.x,h.y,p.x,p.y,u),y=yo.pointAt(p.x,p.y,d.x,d.y,u);return[[t,e,h.x,h.y,f.x,f.y,c,l],[c,l,y.x,y.y,d.x,d.y,a,s]]}function bo(t,e,n,i,r,o,a,s,u){if(0===u)return function(t,e){for(var n=0,i=t.length,r=0;i>r;r++)n+=ho(t[r],e[r],t[(r+1)%i],e[(r+1)%i]);return n/2}([t,n,r,a],[e,i,o,s]);var c=To(t,e,n,i,r,o,a,s,.5),l=[].concat(c[0],[u-1]),h=[].concat(c[1],[u-1]);return bo.apply(void 0,l)+bo.apply(void 0,h)}var Eo={extrema:mo,box:function(t,e,n,i,r,o,a,s){for(var u=[t,a],c=[e,s],l=mo(t,n,r,a),h=mo(e,i,o,s),p=0;l.length>p;p++)u.push(vo(t,n,r,a,l[p]));for(var d=0;h.length>d;d++)c.push(vo(e,i,o,s,h[d]));return fo(u,c)},length:function(t,e,n,i,r,o,a,s){return bo(t,e,n,i,r,o,a,s,3)},nearestPoint:function(t,e,n,i,r,o,a,s,u,c,l){return function(t,e,n,i,r,o){var a=-1,s=1/0,u=[n,i],c=20;o&&o>200&&(c=o/10);for(var l=1/c,h=l/10,p=0;c>=p;p++){var d=p*l,f=[r.apply(void 0,t.concat([d])),r.apply(void 0,e.concat([d]))],y=ho(u[0],u[1],f[0],f[1]);s>y&&(a=d,s=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var v=t.length;return{x:t[v-1],y:e[v-1]}}s=1/0;for(var g=0;32>g&&h>=1e-4;g++){var m=a-h,T=a+h,b=[r.apply(void 0,t.concat([m])),r.apply(void 0,e.concat([m]))],E=ho(u[0],u[1],b[0],b[1]);if(m>=0&&s>E)a=m,s=E;else{var S=[r.apply(void 0,t.concat([T])),r.apply(void 0,e.concat([T]))],k=ho(u[0],u[1],S[0],S[1]);1>=T&&s>k?(a=T,s=k):h*=.5}}return{x:r.apply(void 0,t.concat([a])),y:r.apply(void 0,e.concat([a]))}}([t,n,r,a],[e,i,o,s],u,c,vo,l)},pointDistance:function(t,e,n,i,r,o,a,s,u,c,l){var h=this.nearestPoint(t,e,n,i,r,o,a,s,u,c,l);return ho(h.x,h.y,u,c)},interpolationAt:vo,pointAt:function(t,e,n,i,r,o,a,s,u){return{x:vo(t,n,r,a,u),y:vo(e,i,o,s,u)}},divide:function(t,e,n,i,r,o,a,s,u){return To(t,e,n,i,r,o,a,s,u)},tangentAngle:function(t,e,n,i,r,o,a,s,u){var c=go(t,n,r,a,u),l=go(e,i,o,s,u);return(Math.atan2(l,c)+2*Math.PI)%(2*Math.PI)}};var So=function(t){return function(t){if(2>t.length)return 0;for(var e=0,n=0;t.length-1>n;n++){var i=t[n],r=t[n+1];e+=ho(i[0],i[1],r[0],r[1])}return e}(t)};function ko(t,e,n){var i=t[0],r=t[1];return[i+(e[0]-i)*n,r+(e[1]-r)*n]}function Po(t){return t.map((function(t,e,n){var i=e&&n[e-1].slice(-2).concat(t.slice(1)),r=e?Eo.length.apply(Eo,i):0;return{s:t,ss:e?r?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),i=t.slice(2,4),r=t.slice(4,6),o=t.slice(6,8),a=ko(n,i,e),s=ko(i,r,e),u=ko(r,o,e),c=ko(a,s,e),l=ko(s,u,e),h=ko(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(i):[t,t]:[t],l:r}}))}function xo(t,e,n){var i=Po(t),r=Po(e),o=i.length,a=r.length,s=i.filter((function(t){return t.l})).length,u=r.filter((function(t){return t.l})).length,c=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),p=[c,l],d=[h-o,h-a],f=0,y=[i,r].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d[e]-=(f=n&&d[e]&&t.l>=p[e])?1:0,f?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:xo(y[0],y[1],h)}function wo(t){return _o(t)>=0}function No(t,e,n,i,r,o,a,s){return 3*((s-e)*(n+r)-(a-t)*(i+o)+i*(t-r)-n*(e-o)+s*(r+t/3)-a*(o+e/3))/20}function _o(t){var e=0,n=0,i=0,r=0,o=0;return t.map((function(t){switch(t[0]){case"M":case"Z":return e=i="M"===t[0]?t[1]:i,n=r="M"===t[0]?t[2]:r,0;default:o=No.apply(0,[e,n].concat(t.slice(1)));var a=t.slice(-2);return e=a[0],n=a[1],o}})).reduce((function(t,e){return t+e}),0)}function Co(t){var e=t.slice(1).map((function(e,n,i){return n?i[n-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map((function(t){return["C"].concat(t.slice(2))})))}function Ao(t){return t.map((function(t){return Array.isArray(t)?Ao(t):Number.isNaN(+t)?t:+t}))}function Mo(t,e){var n=t.length-1,i=[],r=0,o=function(t){var e=t.length,n=e-1;return t.map((function(i,r){return t.map((function(i,o){var a=r+o;return 0===o||t[a]&&"M"===t[a][0]?["M"].concat(t[a].slice(-2)):(e>a||(a-=n),t[a])}))}))}(t);return o.forEach((function(o,a){t.slice(1).forEach((function(i,o){r+=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}(t[(a+o)%n].slice(-2),e[o%n].slice(-2))})),i[a]=r,r=0})),o[i.indexOf(Math.min.apply(null,i))]}function Oo(t,e,n,i){var r=.5522847498307936,o=t*r,a=e*r,s=n-t,u=n+t,c=i-e,l=i+e;return[["M",s,i],["C",s,i-a,n-o,c,n,c],["C",n+o,c,u,i-a,u,i],["C",u,i+a,n+o,l,n,l],["C",n-o,l,s,i+a,s,i],["Z"]]}function Io(t,e){var n=Yr(t),i=function(t){for(var e=!1,n=t.length,i=0;n>i;i++){var r=t[i][0];if("C"===r||"A"===r||"Q"===r){e=!0;break}}return e}(n),r=n.slice(),o=function(t){for(var e=[],n=[],i=[],r=0;t.length>r;r++){var o=t[r],a=o[0];"M"===a?(i.length&&(n.push(i),i=[]),i.push([o[1],o[2]])):"Z"===a?i.length&&(e.push(i),i=[]):i.push([o[1],o[2]])}i.length>0&&n.push(i);return{polygons:e,polylines:n}}(r),a=o.polygons,s=o.polylines,u=function(t,e){void 0===e&&(e=!1);for(var n,i,r=Yr(t),o={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},a=[],s="",u=r.length,c=[],l=0;u>l;l+=1)r[l]&&(s=r[l][0]),a[l]=s,r[l]=no(r[l],o),io(r,a,l),u=r.length,"Z"===s&&c.push(l),o.x1=+(n=r[l])[(i=n.length)-2],o.y1=+n[i-1],o.x2=+n[i-4]||o.x1,o.y2=+n[i-3]||o.y1;return e?[r,c]:r}(r,!0),c=u[0],l=u[1],h=lo(r),p=function(t){var e,n,i,r,o=0,a=0,s=[];if(!t)return{curveSegments:[],totalLength:o};if(t.forEach((function(e,n){r=e.length,(i=t[n+1])&&(o+=Eo.length(e[r-2],e[r-1],i[1],i[2],i[3],i[4],i[5],i[6])||0)})),0===o)return{curveSegments:[],totalLength:o};return t.forEach((function(u,c){r=u.length,(i=t[c+1])&&((e=[])[0]=a/o,n=Eo.length(u[r-2],u[r-1],i[1],i[2],i[3],i[4],i[5],i[6]),e[1]=(a+=n||0)/o,s.push(e))})),{curveSegments:s,totalLength:o}}(c),d=p.totalLength,f=p.curveSegments,y=function(t){var e=0,n=0,i=[],r=[];t.forEach((function(t){var o=t.slice(-2),a=o[0],s=o[1];if("M"===t[0])e=a,n=s,i.push(a),r.push(s);else if("C"===t[0]){var u=Eo.box.apply(Eo,[e,n].concat(t.slice(1)));i=i.concat(u.x,u.x+u.width),r=r.concat(u.y,u.y+u.height),e=a,n=s}}));var o=Math.min.apply(0,i),a=Math.min.apply(0,r),s=Math.max.apply(0,i),u=Math.max.apply(0,r);return new Pn(o,a,s-o,u-a)}(c);return e&&(e.parsedStyle.defX=y.x,e.parsedStyle.defY=y.y),{absolutePath:n,hasArc:i,segments:h,polygons:a,polylines:s,curve:c,totalLength:d,curveSegments:f,zCommandIndexes:l,rect:y}}function Ro(t,e,n){var i=t.curve,r=e.curve,o=[i,r];i.length!==r.length&&(o=xo(i,r));var a=wo(o[0])!==wo(o[1])?Co(o[0]):Ao(o[0]);return[a,Mo(o[1],a),function(t){return t}]}function Do(t,e){var n;n=bu(t)?t.split(" ").map((function(t){var e=t.split(","),n=e[1];return[Number(e[0]),Number(n)]})):t;var i,r,o=[],a=0,s=So(n);n.forEach((function(t,e){n[e+1]&&((i=[0,0])[0]=a/s,r=yo.length(t[0],t[1],n[e+1][0],n[e+1][1]),i[1]=(a+=r)/s,o.push(i))}));var u=Math.min.apply(Math,n.map((function(t){return t[0]}))),c=Math.min.apply(Math,n.map((function(t){return t[1]})));return e&&(e.parsedStyle.defX=u,e.parsedStyle.defY=c),{points:n,totalLength:s,segments:o}}var Lo,Uo,Fo,Bo,Vo=Cr.bind(null,/deg|rad|grad|turn|px|%/g),Go=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function jo(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,i=[],r=0;e=n.exec(t);){if(e.index!==r)return[];if(r=e.index+e[0].length,Go.indexOf(e[1])>-1&&i.push({name:e[1],params:e[2].split(" ").map((function(t){return Vo(t)||Nr(t)}))}),n.lastIndex===t.length)return i}return[]}(Lo=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",Lo.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(Uo||(Uo={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(Fo||(Fo={})),(Bo=t.PropertyName||(t.PropertyName={})).LAYOUT="display",Bo.LEFT="left",Bo.TOP="top",Bo.BOTTOM="bottom",Bo.RIGHT="right",Bo.WIDTH="width",Bo.HEIGHT="height",Bo.MIN_WIDTH="minWidth",Bo.MAX_WIDTH="maxWidth",Bo.MIN_HEIGHT="minHeight",Bo.MAX_HEIGHT="maxHeight",Bo.BOX_SIZING="boxSizing",Bo.PADDING="padding",Bo.PADDING_TOP="paddingTop",Bo.PADDING_BOTTOM="paddingBottom",Bo.PADDING_START="paddingLeft",Bo.PADDING_END="paddingRight",Bo.MARGIN="margin",Bo.MARGIN_TOP="marginTop",Bo.MARGIN_BOTTOM="marginBottom",Bo.MARGIN_START="marginLeft",Bo.MARGIN_END="marginRight",Bo.BORDER="border",Bo.BORDER_TOP="borderTop",Bo.BORDER_BOTTOM="borderBottom",Bo.BORDER_START="borderLeft",Bo.BORDER_END="borderRight",Bo.FLEX_DIRECTION="flexDirection",Bo.FLEX_WRAP="flexWrap",Bo.FLEX_FLOW="flexFlow",Bo.ALIGN_ITEMS="alignItems",Bo.ALIGN_CONTENT="alignContent",Bo.JUSTIFY_CONTENT="justifyContent",Bo.FLEX="flex",Bo.ALIGN_SELF="alignSelf",Bo.FLEX_SHRINK="flexShrink",Bo.FLEX_BASIS="flexBasis",Bo.FLEX_GROW="flexGrow",Bo.OFFSET_WIDTH="offsetWidth",Bo.OFFSET_HEIGHT="offsetHeight",Bo.ORDER="order";var Ho=1,zo=function(){function e(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=Ho++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var n=e.prototype;return n.setMeasure=function(t){this.measureFn=t},n.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},n.addChild=function(t){var e;null===(e=this.children)||void 0===e||e.push(t)},n.insertChild=function(t,e){this.children.splice(t,0,e)},n.removeChild=function(t){var e,n=null===(e=this.children)||void 0===e?void 0:e.findIndex((function(e){return e.id===t.id}));this.removeChildAtIndex(n)},n.removeChildAtIndex=function(t){this.children.splice(t,1)},n.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},n.setStyle=function(t,e){this.style.set(t,e)},n.getStyle=function(){for(var t=this,e=new Map,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return i.forEach((function(n){var i=t.style.get(n);i&&e.set(n,i)})),e},n.getAllStyle=function(){return this.style},n.markDirty=function(){this.dirty=!0},n.idDirty=function(){return this.dirty},n.getSize=function(){var e,n,i,r;return{width:null!==(e=null===(n=this.style.get(t.PropertyName.WIDTH))||void 0===n?void 0:n.value)&&void 0!==e?e:0,height:null!==(i=null===(r=this.style.get(t.PropertyName.HEIGHT))||void 0===r?void 0:r.value)&&void 0!==i?i:0}},n.computeLayout=function(){var t=Ht(Gt().mark((function t(){var e;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,zl.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.setComputedLayout=function(t){this.computedLayout=t},n.getComputedLayout=function(){return this.computedLayout},n.getAllComputedLayout=function(){},n.toString=function(){return"LayoutObject "+this.id},Wt(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}(),Wo=r.defineToken("LayoutContextFactory"),qo=r.defineToken("LayoutContextOptions"),Yo=0;t.LayoutContext=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+Yo++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),t.LayoutContext=ie([lt(),re(0,ht(qo)),oe("design:paramtypes",[Object])],t.LayoutContext);var Xo=r.defineToken("FragmentResultFactory"),Ko=r.defineToken("FragmentResultOptions"),$o=r.defineToken("contextNode");t.FragmentResult=function(t,e,n){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e},t.FragmentResult=ie([ct(),re(0,ht(t.LayoutContext)),re(1,ht($o)),re(2,ht(Ko)),oe("design:paramtypes",[t.LayoutContext,zo,Object])],t.FragmentResult);var Zo=r.defineToken("LayoutChildrenFactory"),Jo=r.defineToken("LayoutChildrenOptions");t.LayoutChildren=function(){function e(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var n=e.prototype;return n.intrinsicSizes=function(){var e=new Lu;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:t.LayoutTaskType.IntrinsicSizes,deferred:e}),e.promise},n.layoutNextFragment=function(e){if(this.layoutContext.mode===t.LayoutTaskType.IntrinsicSizes)throw Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var n=new Lu;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:n}),n.promise},e}(),t.LayoutChildren=ie([ct(),re(0,ht(t.LayoutContext)),re(1,ht(Jo)),oe("design:paramtypes",[t.LayoutContext,Object])],t.LayoutChildren);var Qo=function(){};Qo.inputProperties=void 0,Qo.childrenInputProperties=void 0,Qo.layoutOptions=void 0;var ta,ea,na=r.defineToken("LayoutEdgesFactory"),ia=r.defineToken("LayoutEdgesOptions");t.LayoutEdges=function(e){var n,i,r,o,a,s,u,c,l,h,p,d,f,y,v,g;this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0,this.options=e;var m=e.node.getAllStyle(),T=null!==(n=null===(i=m.get(t.PropertyName.PADDING_TOP))||void 0===i?void 0:i.value)&&void 0!==n?n:0,b=null!==(r=null===(o=m.get(t.PropertyName.PADDING_END))||void 0===o?void 0:o.value)&&void 0!==r?r:0,E=null!==(a=null===(s=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===s?void 0:s.value)&&void 0!==a?a:0,S=null!==(u=null===(c=m.get(t.PropertyName.PADDING_START))||void 0===c?void 0:c.value)&&void 0!==u?u:0,k=null!==(l=null===(h=m.get(t.PropertyName.PADDING_TOP))||void 0===h?void 0:h.value)&&void 0!==l?l:0,P=null!==(p=null===(d=m.get(t.PropertyName.PADDING_END))||void 0===d?void 0:d.value)&&void 0!==p?p:0,x=null!==(f=null===(y=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===y?void 0:y.value)&&void 0!==f?f:0,w=null!==(v=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==v?v:0;this.blockStart=T+0+k,this.inlineStart=b+0+P,this.blockEnd=E+0+x,this.inlineEnd=S+0+w,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEdges=ie([ct(),re(0,ht(ia)),oe("design:paramtypes",[Object])],t.LayoutEdges),t.LayoutRegistry=((ta=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(void 0===t&&(t="absolute"),!this.hasLayout(t))throw Error("invalid layout property: "+t);return this.registry.get(t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(t,e){if(""===t)throw new TypeError("layout name cant't be empty");if(ea.reservedLayout.includes(t))throw Error("layout name '"+t+"' is a system reserved layout name, please use another name");if(this.hasLayout(t))throw Error("layout '"+t+"' already exist.");this.registry.set(t,e)},e.deleteLayout=function(t){this.registry.delete(t)},Wt(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],ea=ta),t.LayoutRegistry=ea=ie([lt()],t.LayoutRegistry);var ra=function(t){return void 0===t&&(t=0),new Promise((function(e){setTimeout((function(){e()}),t)}))};t.LayoutEngine=function(){function e(t,e,n){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}var n=e.prototype;return n.computeLayout=function(){var t=Ht(Gt().mark((function t(e,n){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,n);case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.determineAllIntrinsicSizes=function(){var t=Ht(Gt().mark((function t(e){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),n.getLayoutDefinitionName=function(e){var n=e.getAllStyle().get(t.PropertyName.LAYOUT);if(!n)throw Error("layout property not found");return n.value},n.determineIntrinsicSizes=function(){var t=Ht(Gt().mark((function t(e,n){var i;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(i,e,n);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.invokeIntrinsicSizesCallback=function(){var e=Ht(Gt().mark((function e(n,i,r){var o,a,s,u,c,l,h,p,d,f,y;return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.layoutRegistry.getLayout(n),a=new o,s=this.layoutContextFactory({mode:t.LayoutTaskType.IntrinsicSizes}),c=void 0===(u=o.inputProperties)?[]:u,l=[],r.forEach((function(t){var e=s.layoutChildrenFactory({node:t});l.push(e)})),h=this.layoutEdgesFactory({node:i}),p=i.getStyle.apply(i,c),d=a.intrinsicSizes(l,h,p),(f=this.runWorkQueue(d,s.workQueue)).next(),e.next=13,ra();case 13:y=f.next().value,s.clearWorkQueue(),i.setIntrisicSizes(y);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n,i){return e.apply(this,arguments)}}(),n.calculateLayout=function(){var t=Ht(Gt().mark((function t(e,n,i){var r;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(r,e,n,i);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n,i){return t.apply(this,arguments)}}(),n.invokeLayoutCallback=function(){var e=Ht(Gt().mark((function e(n,i,r,o){var a,s,u,c,l,h,p,d,f,y,v,g,m;return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.layoutRegistry.getLayout(n),s=new a,u=this.layoutContextFactory({mode:t.LayoutTaskType.Layout}),l=void 0===(c=a.inputProperties)?[]:c,h=[],r.forEach((function(t){var e=u.layoutChildrenFactory({node:t});h.push(e)})),p=this.layoutEdgesFactory({node:i}),d=i.getStyle.apply(i,l),f=s.layout(h,p,o,d),(y=this.runWorkQueue(f,u.workQueue)).next(),e.next=13,ra();case 13:v=y.next().value,u.clearWorkQueue(),g=v instanceof t.FragmentResult?v:u.fragmentResultFactory(v),m=u.layoutFragmentFactory({inlineSize:g.inlineSize,blockSize:g.blockSize,data:g.data}),i.setComputedLayout(m),r.forEach((function(t,e){t.setComputedLayout(g.childFragments[e])}));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n,i,r){return e.apply(this,arguments)}}(),n.runWorkQueue=Gt().mark((function e(n,i){var r,o=this;return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Du(n),i.length>0&&r.isPending()&&i.forEach((function(e){e.taskType===t.LayoutTaskType.IntrinsicSizes&&e.deferred.resolve(o.getNodeIntrisicSizes(e.layoutChild.node));if(e.taskType===t.LayoutTaskType.Layout){var n=e.layoutChild,i=e.deferred,r=n.layoutContext,a=o.getNodeFragment(n.node,e.layoutConstraints);i.resolve(r.layoutFragmentFactory(a))}})),void(e.next=4);case 4:if(r.isFulfilled()){e.next=6;break}throw Error("promise not fullfilled!");case 6:return e.abrupt("return",r.getFullFilledValue());case 7:case"end":return e.stop()}}),e)})),n.getNodeIntrisicSizes=function(e){var n,i,r,o,a,s,u,c,l,h,p,d,f=e.getAllStyle();return{minContentInlineSize:(null===(n=f.get(t.PropertyName.MIN_WIDTH))||void 0===n?void 0:n.value)||(null===(i=e.intrisicSizes)||void 0===i?void 0:i.minContentInlineSize)||(null===(r=f.get(t.PropertyName.WIDTH))||void 0===r?void 0:r.value)||0,maxContentInlineSize:(null===(o=f.get(t.PropertyName.MAX_WIDTH))||void 0===o?void 0:o.value)||(null===(a=e.intrisicSizes)||void 0===a?void 0:a.maxContentInlineSize)||(null===(s=f.get(t.PropertyName.WIDTH))||void 0===s?void 0:s.value)||0,minContentBlockSize:(null===(u=f.get(t.PropertyName.MIN_HEIGHT))||void 0===u?void 0:u.value)||(null===(c=e.intrisicSizes)||void 0===c?void 0:c.minContentBlockSize)||(null===(l=f.get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,maxContentBlockSize:(null===(h=f.get(t.PropertyName.MAX_HEIGHT))||void 0===h?void 0:h.value)||(null===(p=e.intrisicSizes)||void 0===p?void 0:p.maxContentBlockSize)||(null===(d=f.get(t.PropertyName.HEIGHT))||void 0===d?void 0:d.value)||0}},n.getNodeFragment=function(e,n){var i,r,o,a,s,u;return{inlineSize:(null===(i=e.getComputedLayout())||void 0===i?void 0:i.inlineSize)||(null===(r=e.getAllStyle().get(t.PropertyName.MIN_WIDTH))||void 0===r?void 0:r.value)||(null===(o=e.getAllStyle().get(t.PropertyName.WIDTH))||void 0===o?void 0:o.value)||0,blockSize:(null===(a=e.getComputedLayout())||void 0===a?void 0:a.blockSize)||(null===(s=e.getAllStyle().get(t.PropertyName.MIN_HEIGHT))||void 0===s?void 0:s.value)||(null===(u=e.getAllStyle().get(t.PropertyName.HEIGHT))||void 0===u?void 0:u.value)||0,data:n.data}},e}(),t.LayoutEngine=ie([lt(),re(0,ht(t.LayoutRegistry)),re(1,ht(Wo)),re(2,ht(na)),oe("design:paramtypes",[t.LayoutRegistry,Function,Function])],t.LayoutEngine);var oa=r.defineToken("LayoutFragmentFactory"),aa=r.defineToken("LayoutFragmentOptions");t.LayoutFragment=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},t.LayoutFragment=ie([ct(),re(0,ht(t.LayoutContext)),re(1,ht(aa)),oe("design:paramtypes",[t.LayoutContext,Object])],t.LayoutFragment);var sa={number:function(t){return new Di(t)},percent:function(t){return new Di(t,"%")},px:function(t){return new Di(t,"px")},em:function(t){return new Di(t,"em")},rem:function(t){return new Di(t,"rem")},deg:function(t){return new Di(t,"deg")},grad:function(t){return new Di(t,"grad")},rad:function(t){return new Di(t,"rad")},turn:function(t){return new Di(t,"turn")},s:function(t){return new Di(t,"s")},ms:function(t){return new Di(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,i=t.interpolable,r=t.initialValue,o=t.syntax;Ut.get(Kn).registerMetadata({name:e,inherited:n,interpolable:i,defaultValue:r,syntax:o})},registerLayout:function(e,n){Ut.get(t.LayoutRegistry).registerLayout(e,n)}},ua=null;function ca(t){return function(e){var n=0;return t.map((function(t){return t===ua?e[n++]:t}))}}function la(t){return t}var ha={rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],scale:["Nn",ca([ua,ua,sa.number(1)]),la],scalex:["N",ca([ua,sa.number(1),sa.number(1)]),ca([ua,sa.number(1)])],scaley:["N",ca([sa.number(1),ua,sa.number(1)]),ca([sa.number(1),ua])],scalez:["N",ca([sa.number(1),sa.number(1),ua])],scale3d:["NNN",la],translate:["Tt",ca([ua,ua,qi]),la],translatex:["T",ca([ua,qi,qi]),ca([ua,qi])],translatey:["T",ca([qi,ua,qi]),ca([qi,ua])],translatez:["L",ca([qi,qi,ua])],translate3d:["TTL",la]};function pa(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,i=[],r=0;e=n.exec(t);){if(e.index!==r)return[];r=e.index+e[0].length;var o=e[1],a=ha[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(s.length>u.length)return[];for(var c=[],l=0;u.length>l;l++){var h=s[l],p=u[l],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?Yi:Ir(t)},N:Vr,T:Or,L:Ar}[p.toUpperCase()](h):{a:Yi,n:c[0],t:qi}[p]))return[];c.push(d)}if(i.push({t:o,d:c}),n.lastIndex===t.length)return i}return[]}function da(t){return t.replace(/[xy]/,"")}function fa(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function ya(e,n,i){var r=!1;if(!e.length||!n.length){e.length||(r=!0,e=n,n=[]);for(var o=function(t){var i=e[t],r=i.t,o=i.d,a="scale"===r.substr(0,5)?1:0;n.push({t:r,d:o.map((function(t){return"number"==typeof t?new Di(a):new Di(a,t.unit)}))})},a=0;e.length>a;a++)o(a)}var s,u,c=[],l=[],h=[];if(e.length!==n.length);else for(var p=0;e.length>p;p++){var d=e[p].t,f=n[p].t,y=e[p].d,v=n[p].d,g=ha[d],m=ha[f],T=void 0;if(u=f,("perspective"!==(s=d)||"perspective"!==u)&&("matrix"!==s&&"matrix3d"!==s||"matrix"!==u&&"matrix3d"!==u)){if(d===f)T=d;else if(g[2]&&m[2]&&da(d)===da(f))T=da(d),y=g[2](y),v=m[2](v);else{if(!g[1]||!m[1]||fa(d)!==fa(f))break;T=fa(d),y=g[1](y),v=m[1](v)}for(var b=[],E=[],S=[],k=0;y.length>k;k++){var P=(y[k].unit===t.UnitType.kNumber?Gr:Rr)(y[k],v[k],i,!1,k);b[k]=P[0],E[k]=P[1],S.push(P[2])}c.push(b),l.push(E),h.push([T,S])}}if(r){var x=c;c=l,l=x}return[c,l,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return h[e][1][n](t)})).join(",");return"matrix"===h[e][0]&&16===n.split(",").length&&(h[e][0]="matrix3d"),h[e][0]+"("+n+")"})).join(" ")}]}function va(t){if(bu(t)){var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Or(ga(e[0])),Or(ga(e[1]))]}return[new Di(t[0]||0,"px"),new Di(t[1]||0,"px")]}function ga(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}function ma(t){var e=t.parsedStyle.fontSize;return e&&!Di.isRelativeUnit(e.unit)?e.clone():new Di(0,"px")}var Ta={parser:Or,mixer:Rr,calculator:function(e,n,i,r,o){if(!Di.isRelativeUnit(i.unit))return i.clone();if(i.unit===t.UnitType.kPercentage)return new Di(0,"px");if(i.unit===t.UnitType.kEms){if(r.parentNode){var a=ma(r.parentNode);return a.value*=i.value,a}return new Di(0,"px")}if(i.unit===t.UnitType.kRems){var s;if(null==r||null===(s=r.ownerDocument)||void 0===s?void 0:s.documentElement){var u=ma(r.ownerDocument.documentElement);return u.value*=i.value,u}return new Di(0,"px")}}},ba={parser:Ta.parser,mixer:Ta.mixer,calculator:Ta.calculator,postProcessor:function(e){var n,i,r;switch(e.nodeName){case t.Shape.CIRCLE:case t.Shape.ELLIPSE:var o=e.parsedStyle,a=o.cx,s=o.cy;Dn(a)||(n=a.value),Dn(s)||(i=s.value);break;case t.Shape.LINE:var u=e.parsedStyle,c=u.y1,l=u.y2;n=Math.min(u.x1.value,u.x2.value),i=Math.min(c.value,l.value),r=0;break;default:Dn(e.parsedStyle.x)||(n=e.parsedStyle.x.value),Dn(e.parsedStyle.y)||(i=e.parsedStyle.y.value)}e.parsedStyle.defX=n||0,e.parsedStyle.defY=i||0;var h=e.getLocalPosition(),p=h[0],d=h[1],f=h[2];e.setLocalPosition(Dn(n)?p:n,Dn(i)?d:i,Dn(r)?f:r)}},Ea={parser:Vr,mixer:jr(0,1)},Sa={parser:Nr,calculator:function(t,e,n,i,r){return n instanceof xi?new Xi(0,0,0,0,"none"===n.value):n},mixer:_r},ka={parser:jo},Pa={parser:function(t){var e=Lr(Ln(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},mixer:Ur},xa={parser:function(t){var e=Lr(Ln(t)?[t]:t);return 1===e.length?[e[0],e[0],e[0],e[0]]:2===e.length?[e[0],e[1],e[0],e[1]]:3===e.length?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]},mixer:Ur},wa={parser:Ta.parser,mixer:jr(0,1/0),calculator:Ta.calculator},Na={calculator:function(t,e,n,i){if(e&&e!==n&&e.style.offsetPathTargets){var r=e.style.offsetPathTargets.indexOf(i);e.style.offsetPathTargets.splice(r,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(i)),n}},_a={parser:Vr,mixer:jr(0,1),postProcessor:function(e){if(e.attributes.offsetPath){var n=e.attributes.offsetPath.nodeName;if(n===t.Shape.LINE||n===t.Shape.PATH||n===t.Shape.POLYLINE){var i=e.attributes.offsetPath.getPoint(e.parsedStyle.offsetDistance.value);i&&e.setLocalPosition(i.x,i.y)}}}},Ca={parser:Vr,postProcessor:function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,i=e.sortable;n&&(n.dirty=!0),i&&(i.dirty=!0)}}},Aa={parser:pa,mixer:ya,postProcessor:function(t){var e=t.parsedStyle,n=e.transform,i=e.defX,r=e.defY;n&&n.length&&(t.resetLocalTransform(),t.setLocalPosition(i,r),n.forEach((function(e){var n=e.t,i=e.d;if("scale"===n){var r=i.map((function(t){return t.value}))||[1,1];t.scaleLocal(r[0],r[1],1)}else if("scalex"===n){var o=i.map((function(t){return t.value}))||[1];t.scaleLocal(o[0],1,1)}else if("scaley"===n){var a=i.map((function(t){return t.value}))||[1];t.scaleLocal(1,a[0],1)}else if("scalez"===n){var s=i.map((function(t){return t.value}))||[1];t.scaleLocal(1,1,s[0])}else if("scale3d"===n){var u=i.map((function(t){return t.value}))||[1,1,1];t.scaleLocal(u[0],u[1],u[2])}else if("translate"===n){var c=i||[qi,qi];t.translateLocal(c[0].value,c[1].value,0)}else if("translatex"===n){t.translateLocal((i||[qi])[0].value,0,0)}else if("translatey"===n){t.translateLocal(0,(i||[qi])[0].value,0)}else if("translatez"===n){t.translateLocal(0,0,(i||[qi])[0].value)}else if("translate3d"===n){var l=i||[qi,qi,qi];t.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===n){t.rotateLocal(0,0,(i||[Yi])[0].value)}else if("rotatex"===n){t.rotateLocal((i||[Yi])[0].value,0,0)}else if("rotatey"===n){t.rotateLocal(0,(i||[Yi])[0].value,0)}else if("rotatez"===n){t.rotateLocal(0,0,(i||[Yi])[0].value)}})))}},Ma={parser:va},Oa={parser:Io,calculator:function(t,e,n){return n instanceof xi&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,curveSegments:[],zCommandIndexes:[],rect:new Pn(0,0,0,0)}:n},mixer:Ro,postProcessor:function(e){if(e.nodeName===t.Shape.PATH){var n=e.parsedStyle,i=n.defX,r=n.defY;e.setLocalPosition(void 0===i?0:i,void 0===r?0:r)}}},Ia={parser:Do,postProcessor:function(e){if(e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.POLYLINE){var n=e.parsedStyle;e.setLocalPosition(n.defX,n.defY)}}},Ra={calculator:function(t,e,n,i){if(n instanceof xi&&(n=null),e&&e!==n&&e.style.clipPathTargets){var r=e.style.clipPathTargets.indexOf(i);e.style.clipPathTargets.splice(r,1)}return n&&(n.style.clipPathTargets||(n.style.clipPathTargets=[]),n.style.clipPathTargets.push(i)),Bu(i),n}},Da={calculator:function(t,e,n,i){return n instanceof xi?"unset"===n.value?"":n.value:n},postProcessor:function(t){t.nodeValue=""+t.parsedStyle.text||""}},La={calculator:function(t,e,n,i){var r=i.getAttribute("text");if(r){var o=r;"capitalize"===n.value?o=r.charAt(0).toUpperCase()+r.slice(1):"lowercase"===n.value?o=r.toLowerCase():"uppercase"===n.value&&(o=r.toUpperCase()),i.parsedStyle.text=o}return n}},Ua={anchor:[0,0],opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"0",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:""},Fa=function(e){function n(n){var i,r,o,a;return(a=e.call(this)||this).config=void 0,a.styleValueRegistry=Ut.get(Kn),a.isCustomElement=!1,a.activeAnimations=[],a.config=n,a.config.interactive=null!==(i=a.config.capture)&&void 0!==i?i:a.config.interactive,a.id=a.config.id||"",a.name=a.config.name||"",(a.config.className||a.config.class)&&(a.className=a.config.className||a.config.class),a.nodeName=a.config.type||t.Shape.GROUP,a.config.style=qt({},Ua,{zIndex:null!==(r=a.config.zIndex)&&void 0!==r?r:0,interactive:null===(o=a.config.interactive)||void 0===o||o},a.config.style,a.config.attrs),null!=a.config.visible&&(a.config.style.visibility=!1===a.config.visible?"hidden":"visible"),null!=a.config.interactive&&(a.config.style.pointerEvents=!1===a.config.interactive?"none":"auto"),a.style=new Proxy(qt({},a.attributes,{setProperty:function(t,e){a.setAttribute(t,e)},getPropertyValue:function(t){return a.getAttribute(t)},removeProperty:function(t){a.removeAttribute(t)},item:function(){return""}}),{get:function(t,e){return e in t?t[e]:a.getAttribute(e)},set:function(t,e,n){return a.setAttribute(e,n),!0}}),a.initAttributes(a.config.style),Ut.get(t.DisplayObjectPool).add(a.entity,Jt(a)),a}Yt(n,e);var i=n.prototype;return i.destroy=function(){e.prototype.destroy.call(this),Ut.get(t.DisplayObjectPool).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},i.cloneNode=function(t){var e=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:qt({},this.attributes)});return t&&this.children.forEach((function(n){var i=n.cloneNode(t);e.appendChild(i)})),e},i.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t),e.dirty=!0},i.setAttribute=function(t,n,i){void 0===i&&(i=!1);var r=Nu(t,n),o=r[0],a=r[1];Rn(n)||(i||a!=this.attributes[o])&&(this.internalSetAttribute(o,a),e.prototype.setAttribute.call(this,o,a))},i.internalSetAttribute=function(e,n,i){var r,o=this;void 0===i&&(i={});var a=this.renderable,s=this.attributes[e],u=this.parsedStyle[e];this.styleValueRegistry.processProperties(this,((r={})[e]=n,r),i),this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&this.attributes.clipPathTargets.forEach((function(e){Bu(e),e.dispatchEvent(new An(t.ElementEvent.ATTR_MODIFIED,e,o,o,"clipPath",An.MODIFICATION,o,o)),e.isCustomElement&&e.attributeChangedCallback&&e.attributeChangedCallback("clipPath",o,o)})),a.dirty=!0,this.dispatchEvent(new An(t.ElementEvent.ATTR_MODIFIED,this,s,n,e,An.MODIFICATION,u,this.parsedStyle[e])),this.isCustomElement&&this.attributeChangedCallback&&this.attributeChangedCallback(e,s,n)},i.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],i=e[1],r=t.getMax();return new Pn(n,i,r[0]-n,r[1]-i)},i.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,jn(t,e,n)),this},i.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},i.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,jn(t,e,n)),this},i.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,jn(t,e,n)),this},i.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,jn(t,e,n)),this},i.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,jn(t,e,n)),this},i.getPosition=function(){return this.sceneGraphService.getPosition(this)},i.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},i.scale=function(t,e,n){return this.scaleLocal(t,e,n)},i.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=jn(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},i.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=jn(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},i.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},i.getScale=function(){return this.sceneGraphService.getScale(this)},i.getEulerAngles=function(){var t=Wn(ke(),this.sceneGraphService.getWorldTransform(this));return Hn(t[2])},i.getLocalEulerAngles=function(){var t=Wn(ke(),this.sceneGraphService.getLocalRotation(this));return Hn(t[2])},i.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},i.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},i.rotateLocal=function(t,e,n){return Dn(e)&&Dn(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},i.rotate=function(t,e,n){return Dn(e)&&Dn(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},i.setRotation=function(t,e,n,i){return this.sceneGraphService.setRotation(this,t,e,n,i),this},i.setLocalRotation=function(t,e,n,i){return this.sceneGraphService.setLocalRotation(this,t,e,n,i),this},i.getRotation=function(){return this.sceneGraphService.getRotation(this)},i.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},i.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},i.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},i.setLocalTransform=function(t){return this.sceneGraphService.setLocalTransform(this,t),this},i.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},i.getAnimations=function(){return this.activeAnimations},i.animate=function(t,e){var n,i,r=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&(r=null===(i=this.attributes.clipPathTargets[0].ownerDocument)||void 0===i?void 0:i.timeline);return delete this.parsedStyle.transform,r?r.play(new yu(this,t,e)):null},i.show=function(){this.style.visibility="visible"},i.hide=function(){this.style.visibility="hidden"},i.isVisible=function(){var t,e;return"visible"===(null===(t=this.parsedStyle)||void 0===t||null===(e=t.visibility)||void 0===e?void 0:e.value)},i.isInteractive=function(){var t,e;return"none"!==(null===(t=this.parsedStyle)||void 0===t||null===(e=t.pointerEvents)||void 0===e?void 0:e.value)},i.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},i.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))+1),this},i.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))-1),this},i.getCount=function(){return this.childElementCount},i.getParent=function(){return this.parentElement},i.getChildren=function(){return this.children},i.getFirst=function(){return this.firstElementChild},i.getLast=function(){return this.lastElementChild},i.getChildByIndex=function(t){return this.children[t]||null},i.add=function(t,e){return this.appendChild(t,e)},i.setClip=function(t){this.style.clipPath=t},i.getClip=function(){return this.style.clipPath||null},i.set=function(t,e){this.config[t]=e},i.get=function(t){return this.config[t]},i.getConfig=function(){return this.config},i.attr=function(){for(var t=this,e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];var r=n[0],o=n[1];return r?Bn(r)?(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),this):2===n.length?(this.setAttribute(r,o),this):this.attributes[r]:this.attributes},i.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},i.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},i.setZIndex=function(t){return this.style.zIndex=t,this},i.getMatrix=function(t){var e=t||this.getWorldTransform(),n=ge(ke(),e),i=n[0],r=n[1],o=me(ke(),e),a=o[0],s=o[1],u=Te(Ye(),e),c=Wn(ke(),u);return qn(c[0]||c[2],i,r,a,s)},i.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},i.setMatrix=function(t){var e=Xn(t),n=e[0],i=e[1],r=e[2],o=e[3];this.setEulerAngles(e[4]).setPosition(n,i).setLocalScale(r,o)},i.setLocalMatrix=function(t){var e=Xn(t),n=e[0],i=e[1],r=e[2],o=e[3];this.setLocalEulerAngles(e[4]).setLocalPosition(n,i).setLocalScale(r,o)},Wt(n,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),n}(ui),Ba=["style"],Va=function(t){function e(e){var n,i=void 0===e?{}:e,r=i.style,o=Zt(i,Ba);return(n=t.call(this,qt({style:qt({x:"",y:""},r)},o))||this).isCustomElement=!0,n}return Yt(e,t),e}(Fa),Ga=["style"],ja=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,Ga);return e.call(this,qt({type:t.Shape.CIRCLE,style:qt({cx:"",cy:"",r:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},r)},o))||this}return Yt(n,e),n}(Fa),Ha=["style"],za=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,Ha);return e.call(this,qt({type:t.Shape.ELLIPSE,style:qt({cx:"",cy:"",rx:"",ry:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},r)},o))||this}return Yt(n,e),n}(Fa),Wa=["style"],qa=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,Wa);return e.call(this,qt({type:t.Shape.GROUP,style:qt({x:"",y:"",width:"",height:""},r)},o))||this}return Yt(n,e),n}(Fa),Ya=["style"],Xa=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,Ya);return e.call(this,qt({type:t.Shape.IMAGE,style:qt({x:"",y:"",img:"",width:"",height:"",lineWidth:"0"},r)},o))||this}return Yt(n,e),n}(Fa),Ka=["style"],$a=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,Ka);return e.call(this,qt({type:t.Shape.LINE,style:qt({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,lineWidth:1,isBillboard:!1},r)},o))||this}Yt(n,e);var i=n.prototype;return i.getPoint=function(t){var e=this.parsedStyle,n=yo.pointAt(e.x1.value,e.y1.value,e.x2.value,e.y2.value,t);return new kn(n.x,n.y)},i.getTotalLength=function(){var t=this.parsedStyle;return yo.length(t.x1.value,t.y1.value,t.x2.value,t.y2.value)},n}(Fa),Za=["style"],Ja=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,Za);return e.call(this,qt({type:t.Shape.PATH,style:qt({path:"",lineWidth:1,miterLimit:4},r)},o))||this}Yt(n,e);var i=n.prototype;return i.getTotalLength=function(){return this.parsedStyle.path.totalLength},i.getPoint=function(t){var e=0,n=0,i=this.parsedStyle.path.curve;if(!this.parsedStyle.path.curveSegments.length)return i?new kn(i[0][1],i[0][2]):null;this.parsedStyle.path.curveSegments.forEach((function(i,r){i[0]>t||t>i[1]||(e=(t-i[0])/(i[1]-i[0]),n=r)}));var r=i[n];if(Dn(r)||Dn(n))return null;var o=r.length,a=i[n+1],s=Eo.pointAt(r[o-2],r[o-1],a[1],a[2],a[3],a[4],a[5],a[6],e);return new kn(s.x,s.y)},i.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,i=t[1].currentPoint,r=t[1].startTangent;e=[],r?(e.push([n[0]-r[0],n[1]-r[1]]),e.push([n[0],n[1]])):(e.push([i[0],i[1]]),e.push([n[0],n[1]]))}return e},i.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var i=t[e-2].currentPoint,r=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([r[0]-o[0],r[1]-o[1]]),n.push([r[0],r[1]])):(n.push([i[0],i[1]]),n.push([r[0],r[1]]))}return n},n}(Fa),Qa=["style"],ts=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,Qa);return e.call(this,qt({type:t.Shape.POLYGON,style:qt({points:"",miterLimit:4,lineWidth:1},r)},o))||this}return Yt(n,e),n}(Fa),es=["style"],ns=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,es);return e.call(this,qt({type:t.Shape.POLYLINE,style:qt({points:"",lineWidth:1,miterLimit:4},r)},o))||this}Yt(n,e);var i=n.prototype;return i.getTotalLength=function(){return this.parsedStyle.points.totalLength},i.getPoint=function(t){var e=this.parsedStyle.points,n=e.points,i=0,r=0;e.segments.forEach((function(e,n){e[0]>t||t>e[1]||(i=(t-e[0])/(e[1]-e[0]),r=n)}));var o=yo.pointAt(n[r][0],n[r][1],n[r+1][0],n[r+1][1],i);return new kn(o.x,o.y)},i.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},i.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},n}(Fa),is=["style"],rs=function(e){function n(n){var i=void 0===n?{}:n,r=i.style,o=Zt(i,is);return e.call(this,qt({type:t.Shape.RECT,style:qt({x:"",y:"",width:"",height:"",radius:"",lineWidth:"0"},r)},o))||this}return Yt(n,e),n}(Fa),os=["style"],as=function(e){function n(n){var i,r=void 0===n?{}:n,o=r.style,a=Zt(r,os);return(i=e.call(this,qt({type:t.Shape.TEXT,style:qt({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",stroke:"black",letterSpacing:0,lineHeight:0,lineWidth:0,miterLimit:10,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},o)},a))||this).LENGTHADJUST_SPACING=1,i.LENGTHADJUST_SPACINGANDGLYPHS=2,i.LENGTHADJUST_UNKNOWN=0,i.lengthAdjust=void 0,i.textLength=void 0,i}Yt(n,e);var i=n.prototype;return i.getCharNumAtPosition=function(t){throw Error("Method not implemented.")},i.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},i.getEndPositionOfChar=function(t){throw Error("Method not implemented.")},i.getExtentOfChar=function(t){throw Error("Method not implemented.")},i.getNumberOfChars=function(){throw Error("Method not implemented.")},i.getRotationOfChar=function(t){throw Error("Method not implemented.")},i.getStartPositionOfChar=function(t){throw Error("Method not implemented.")},i.getSubStringLength=function(t,e){throw Error("Method not implemented.")},i.selectSubString=function(t,e){throw Error("Method not implemented.")},i.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},n}(Fa),ss=["style"],us=function(e){function n(n){var i,r=void 0===n?{}:n,o=r.style,a=Zt(r,ss);return(i=e.call(this,qt({type:t.Shape.HTML,style:qt({x:"",y:"",width:"auto",height:"auto",innerHTML:""},o)},a))||this).cullable.enable=!1,i}Yt(n,e);var i=n.prototype;return i.getDomElement=function(){return this.parsedStyle.$el},i.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},i.getClientRects=function(){return[this.getBoundingClientRect()]},i.getBounds=function(){var t,e,n=this.getBoundingClientRect(),i=null===(t=this.ownerDocument)||void 0===t||null===(e=t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(i){var r=n.left-i.left,o=n.top-i.top,a=new hn;return a.setMinMax(we(r,o,0),we(r+n.width,o+n.height,0)),a}return null},i.getLocalBounds=function(){if(this.parentNode){var t=de(le(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!hn.isEmpty(e)){var n=new hn;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},n}(Fa),cs=function(t){function e(){var e;(e=t.call(this)||this).defaultView=null,e.documentElement=void 0,e.timeline=void 0,e.ownerDocument=null,e.nodeName="document",e.timeline=new mi(Jt(e));var n={};return mu.forEach((function(t){var e=t.defaultValue;t.inherited&&e&&(n[t.name]=e)})),e.documentElement=new qa({id:"g-root",style:n}),e.documentElement.ownerDocument=Jt(e),e.documentElement.parentNode=Jt(e),e.childNodes=[e.documentElement],e}Yt(e,t);var n=e.prototype;return n.createElement=function(t,e){var n=this.defaultView.customElements.get(t);return n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?as:qa),new n(e)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw Error("Method not implemented.")},n.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},n.elementFromPoint=function(){var t=Ht(Gt().mark((function t(e,n){var i,r,o,a,s,u,c,l,h,p;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,o=i.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>r||0>o||r>s||o>u)){t.next=4;break}return t.abrupt("return",null);case 4:return c=this.defaultView.viewport2Client({x:r,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return t.abrupt("return",(p=t.sent.picked)&&p[0]||this.documentElement);case 10:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.elementsFromPoint=function(){var t=Ht(Gt().mark((function t(e,n){var i,r,o,a,s,u,c,l,h,p;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,o=i.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>r||0>o||r>s||o>u)){t.next=4;break}return t.abrupt("return",[]);case 4:return c=this.defaultView.viewport2Client({x:r,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return(p=t.sent.picked)[p.length-1]!==this.documentElement&&p.push(this.documentElement),t.abrupt("return",p);case 11:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.appendChild=function(t,e){throw Error("Use document.documentElement instead.")},n.insertBefore=function(t,e){throw Error("Use document.documentElement instead.")},n.removeChild=function(t,e){throw Error("Use document.documentElement instead.")},n.replaceChild=function(t,e,n){throw Error("Use document.documentElement instead.")},n.append=function(){throw Error("Use document.documentElement instead.")},n.prepend=function(){throw Error("Use document.documentElement instead.")},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},Wt(e,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),e}(ti),ls=function(t){function e(){for(var e,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))||this).altKey=void 0,e.button=void 0,e.buttons=void 0,e.ctrlKey=void 0,e.metaKey=void 0,e.relatedTarget=void 0,e.shiftKey=void 0,e.client=new kn,e.movement=new kn,e.offset=new kn,e.global=new kn,e.screen=new kn,e}Yt(e,t);var n=e.prototype;return n.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},n.initMouseEvent=function(){throw Error("Method not implemented.")},Wt(e,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),e}(Cn),hs=function(t){function e(){for(var e,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))||this).pointerId=void 0,e.width=0,e.height=0,e.isPrimary=!1,e.pointerType=void 0,e.pressure=void 0,e.tangentialPressure=void 0,e.tiltX=void 0,e.tiltY=void 0,e.twist=void 0,e}Yt(e,t);var n=e.prototype;return n.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},n.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e}(ls),ps=function(t){function e(){for(var e,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))||this).deltaMode=void 0,e.deltaX=void 0,e.deltaY=void 0,e.deltaZ=void 0,e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return Yt(e,t),e}(ls),ds=.1,fs="function"==typeof Float32Array,ys=function(t,e){return 1-3*e+3*t},vs=function(t,e){return 3*e-6*t},gs=function(t){return 3*t},ms=function(t,e,n){return((ys(e,n)*t+vs(e,n))*t+gs(e))*t},Ts=function(t,e,n){return 3*ys(e,n)*t*t+2*vs(e,n)*t+gs(e)},bs=function(t,e,n,i){if(0>t||t>1||0>n||n>1)throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===i)return function(t){return t};for(var r=fs?new Float32Array(11):[,,,,,,,,,,,],o=0;11>o;++o)r[o]=ms(o*ds,t,n);var a=function(e){for(var i=0,o=1;10!==o&&e>=r[o];++o)i+=ds;--o;var a=i+(e-r[o])/(r[o+1]-r[o])*ds,s=Ts(a,t,n);return.001>s?0===s?a:function(t,e,n,i,r){var o,a,s=0;do{(o=ms(a=e+(n-e)/2,i,r)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&10>++s);return a}(e,i,i+ds,t,n):function(t,e,n,i){for(var r=0;4>r;++r){var o=Ts(e,n,i);if(0===o)return e;e-=(ms(e,n,i)-t)/o}return e}(e,a,t,n)};return function(t){return 0===t||1===t?t:ms(a(t),e,i)}},Es=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substr(1):t},Ss=function(t){return Math.pow(t,2)},ks=function(t){return Math.pow(t,3)},Ps=function(t){return Math.pow(t,4)},xs=function(t){return Math.pow(t,5)},ws=function(t){return Math.pow(t,6)},Ns=function(t){return 1-Math.cos(t*Math.PI/2)},_s=function(t){return 1-Math.sqrt(1-t*t)},Cs=function(t){return t*t*(3*t-2)},As=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},Ms=function(t,e){void 0===e&&(e=[]);var n=e[0],i=e[1],r=void 0===i?.5:i,o=Vn(Number(void 0===n?1:n),1,10),a=Vn(Number(r),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},Os=function(t,e,n){void 0===e&&(e=[]);var i=e[0],r=void 0===i?1:i,o=e[1],a=void 0===o?100:o,s=e[2],u=void 0===s?10:s,c=e[3],l=void 0===c?0:c;r=Vn(r,.1,1e3),a=Vn(a,.1,1e3),u=Vn(u,.1,1e3),l=Vn(l,.1,1e3);var h=Math.sqrt(a/r),p=u/(2*Math.sqrt(a*r)),d=1>p?h*Math.sqrt(1-p*p):0,f=1>p?(p*h-l)/d:-l+h,y=n?n*t/1e3:t;return y=1>p?Math.exp(-y*p*h)*(1*Math.cos(d*y)+f*Math.sin(d*y)):(1+f*y)*Math.exp(-y*h),0===t||1===t?t:1-y},Is=function(t,e){void 0===e&&(e=[]);var n=e[0],i=void 0===n?10:n;return("start"==e[1]?Math.ceil:Math.floor)(Vn(t,0,1)*i)/i},Rs=function(t,e){void 0===e&&(e=[]);return bs(e[0],e[1],e[2],e[3])(t)},Ds=bs(.42,0,1,1),Ls=function(t){return function(e,n,i){return void 0===n&&(n=[]),1-t(1-e,n,i)}},Us=function(t){return function(e,n,i){return void 0===n&&(n=[]),.5>e?t(2*e,n,i)/2:1-t(-2*e+2,n,i)/2}},Fs=function(t){return function(e,n,i){return void 0===n&&(n=[]),.5>e?(1-t(1-2*e,n,i))/2:(t(2*e-1,n,i)+1)/2}},Bs={steps:Is,"step-start":function(t){return Is(t,[1,"start"])},"step-end":function(t){return Is(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Rs,ease:function(t){return Rs(t,[.25,.1,.25,1])},in:Ds,out:Ls(Ds),"in-out":Us(Ds),"out-in":Fs(Ds),"in-quad":Ss,"out-quad":Ls(Ss),"in-out-quad":Us(Ss),"out-in-quad":Fs(Ss),"in-cubic":ks,"out-cubic":Ls(ks),"in-out-cubic":Us(ks),"out-in-cubic":Fs(ks),"in-quart":Ps,"out-quart":Ls(Ps),"in-out-quart":Us(Ps),"out-in-quart":Fs(Ps),"in-quint":xs,"out-quint":Ls(xs),"in-out-quint":Us(xs),"out-in-quint":Fs(xs),"in-expo":ws,"out-expo":Ls(ws),"in-out-expo":Us(ws),"out-in-expo":Fs(ws),"in-sine":Ns,"out-sine":Ls(Ns),"in-out-sine":Us(Ns),"out-in-sine":Fs(Ns),"in-circ":_s,"out-circ":Ls(_s),"in-out-circ":Us(_s),"out-in-circ":Fs(_s),"in-back":Cs,"out-back":Ls(Cs),"in-out-back":Us(Cs),"out-in-back":Fs(Cs),"in-bounce":As,"out-bounce":Ls(As),"in-out-bounce":Us(As),"out-in-bounce":Fs(As),"in-elastic":Ms,"out-elastic":Ls(Ms),"in-out-elastic":Us(Ms),"out-in-elastic":Fs(Ms),spring:Os,"spring-in":Os,"spring-out":Ls(Os),"spring-in-out":Us(Os),"spring-out-in":Fs(Os)},Vs=function(t){return Bs[function(t){return Es(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Bs.linear},Gs=function(t){return t};function js(t,e){return function(n){if(n>=1)return 1;var i=1/t;return(n+=e*i)-n%i}}var Hs=/cubic-bezier\(\s*(-?\d+\.?\d*|-?\.\d+)\s*,\s*(-?\d+\.?\d*|-?\.\d+)\s*,\s*(-?\d+\.?\d*|-?\.\d+)\s*,\s*(-?\d+\.?\d*|-?\.\d+)\s*\)/,zs=/steps\(\s*(\d+)\s*\)/,Ws=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function qs(t){var e=Hs.exec(t);if(e)return bs.apply(void 0,e.slice(1).map(Number));var n=zs.exec(t);if(n)return js(Number(n[1]),0);var i=Ws.exec(t);return i?js(Number(i[1]),{start:1,middle:.5,end:0}[i[2]]):Vs(t)}function Ys(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function Xs(t,e,n){var i=function(t,e,n){if(null===e)return 0;var i=n.endTime;return Math.min(n.delay,i)>e?1:Math.min(n.delay+t+n.endDelay,i)>e?3:2}(t,e,n),r=function(t,e,n,i,r){switch(i){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-r;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,i,n.delay);if(null===r)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,i,r){var o=r;return 0===t?1!==e&&(o+=n):o+=i/t,o}(o,i,n.iterations,r,n.iterationStart),s=function(t,e,n,i,r,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===i||0===r&&0!==o||(a=1),a}(a,n.iterationStart,i,n.iterations,r,o),u=function(t,e,n,i){return 2===t&&e===1/0?1/0:1===n?Math.floor(i)-1:Math.floor(i)}(i,n.iterations,s,a),c=function(t,e,n){var i=t;if("normal"!==t&&"reverse"!==t){var r=e;"alternate-reverse"===t&&(r+=1),i="normal",r!==1/0&&r%2!=0&&(i="reverse")}return"normal"===i?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}var Ks,$s,Zs=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Gs,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return Wt(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=qs(t),this._easing=t}}]),t}(),Js=function(){function t(t,e){this.type=void 0,this.target=void 0,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[],this.type=t,this.target=e}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),Qs=0,tu=new WeakMap,eu=function(){function e(t,e,n){this.observer=void 0,this.target=void 0,this.options=void 0,this.transientObservedNodes=[],this.observer=t,this.target=e,this.options=n}var n=e.prototype;return n.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var i=function(t,e){return t===e?t:$s&&function(t){return t===$s||t===Ks}(t)?$s:null}(e[n-1],t);if(i)return void(e[n-1]=i)}else au.push(this.observer),ou||(ou=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(su):su());e[n]=t},n.addListeners=function(){this.addListeners_(this.target)},n.addListeners_=function(e){var n=this.options;n.attributes&&e.addEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeListeners=function(){this.removeListeners_(this.target)},n.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=tu.get(t),n=0;e.length>n;n++)if(e[n]===this){e.splice(n,1);break}}),this)},n.handleEvent=function(e){var n,i;switch(e.stopImmediatePropagation(),e.type){case t.ElementEvent.ATTR_MODIFIED:var r=e.attrName,o=e.relatedNode.namespaceURI;(n=iu("attributes",i=e.target)).attributeName=r,n.attributeNamespace=o;var a=e.attrChange===An.ADDITION?null:e.prevValue;ru(i,(function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(o)))return t.attributeOldValue?function(t){return $s||(($s=Js.copy(Ks)).oldValue=t,$s)}(a):n}));break;case t.ElementEvent.REMOVED:case t.ElementEvent.INSERTED:var s,u,c=e.target;e.type===t.ElementEvent.INSERTED?(s=[c],u=[]):(s=[],u=[c]);var l=c.previousSibling,h=c.nextSibling;(n=iu("childList",i=e.relatedNode)).addedNodes=s,n.removedNodes=u,n.previousSibling=l,n.nextSibling=h,ru(i,(function(t){if(t.childList)return n}))}Ks=$s=void 0},e}(),nu=function(){function t(t){this.callback=void 0,this.nodes=[],this.records=[],this.uid=Qs++,this.callback=t}var e=t.prototype;return e.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,i=tu.get(t);i||tu.set(t,i=[]);for(var r=0;i.length>r;r++)if(i[r].observer===this){(n=i[r]).removeListeners(),n.options=e;break}n||(n=new eu(this,t,e),i.push(n),this.nodes.push(t)),n.addListeners()},e.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=tu.get(e),i=0;n.length>i;i++){var r=n[i];if(r.observer===t){r.removeListeners(),n.splice(i,1);break}}}),this),this.records=[]},e.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function iu(t,e){return Ks=new Js(t,e)}function ru(t,e){for(var n=t;n;n=n.parentNode){var i=tu.get(n);if(i)for(var r=0;i.length>r;r++){var o=i[r],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var ou=!1,au=[];function su(){ou=!1;var t=au;au=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=tu.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&su()}function uu(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var i=t[n];Array.isArray(i)||(i=[i]);for(var r=i.length,o=0;r>o;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}null!=i[o]&&(e[o][n]=i[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var i in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var r=t[i];if("offset"===i){if(null!==r){if(!isFinite(r=Number(r)))throw Error("Keyframe offsets must be numbers.");if(0>r||r>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===i&&-1===["replace","add","accumulate","auto"].indexOf(r))throw Error(r+" compositing is not supported");n[i]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),i=!0,r=-1/0,o=0;n.length>o;o++){var a=n[o].offset;if(null!=a){if(r>a)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=a}else i=!1}return n=n.filter((function(t){return Number(t.offset)>=0&&1>=Number(t.offset)})),i||function(){var t,e,i=n.length;n[i-1].computedOffset=Number(null!==(t=n[i-1].offset)&&void 0!==t?t:1),i>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var r=0,o=Number(n[0].computedOffset),a=1;i>a;a++){var s=Number(n[a].computedOffset);if(null!=s&&null!=o){for(var u=1;a-r>u;u++)n[r+u].computedOffset=o+(s-o)*u/(a-r);r=a,o=s}}}(),n}var cu="backwards|forwards|both|none".split("|"),lu="reverse|alternate|alternate-reverse".split("|");function hu(t,e){var n=new Zs;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(null!=t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===cu.indexOf(t[e]))return;if("direction"===e&&-1===lu.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function pu(t,e){var n;return hu(t=du(null!==(n=t)&&void 0!==n?n:{duration:"auto"}),e)}function du(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var fu,yu=function(){function t(t,e,n){var i=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=pu(n,!1),this.timing.effect=this,this.timing.activeDuration=Ys(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=uu(e,this.timing),this.interpolations=Eu(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?i.animation&&i.animation.currentTime||null:"currentIteration"===e?i.animation&&"running"===i.animation.playState?t.currentIteration||0:null:"progress"===e?i.animation&&"running"===i.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=Xs(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=uu(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),vu=function(){function e(){this.registry={},this.define(t.Shape.CIRCLE,ja),this.define(t.Shape.ELLIPSE,za),this.define(t.Shape.RECT,rs),this.define(t.Shape.IMAGE,Xa),this.define(t.Shape.LINE,$a),this.define(t.Shape.GROUP,qa),this.define(t.Shape.PATH,Ja),this.define(t.Shape.POLYGON,ts),this.define(t.Shape.POLYLINE,ns),this.define(t.Shape.TEXT,as),this.define(t.Shape.HTML,us)}var n=e.prototype;return n.define=function(t,e){this.registry[t]=e},n.get=function(t){return this.registry[t]},e}(),gu=((fu={})[t.PropertySyntax.COORDINATE]=ba,fu[t.PropertySyntax.COLOR]=Sa,fu[t.PropertySyntax.PAINT]=Sa,fu[t.PropertySyntax.OPACITY_VALUE]=Ea,fu[t.PropertySyntax.LENGTH_PERCENTAGE]=Ta,fu[t.PropertySyntax.LENGTH_PERCENTAGE_12]=Pa,fu[t.PropertySyntax.LENGTH_PERCENTAGE_14]=xa,fu[t.PropertySyntax.SHADOW_BLUR]=wa,fu[t.PropertySyntax.LIST_OF_POINTS]=Ia,fu[t.PropertySyntax.PATH]=Oa,fu[t.PropertySyntax.FILTER]=ka,fu[t.PropertySyntax.Z_INDEX]=Ca,fu[t.PropertySyntax.OFFSET_PATH]=Na,fu[t.PropertySyntax.OFFSET_DISTANCE]=_a,fu[t.PropertySyntax.CLIP_PATH]=Ra,fu[t.PropertySyntax.TRANSFORM]=Aa,fu[t.PropertySyntax.TRANSFORM_ORIGIN]=Ma,fu[t.PropertySyntax.TEXT]=Da,fu[t.PropertySyntax.TEXT_TRANSFORM]=La,fu),mu=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"shadowColor",interpolable:!0,syntax:t.PropertySyntax.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:t.PropertySyntax.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:t.PropertySyntax.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:t.PropertySyntax.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,syntax:t.PropertySyntax.FILTER},{name:"clipPath",syntax:t.PropertySyntax.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:"left top",layoutDependent:!0,syntax:t.PropertySyntax.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:t.PropertySyntax.PATH},{name:"points",layoutDependent:!0,syntax:t.PropertySyntax.LIST_OF_POINTS},{name:"text",layoutDependent:!0,defaultValue:"",syntax:t.PropertySyntax.TEXT},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:t.PropertySyntax.TEXT_TRANSFORM},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0},{name:"letterSpacing",layoutDependent:!0},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0}];function Tu(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}function bu(t){return!Dn(t)&&"string"==typeof t}function Eu(t,e,n){var i=function(t,e){for(var n={},i=0;t.length>i;i++)for(var r in t[i])if(Su(r)){var o={offset:t[i].offset,computedOffset:t[i].computedOffset,easing:t[i].easing,easingFunction:qs(t[i].easing)||e.easingFunction,value:t[i][r]};n[r]=n[r]||[],n[r].push(o)}return n}(t,e),r=function(t,e){var n=[];for(var i in t)for(var r=t[i],o=0;r.length-1>o;o++){var a=o,s=o+1,u=r[a].computedOffset,c=r[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===r.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:r[a].computedOffset,endOffset:r[s].computedOffset,easingFunction:r[a].easingFunction,property:i,interpolation:Pu(i,r[a].value,r[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(i,n);return function(t,e){if(null!==e)r.filter((function(t){return e>=t.applyFrom&&t.applyTo>e})).forEach((function(n){var i=n.endOffset-n.startOffset,r=0===i?0:n.easingFunction((e-n.startOffset)/i);t.style[n.property]=n.interpolation(r)}));else for(var n in i)Su(n)&&(t.style[n]=null)}}function Su(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}t.DefaultStyleValueRegistry=function(){function e(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.cascadeProperties={}}var n=e.prototype;return n.init=function(){var t=this;mu.forEach((function(e){t.registerMetadata(e)}))},n.registerMetadata=function(t){var e=this;[t.name].concat(t.alias||[]).forEach((function(n){e.cache[n]=t}))},n.unregisterMetadata=function(t){delete this.cache[t]},n.getMetadata=function(t){return this.cache[t]},n.processProperties=function(t,e,n){var i=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1});var r=n.skipUpdateAttribute,o=n.skipParse,a=!1;Object.keys(e).forEach((function(n){var o,s=Nu(n,e[n]),u=s[0];r||(t.attributes[u]=s[1]),!a&&(null===(o=i.getMetadata(u))||void 0===o?void 0:o.layoutDependent)&&(a=!0)}));var s=Object.keys(e).sort((function(t,e){var n,r;return((null===(n=i.getMetadata(t))||void 0===n?void 0:n.parsePriority)||0)-((null===(r=i.getMetadata(e))||void 0===r?void 0:r.parsePriority)||0)}));o||s.forEach((function(e){t.computedStyle[e]=i.parseProperty(e,t.attributes[e],t)}));var u=!1;s.forEach((function(e){e in t.computedStyle&&(u=i.computeProperty(e,t.computedStyle[e],t))})),u?this.dirty=!0:(a&&this.updateGeometry(t),s.forEach((function(e){e in t.parsedStyle&&i.postProcessProperty(e,t)})),s.forEach((function(e){e in t.parsedStyle&&i.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))})))},n.parseProperty=function(t,e,n){var i=this.getMetadata(t),r=e;if((""===e||Dn(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)r=new xi(e);else if(i){var o=i.keywords,a=i.syntax,s=a&&gu[a];if(o&&o.indexOf(e)>-1)r=new xi(e);else if(s){s&&s.parser&&(r=s.parser(e,n))}}return r},n.computeProperty=function(t,e,n){var i=this.getMetadata(t),r="g-root"===n.id,o=e instanceof ki?e.clone():e;if(i){var a=i.syntax,s=i.defaultValue;if(e instanceof xi){var u=e.value;if("unset"===u&&(u=i.inherited&&!r?"inherit":"initial"),"initial"===u)Dn(s)||(e=this.parseProperty(t,s,n));else if("inherit"===u){var c=this.tryToResolveProperty(n,t,{inherited:!0});return c?(n.parsedStyle[t]=c,!1):(this.addUnresolveProperty(n,t),!0)}}var l=a&&gu[a];if(l){if(l&&l.calculator)o=l.calculator(t,n.parsedStyle[t],e,n,this);else o=e}else o=e}return n.parsedStyle[t]=o,!1},n.postProcessProperty=function(t,e){var n=this.getMetadata(t);if(n&&n.syntax){var i=n.syntax&&gu[n.syntax];i&&i.postProcessor&&i.postProcessor(e)}},n.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},n.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},n.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var i=t.parentElement.parsedStyle[e];return(!(i instanceof xi)||"unset"!==i.value&&"initial"!==i.value&&"inherit"!==i.value)&&(!(i instanceof Di&&Di.isRelativeUnit(i.unit))&&i)}return!1},n.recalc=function(t){var e=this.unresolvedProperties[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete this.unresolvedProperties[t.entity]}},n.updateGeometry=function(e){var n=Ut.get($n)(e.nodeName);if(n){var i,r=e.geometry;r.contentBounds||(r.contentBounds=new hn),r.renderBounds||(r.renderBounds=new hn);var o=e.parsedStyle,a=n.update(o,e),s=a.depth,u=a.offsetX,c=void 0===u?0:u,l=a.offsetY,h=void 0===l?0:l,p=a.offsetZ,d=void 0===p?0:p,f=we(a.width/2,a.height/2,(void 0===s?0:s)/2),y=o.lineWidth,v=o.increasedLineWidthForHitTesting,g=o.shadowColor,m=o.filter,T=void 0===m?[]:m,b=o.transformOrigin,E=o.anchor;e.nodeName===t.Shape.TEXT&&delete o.anchor;var S=we((1-2*(E&&E[0].value||0))*f[0]+c,(1-2*(E&&E[1].value||0))*f[1]+h,(1-2*(E&&(null===(i=E[2])||void 0===i?void 0:i.value)||0))*f[2]+d);r.contentBounds.update(S,f);var k=(((null==y?void 0:y.value)||0)+((null==v?void 0:v.value)||0))/2;if(Ce(f,f,we(k,k,0)),r.renderBounds.update(S,f),g){var P=r.renderBounds,x=P.min,w=P.max,N=o.shadowBlur,_=o.shadowOffsetX,C=o.shadowOffsetY,A=N&&N.value||0,M=_&&_.value||0,O=C&&C.value||0,I=w[0]+A+M,R=x[1]-A+O,D=w[1]+A+O;x[0]=Math.min(x[0],x[0]-A+M),w[0]=Math.max(w[0],I),x[1]=Math.min(x[1],R),w[1]=Math.max(w[1],D),r.renderBounds.setMinMax(x,w)}T.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,Ce(r.renderBounds.halfExtents,r.renderBounds.halfExtents,we(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,u=r.renderBounds,c=u.min,l=u.max,h=l[0]+s+o,p=c[1]-s+a,d=l[1]+s+a;c[0]=Math.min(c[0],c[0]-s+o),l[0]=Math.max(l[0],h),c[1]=Math.min(c[1],p),l[1]=Math.max(l[1],d),r.renderBounds.setMinMax(c,l)}})),E=o.anchor;var L=Fr(b[0],0,e),U=Fr(b[1],1,e);e.setOrigin(L-=(E&&E[0].value||0)*r.contentBounds.halfExtents[0]*2,U-=(E&&E[1].value||0)*r.contentBounds.halfExtents[1]*2),e.emit(t.ElementEvent.GEOMETRY_BOUNDS_CHANGED,{}),Bu(e)}},n.isPropertyInheritable=function(t){var e=this.getMetadata(t);return!!e&&e.inherited},e}(),ie([Y.postConstruct(),oe("design:type",Function),oe("design:paramtypes",[]),oe("design:returntype",void 0)],t.DefaultStyleValueRegistry.prototype,"init",null),t.DefaultStyleValueRegistry=ie([lt({token:Kn})],t.DefaultStyleValueRegistry);var ku=function(t,e,n){return function(i){return n(xu(t,e,i))}};function Pu(t,e,n,i){var r=e,o=n,a=Ut.get(Kn).getMetadata(t);if(a&&a.syntax&&a.interpolable&&gu[a.syntax]){var s=gu[a.syntax];if(s){s.parser&&(r=s.parser(e,i),o=s.parser(n,i));var u=s.mixer(r,o,i);if(u){var c=ku.apply(void 0,u);return function(t){return 0===t?e:1===t?n:c(t)}}}}return ku(!1,!0,(function(t){return t?n:e}))}function xu(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e||"string"==typeof t&&"string"==typeof e)return.5>n?t:e;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){for(var i=[],r=0;t.length>r;r++)i.push(xu(t[r],e[r],n));return i}throw Error("Mismatched interpolation arguments "+t+":"+e)}var wu={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}};function Nu(t,e){var n,i=Tu(t),r=wu[i];return[i=(null==r?void 0:r.alias)||i,(null==r||null===(n=r.values)||void 0===n?void 0:n[e])||e]}var _u=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Cu(t){for(var e=t.fontSize,n=t.fontFamily,i=t.fontStyle,r=t.fontVariant,o=t.fontWeight,a=Ln(e)?e+"px":""+e,s=bu(n)?n.split(","):[n.value],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&0>_u.indexOf(c)&&(c='"'+c+'"'),s[u]=c}return i+" "+r+" "+o+" "+a+" "+s.join(",")}var Au={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Mu={},Ou=0;function Iu(t,e){if(t){var n="string"==typeof t?t:t.id||Ou++;Mu[n]&&Mu[n].destroy(),Mu[n]=e}}var Ru="undefined"!=typeof window&&void 0!==window.document,Du=function(t){if(t.isRejected||t.isFulfilled)return t;var e,n=!0,i=!1,r=!1,o=t.then((function(t){return r=!0,n=!1,e=t,t}),(function(t){throw i=!0,n=!1,t}));return o.isFulfilled=function(){return r},o.isPending=function(){return n},o.isRejected=function(){return i},o.getFullFilledValue=function(){return e},o},Lu=function(){var t=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Uu={keys:Object.keys,values:Object.values,entries:Object.entries};function Fu(t,e){var n=Number(t.style.zIndex),i=Number(e.style.zIndex);if(n===i){var r=t.parentNode;if(r){var o=r.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-i}function Bu(e,n){void 0===n&&(n=!1);for(var i=e;i;){var r=i.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),i=i.parentNode}e.emit(t.ElementEvent.BOUNDS_CHANGED,{affectChildren:n})}var Vu=r.defineToken("SceneGraphService");t.DefaultSceneGraphService=function(){function e(){var t,e,n,i,r,o=this;this.sceneGraphSelectorFactory=void 0,this.rotate=(t=Ye(),function(e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=0),"number"==typeof n&&(n=we(n,i,r));var a=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var s=Ye();Je(s,n[0],n[1],n[2]);var u=o.getRotation(e),c=o.getRotation(e.parentNode);sn(t,c),Ze(t,t),Ke(s,t,s),Ke(a.localRotation,s,u),cn(a.localRotation,a.localRotation),o.dirtifyLocal(e,a)}else o.rotateLocal(e,n)}),this.rotateLocal=(e=Ye(),function(t,n,i,r){void 0===i&&(i=0),void 0===r&&(r=0),"number"==typeof n&&(n=we(n,i,r));var a=t.transformable;Je(e,n[0],n[1],n[2]),un(a.localRotation,a.localRotation,e),o.dirtifyLocal(t,a)}),this.setEulerAngles=(n=Ye(),function(t,e,i,r){void 0===i&&(i=0),void 0===r&&(r=0),"number"==typeof e&&(e=we(e,i,r));var a=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){Je(a.localRotation,e[0],e[1],e[2]);var s=o.getRotation(t.parentNode);sn(n,Ze(Ye(),s)),un(a.localRotation,a.localRotation,n),o.dirtifyLocal(t,a)}else o.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=we(e,n,i));var r=t.transformable;Be(e,ke())||(function(t,e,n){var i=n[0],r=n[1],o=n[2],a=e[0],s=e[1],u=e[2],c=r*u-o*s,l=o*a-i*u,h=i*s-r*a,p=r*h-o*l,d=o*c-i*h,f=i*l-r*c,y=2*n[3];l*=y,h*=y,d*=2,f*=2,t[0]=a+(c*=y)+(p*=2),t[1]=s+l+d,t[2]=u+h+f}(e,e,r.localRotation),Ce(r.localPosition,r.localPosition,e),o.dirtifyLocal(t,r))},this.setPosition=(i=le(),function(t,e){var n=t.transformable;e=we(e[0],e[1],e[2]||0),Be(o.getPosition(t),e)||(n.position=e,null!==t.parentNode&&t.parentNode.transformable?(he(i,t.parentNode.transformable.worldTransform),de(i,i),Fe(n.localPosition,e,i)):Ne(n.localPosition,e),o.dirtifyLocal(t,n))}),this.translate=(r=ke(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=we(e,n,i)),Be(e,ke())||(Ce(r,o.getPosition(t),e),o.setPosition(t,r))}),this.setRotation=function(){var t=Ye();return function(e,n,i,r,a){var s=e.transformable;if("number"==typeof n&&(n=an(n,i,r,a)),null!==e.parentNode&&e.parentNode.transformable){var u=o.getRotation(e.parentNode);sn(t,u),Ze(t,t),Ke(s.localRotation,t,n),cn(s.localRotation,s.localRotation),o.dirtifyLocal(e,s)}else o.setLocalRotation(e,n)}}}var n=e.prototype;return n.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},n.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},n.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},n.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Dn(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var i=e.sortable;i&&(i.dirty=!0);var r=t.transformable;r&&this.dirtifyWorld(t,r),r.frozen&&this.unfreezeParentToRoot(t)},n.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var i=t.parentNode.childNodes.indexOf(t);i>-1&&t.parentNode.childNodes.splice(i,1),e&&this.dirtifyWorld(t,e),t.parentNode=null}},n.getOrigin=function(t){return t.transformable.origin},n.setOrigin=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=we(e,n,i));var r=t.transformable;if(!Be(e,r.origin)){var o=r.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,r)}},n.setLocalEulerAngles=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=we(e,n,i));var r=t.transformable;Je(r.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,r)},n.setLocalPosition=function(t,e){var n=t.transformable;e=we(e[0],e[1],e[2]||0),Be(n.localPosition,e)||(Ne(n.localPosition,e),this.dirtifyLocal(t,n))},n.scaleLocal=function(t,e){var n=t.transformable;Me(n.localScale,n.localScale,we(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},n.setLocalScale=function(t,e){var n=t.transformable,i=we(e[0],e[1],e[2]||n.localScale[2]);Be(i,n.localScale)||(Ne(n.localScale,i),this.dirtifyLocal(t,n))},n.setLocalRotation=function(t,e,n,i,r){"number"==typeof e&&(e=an(e,n,i,r));var o=t.transformable;sn(o.localRotation,e),this.dirtifyLocal(t,o)},n.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},n.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),Bu(t,!0)},n.getPosition=function(t){var e=t.transformable;return ge(e.position,this.getWorldTransform(t,e))},n.getRotation=function(t){var e=t.transformable;return Te(e.rotation,this.getWorldTransform(t,e))},n.getScale=function(t){var e=t.transformable;return me(e.scaling,this.getWorldTransform(t,e))},n.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},n.getLocalPosition=function(t){return t.transformable.localPosition},n.getLocalRotation=function(t){return t.transformable.localRotation},n.getLocalScale=function(t){return t.transformable.localScale},n.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(be(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.localTransform},n.setLocalTransform=function(t,e){var n=ge(ke(),e),i=Te(Ye(),e),r=me(ke(),e);this.setLocalScale(t,r),this.setLocalPosition(t,n),this.setLocalRotation(t,i)},n.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0])},n.getTransformedGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(hn.isEmpty(n))return null;var i=new hn;return i.setFromTransformedAABB(n,this.getWorldTransform(t)),i},n.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry,i=e?n.renderBounds:n.contentBounds||null;return i&&new hn(i.center,i.halfExtents)||new hn},n.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var i=t.renderable;if(!i.boundsDirty&&!e&&i.bounds)return i.bounds;if(!i.renderBoundsDirty&&e&&i.renderBounds)return i.renderBounds;var r=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var i=n.getBounds(t,e);i&&(r?r.add(i):(r=new hn).update(i.center,i.halfExtents))}));var o=t.style.clipPath;if(o){var a,s=this.getTransformedGeometryBounds(o,!0);s&&(a=new hn).setFromTransformedAABB(s,this.getWorldTransform(t)),r?a&&(r=a.intersection(r)):r=a}return r&&(e?i.renderBounds=r:i.bounds=r),e?i.renderBoundsDirty=!1:i.boundsDirty=!1,r||new hn},n.getLocalBounds=function(t){if(t.parentNode){var e=le();t.parentNode.transformable&&(e=de(le(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!hn.isEmpty(n)){var i=new hn;return i.setFromTransformedAABB(n,e),i}}return this.getBounds(t)},n.getBoundingClientRect=function(t){var e,n,i,r=this.getGeometryBounds(t);hn.isEmpty(r)||(i=new hn).setFromTransformedAABB(r,this.getWorldTransform(t));var o=null===(e=t.ownerDocument)||void 0===e||null===(n=e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(i){var a=i.getMin(),s=a[0],u=a[1],c=i.getMax();return new Pn(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),c[0]-s,c[1]-u)}return new Pn((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},n.dirtifyWorldInternal=function(e,n){var i=this;if(!n.dirtyFlag){n.dirtyFlag=!0,n.frozen=!1,e.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||i.dirtifyWorldInternal(t,e)}));var r=e.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),e.dispatchEvent(new An(t.ElementEvent.ATTR_MODIFIED,e,null,null,"modelMatrix",An.MODIFICATION,null,null))}},n.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,i=0;n.length>i;i++)this.syncHierarchy(n[i])}},n.sync=function(t,e){if(e.localDirtyFlag&&(be(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,i=n&&n.transformable;null!==n&&i?fe(e.worldTransform,i.worldTransform,e.localTransform):he(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},n.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},e}(),ie([ht(xn),oe("design:type",Function)],t.DefaultSceneGraphService.prototype,"sceneGraphSelectorFactory",void 0),t.DefaultSceneGraphService=ie([lt({token:Vu})],t.DefaultSceneGraphService);var Gu,ju=r.defineToken("ContextService",{multiple:!1});(Gu=t.RenderReason||(t.RenderReason={}))[Gu.CAMERA_CHANGED=0]="CAMERA_CHANGED",Gu[Gu.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",Gu[Gu.NONE=2]="NONE";var Hu=r.defineToken("RenderingContext"),zu=(t,e)=>{let n=!0;return function(){return n&&(console.warn("DeprecationWarning: "+e),n=!1),t.apply(this,arguments)}};const Wu=zu((()=>{}),"Hook.context is deprecated and will be removed"),qu=function(...t){return this.call=this._createCall("sync"),this.call(...t)},Yu=function(...t){return this.callAsync=this._createCall("async"),this.callAsync(...t)},Xu=function(...t){return this.promise=this._createCall("promise"),this.promise(...t)};class Ku{constructor(t=[],e){this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=qu,this.call=qu,this._callAsync=Yu,this.callAsync=Yu,this._promise=Xu,this.promise=Xu,this._x=void 0,this.compile=this.compile,this.tap=this.tap,this.tapAsync=this.tapAsync,this.tapPromise=this.tapPromise}compile(t){throw Error("Abstract: should be overridden")}_createCall(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})}_tap(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw Error("Missing name for tap");void 0!==e.context&&Wu(),e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)}tap(t,e){this._tap("sync",t,e)}tapAsync(t,e){this._tap("async",t,e)}tapPromise(t,e){this._tap("promise",t,e)}_runRegisterInterceptors(t){for(const e of this.interceptors)if(e.register){const n=e.register(t);void 0!==n&&(t=n)}return t}withOptions(t){const e=e=>Object.assign({},t,"string"==typeof e?{name:e}:e);return{name:this.name,tap:(t,n)=>this.tap(e(t),n),tapAsync:(t,n)=>this.tapAsync(e(t),n),tapPromise:(t,n)=>this.tapPromise(e(t),n),intercept:t=>this.intercept(t),isUsed:()=>this.isUsed(),withOptions:t=>this.withOptions(e(t))}}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(t){if(this._resetCompilation(),this.interceptors.push(Object.assign({},t)),t.register)for(let e=0;this.taps.length>e;e++)this.taps[e]=t.register(this.taps[e])}_resetCompilation(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise}_insert(t){let e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let n=0;"number"==typeof t.stage&&(n=t.stage);let i=this.taps.length;for(;i>0;){i--;const t=this.taps[i];this.taps[i+1]=t;const r=t.stage||0;if(e){if(e.has(t.name)){e.delete(t.name);continue}if(e.size>0)continue}if(n>=r){i++;break}}this.taps[i]=t}}Object.setPrototypeOf(Ku.prototype,null);var $u=Ku;var Zu=class{constructor(t){this.config=t,this.options=void 0,this._args=void 0}create(t){let e;switch(this.init(t),this.options.type){case"sync":e=Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`throw ${t};\n`,onResult:t=>`return ${t};\n`,resultReturns:!0,onDone:()=>"",rethrowIfPossible:!0}));break;case"async":e=Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`_callback(${t});\n`,onResult:t=>`_callback(null, ${t});\n`,onDone:()=>"_callback();\n"}));break;case"promise":let t=!1;const n=this.contentWithInterceptors({onError:e=>(t=!0,`_error(${e});\n`),onResult:t=>`_resolve(${t});\n`,onDone:()=>"_resolve();\n"});let i="";i+='"use strict";\n',i+=this.header(),i+="return new Promise((function(_resolve, _reject) {\n",t&&(i+="var _sync = true;\n",i+="function _error(_err) {\n",i+="if(_sync)\n",i+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",i+="else\n",i+="_reject(_err);\n",i+="};\n"),i+=n,t&&(i+="_sync = false;\n"),i+="}));\n",e=Function(this.args(),i)}return this.deinit(),e}setup(t,e){t._x=e.taps.map((t=>t.fn))}init(t){this.options=t,this._args=t.args.slice()}deinit(){this.options=void 0,this._args=void 0}contentWithInterceptors(t){if(this.options.interceptors.length>0){const e=t.onError,n=t.onResult,i=t.onDone;let r="";for(let t=0;this.options.interceptors.length>t;t++){const e=this.options.interceptors[t];e.call&&(r+=`${this.getInterceptor(t)}.call(${this.args({before:e.context?"_context":void 0})});\n`)}return r+=this.content(Object.assign(t,{onError:e&&(t=>{let n="";for(let e=0;this.options.interceptors.length>e;e++){this.options.interceptors[e].error&&(n+=`${this.getInterceptor(e)}.error(${t});\n`)}return n+=e(t),n}),onResult:n&&(t=>{let e="";for(let n=0;this.options.interceptors.length>n;n++){this.options.interceptors[n].result&&(e+=`${this.getInterceptor(n)}.result(${t});\n`)}return e+=n(t),e}),onDone:i&&(()=>{let t="";for(let e=0;this.options.interceptors.length>e;e++){this.options.interceptors[e].done&&(t+=this.getInterceptor(e)+".done();\n")}return t+=i(),t})})),r}return this.content(t)}header(){let t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t}needContext(){for(const t of this.options.taps)if(t.context)return!0;return!1}callTap(t,{onError:e,onResult:n,onDone:i,rethrowIfPossible:r}){let o="",a=!1;for(let e=0;this.options.interceptors.length>e;e++){const n=this.options.interceptors[e];n.tap&&(a||(o+=`var _tap${t} = ${this.getTap(t)};\n`,a=!0),o+=`${this.getInterceptor(e)}.tap(${n.context?"_context, ":""}_tap${t});\n`)}o+=`var _fn${t} = ${this.getTapFn(t)};\n`;const s=this.options.taps[t];switch(s.type){case"sync":r||(o+=`var _hasError${t} = false;\n`,o+="try {\n"),o+=n?`var _result${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`:`_fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,r||(o+="} catch(_err) {\n",o+=`_hasError${t} = true;\n`,o+=e("_err"),o+="}\n",o+=`if(!_hasError${t}) {\n`),n&&(o+=n("_result"+t)),i&&(o+=i()),r||(o+="}\n");break;case"async":let a="";a+=n?`(function(_err${t}, _result${t}) {\n`:`(function(_err${t}) {\n`,a+=`if(_err${t}) {\n`,a+=e("_err"+t),a+="} else {\n",n&&(a+=n("_result"+t)),i&&(a+=i()),a+="}\n",a+="})",o+=`_fn${t}(${this.args({before:s.context?"_context":void 0,after:a})});\n`;break;case"promise":o+=`var _hasResult${t} = false;\n`,o+=`var _promise${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,o+=`if (!_promise${t} || !_promise${t}.then)\n`,o+=` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${t} + ')');\n`,o+=`_promise${t}.then((function(_result${t}) {\n`,o+=`_hasResult${t} = true;\n`,n&&(o+=n("_result"+t)),i&&(o+=i()),o+=`}), function(_err${t}) {\n`,o+=`if(_hasResult${t}) throw _err${t};\n`,o+=e("_err"+t),o+="});\n"}return o}callTapsSeries({onError:t,onResult:e,resultReturns:n,onDone:i,doneReturns:r,rethrowIfPossible:o}){if(0===this.options.taps.length)return i();const a=this.options.taps.findIndex((t=>"sync"!==t.type)),s=n||r;let u="",c=i,l=0;for(let n=this.options.taps.length-1;n>=0;n--){const r=n;c!==i&&("sync"!==this.options.taps[r].type||l++>20)&&(l=0,u+=`function _next${r}() {\n`,u+=c(),u+="}\n",c=()=>`${s?"return ":""}_next${r}();\n`);const h=c,p=t=>t?"":i(),d=this.callTap(r,{onError:e=>t(r,e,h,p),onResult:e&&(t=>e(r,t,h,p)),onDone:!e&&h,rethrowIfPossible:o&&(0>a||a>r)});c=()=>d}return u+=c(),u}callTapsLooping({onError:t,onDone:e,rethrowIfPossible:n}){if(0===this.options.taps.length)return e();const i=this.options.taps.every((t=>"sync"===t.type));let r="";i||(r+="var _looper = (function() {\n",r+="var _loopAsync = false;\n"),r+="var _loop;\n",r+="do {\n",r+="_loop = false;\n";for(let t=0;this.options.interceptors.length>t;t++){const e=this.options.interceptors[t];e.loop&&(r+=`${this.getInterceptor(t)}.loop(${this.args({before:e.context?"_context":void 0})});\n`)}return r+=this.callTapsSeries({onError:t,onResult:(t,e,n,r)=>{let o="";return o+=`if(${e} !== undefined) {\n`,o+="_loop = true;\n",i||(o+="if(_loopAsync) _looper();\n"),o+=r(!0),o+="} else {\n",o+=n(),o+="}\n",o},onDone:e&&(()=>{let t="";return t+="if(!_loop) {\n",t+=e(),t+="}\n",t}),rethrowIfPossible:n&&i}),r+="} while(_loop);\n",i||(r+="_loopAsync = true;\n",r+="});\n",r+="_looper();\n"),r}callTapsParallel({onError:t,onResult:e,onDone:n,rethrowIfPossible:i,onTap:r=((t,e)=>e())}){if(1>=this.options.taps.length)return this.callTapsSeries({onError:t,onResult:e,onDone:n,rethrowIfPossible:i});let o="";o+="do {\n",o+=`var _counter = ${this.options.taps.length};\n`,n&&(o+="var _done = (function() {\n",o+=n(),o+="});\n");for(let a=0;this.options.taps.length>a;a++){const s=()=>n?"if(--_counter === 0) _done();\n":"--_counter;",u=t=>t||!n?"_counter = 0;\n":"_counter = 0;\n_done();\n";o+="if(_counter <= 0) break;\n",o+=r(a,(()=>this.callTap(a,{onError:e=>{let n="";return n+="if(_counter > 0) {\n",n+=t(a,e,s,u),n+="}\n",n},onResult:e&&(t=>{let n="";return n+="if(_counter > 0) {\n",n+=e(a,t,s,u),n+="}\n",n}),onDone:!e&&(()=>s()),rethrowIfPossible:i})),s,u)}return o+="} while(false);\n",o}args({before:t,after:e}={}){let n=this._args;return t&&(n=[t].concat(n)),e&&(n=n.concat(e)),0===n.length?"":n.join(", ")}getTapFn(t){return`_x[${t}]`}getTap(t){return`_taps[${t}]`}getInterceptor(t){return`_interceptors[${t}]`}};const Ju=new class extends Zu{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsSeries({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},Qu=()=>{throw Error("tapAsync is not supported on a SyncHook")},tc=()=>{throw Error("tapPromise is not supported on a SyncHook")},ec=function(t){return Ju.setup(this,t),Ju.create(t)};function nc(t=[],e){const n=new $u(t,e);return n.constructor=nc,n.tapAsync=Qu,n.tapPromise=tc,n.compile=ec,n}nc.prototype=null;var ic=nc;const rc=new class extends Zu{content({onError:t,onResult:e,resultReturns:n,onDone:i,rethrowIfPossible:r}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,n,i)=>`if(${n} !== undefined) {\n${e(n)};\n} else {\n${i()}}\n`,resultReturns:n,onDone:i,rethrowIfPossible:r})}},oc=()=>{throw Error("tapAsync is not supported on a SyncBailHook")},ac=()=>{throw Error("tapPromise is not supported on a SyncBailHook")},sc=function(t){return rc.setup(this,t),rc.create(t)};function uc(t=[],e){const n=new $u(t,e);return n.constructor=uc,n.tapAsync=oc,n.tapPromise=ac,n.compile=sc,n}uc.prototype=null;var cc=uc;const lc=new class extends Zu{content({onError:t,onResult:e,resultReturns:n,rethrowIfPossible:i}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,e,n)=>{let i="";return i+=`if(${e} !== undefined) {\n`,i+=`${this._args[0]} = ${e};\n`,i+="}\n",i+=n(),i},onDone:()=>e(this._args[0]),doneReturns:n,rethrowIfPossible:i})}},hc=()=>{throw Error("tapAsync is not supported on a SyncWaterfallHook")},pc=()=>{throw Error("tapPromise is not supported on a SyncWaterfallHook")},dc=function(t){return lc.setup(this,t),lc.create(t)};function fc(t=[],e){if(1>t.length)throw Error("Waterfall hooks must have at least one argument");const n=new $u(t,e);return n.constructor=fc,n.tapAsync=hc,n.tapPromise=pc,n.compile=dc,n}fc.prototype=null;var yc=fc;const vc=new class extends Zu{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsLooping({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},gc=()=>{throw Error("tapAsync is not supported on a SyncLoopHook")},mc=()=>{throw Error("tapPromise is not supported on a SyncLoopHook")},Tc=function(t){return vc.setup(this,t),vc.create(t)};function bc(t=[],e){const n=new $u(t,e);return n.constructor=bc,n.tapAsync=gc,n.tapPromise=mc,n.compile=Tc,n}bc.prototype=null;var Ec=bc;const Sc=new class extends Zu{content({onError:t,onDone:e}){return this.callTapsParallel({onError:(e,n,i,r)=>t(n)+r(!0),onDone:e})}},kc=function(t){return Sc.setup(this,t),Sc.create(t)};function Pc(t=[],e){const n=new $u(t,e);return n.constructor=Pc,n.compile=kc,n._call=void 0,n.call=void 0,n}Pc.prototype=null;var xc=Pc;const wc=new class extends Zu{content({onError:t,onResult:e,onDone:n}){let i="";return i+=`var _results = new Array(${this.options.taps.length});\n`,i+="var _checkDone = function() {\n",i+="for(var i = 0; i < _results.length; i++) {\n",i+="var item = _results[i];\n",i+="if(item === undefined) return false;\n",i+="if(item.result !== undefined) {\n",i+=e("item.result"),i+="return true;\n",i+="}\n",i+="if(item.error) {\n",i+=t("item.error"),i+="return true;\n",i+="}\n",i+="}\n",i+="return false;\n",i+="}\n",i+=this.callTapsParallel({onError:(t,e,n,i)=>{let r="";return r+=`if(${t} < _results.length && ((_results.length = ${t+1}), (_results[${t}] = { error: ${e} }), _checkDone())) {\n`,r+=i(!0),r+="} else {\n",r+=n(),r+="}\n",r},onResult:(t,e,n,i)=>{let r="";return r+=`if(${t} < _results.length && (${e} !== undefined && (_results.length = ${t+1}), (_results[${t}] = { result: ${e} }), _checkDone())) {\n`,r+=i(!0),r+="} else {\n",r+=n(),r+="}\n",r},onTap:(t,e,n,i)=>{let r="";return t>0&&(r+=`if(${t} >= _results.length) {\n`,r+=n(),r+="} else {\n"),r+=e(),t>0&&(r+="}\n"),r},onDone:n}),i}},Nc=function(t){return wc.setup(this,t),wc.create(t)};function _c(t=[],e){const n=new $u(t,e);return n.constructor=_c,n.compile=Nc,n._call=void 0,n.call=void 0,n}_c.prototype=null;var Cc=_c;const Ac=new class extends Zu{content({onError:t,onDone:e}){return this.callTapsSeries({onError:(e,n,i,r)=>t(n)+r(!0),onDone:e})}},Mc=function(t){return Ac.setup(this,t),Ac.create(t)};function Oc(t=[],e){const n=new $u(t,e);return n.constructor=Oc,n.compile=Mc,n._call=void 0,n.call=void 0,n}Oc.prototype=null;var Ic=Oc;const Rc=new class extends Zu{content({onError:t,onResult:e,resultReturns:n,onDone:i}){return this.callTapsSeries({onError:(e,n,i,r)=>t(n)+r(!0),onResult:(t,n,i)=>`if(${n} !== undefined) {\n${e(n)}\n} else {\n${i()}}\n`,resultReturns:n,onDone:i})}},Dc=function(t){return Rc.setup(this,t),Rc.create(t)};function Lc(t=[],e){const n=new $u(t,e);return n.constructor=Lc,n.compile=Dc,n._call=void 0,n.call=void 0,n}Lc.prototype=null;var Uc=Lc;const Fc=new class extends Zu{content({onError:t,onDone:e}){return this.callTapsLooping({onError:(e,n,i,r)=>t(n)+r(!0),onDone:e})}},Bc=function(t){return Fc.setup(this,t),Fc.create(t)};function Vc(t=[],e){const n=new $u(t,e);return n.constructor=Vc,n.compile=Bc,n._call=void 0,n.call=void 0,n}Vc.prototype=null;var Gc=Vc;const jc=new class extends Zu{content({onError:t,onResult:e}){return this.callTapsSeries({onError:(e,n,i,r)=>t(n)+r(!0),onResult:(t,e,n)=>{let i="";return i+=`if(${e} !== undefined) {\n`,i+=`${this._args[0]} = ${e};\n`,i+="}\n",i+=n(),i},onDone:()=>e(this._args[0])})}},Hc=function(t){return jc.setup(this,t),jc.create(t)};function zc(t=[],e){if(1>t.length)throw Error("Waterfall hooks must have at least one argument");const n=new $u(t,e);return n.constructor=zc,n.compile=Hc,n._call=void 0,n.call=void 0,n}zc.prototype=null;var Wc=zc;const qc=(t,e)=>e;class Yc{constructor(t,e){this._map=new Map,this.name=e,this._factory=t,this._interceptors=[]}get(t){return this._map.get(t)}for(t){const e=this.get(t);if(void 0!==e)return e;let n=this._factory(t);const i=this._interceptors;for(let e=0;i.length>e;e++)n=i[e].factory(t,n);return this._map.set(t,n),n}intercept(t){this._interceptors.push(Object.assign({factory:qc},t))}}Yc.prototype.tap=zu((function(t,e,n){return this.for(t).tap(e,n)}),"HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."),Yc.prototype.tapAsync=zu((function(t,e,n){return this.for(t).tapAsync(e,n)}),"HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."),Yc.prototype.tapPromise=zu((function(t,e,n){return this.for(t).tapPromise(e,n)}),"HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead.");var Xc=Yc;class Kc{constructor(t,e){this.hooks=t,this.name=e}tap(t,e){for(const n of this.hooks)n.tap(t,e)}tapAsync(t,e){for(const n of this.hooks)n.tapAsync(t,e)}tapPromise(t,e){for(const n of this.hooks)n.tapPromise(t,e)}isUsed(){for(const t of this.hooks)if(t.isUsed())return!0;return!1}intercept(t){for(const e of this.hooks)e.intercept(t)}withOptions(t){return new Kc(this.hooks.map((e=>e.withOptions(t))),this.name)}}var $c=Kc,Zc=i((function(t,e){e.__esModule=!0,e.SyncHook=ic,e.SyncBailHook=cc,e.SyncWaterfallHook=yc,e.SyncLoopHook=Ec,e.AsyncParallelHook=xc,e.AsyncParallelBailHook=Cc,e.AsyncSeriesHook=Ic,e.AsyncSeriesBailHook=Uc,e.AsyncSeriesLoopHook=Gc,e.AsyncSeriesWaterfallHook=Wc,e.HookMap=Xc,e.MultiHook=$c})),Jc=r.defineToken("RenderingPluginContribution");t.RenderingService=function(){function e(){this.renderingPluginProvider=void 0,this.renderingContext=void 0,this.sceneGraphService=void 0,this.styleValueRegistry=void 0,this.inited=!1,this.stats={total:0,rendered:0,renderedOnscreen:0},this.zIndexCounter=0,this.hooks={init:new Zc.AsyncParallelHook,dirtycheck:new Zc.SyncWaterfallHook(["object"]),cull:new Zc.SyncWaterfallHook(["object"]),beginFrame:new Zc.SyncHook([]),beforeRender:new Zc.SyncHook(["objectToRender"]),render:new Zc.SyncHook(["objectToRender"]),afterRender:new Zc.SyncHook(["objectToRender"]),endFrame:new Zc.SyncHook([]),destroy:new Zc.SyncHook([]),pick:new Zc.AsyncSeriesWaterfallHook(["result"]),pointerDown:new Zc.SyncHook(["event"]),pointerUp:new Zc.SyncHook(["event"]),pointerMove:new Zc.SyncHook(["event"]),pointerOut:new Zc.SyncHook(["event"]),pointerOver:new Zc.SyncHook(["event"]),pointerWheel:new Zc.SyncHook(["event"]),pointerCancel:new Zc.SyncHook(["event"])}}var n=e.prototype;return n.init=function(){var t=Ht(Gt().mark((function t(){var e=this;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(t){t.apply(e)})),t.next=3,this.hooks.init.promise();case 3:this.inited=!0;case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getStats=function(){return this.stats},n.render=function(t){this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root),(this.renderingContext.dirty||t.renderer.getConfig().enableDirtyRectangleRendering&&1===this.stats.total)&&(this.renderingContext.dirty||this.hooks.beginFrame.call(),this.stats.renderedOnscreen=this.stats.rendered,this.hooks.endFrame.call(),this.renderingContext.dirty=!1),this.renderingContext.renderReasons.clear())},n.renderDisplayObject=function(e){var n=this;this.styleValueRegistry.recalc(e);var i=this.hooks.dirtycheck.call(e);i&&(this.hooks.cull.call(i),this.stats.rendered++,this.renderingContext.dirty||(this.renderingContext.dirty=!0,this.hooks.beginFrame.call()),this.hooks.beforeRender.call(i),this.hooks.render.call(i),this.hooks.afterRender.call(i),e.renderable.dirty=!1),e.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var r=e.sortable,o=!1;r.dirty&&(r.sorted=e.childNodes.slice().sort(Fu),o=!0,r.dirty=!1),(r.sorted||e.childNodes).forEach((function(t){n.renderDisplayObject(t)})),o&&e.forEach((function(e){e.emit(t.ElementEvent.RENDER_ORDER_CHANGED,{renderOrder:e.sortable.renderOrder})}))},n.destroy=function(){this.inited=!1,this.hooks.destroy.call()},n.dirtify=function(){this.renderingContext.renderReasons.add(t.RenderReason.DISPLAY_OBJECT_CHANGED)},e}(),ie([Bt(Jc),oe("design:type",Object)],t.RenderingService.prototype,"renderingPluginProvider",void 0),ie([ht(Hu),oe("design:type",Object)],t.RenderingService.prototype,"renderingContext",void 0),ie([ht(Vu),oe("design:type",Object)],t.RenderingService.prototype,"sceneGraphService",void 0),ie([ht(Kn),oe("design:type",Object)],t.RenderingService.prototype,"styleValueRegistry",void 0),t.RenderingService=ie([lt()],t.RenderingService);t.EventService=function(t){function e(){for(var e,n=arguments.length,i=Array(n),r=0;n>r;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))||this).renderingContext=void 0,e.contextService=void 0,e.canvasConfig=void 0,e.displayObjectPool=void 0,e.rootTarget=void 0,e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.pickHandler=void 0,e.onPointerDown=function(){var t=Ht(Gt().mark((function t(n){var i;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof hs){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:e.dispatchEvent(i=t.sent,"pointerdown"),"touch"===i.pointerType?e.dispatchEvent(i,"touchstart"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.dispatchEvent(i,2===i.button?"rightdown":"mousedown"),e.trackingData(n.pointerId).pressTargetsByButton[n.button]=i.composedPath(),e.freeEvent(i);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUp=function(){var t=Ht(Gt().mark((function t(n){var i,r,o,a,s,u,c,l;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof hs){t.next=2;break}return t.abrupt("return");case 2:return i=performance.now(),t.next=5,e.createPointerEvent(n);case 5:if(e.dispatchEvent(r=t.sent,"pointerup"),"touch"===r.pointerType?e.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||e.dispatchEvent(r,2===r.button?"rightup":"mouseup"),o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.pressTargetsByButton[n.button]),s=a,a&&!r.composedPath().includes(a)){for(u=a;u&&!r.composedPath().includes(u);)r.currentTarget=u,e.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?e.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||e.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),ti.isNode(u)&&(u=u.parentNode);delete o.pressTargetsByButton[n.button],s=u}s&&((c=e.clonePointerEvent(r,"click")).target=s,c.path=[],o.clicksByButton[n.button]||(o.clicksByButton[n.button]={clickCount:0,target:c.target,timeStamp:i}),(l=o.clicksByButton[n.button]).target===c.target&&200>i-l.timeStamp?++l.clickCount:l.clickCount=1,l.target=c.target,l.timeStamp=i,c.detail=l.clickCount,e.dispatchEvent(c,"mouse"===c.pointerType||"touch"===c.pointerType?"click":"pointertap"),e.freeEvent(c)),e.freeEvent(r);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerMove=function(){var t=Ht(Gt().mark((function t(n){var i,r,o,a,s,u,c,l,h,p;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof hs){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:if(r="mouse"===(i=t.sent).pointerType||"pen"===i.pointerType,o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.overTargets),!o.overTargets||a===i.target){t.next=23;break}return s="mousemove"===n.type?"mouseout":"pointerout",t.next=12,e.createPointerEvent(n,s,a||void 0);case 12:if(e.dispatchEvent(u=t.sent,"pointerout"),r&&e.dispatchEvent(u,"mouseout"),i.composedPath().includes(a)){t.next=22;break}return t.next=18,e.createPointerEvent(n,"pointerleave",a||void 0);case 18:for((c=t.sent).eventPhase=c.AT_TARGET;c.target&&!i.composedPath().includes(c.target);)c.currentTarget=c.target,e.notifyTarget(c),r&&e.notifyTarget(c,"mouseleave"),ti.isNode(c.target)&&(c.target=c.target.parentNode);e.freeEvent(c);case 22:e.freeEvent(u);case 23:if(a===i.target){t.next=38;break}l=e.clonePointerEvent(i,"mousemove"===n.type?"mouseover":"pointerover"),e.dispatchEvent(l,"pointerover"),r&&e.dispatchEvent(l,"mouseover"),h=a&&ti.isNode(a)&&a.parentNode;case 29:if(!h||h===(ti.isNode(e.rootTarget)&&e.rootTarget.parentNode)){t.next=35;break}if(h!==i.target){t.next=32;break}return t.abrupt("break",35);case 32:h=h.parentNode,t.next=29;break;case 35:if(!h||h===(ti.isNode(e.rootTarget)&&e.rootTarget.parentNode)){for((p=e.clonePointerEvent(i,"pointerenter")).eventPhase=p.AT_TARGET;p.target&&p.target!==a&&p.target!==(ti.isNode(e.rootTarget)&&e.rootTarget.parentNode);)p.currentTarget=p.target,e.notifyTarget(p),r&&e.notifyTarget(p,"mouseenter"),ti.isNode(p.target)&&(p.target=p.target.parentNode);e.freeEvent(p)}e.freeEvent(l);case 38:e.dispatchEvent(i,"pointermove"),"touch"===i.pointerType&&e.dispatchEvent(i,"touchmove"),r&&(e.dispatchEvent(i,"mousemove"),e.cursor=e.getCursor(i.target)),o.overTargets=i.composedPath(),e.freeEvent(i);case 43:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOut=function(){var t=Ht(Gt().mark((function t(n){var i,r,o,a,s;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof hs){t.next=2;break}return t.abrupt("return");case 2:if(!(i=e.trackingData(n.pointerId)).overTargets){t.next=19;break}return r="mouse"===n.pointerType||"pen"===n.pointerType,o=e.findMountedTarget(i.overTargets),t.next=8,e.createPointerEvent(n,"pointerout",o||void 0);case 8:return e.dispatchEvent(a=t.sent),r&&e.dispatchEvent(a,"mouseout"),t.next=13,e.createPointerEvent(n,"pointerleave",o||void 0);case 13:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&s.target!==(ti.isNode(e.rootTarget)&&e.rootTarget.parentNode);)s.currentTarget=s.target,e.notifyTarget(s),r&&e.notifyTarget(s,"mouseleave"),ti.isNode(s.target)&&(s.target=s.target.parentNode);i.overTargets=null,e.freeEvent(a),e.freeEvent(s);case 19:e.cursor=null;case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOver=function(){var t=Ht(Gt().mark((function t(n){var i,r,o,a;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof hs){t.next=2;break}return t.abrupt("return");case 2:return i=e.trackingData(n.pointerId),t.next=5,e.createPointerEvent(n);case 5:for(o="mouse"===(r=t.sent).pointerType||"pen"===r.pointerType,e.dispatchEvent(r,"pointerover"),o&&e.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(e.cursor=e.getCursor(r.target)),(a=e.clonePointerEvent(r,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(ti.isNode(e.rootTarget)&&e.rootTarget.parentNode);)a.currentTarget=a.target,e.notifyTarget(a),o&&e.notifyTarget(a,"mouseenter"),ti.isNode(a.target)&&(a.target=a.target.parentNode);i.overTargets=r.composedPath(),e.freeEvent(r),e.freeEvent(a);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUpOutside=function(){var t=Ht(Gt().mark((function t(n){var i,r,o,a;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof hs){t.next=2;break}return t.abrupt("return");case 2:return i=e.trackingData(n.pointerId),r=e.findMountedTarget(i.pressTargetsByButton[n.button]),t.next=6,e.createPointerEvent(n);case 6:if(o=t.sent,r){for(a=r;a;)o.currentTarget=a,e.notifyTarget(o,"pointerupoutside"),"touch"===o.pointerType||"mouse"!==o.pointerType&&"pen"!==o.pointerType||e.notifyTarget(o,2===o.button?"rightupoutside":"mouseupoutside"),ti.isNode(a)&&(a=a.parentNode);delete i.pressTargetsByButton[n.button]}e.freeEvent(o);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onWheel=function(){var t=Ht(Gt().mark((function t(n){var i;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof ps){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createWheelEvent(n);case 4:e.dispatchEvent(i=t.sent),e.freeEvent(i);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}Yt(e,t);var n=e.prototype;return n.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},n.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new kn(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},n.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new kn(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},n.viewport2Canvas=function(t){var e=t.x,n=t.y,i=this.rootTarget.defaultView.getCamera(),r=this.canvasConfig,o=r.width,a=r.height,s=i.getPerspectiveInverse(),u=i.getWorldTransform(),c=fe(le(),u,s),l=we(e/o*2-1,2*(1-n/a)-1,0);return Fe(l,l,c),new kn(l[0],l[1])},n.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),i=e.getViewTransform(),r=fe(le(),n,i),o=we(t.x,t.y,0);Fe(o,o,r);var a=this.canvasConfig;return new kn((o[0]+1)/2*a.width,(1-(o[1]+1)/2)*a.height)},n.setPickHandler=function(t){this.pickHandler=t},n.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},n.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,i=e.length;i>n;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},n.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},n.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var i=n.length-1;i>=1;i--)if(t.currentTarget=n[i],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var r=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=r+1;n.length>o;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},n.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var i=0;2048>i&&t!==this.rootTarget;i++)ti.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},n.hitTest=function(){var t=Ht(Gt().mark((function t(e){var n,i,r,o,a;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.viewportY,o=(r=this.canvasConfig).width,a=r.height,!(0>(n=e.viewportX)||0>i||n>o||i>a)){t.next=4;break}return t.abrupt("return",null);case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),i=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(i){if(i===n)return!0;if(n&&n.contains)return n.contains(i)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},n.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e,n=te(this.displayObjectPool.getHTMLs());!(e=n()).done;){var i=e.value;if(t.nativeEvent.composedPath().indexOf(i)>-1)return i}return null},n.pickTarget=function(){var t=Ht(Gt().mark((function t(e){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.createPointerEvent=function(){var t=Ht(Gt().mark((function t(e,n,i){var r,o;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.allocateEvent(hs),this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e,o=this.getExistedHTML(r),null==i){t.next=11;break}t.t0=i,t.next=20;break;case 11:if(t.t1=o,t.t1){t.next=19;break}if(t.t2=this.isNativeEventFromCanvas(r),!t.t2){t.next=18;break}return t.next=17,this.pickTarget(r);case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return r.target=t.t0,"string"==typeof n&&(r.type=n),t.abrupt("return",r);case 23:case"end":return t.stop()}}),t,this)})));return function(e,n,i){return t.apply(this,arguments)}}(),n.createWheelEvent=function(){var t=Ht(Gt().mark((function t(e){var n,i;return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(ps),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,i=this.getExistedHTML(n),t.t0=i,t.t0){t.next=15;break}if(t.t1=this.isNativeEventFromCanvas(n),!t.t1){t.next=14;break}return t.next=13,this.pickTarget(n);case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},n.clonePointerEvent=function(t,e){var n=this.allocateEvent(hs);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},n.copyPointerData=function(t,e){t instanceof hs&&e instanceof hs&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},n.copyMouseData=function(t,e){t instanceof ls&&e instanceof ls&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},n.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},n.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},n.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},n.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},n.notifyTarget=function(t,e){var n;e=null!==(n=e)&&void 0!==n?n:t.type,this.notifyListeners(t,t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},n.notifyListeners=function(t,e){var n=t.currentTarget.emitter,i=n._events[e];if(i)if("fn"in i)i.once&&n.removeListener(e,i.fn,void 0,!0),i.fn.call(t.currentTarget||i.context,t);else for(var r=0;i.length>r&&!t.propagationImmediatelyStopped;r++)i[r].once&&n.removeListener(e,i[r].fn,void 0,!0),i[r].fn.call(t.currentTarget||i[r].context,t)},n.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var i=t[n];if(!(i===this.rootTarget||ti.isNode(i)&&i.parentNode===e))break;e=t[n]}return e},n.getCursor=function(t){for(var e=t;e;){var n=ui.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=ti.isNode(e)&&e.parentNode}},e}(ne.EventEmitter),ie([ht(Hu),oe("design:type",Object)],t.EventService.prototype,"renderingContext",void 0),ie([ht(ju),oe("design:type",Object)],t.EventService.prototype,"contextService",void 0),ie([ht(ae),oe("design:type",Object)],t.EventService.prototype,"canvasConfig",void 0),ie([ht(t.DisplayObjectPool),oe("design:type",t.DisplayObjectPool)],t.EventService.prototype,"displayObjectPool",void 0),ie([Y.postConstruct(),oe("design:type",Function),oe("design:paramtypes",[]),oe("design:returntype",void 0)],t.EventService.prototype,"init",null),t.EventService=ie([lt()],t.EventService),t.OffscreenCanvasCreator=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),t.OffscreenCanvasCreator=ie([lt()],t.OffscreenCanvasCreator);var Qc={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},tl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,el=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]|[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]|[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]|[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,nl=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]|[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]|[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]|[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/;t.TextService=function(){function t(){var t=this;this.cache={},this.offscreenCanvas=void 0,this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!nl.exec(n)&&!el.exec(e))},this.trimByKinsokuShorui=function(t){var e=[].concat(t),n=e[e.length-2];if(!n)return t;var i=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=i+e[e.length-1],e}}var e=t.prototype;return e.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},i=this.offscreenCanvas.getOrCreateCanvas(e),r=this.offscreenCanvas.getOrCreateContext(e);r.font=t;var o=Qc.MetricsString+Qc.BaselineSymbol,a=Math.ceil(r.measureText(o).width),s=Math.ceil(r.measureText(Qc.BaselineSymbol).width),u=Qc.HeightMultiplier*s;s=s*Qc.BaselineMultiplier|0,i.width=a,i.height=u,r.fillStyle="#f00",r.fillRect(0,0,a,u),r.font=t,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(o,0,s);var c=r.getImageData(0,0,a||1,u||1).data,l=c.length,h=4*a,p=0,d=0,f=!1;for(p=0;s>p;++p){for(var y=0;h>y;y+=4)if(255!==c[d+y]){f=!0;break}if(f)break;d+=h}for(n.ascent=s-p,d=l-h,f=!1,p=u;p>s;--p){for(var v=0;h>v;v+=4)if(255!==c[d+v]){f=!0;break}if(f)break;d-=h}return n.descent=p-s,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},e.measureText=function(t,e,n){var i=e.fontSize,r=e.wordWrap,o=e.lineHeight,a=void 0===o?0:o,s=e.lineWidth,u=e.textBaseline,c=e.textAlign,l=e.letterSpacing,h=void 0===l?0:l,p=e.leading,d=void 0===p?0:p,f=Cu(e),y=this.measureFont(f,n);0===y.fontSize&&(y.fontSize=i.value,y.ascent=i.value);var v=this.offscreenCanvas.getOrCreateContext(n);v.font=f;for(var g=(r?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),m=Array(g.length),T=0,b=0;g.length>b;b++){var E=v.measureText(g[b]).width+(g[b].length-1)*h;m[b]=E,T=Math.max(T,E)}var S=T+s.value,k=a||y.fontSize+s.value,P=Math.max(k,y.fontSize+s.value)+(g.length-1)*(k+d),x=0;return"middle"===u.value?x=-P/2:"bottom"===u.value||"alphabetic"===u.value||"ideographic"===u.value?x=-P:"top"!==u.value&&"hanging"!==u.value||(x=0),{font:f,width:S,height:P,lines:g,lineWidths:m,lineHeight:k+=d,maxLineWidth:T,fontProperties:y,lineMetrics:m.map((function(t,e){var n=0;return"center"===c.value?n-=t/2:"right"!==c.value&&"end"!==c.value||(n-=t),new Pn(n-s.value/2,x+e*k,t+s.value,k)}))}},e.wordWrap=function(t,e,n){var i=this,r=e.wordWrapWidth,o=void 0===r?0:r,a=e.letterSpacing,s=void 0===a?0:a,u=this.offscreenCanvas.getOrCreateContext(n),c=o+s,l=[],h=0,p=0,d={},f=function(t){return i.getFromCache(t,s,d,u)};return Array.from(t).forEach((function(e,n){var r=t[n-1],o=t[n+1],a=f(e);if(i.isNewline(e))return h++,p=0,void(l[h]="");if(p>0&&p+a>c){if(h++,p=0,l[h]="",i.isBreakingSpace(e))return;i.canBreakInLastChar(e)||(l=i.trimToBreakable(l),p=i.sumTextWidthByCache(l[h]||"",d)),i.shouldBreakByKinsokuShorui(e,o)&&(l=i.trimByKinsokuShorui(l),p+=f(r||""))}p+=a,l[h]=(l[h]||"")+e})),l.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&Qc.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.isNewline=function(t){return"string"==typeof t&&Qc.Newlines.indexOf(t.charCodeAt(0))>=0},e.trimToBreakable=function(t){var e=[].concat(t),n=e[e.length-2],i=this.findBreakableIndex(n);if(-1===i||!n)return e;var r=n.slice(i,i+1),o=i+(this.isBreakingSpace(r)?0:1);return e[e.length-1]+=n.slice(i+1,n.length),e[e.length-2]=n.slice(0,o),e},e.canBreakInLastChar=function(t){return!t||!tl.test(t)},e.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},e.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!tl.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,i){var r=n[t];if("number"!=typeof r){var o=t.length*e;r=i.measureText(t).width+o,n[t]=r}return r},t}(),ie([ht(t.OffscreenCanvasCreator),oe("design:type",t.OffscreenCanvasCreator)],t.TextService.prototype,"offscreenCanvas",void 0),t.TextService=ie([lt()],t.TextService),t.CircleUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n.value,height:2*n.value}},t}(),t.CircleUpdater=ie([lt({token:{token:Zn,named:t.Shape.CIRCLE}})],t.CircleUpdater),t.EllipseUpdater=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx.value,height:2*t.ry.value}},t}(),t.EllipseUpdater=ie([lt({token:{token:Zn,named:t.Shape.ELLIPSE}})],t.EllipseUpdater),t.RectUpdater=function(){function e(){}return e.prototype.update=function(e,n){var i=e.img,r=e.width,o=e.height,a=0,s=0;return r instanceof Di&&r.unit===t.UnitType.kPixels&&(a=r.value),o instanceof Di&&o.unit===t.UnitType.kPixels&&(s=o.value),i&&!bu(i)&&(a||(a=i.width),s||(s=i.height)),r instanceof Di&&(r.value=a),o instanceof Di&&(o.value=s),{width:a,height:s}},e}(),t.RectUpdater=ie([lt({token:[{token:Zn,named:t.Shape.RECT},{token:Zn,named:t.Shape.IMAGE},{token:Zn,named:t.Shape.GROUP}]})],t.RectUpdater),t.TextUpdater=function(){function t(){this.textService=void 0}var e=t.prototype;return e.isReadyToMeasure=function(t,e){return t.text&&t.fontSize&&t.fontStyle&&t.fontWeight&&t.fontVariant&&t.textAlign&&t.textBaseline},e.update=function(t,e){var n,i,r=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,u=t.dx,c=t.dy,l=((null==e||null===(n=e.ownerDocument)||void 0===n||null===(i=n.defaultView)||void 0===i?void 0:i.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var h=this.textService.measureText(r,t,l);t.metrics=h;var p=h.lineHeight,d=h.fontProperties,f=we(h.width/2,h.height/2,0),y=[0,1],v=0;"center"===o.value?(v=a.value/2,y=[.5,1]):"right"!==o.value&&"end"!==o.value||(v=a.value,y=[1,1]);var g=0;return"middle"===s.value?g=f[1]:"top"===s.value||"hanging"===s.value?g=2*f[1]:"alphabetic"===s.value?g=p-d.ascent:"bottom"!==s.value&&"ideographic"!==s.value||(g=0),u&&(v+=u.value),c&&(g+=c.value),t.anchor=[new Di(y[0]),new Di(y[1]),new Di(0)],{width:2*f[0],height:2*f[1],offsetX:v,offsetY:g}},t}(),ie([ht(t.TextService),oe("design:type",t.TextService)],t.TextUpdater.prototype,"textService",void 0),t.TextUpdater=ie([lt({token:{token:Zn,named:t.Shape.TEXT}})],t.TextUpdater),t.LineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,i=t.x2,r=t.y2,o=Math.min(e.value,i.value),a=Math.max(e.value,i.value),s=Math.min(n.value,r.value);return{width:a-o,height:Math.max(n.value,r.value)-s}},t}(),t.LineUpdater=ie([lt({token:{token:Zn,named:t.Shape.LINE}})],t.LineUpdater),t.PolylineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,e.map((function(t){return t[0]}))),i=Math.max.apply(Math,e.map((function(t){return t[0]}))),r=Math.min.apply(Math,e.map((function(t){return t[1]})));return{width:i-n,height:Math.max.apply(Math,e.map((function(t){return t[1]})))-r}},t}(),t.PolylineUpdater=ie([lt({token:[{token:Zn,named:t.Shape.POLYLINE},{token:Zn,named:t.Shape.POLYGON}]})],t.PolylineUpdater),t.PathUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),t.PathUpdater=ie([lt({token:{token:Zn,named:t.Shape.PATH}})],t.PathUpdater);var il,rl,ol,al=Ot((function(e){Y.decorate(ct(),ne.EventEmitter),e(t.DisplayObjectPool),e(t.DefaultSceneGraphSelector),e({token:xn,useFactory:function(t){return function(){return t.container.get(wn)}}}),e(t.DefaultSceneGraphService),e(t.OffscreenCanvasCreator),e(t.TextService),e(t.CircleUpdater),e(t.EllipseUpdater),e(t.RectUpdater),e(t.TextUpdater),e(t.LineUpdater),e(t.PolylineUpdater),e(t.PathUpdater),e({token:$n,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Zn,n)&&(e[n]=t.container.getNamed(Zn,n)),e[n]}}}),e(t.LayoutRegistry),e(t.DefaultStyleValueRegistry),e(t.LayoutEngine),e(t.LayoutEdges),e({token:na,useFactory:function(e){return function(n){var i=e.container.createChild();return i.register({token:ia,useValue:n}),i.get(t.LayoutEdges)}}}),e({token:Wo,useFactory:function(e){return function(n){var i=e.container.createChild();i.register(t.LayoutContext),i.register(t.LayoutChildren),i.register({token:Zo,useFactory:function(e){return function(n){var i=e.container.createChild();return i.register({token:Jo,useValue:n}),i.get(t.LayoutChildren)}}}),i.register(t.FragmentResult),i.register({token:Xo,useFactory:function(e){return function(n,i){var r=e.container.createChild();return r.register({token:Ko,useValue:n}),r.register({token:$o,useValue:i}),r.get(t.FragmentResult)}}}),i.register(t.LayoutFragment),i.register({token:oa,useFactory:function(e){return function(n){var i=e.container.createChild();return i.register({token:aa,useValue:n}),i.get(t.LayoutFragment)}}});var r=i.get(Zo),o=i.get(oa),a=i.get(Xo);return i.register({token:qo,useValue:qt({},n,{layoutChildrenFactory:r,layoutFragmentFactory:o,fragmentResultFactory:a})}),i.get(t.LayoutContext)}}})})),sl=r.defineToken("DefaultCamera");(il=t.CameraType||(t.CameraType={}))[il.ORBITING=0]="ORBITING",il[il.EXPLORING=1]="EXPLORING",il[il.TRACKING=2]="TRACKING",(rl=t.CameraTrackingMode||(t.CameraTrackingMode={}))[rl.DEFAULT=0]="DEFAULT",rl[rl.ROTATIONAL=1]="ROTATIONAL",rl[rl.TRANSLATIONAL=2]="TRANSLATIONAL",rl[rl.CINEMATIC=3]="CINEMATIC",(ol=t.CameraProjectionMode||(t.CameraProjectionMode={}))[ol.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",ol[ol.PERSPECTIVE=1]="PERSPECTIVE";var ul={UPDATED:"updated"},cl=Math.PI/180,ll=180/Math.PI,hl=2e-4,pl=function(e){function n(n,i){var r;return void 0===n&&(n=t.CameraType.EXPLORING),void 0===i&&(i=t.CameraTrackingMode.DEFAULT),(r=e.call(this)||this).canvas=void 0,r.matrix=le(),r.right=we(1,0,0),r.up=we(0,1,0),r.forward=we(0,0,1),r.position=we(0,0,1),r.focalPoint=we(0,0,0),r.distanceVector=we(0,0,-1),r.distance=1,r.azimuth=0,r.elevation=0,r.roll=0,r.relAzimuth=0,r.relElevation=0,r.relRoll=0,r.dollyingStep=0,r.maxDistance=1/0,r.minDistance=-1/0,r.zoom=1,r.rotateWorld=!1,r.fov=30,r.near=.1,r.far=1e3,r.aspect=1,r.left=void 0,r.rright=void 0,r.top=void 0,r.bottom=void 0,r.projectionMatrix=le(),r.projectionMatrixInverse=le(),r.jitteredProjectionMatrix=void 0,r.view=void 0,r.enableUpdate=!0,r.type=t.CameraType.EXPLORING,r.trackingMode=t.CameraTrackingMode.DEFAULT,r.projectionMode=t.CameraProjectionMode.PERSPECTIVE,r.frustum=new vn,r.landmarks=[],r.landmarkAnimationID=void 0,r.orthoMatrix=le(),r.setType(n,i),r}Yt(n,e);var i=n.prototype;return i.isOrtho=function(){return this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC},i.getProjectionMode=function(){return this.projectionMode},i.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},i.getPerspectiveInverse=function(){return this.projectionMatrixInverse},i.getFrustum=function(){return this.frustum},i.getPosition=function(){return this.position},i.getFocalPoint=function(){return this.focalPoint},i.getDollyingStep=function(){return this.dollyingStep},i.getNear=function(){return this.near},i.getFar=function(){return this.far},i.getZoom=function(){return this.zoom},i.getOrthoMatrix=function(){return this.orthoMatrix},i.getView=function(){return this.view},i.setEnableUpdate=function(t){this.enableUpdate=t},i.setType=function(e,n){return this.type=e,this.setWorldRotation(this.type===t.CameraType.EXPLORING),this._getAngles(),this.type===t.CameraType.TRACKING&&void 0!==n&&this.setTrackingMode(n),this},i.setProjectionMode=function(t){return this.projectionMode=t,this},i.setTrackingMode=function(e){if(this.type!==t.CameraType.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this},i.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},i.getViewTransform=function(){return de(le(),this.matrix)},i.getWorldTransform=function(){return this.matrix},i.jitterProjectionMatrix=function(t,e){var n,i,r=(n=le(),i=[t,e,0],n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=i[0],n[13]=i[1],n[14]=i[2],n[15]=1,n);this.jitteredProjectionMatrix=fe(le(),r,this.projectionMatrix)},i.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},i.setMatrix=function(t){return this.matrix=t,this._update(),this},i.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},i.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},i.setNear=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this},i.setFar=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this},i.setViewOffset=function(e,n,i,r,o,a){return this.aspect=e/n,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=o,this.view.height=a,this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},i.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},i.setZoom=function(e){return this.zoom=e,this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===t.CameraProjectionMode.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},i.setPerspective=function(e,n,i,r){var o;this.projectionMode=t.CameraProjectionMode.PERSPECTIVE,this.fov=i,this.near=e,this.far=n,this.aspect=r;var a=this.near*Math.tan(.5*cl*this.fov)/this.zoom,s=2*a,u=this.aspect*s,c=-.5*u;if(null===(o=this.view)||void 0===o?void 0:o.enabled){var l=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/l,a-=this.view.offsetY*s/h,u*=this.view.width/l,s*=this.view.height/h}return Yn(this.projectionMatrix,c,c+u,a,a-s,e,this.far),ve(this.projectionMatrix,this.projectionMatrix,we(1,-1,1)),de(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},i.setOrthographic=function(e,n,i,r,o,a){var s;this.projectionMode=t.CameraProjectionMode.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=i,this.bottom=r,this.near=o,this.far=a;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,p=l-u,d=l+u,f=h+c,y=h-c;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var v=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(p+=v*this.view.offsetX)+v*this.view.width,y=(f-=g*this.view.offsetY)-g*this.view.height}return Se(this.projectionMatrix,p,d,y,f,o,a),ve(this.projectionMatrix,this.projectionMatrix,we(1,-1,1)),de(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},i.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var i=jn(t,e,n);return this._setPosition(i),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},i.setFocalPoint=function(e,n,i){void 0===n&&(n=this.focalPoint[1]),void 0===i&&(i=this.focalPoint[2]);var r,o,a,s,u,c,l,h,p,d,f,y,v,g=we(0,1,0);if(this.focalPoint=jn(e,n,i),this.trackingMode===t.CameraTrackingMode.CINEMATIC){var m=Ae(ke(),this.focalPoint,this.position);e=m[0],n=m[1],i=m[2];var T=xe(m),b=Math.asin(n/T)*ll,E=90+Math.atan2(i,e)*ll,S=le();r=S,o=S,s=Math.sin(a=E*cl),u=Math.cos(a),c=o[0],l=o[1],h=o[2],p=o[3],d=o[8],f=o[9],y=o[10],v=o[11],o!==r&&(r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[0]=c*u-d*s,r[1]=l*u-f*s,r[2]=h*u-y*s,r[3]=p*u-v*s,r[8]=c*s+d*u,r[9]=l*s+f*u,r[10]=h*s+y*u,r[11]=p*s+v*u,function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],p=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*r+c*i,t[5]=a*r+l*i,t[6]=s*r+h*i,t[7]=u*r+p*i,t[8]=c*r-o*i,t[9]=l*r-a*i,t[10]=h*r-s*i,t[11]=p*r-u*i}(S,S,b*cl),g=Fe(ke(),[0,1,0],S)}return de(this.matrix,function(t,e,n,i){var r,o,a,s,u,c,l,h,p,d,f=e[0],y=e[1],v=e[2],g=i[0],m=i[1],T=i[2],b=n[0],E=n[1],S=n[2];return se>Math.abs(f-b)&&se>Math.abs(y-E)&&se>Math.abs(v-S)?pe(t):(d=1/Math.hypot(l=f-b,h=y-E,p=v-S),(d=Math.hypot(r=m*(p*=d)-T*(h*=d),o=T*(l*=d)-g*p,a=g*h-m*l))?(r*=d=1/d,o*=d,a*=d):(r=0,o=0,a=0),(d=Math.hypot(s=h*a-p*o,u=p*r-l*a,c=l*o-h*r))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),t[0]=r,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=p,t[11]=0,t[12]=-(r*f+o*y+a*v),t[13]=-(s*f+u*y+c*v),t[14]=-(l*f+h*y+p*v),t[15]=1,t)}(le(),this.position,this.focalPoint,g)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},i.getDistance=function(){return this.distance},i.setDistance=function(t){if(this.distance===t||0>t)return this;this.distance=t,hl>this.distance&&(this.distance=hl),this.dollyingStep=this.distance/100;var e=ke(),n=this.forward,i=this.focalPoint;return e[0]=(t=this.distance)*n[0]+i[0],e[1]=t*n[1]+i[1],e[2]=t*n[2]+i[2],this._setPosition(e),this.triggerUpdate(),this},i.setMaxDistance=function(t){return this.maxDistance=t,this},i.setMinDistance=function(t){return this.minDistance=t,this},i.setAzimuth=function(e){return this.azimuth=Gn(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},i.getAzimuth=function(){return this.azimuth},i.setElevation=function(e){return this.elevation=Gn(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},i.getElevation=function(){return this.elevation},i.setRoll=function(e){return this.roll=Gn(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},i.getRoll=function(){return this.roll},i.rotate=function(e,n,i){if(this.relElevation=Gn(n),this.relAzimuth=Gn(e),this.relRoll=Gn(i),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===t.CameraType.EXPLORING){var r=Xe(Ye(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*cl),o=Xe(Ye(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*cl),a=Xe(Ye(),[0,0,1],this.relRoll*cl),s=Ke(Ye(),o,r);s=Ke(Ye(),s,a);var u=Ee(le(),s);ye(this.matrix,this.matrix,[0,0,-this.distance]),fe(this.matrix,this.matrix,u),ye(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this._update(),this},i.pan=function(t,e){var n=jn(t,e,0),i=Pe(this.position);return Ce(i,i,Oe(ke(),this.right,n[0])),Ce(i,i,Oe(ke(),this.up,n[1])),this._setPosition(i),this.triggerUpdate(),this},i.dolly=function(e){var n,i=this.forward,r=Pe(this.position);return r[0]+=(n=Math.max(Math.min(this.distance+e*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance)*i[0],r[1]+=n*i[1],r[2]+=n*i[2],this._setPosition(r),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getDistance():this.type===t.CameraType.TRACKING&&Ce(this.focalPoint,r,this.distanceVector),this.triggerUpdate(),this},i.createLandmark=function(t,e){void 0===e&&(e={});var i=e.position,r=void 0===i?this.position:i,o=e.focalPoint,a=void 0===o?this.focalPoint:o,s=e.roll,u=e.zoom,c=new n;c.setType(this.type,void 0),c.setPosition(r[0],r[1]||this.position[1],r[2]||this.position[2]),c.setFocalPoint(a[0],a[1]||this.focalPoint[1],a[2]||this.focalPoint[2]),c.setRoll(s||this.roll),c.setZoom(u||this.zoom);var l,h,p={name:t,matrix:(l=c.matrix,h=new ue(16),h[0]=l[0],h[1]=l[1],h[2]=l[2],h[3]=l[3],h[4]=l[4],h[5]=l[5],h[6]=l[6],h[7]=l[7],h[8]=l[8],h[9]=l[9],h[10]=l[10],h[11]=l[11],h[12]=l[12],h[13]=l[13],h[14]=l[14],h[15]=l[15],h),right:Pe(c.right),up:Pe(c.up),forward:Pe(c.forward),position:Pe(c.position),focalPoint:Pe(c.focalPoint),distanceVector:Pe(c.distanceVector),distance:c.distance,dollyingStep:c.dollyingStep,azimuth:c.azimuth,elevation:c.elevation,roll:c.roll,relAzimuth:c.relAzimuth,relElevation:c.relElevation,relRoll:c.relRoll,zoom:c.zoom};return this.landmarks.push(p),p},i.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var i=bu(t)?this.landmarks.find((function(e){return e.name===t})):t;if(i){var r=Ln(e)?{duration:e}:e,o=r.easing,a=void 0===o?"linear":o,s=r.duration,u=void 0===s?100:s,c=r.easingFunction,l=void 0===c?void 0:c,h=r.onfinish,p=void 0===h?void 0:h;if(0===u)return this.syncFromLandmark(i),void(p&&p());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,f=i.position,y=i.focalPoint,v=i.zoom,g=i.roll,m=l||qs(a),T=function(){n.setFocalPoint(y),n.setPosition(f),n.setRoll(g),n.setZoom(v),n.computeMatrix(),n.triggerUpdate(),p&&p()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var i=e-d;if(u<i)T();else{var r,o,a=m(i/u),s=ke(),c=ke();Ue(s,n.focalPoint,y,a),Ue(c,n.position,f,a),o=n.roll*(1-a)+g*a,r=n.zoom*(1-a)+v*a,n.setFocalPoint(s),n.setPosition(c),n.setRoll(o),n.setZoom(r),He(s,y)+He(c,f)>.01?(n.computeMatrix(),n.triggerUpdate(),u>i&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))):T()}}))}},i._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},i.computeMatrix=function(){var e=Xe(Ye(),[0,0,1],this.roll*cl);pe(this.matrix);var n=Xe(Ye(),[1,0,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.elevation*cl),i=Xe(Ye(),[0,1,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.azimuth*cl),r=Ke(Ye(),i,n);r=Ke(Ye(),r,e);var o=Ee(le(),r);this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?(ye(this.matrix,this.matrix,this.focalPoint),fe(this.matrix,this.matrix,o),ye(this.matrix,this.matrix,[0,0,this.distance])):this.type===t.CameraType.TRACKING&&(ye(this.matrix,this.matrix,this.position),fe(this.matrix,this.matrix,o))},i._setPosition=function(t,e,n){this.position=jn(t,e,n);var i=this.matrix;i[12]=this.position[0],i[13]=this.position[1],i[14]=this.position[2],i[15]=1,this._getOrthoMatrix()},i._getAxes=function(){Ne(this.right,jn(qe(We(),[1,0,0,0],this.matrix))),Ne(this.up,jn(qe(We(),[0,1,0,0],this.matrix))),Ne(this.forward,jn(qe(We(),[0,0,1,0],this.matrix))),Re(this.right,this.right),Re(this.up,this.up),Re(this.forward,this.forward)},i._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],i=this.distanceVector[2],r=xe(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===t.CameraType.TRACKING||this.rotateWorld?(this.elevation=Math.asin(n/r)*ll,this.azimuth=Math.atan2(-e,-i)*ll):(this.elevation=-Math.asin(n/r)*ll,this.azimuth=-Math.atan2(-e,-i)*ll)},i._getPosition=function(){Ne(this.position,jn(qe(We(),[0,0,0,1],this.matrix))),this._getDistance()},i._getFocalPoint=function(){var t,e;!function(t,e,n){var i=e[0],r=e[1],o=e[2];t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8]}(this.distanceVector,[0,0,-this.distance],(t=ce(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Ce(this.focalPoint,this.position,this.distanceVector),this._getDistance()},i._getDistance=function(){this.distanceVector=Ae(ke(),this.focalPoint,this.position),this.distance=xe(this.distanceVector),this.dollyingStep=this.distance/100},i._getOrthoMatrix=function(){if(this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC){var e=this.position,n=Xe(Ye(),[0,0,1],-this.roll*Math.PI/180);be(this.orthoMatrix,n,we((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),we(this.zoom,this.zoom,1),e)}},i.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=fe(le(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(ul.UPDATED)}},i.syncFromLandmark=function(t){this.matrix=he(this.matrix,t.matrix),this.right=Ne(this.right,t.right),this.up=Ne(this.up,t.up),this.forward=Ne(this.forward,t.forward),this.position=Ne(this.position,t.position),this.focalPoint=Ne(this.focalPoint,t.focalPoint),this.distanceVector=Ne(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},n}(ne.EventEmitter),dl=function(){function t(t){this.plugins=[],this.config=void 0,this.config=qt({enableDirtyCheck:!0,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(t){this.plugins.push(t)},e.unregisterPlugin=function(t){var e=this.plugins.findIndex((function(e){return e===t}));e>-1&&this.plugins.splice(e,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(t){return this.plugins.find((function(e){return e.name===t}))},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}();let fl=1;const yl="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},vl=Date.now();let gl={},ml=Date.now();const Tl=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-ml,i=n>16?0:16-n,r=fl++;return gl[r]=t,Object.keys(gl).length>1||setTimeout((()=>{ml=e;const t=gl;gl={},Object.keys(t).forEach((e=>t[e](yl.performance&&"function"==typeof yl.performance.now?yl.performance.now():Date.now()-vl)))}),i),r},bl=t=>{delete gl[t]},El=t=>"string"!=typeof t?Tl:""===t?yl.requestAnimationFrame:yl[t+"RequestAnimationFrame"],Sl=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],(t=>!!El(t))),kl=El(Sl),Pl="string"!=typeof(xl=Sl)?bl:""===xl?yl.cancelAnimationFrame:yl[xl+"CancelAnimationFrame"]||yl[xl+"CancelRequestAnimationFrame"];var xl,wl,Nl;yl.requestAnimationFrame=kl,yl.cancelAnimationFrame=Pl,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:kl,cancelAnimationFrame:Pl});var _l,Cl,Al=(wl=function(){function e(){this.canvasConfig=void 0,this.renderingContext=void 0}return e.prototype.apply=function(e){var n=this;e.hooks.dirtycheck.tap(Nl.tag,(function(e){if(e){var i=n.canvasConfig.renderer.getConfig().enableDirtyCheck,r=e.renderable,o=n.renderingContext.renderReasons.has(t.RenderReason.CAMERA_CHANGED);return r.dirty||o||!i&&n.renderingContext.dirty?e:null}return e}))},e}(),wl.tag="DirtyCheck",Nl=wl);ie([ht(ae),oe("design:type",Object)],Al.prototype,"canvasConfig",void 0),ie([ht(Hu),oe("design:type",Object)],Al.prototype,"renderingContext",void 0),Al=Nl=ie([lt({contrib:Jc})],Al);var Ml,Ol,Il=r.defineToken("CullingStrategyContribution"),Rl=(_l=function(){function t(){this.strategyProvider=void 0}return t.prototype.apply=function(t){var e=this.strategyProvider.getContributions();t.hooks.cull.tap(Cl.tag,(function(t){if(t){var n=t.cullable;return n.visible=0===e.length||e.every((function(e){return e.isVisible(t)})),!n.isCulled()&&t.isVisible()?t:null}return t})),t.hooks.afterRender.tap(Cl.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},t}(),_l.tag="Culling",Cl=_l);ie([Bt(Il),oe("design:type",Object)],Rl.prototype,"strategyProvider",void 0),Rl=Cl=ie([lt({contrib:Jc})],Rl);var Dl=(Ml=function(){function e(){this.renderingContext=void 0,this.styleValueRegistry=void 0}return e.prototype.apply=function(e){var n=this,i=function(t){t.target.renderable.dirty=!0,e.dirtify()},r=function(){e.dirtify()},o=function(t){var i=t.target;n.styleValueRegistry.recalc(i),Bu(i),e.dirtify()},a=function(t){Bu(t.target),e.dirtify()};e.hooks.init.tapPromise(Ol.tag,Ht(Gt().mark((function e(){return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.renderingContext.root.addEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.addEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.addEventListener(t.ElementEvent.ATTR_MODIFIED,i),n.renderingContext.root.addEventListener(t.ElementEvent.BOUNDS_CHANGED,r);case 4:case"end":return e.stop()}}),e)})))),e.hooks.destroy.tap(Ol.tag,(function(){n.renderingContext.root.removeEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.removeEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.removeEventListener(t.ElementEvent.ATTR_MODIFIED,i),n.renderingContext.root.removeEventListener(t.ElementEvent.BOUNDS_CHANGED,r)}))},e}(),Ml.tag="Prepare",Ol=Ml);ie([ht(Hu),oe("design:type",Object)],Dl.prototype,"renderingContext",void 0),ie([ht(Kn),oe("design:type",Object)],Dl.prototype,"styleValueRegistry",void 0),Dl=Ol=ie([lt({contrib:Jc})],Dl);var Ll,Ul,Fl=[t.Shape.CIRCLE,t.Shape.ELLIPSE,t.Shape.IMAGE,t.Shape.RECT,t.Shape.LINE,t.Shape.POLYLINE,t.Shape.POLYGON,t.Shape.TEXT,t.Shape.PATH,t.Shape.HTML],Bl=function(){function e(){this.camera=void 0}var n=e.prototype;return n.isVisible=function(e){var n,i,r=e.cullable;if(!r.enable)return!0;var o=e.getRenderBounds();if(hn.isEmpty(o))return!1;var a=this.camera.getFrustum(),s=null===(n=e.parentNode)||void 0===n||null===(i=n.cullable)||void 0===i?void 0:i.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,s||t.Mask.INDETERMINATE,a.planes),r.visible=r.visibilityPlaneMask!==t.Mask.OUTSIDE,r.visible},n.computeVisibilityWithPlaneMask=function(e,n,i,r){if(i===t.Mask.OUTSIDE||i===t.Mask.INSIDE)return i;for(var o=t.Mask.INSIDE,a=Fl.indexOf(e.nodeName)>-1,s=0,u=r.length;u>s;++s){var c=1<<s;if(0!=(i&c)&&(!a||4!==s&&5!==s)){var l=r[s],h=l.normal,p=l.distance;if(0>De(h,n.getPositiveFarPoint(r[s]))+p)return t.Mask.OUTSIDE;0>De(h,n.getNegativeFarPoint(r[s]))+p&&(o|=c)}}return o},e}();ie([ht(sl),oe("design:type",pl)],Bl.prototype,"camera",void 0),Bl=ie([lt({contrib:Il})],Bl);var Vl=(Ll=function(){function t(){var t=this;this.canvasConfig=void 0,this.contextService=void 0,this.renderingService=void 0,this.renderingContext=void 0,this.eventService=void 0,this.autoPreventDefault=!0,this.rootPointerEvent=new hs(null),this.rootWheelEvent=new ps(null),this.onPointerMove=function(e){var n,i,r=null===(n=t.renderingContext.root)||void 0===n||null===(i=n.ownerDocument)||void 0===i?void 0:i.defaultView;if(!r.supportTouchEvent||"touch"!==e.pointerType){for(var o,a=te(t.normalizeToPointerEvent(e,r));!(o=a()).done;){var s=t.bootstrapEvent(t.rootPointerEvent,o.value,r);t.eventService.mapEvent(s)}t.setCursor(t.eventService.cursor)}}}var e=t.prototype;return e.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var t=Ht(Gt().mark((function t(n){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.renderingService.hooks.pick.promise({position:n,picked:[],topmost:!0});case 2:return t.abrupt("return",t.sent.picked[0]||null);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(Ul.tag,(function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap(Ul.tag,(function(t){var i=e.normalizeToPointerEvent(t,n);e.autoPreventDefault&&i[0].isNormalized&&((t.cancelable||!("cancelable"in t))&&t.preventDefault());for(var r,o=te(i);!(r=o()).done;){var a=e.bootstrapEvent(e.rootPointerEvent,r.value,n);e.eventService.mapEvent(a)}e.setCursor(e.eventService.cursor)})),t.hooks.pointerUp.tap(Ul.tag,(function(t){if(!n.supportTouchEvent||"touch"!==t.pointerType){for(var i,r=e.contextService.getDomElement(),o=r&&t.target&&t.target!==r&&r.contains&&!r.contains(t.target)?"outside":"",a=te(e.normalizeToPointerEvent(t,n));!(i=a()).done;){var s=e.bootstrapEvent(e.rootPointerEvent,i.value,n);s.type+=o,e.eventService.mapEvent(s)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerMove.tap(Ul.tag,this.onPointerMove),t.hooks.pointerOver.tap(Ul.tag,this.onPointerMove),t.hooks.pointerOut.tap(Ul.tag,this.onPointerMove)},e.bootstrapEvent=function(t,e,n){t.pointerType=e.pointerType;var i=t;i.view=n,i.originalEvent=null,i.nativeEvent=e,i.pointerId=e.pointerId,i.width=e.width,i.height=e.height,i.isPrimary=e.isPrimary,i.pressure=e.pressure,i.tangentialPressure=e.tangentialPressure,i.tiltX=e.tiltX,i.tiltY=e.tiltY,i.twist=e.twist,this.transferMouseData(i,e);var r=this.eventService.client2Viewport(new kn(e.clientX,e.clientY)),o=r.y;i.viewport.x=r.x,i.viewport.y=o;var a=this.eventService.viewport2Canvas(i.viewport),s=a.y;return i.canvas.x=a.x,i.canvas.y=s,i.global.copyFrom(i.canvas),i.offset.copyFrom(i.canvas),i.isTrusted=e.isTrusted,"pointerleave"===i.type&&(i.type="pointerout"),i.type.startsWith("mouse")&&(i.type=i.type.replace("mouse","pointer")),i.type.startsWith("touch")&&(i.type=Au[i.type]||i.type),i},e.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new kn(t.clientX,t.clientY)),i=n.y;e.viewport.x=n.x,e.viewport.y=i;var r=this.eventService.viewport2Canvas(e.viewport),o=r.y;return e.canvas.x=r.x,e.canvas.y=o,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},e.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},e.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},e.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var i=0;t.changedTouches.length>i;i++){var r=t.changedTouches[i];Rn(r.button)&&(r.button=t.touches.length?1:0),Rn(r.buttons)&&(r.buttons=t.touches.length?1:0),Rn(r.isPrimary)&&(r.isPrimary=1===t.touches.length&&"touchstart"===t.type),Rn(r.width)&&(r.width=r.radiusX||1),Rn(r.height)&&(r.height=r.radiusY||1),Rn(r.tiltX)&&(r.tiltX=0),Rn(r.tiltY)&&(r.tiltY=0),Rn(r.pointerType)&&(r.pointerType="touch"),Rn(r.pointerId)&&(r.pointerId=r.identifier||0),Rn(r.pressure)&&(r.pressure=r.force||.5),Rn(r.twist)&&(r.twist=0),Rn(r.tangentialPressure)&&(r.tangentialPressure=0),r.isNormalized=!0,r.type=t.type,n.push(r)}else if(e.isMouseEvent(t)){var o=t;Rn(o.isPrimary)&&(o.isPrimary=!0),Rn(o.width)&&(o.width=1),Rn(o.height)&&(o.height=1),Rn(o.tiltX)&&(o.tiltX=0),Rn(o.tiltY)&&(o.tiltY=0),Rn(o.pointerType)&&(o.pointerType="mouse"),Rn(o.pointerId)&&(o.pointerId=1),Rn(o.pressure)&&(o.pressure=.5),Rn(o.twist)&&(o.twist=0),Rn(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t}(),Ll.tag="Event",Ul=Ll);ie([ht(ae),oe("design:type",Object)],Vl.prototype,"canvasConfig",void 0),ie([ht(ju),oe("design:type",Object)],Vl.prototype,"contextService",void 0),ie([ht(t.RenderingService),oe("design:type",t.RenderingService)],Vl.prototype,"renderingService",void 0),ie([ht(Hu),oe("design:type",Object)],Vl.prototype,"renderingContext",void 0),ie([ht(t.EventService),oe("design:type",t.EventService)],Vl.prototype,"eventService",void 0),Vl=Ul=ie([lt({contrib:Jc})],Vl);var Gl,jl=Ot((function(e){Rt.register(e,Jc,{cache:!1}),Rt.register(e,Il,{cache:!1}),e(t.RenderingService),e(t.EventService),e(Vl),e(Dl),e(Al),e(Rl),e(Bl)}));(Gl=t.CanvasEvent||(t.CanvasEvent={})).READY="ready",Gl.BEFORE_RENDER="beforerender",Gl.AFTER_RENDER="afterrender",Gl.BEFORE_DESTROY="beforedestroy",Gl.AFTER_DESTROY="afterdestroy",Gl.RESIZE="resize";var Hl=function(e){function n(t){var n;(n=e.call(this)||this).container=Ut.createChild(),n.document=void 0,n.customElements=void 0,n.requestAnimationFrame=void 0,n.cancelAnimationFrame=void 0,n.devicePixelRatio=void 0,n.supportPointerEvent=void 0,n.supportTouchEvent=void 0,n.isTouchEvent=void 0,n.isMouseEvent=void 0,n.Element=Fa,n.frameId=void 0,n.eventService=void 0,n.renderingService=void 0,n.inited=!1,n.readyPromise=void 0,n.resolveReadyPromise=void 0,n.document=new cs,n.document.defaultView=Jt(n),n.customElements=new vu;var i=t.container,r=t.canvas,o=t.offscreenCanvas,a=t.width,s=t.height,u=t.devicePixelRatio,c=t.renderer,l=t.background,h=t.requestAnimationFrame,p=t.cancelAnimationFrame,d=t.createImage,f=t.supportPointerEvent,y=t.supportTouchEvent,v=t.isTouchEvent,g=t.isMouseEvent;Iu(i,Jt(n));var m=a,T=s,b=u;return r&&(b=1>(b=u||Ru&&window.devicePixelRatio||1)?1:Math.ceil(b),m=a||r.width/b,T=s||r.height/b),n.devicePixelRatio=b,n.requestAnimationFrame=null!=h?h:kl.bind(globalThis),n.cancelAnimationFrame=null!=p?p:Pl.bind(globalThis),n.supportTouchEvent=null!=y?y:"ontouchstart"in globalThis,n.supportPointerEvent=null!=f?f:!!globalThis.PointerEvent,n.isTouchEvent=null!=v?v:function(t){return n.supportTouchEvent&&t instanceof globalThis.TouchEvent},n.isMouseEvent=null!=g?g:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!n.supportPointerEvent||!(t instanceof globalThis.PointerEvent))},n.initRenderingContext({container:i,canvas:r,width:m,height:T,renderer:c,offscreenCanvas:o,devicePixelRatio:b,cursor:"default",background:l,createImage:d}),n.initDefaultCamera(m,T),n.initRenderer(c),n}Yt(n,e);var i=n.prototype;return i.initRenderingContext=function(e){var n=this;this.container.register({token:ae,useValue:e}),this.container.register({token:Hu,useValue:{root:this.document.documentElement,renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_INSERTED,(function(t){n.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_REMOVED,(function(t){n.unmountChildren(t.detail.child)}))},i.initDefaultCamera=function(e,n){var i=(new pl).setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0).setOrthographic(e/-2,e/2,n/2,n/-2,.1,1e3);i.canvas=this;var r=this.container.get(Hu);i.on(ul.UPDATED,(function(){r.renderReasons.add(t.RenderReason.CAMERA_CHANGED)})),this.container.register({token:sl,useValue:i})},i.getConfig=function(){return this.container.get(ae)},i.getContainer=function(){return this.container},i.getRoot=function(){return this.document.documentElement},i.getCamera=function(){return this.container.get(sl)},i.getContextService=function(){return this.container.get(ju)},i.getEventService=function(){return this.eventService},i.getRenderingService=function(){return this.renderingService},i.getRenderingContext=function(){return this.container.get(Hu)},i.getStats=function(){return this.getRenderingService().getStats()},i.destroy=function(e){(void 0===e&&(e=!0),this.emit(t.CanvasEvent.BEFORE_DESTROY,(function(){})),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),e&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),this.emit(t.CanvasEvent.AFTER_DESTROY,{})},i.changeSize=function(t,e){this.resize(t,e)},i.resize=function(e,n){var i=this.container.get(ae);i.width=e,i.height=n,this.getContextService().resize(e,n);var r=this.container.get(sl),o=r.getProjectionMode();r.setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0),o===t.CameraProjectionMode.ORTHOGRAPHIC?r.setOrthographic(e/-2,e/2,n/2,n/-2,r.getNear(),r.getFar()):r.setAspect(e/n),this.emit(t.CanvasEvent.RESIZE,{width:e,height:n})},i.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},i.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},i.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},i.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},i.render=function(){(this.emit(t.CanvasEvent.BEFORE_RENDER,{}),this.container.isBound(t.RenderingService))&&this.container.get(t.RenderingService).render(this.getConfig());this.emit(t.CanvasEvent.AFTER_RENDER,{})},i.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},i.initRenderer=function(e){var n=this;if(!e)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(e);var i=this.container.get(ju);this.renderingService=this.container.get(t.RenderingService),this.eventService=this.container.get(t.EventService),i.init(),this.renderingService.init().then((function(){n.emit(t.CanvasEvent.READY,{}),n.readyPromise&&n.resolveReadyPromise(),n.inited=!0})),e.getConfig().enableAutoRendering&&this.run(),this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot())},i.loadCommonContainerModule=function(){this.container.unload(jl),this.container.load(jl,!0)},i.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.init(e.container)}))},i.setRenderer=function(t){var e=this,n=this.getConfig();if(n.renderer!==t){var i=n.renderer;n.renderer=t,this.destroy(!1),null==i||i.getPlugins().reverse().forEach((function(t){t.destroy(e.container)})),this.initRenderer(t)}},i.setCursor=function(t){this.getContextService().applyCursorStyle(t)},i.unmountChildren=function(e){var n=this,i=[];e.forEach((function(t){t.isConnected&&i.push(t)})),i.reverse().forEach((function(e){e instanceof Va&&e.disconnectedCallback&&e.disconnectedCallback(),e.emit(t.ElementEvent.UNMOUNTED,{}),e!==n.document.documentElement&&(e.ownerDocument=null),e.isConnected=!1}))},i.mountChildren=function(e){var n=this;e.forEach((function(e){e.isConnected||(e.ownerDocument=n.document,e.isConnected=!0,e.emit(t.ElementEvent.MOUNTED,{}),e instanceof Va&&e.connectedCallback&&e.connectedCallback())}))},i.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},i.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},i.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},i.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},i.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},i.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},Wt(n,[{key:"ready",get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),n}(Qn);Ut.load(al);var zl=Ut.get(t.LayoutEngine);t.AABB=hn,t.AbstractLayoutDefinition=Qo,t.AbstractRenderer=dl,t.Animation=hi,t.AnimationEffectTiming=Zs,t.AnimationEvent=ci,t.AnimationTimeline=mi,t.BUILT_IN_PROPERTIES=mu,t.BoundingSphere=dn,t.CSS=sa,t.CSSColorValue=Pi,t.CSSGradientValue=Ki,t.CSSKeywordValue=xi,t.CSSMathInvert=Ui,t.CSSMathMax=Hi,t.CSSMathMin=ji,t.CSSMathNegate=Fi,t.CSSMathProduct=Wi,t.CSSMathSum=zi,t.CSSMathValue=Li,t.CSSMathVariadic=Gi,t.CSSNumericValue=Ci,t.CSSNumericValueType=_i,t.CSSPropertyClipPath=Ra,t.CSSPropertyColor=Sa,t.CSSPropertyFilter=ka,t.CSSPropertyLengthOrPercentage=Ta,t.CSSPropertyLengthOrPercentage12=Pa,t.CSSPropertyLengthOrPercentage14=xa,t.CSSPropertyLocalPosition=ba,t.CSSPropertyOffsetDistance=_a,t.CSSPropertyOffsetPath=Na,t.CSSPropertyOpacity=Ea,t.CSSPropertyPath=Oa,t.CSSPropertyPoints=Ia,t.CSSPropertyShadowBlur=wa,t.CSSPropertyText=Da,t.CSSPropertyTextTransform=La,t.CSSPropertyTransform=Aa,t.CSSPropertyTransformOrigin=Ma,t.CSSPropertyZIndex=Ca,t.CSSRGB=Xi,t.CSSStyleValue=ki,t.CSSUnitValue=Di,t.Camera=pl,t.CameraEvent=ul,t.Canvas=Hl,t.CanvasConfig=ae,t.Circle=ja,t.ContextNode=$o,t.ContextService=ju,t.Cullable=oi,t.CustomElement=Va,t.CustomElementRegistry=vu,t.CustomEvent=Jn,t.DCHECK=Mn,t.DCHECK_EQ=On,t.DCHECK_NE=In,t.DELEGATION_SPLITTER=":",t.DefaultCamera=sl,t.Deferred=Lu,t.DisplayObject=Fa,t.Document=cs,t.EasingFunctions=Bs,t.Element=ui,t.Ellipse=za,t.EventTarget=Qn,t.FederatedEvent=Cn,t.FederatedMouseEvent=ls,t.FederatedPointerEvent=hs,t.FederatedWheelEvent=ps,t.FragmentResultFactory=Xo,t.FragmentResultOptions=Ko,t.Frustum=vn,t.Geometry=ei,t.GeometryAABBUpdater=Zn,t.GeometryUpdaterFactory=$n,t.Group=qa,t.HTML=us,t.Image=Xa,t.KeyframeEffect=yu,t.LayoutChildrenFactory=Zo,t.LayoutChildrenOptions=Jo,t.LayoutContextFactory=Wo,t.LayoutContextOptions=qo,t.LayoutEdgesFactory=na,t.LayoutEdgesOptions=ia,t.LayoutFragmentFactory=oa,t.LayoutFragmentOptions=aa,t.LayoutObject=zo,t.Line=$a,t.MOUSE_POINTER_ID=1,t.ManaSyringe=Vt,t.MutationEvent=An,t.MutationObserver=nu,t.MutationRecord=Js,t.Node=ti,t.ObjectTyped=Uu,t.Odeg=Yi,t.Opx=qi,t.PROPERTY_HANDLERS=gu,t.Path=Ja,t.Plane=fn,t.Point=kn,t.Polygon=ts,t.Polyline=ns,t.Ray=Sn,t.Rect=rs,t.Rectangle=Pn,t.Registration=eu,t.Renderable=ni,t.RenderingContext=Hu,t.RenderingPluginContribution=Jc,t.SceneGraphSelector=wn,t.SceneGraphSelectorFactory=xn,t.SceneGraphService=Vu,t.Sortable=ai,t.StyleValueRegistry=Kn,t.TOUCH_TO_POINTER=Au,t.Text=as,t.Transform=ri,t.baseTypeToString=Ni,t.camelCase=Tu,t.clamp=Vn,t.clampedMergeNumbers=jr,t.cleanExistedCanvas=Iu,t.clonePath=Ao,t.compareAnimations=pi,t.convertAngleUnit=Dr,t.convertEffectInput=Eu,t.convertPercentUnit=Fr,t.convertToDash=Es,t.convertToPath=function(e,n){void 0===n&&(n=!0);var i=[];switch(e.nodeName){case t.Shape.LINE:var r=e.parsedStyle;i=function(t,e,n,i){return[["M",t,e],["L",n,i]]}(r.x1.value,r.y1.value,r.x2.value,r.y2.value);break;case t.Shape.CIRCLE:var o=e.parsedStyle,a=o.r;i=Oo(a.value,a.value,o.cx.value,o.cy.value);break;case t.Shape.ELLIPSE:var s=e.parsedStyle;i=Oo(s.rx.value,s.ry.value,s.cx.value,s.cy.value);break;case t.Shape.POLYLINE:case t.Shape.POLYGON:i=function(t,e){var n=t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}));return e&&n.push(["Z"]),n}(e.parsedStyle.points.points,e.nodeName===t.Shape.POLYGON);break;case t.Shape.RECT:var u=e.parsedStyle,c=u.width,l=u.height,h=u.x,p=u.y,d=u.radius,f=d&&d.some((function(t){return 0!==t.value}));i=function(t,e,n,i,r){if(r){var o=r[0],a=r[1],s=r[2],u=r[3];return[["M",n,o+i],o?["A",o,o,0,0,1,o+n,i]:null,["L",t-a+n,i],a?["A",a,a,0,0,1,t+n,a+i]:null,["L",t+n,e-s+i],s?["A",s,s,0,0,1,t-s+n,e+i]:null,["L",u+n,e+i],u?["A",u,u,0,0,1,n,e-u+i]:null,["Z"]].filter((function(t){return t}))}return[["M",n,i],["L",n+t,i],["L",n+t,i+e],["L",n,i+e],["Z"]]}(c.value,l.value,h.value,p.value,f&&d.map((function(t){return t.value})));break;case t.Shape.PATH:var y=e.parsedStyle.path,v=y.zCommandIndexes;i=[].concat(y.curve),v.forEach((function(t,e){i.splice(t+e,1,["Z"])}))}if(i.length)return function(t,e,n){var i;void 0===n&&(n=!0),n&&(i=e.getLocalTransform());var r=e.parsedStyle,o=r.defX,a=void 0===o?0:o,s=r.defY,u=void 0===s?0:s;return t.reduce((function(t,e){var r="";if("M"===e[0]||"L"===e[0]){var o=we(e[1]-a,e[2]-u,0);n&&Fe(o,o,i),r=""+e[0]+o[0]+","+o[1]}else if("Z"===e[0])r=e[0];else if("C"===e[0]){var s=we(e[1]-a,e[2]-u,0),c=we(e[3]-a,e[4]-u,0),l=we(e[5]-a,e[6]-u,0);n&&(Fe(s,s,i),Fe(c,c,i),Fe(l,l,i)),r=""+e[0]+s[0]+","+s[1]+","+c[0]+","+c[1]+","+l[0]+","+l[1]}else if("A"===e[0]){var h=we(e[6]-a,e[7]-u,0);n&&Fe(h,h,i),r=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+h[0]+","+h[1]}return t+r}),"")}(i,e,n)},t.createVec3=jn,t.decompose=Xn,t.deg2rad=function(t){return t*(Math.PI/180)},t.deg2turn=function(t){return t/360},t.dirtifyToRoot=Bu,t.equalSet=function(t,e){if(t.size!==e.size)return!1;for(var n,i=te(t);!(n=i()).done;){if(!e.has(n.value))return!1}return!0},t.equalizeSegments=xo,t.formatAttribute=Nu,t.fromRotationTranslationScale=qn,t.getAngle=Gn,t.getDrawDirection=wo,t.getEasingFunction=Vs,t.getEuler=Wn,t.getPathArea=_o,t.getRotatedCurve=Mo,t.getRotationInRadians=function(t){return Math.atan2(t[1],t[4])},t.getScaling=function(t,e){var n=e[3],i=e[4];return t[0]=Math.hypot(e[0],e[1]),t[1]=Math.hypot(n,i),t},t.getTranslation=function(t,e){return t[0]=e[6],t[1]=e[7],t},t.grad2deg=function(t){return 0>(t%=400)&&(t+=400),t/400*360},t.isBoolean=Fn,t.isBrowser=Ru,t.isComparison=function(e){return e===t.CSSMathOperator.kMin||e===t.CSSMathOperator.kMax||e===t.CSSMathOperator.kClamp},t.isFunction=Un,t.isNil=Dn,t.isNumber=Ln,t.isObject=Bn,t.isString=bu,t.isUndefined=Rn,t.layoutEngine=zl,t.makePerspective=Yn,t.makeQuerablePromise=Du,t.makeTiming=hu,t.mergeColors=_r,t.mergeDimensionList=Ur,t.mergeDimensions=Rr,t.mergeNumberLists=function(t,e){if(t.length==e.length)return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t}]},t.mergeNumbers=Gr,t.mergePaths=Ro,t.mergeTransforms=ya,t.normalizeKeyframes=uu,t.normalizeTimingInput=pu,t.numberToString=Br,t.numericTimingToObject=du,t.parseAngle=Ir,t.parseColor=Nr,t.parseDimension=Cr,t.parseDimensionArray=Lr,t.parseFilter=jo,t.parseLength=Ar,t.parseLengthOrPercentage=Or,t.parseNumber=Vr,t.parseNumberList=function(t){return bu(t)?t.split(" ").map(Vr):t.map(Vr)},t.parseParam=Vo,t.parsePath=Io,t.parsePoints=Do,t.parseTransform=pa,t.parseTransformOrigin=va,t.parserPercentage=Mr,t.rad2deg=Hn,t.reverseCurve=Co,t.setDOMSize=function(t,e,n){Ru&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")},t.sortByZIndex=Fu,t.toFontString=Cu,t.turn2deg=zn,t.typeCheck=Bi,t.unitTypeToBaseType=wi,Object.defineProperty(t,"__esModule",{value:!0})}));