@antv/g 3.5.0-beta.5 → 5.0.3

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 (748) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +0 -546
  3. package/dist/index.umd.js +15 -0
  4. package/es/AbstractRenderer.d.ts +26 -0
  5. package/es/AbstractRenderer.js +42 -0
  6. package/es/Canvas.d.ts +98 -0
  7. package/es/Canvas.js +406 -0
  8. package/es/DisplayObjectPool.d.ts +7 -0
  9. package/es/DisplayObjectPool.js +27 -0
  10. package/es/camera/Camera.d.ts +279 -0
  11. package/es/camera/Camera.js +973 -0
  12. package/es/camera/Landmark.d.ts +28 -0
  13. package/es/camera/Landmark.js +68 -0
  14. package/es/camera/index.d.ts +2 -0
  15. package/es/camera/index.js +2 -0
  16. package/es/canvas-module.d.ts +1 -0
  17. package/es/canvas-module.js +33 -0
  18. package/es/components/Cullable.d.ts +14 -0
  19. package/es/components/Cullable.js +28 -0
  20. package/es/components/Geometry.d.ts +12 -0
  21. package/es/components/Geometry.js +10 -0
  22. package/es/components/Renderable.d.ts +24 -0
  23. package/es/components/Renderable.js +18 -0
  24. package/es/components/Sortable.d.ts +16 -0
  25. package/es/components/Sortable.js +15 -0
  26. package/es/components/Transform.d.ts +29 -0
  27. package/es/components/Transform.js +65 -0
  28. package/es/components/index.d.ts +5 -0
  29. package/es/components/index.js +5 -0
  30. package/es/display-objects/Circle.d.ts +12 -0
  31. package/es/display-objects/Circle.js +26 -0
  32. package/es/display-objects/CustomElement.d.ts +21 -0
  33. package/es/display-objects/CustomElement.js +89 -0
  34. package/es/display-objects/DisplayObject.d.ts +259 -0
  35. package/es/display-objects/DisplayObject.js +855 -0
  36. package/es/display-objects/Ellipse.d.ts +14 -0
  37. package/es/display-objects/Ellipse.js +27 -0
  38. package/es/display-objects/Group.d.ts +6 -0
  39. package/es/display-objects/Group.js +27 -0
  40. package/es/display-objects/HTML.d.ts +36 -0
  41. package/es/display-objects/HTML.js +93 -0
  42. package/es/display-objects/Image.d.ts +16 -0
  43. package/es/display-objects/Image.js +25 -0
  44. package/es/display-objects/Line.d.ts +23 -0
  45. package/es/display-objects/Line.js +56 -0
  46. package/es/display-objects/Path.d.ts +47 -0
  47. package/es/display-objects/Path.js +132 -0
  48. package/es/display-objects/Polygon.d.ts +12 -0
  49. package/es/display-objects/Polygon.js +25 -0
  50. package/es/display-objects/Polyline.d.ts +23 -0
  51. package/es/display-objects/Polyline.js +75 -0
  52. package/es/display-objects/Rect.d.ts +16 -0
  53. package/es/display-objects/Rect.js +26 -0
  54. package/es/display-objects/Text.d.ts +65 -0
  55. package/es/display-objects/Text.js +61 -0
  56. package/es/display-objects/index.d.ts +13 -0
  57. package/es/display-objects/index.js +13 -0
  58. package/es/dom/Animation.d.ts +132 -0
  59. package/es/dom/Animation.js +503 -0
  60. package/es/dom/AnimationEffectTiming.d.ts +58 -0
  61. package/es/dom/AnimationEffectTiming.js +68 -0
  62. package/es/dom/AnimationEvent.d.ts +11 -0
  63. package/es/dom/AnimationEvent.js +34 -0
  64. package/es/dom/AnimationTimeline.d.ts +37 -0
  65. package/es/dom/AnimationTimeline.js +218 -0
  66. package/es/dom/CustomElementRegistry.d.ts +15 -0
  67. package/es/dom/CustomElementRegistry.js +42 -0
  68. package/es/dom/CustomEvent.d.ts +16 -0
  69. package/es/dom/CustomEvent.js +35 -0
  70. package/es/dom/Document.d.ts +59 -0
  71. package/es/dom/Document.js +174 -0
  72. package/es/dom/Element.d.ts +149 -0
  73. package/es/dom/Element.js +491 -0
  74. package/es/dom/EventTarget.d.ts +40 -0
  75. package/es/dom/EventTarget.js +156 -0
  76. package/es/dom/FederatedEvent.d.ts +146 -0
  77. package/es/dom/FederatedEvent.js +232 -0
  78. package/es/dom/FederatedMouseEvent.d.ts +52 -0
  79. package/es/dom/FederatedMouseEvent.js +124 -0
  80. package/es/dom/FederatedPointerEvent.d.ts +69 -0
  81. package/es/dom/FederatedPointerEvent.js +53 -0
  82. package/es/dom/FederatedWheelEvent.d.ts +20 -0
  83. package/es/dom/FederatedWheelEvent.js +27 -0
  84. package/es/dom/KeyframeEffect.d.ts +47 -0
  85. package/es/dom/KeyframeEffect.js +174 -0
  86. package/es/dom/KeyframeList.d.ts +2 -0
  87. package/es/dom/KeyframeList.js +176 -0
  88. package/es/dom/Node.d.ts +106 -0
  89. package/es/dom/Node.js +220 -0
  90. package/es/dom/index.d.ts +17 -0
  91. package/es/dom/index.js +17 -0
  92. package/es/dom/interfaces.d.ts +324 -0
  93. package/es/dom/interfaces.js +32 -0
  94. package/es/global-module.d.ts +2 -0
  95. package/es/global-module.js +173 -0
  96. package/es/index.d.ts +15 -0
  97. package/es/index.js +18 -0
  98. package/es/plugins/CullingPlugin.d.ts +19 -0
  99. package/es/plugins/CullingPlugin.js +79 -0
  100. package/es/plugins/DirtyCheckPlugin.d.ts +10 -0
  101. package/es/plugins/DirtyCheckPlugin.js +52 -0
  102. package/es/plugins/EventPlugin.d.ts +27 -0
  103. package/es/plugins/EventPlugin.js +288 -0
  104. package/es/plugins/FrustumCullingStrategy.d.ts +20 -0
  105. package/es/plugins/FrustumCullingStrategy.js +98 -0
  106. package/es/plugins/PrepareRendererPlugin.d.ts +6 -0
  107. package/es/plugins/PrepareRendererPlugin.js +65 -0
  108. package/es/property-handlers/aabb.d.ts +2 -0
  109. package/es/property-handlers/aabb.js +132 -0
  110. package/es/property-handlers/anchor.d.ts +4 -0
  111. package/es/property-handlers/anchor.js +20 -0
  112. package/es/property-handlers/clipPath.d.ts +19 -0
  113. package/es/property-handlers/clipPath.js +36 -0
  114. package/es/property-handlers/color.d.ts +34 -0
  115. package/es/property-handlers/color.js +253 -0
  116. package/es/property-handlers/dimension.d.ts +18 -0
  117. package/es/property-handlers/dimension.js +123 -0
  118. package/es/property-handlers/filter.d.ts +8 -0
  119. package/es/property-handlers/filter.js +43 -0
  120. package/es/property-handlers/index.d.ts +18 -0
  121. package/es/property-handlers/index.js +18 -0
  122. package/es/property-handlers/interfaces.d.ts +20 -0
  123. package/es/property-handlers/interfaces.js +6 -0
  124. package/es/property-handlers/lineDash.d.ts +1 -0
  125. package/es/property-handlers/lineDash.js +8 -0
  126. package/es/property-handlers/localPosition.d.ts +2 -0
  127. package/es/property-handlers/localPosition.js +9 -0
  128. package/es/property-handlers/numeric.d.ts +5 -0
  129. package/es/property-handlers/numeric.js +34 -0
  130. package/es/property-handlers/offsetDistance.d.ts +5 -0
  131. package/es/property-handlers/offsetDistance.js +20 -0
  132. package/es/property-handlers/offsetPath.d.ts +5 -0
  133. package/es/property-handlers/offsetPath.js +18 -0
  134. package/es/property-handlers/origin.d.ts +11 -0
  135. package/es/property-handlers/origin.js +68 -0
  136. package/es/property-handlers/path.d.ts +4 -0
  137. package/es/property-handlers/path.js +200 -0
  138. package/es/property-handlers/points.d.ts +5 -0
  139. package/es/property-handlers/points.js +23 -0
  140. package/es/property-handlers/transform.d.ts +45 -0
  141. package/es/property-handlers/transform.js +411 -0
  142. package/es/property-handlers/zIndex.d.ts +2 -0
  143. package/es/property-handlers/zIndex.js +16 -0
  144. package/es/services/ContextService.d.ts +12 -0
  145. package/es/services/ContextService.js +5 -0
  146. package/es/services/EventService.d.ts +64 -0
  147. package/es/services/EventService.js +936 -0
  148. package/es/services/RenderingContext.d.ts +28 -0
  149. package/es/services/RenderingContext.js +13 -0
  150. package/es/services/RenderingService.d.ts +52 -0
  151. package/es/services/RenderingService.js +147 -0
  152. package/es/services/SceneGraphSelector.d.ts +20 -0
  153. package/es/services/SceneGraphSelector.js +65 -0
  154. package/es/services/SceneGraphService.d.ts +150 -0
  155. package/es/services/SceneGraphService.js +853 -0
  156. package/es/services/aabb/CircleUpdater.d.ts +10 -0
  157. package/es/services/aabb/CircleUpdater.js +35 -0
  158. package/es/services/aabb/EllipseUpdater.d.ts +10 -0
  159. package/es/services/aabb/EllipseUpdater.js +37 -0
  160. package/es/services/aabb/LineUpdater.d.ts +10 -0
  161. package/es/services/aabb/LineUpdater.js +39 -0
  162. package/es/services/aabb/PathUpdater.d.ts +10 -0
  163. package/es/services/aabb/PathUpdater.js +172 -0
  164. package/es/services/aabb/PolylineUpdater.d.ts +10 -0
  165. package/es/services/aabb/PolylineUpdater.js +48 -0
  166. package/es/services/aabb/RectUpdater.d.ts +10 -0
  167. package/es/services/aabb/RectUpdater.js +55 -0
  168. package/es/services/aabb/TextUpdater.d.ts +13 -0
  169. package/es/services/aabb/TextUpdater.js +81 -0
  170. package/es/services/aabb/index.d.ts +8 -0
  171. package/es/services/aabb/index.js +8 -0
  172. package/es/services/aabb/interfaces.d.ts +16 -0
  173. package/es/services/aabb/interfaces.js +2 -0
  174. package/es/services/index.d.ts +10 -0
  175. package/es/services/index.js +10 -0
  176. package/es/services/text/OffscreenCanvasCreator.d.ts +6 -0
  177. package/es/services/text/OffscreenCanvasCreator.js +47 -0
  178. package/es/services/text/index.d.ts +35 -0
  179. package/es/services/text/index.js +355 -0
  180. package/es/shapes/AABB.d.ts +34 -0
  181. package/es/shapes/AABB.js +217 -0
  182. package/es/shapes/BoundingSphere.d.ts +8 -0
  183. package/es/shapes/BoundingSphere.js +31 -0
  184. package/es/shapes/Frustum.d.ts +16 -0
  185. package/es/shapes/Frustum.js +79 -0
  186. package/es/shapes/Plane.d.ts +14 -0
  187. package/es/shapes/Plane.js +42 -0
  188. package/es/shapes/Point.d.ts +11 -0
  189. package/es/shapes/Point.js +31 -0
  190. package/es/shapes/Polygon.d.ts +9 -0
  191. package/es/shapes/Polygon.js +64 -0
  192. package/es/shapes/Ray.d.ts +24 -0
  193. package/es/shapes/Ray.js +138 -0
  194. package/es/shapes/Rect.d.ts +12 -0
  195. package/es/shapes/Rect.js +24 -0
  196. package/es/shapes/Rectangle.d.ts +12 -0
  197. package/es/shapes/Rectangle.js +20 -0
  198. package/es/shapes/index.d.ts +8 -0
  199. package/es/shapes/index.js +8 -0
  200. package/es/types.d.ts +220 -0
  201. package/es/types.js +17 -0
  202. package/es/utils/animation.d.ts +15 -0
  203. package/es/utils/animation.js +251 -0
  204. package/es/utils/bezier-easing.d.ts +20 -0
  205. package/es/utils/bezier-easing.js +90 -0
  206. package/es/utils/canvas.d.ts +5 -0
  207. package/es/utils/canvas.js +15 -0
  208. package/es/utils/custom-easing.d.ts +73 -0
  209. package/es/utils/custom-easing.js +333 -0
  210. package/es/utils/event.d.ts +11 -0
  211. package/es/utils/event.js +69 -0
  212. package/es/utils/index.d.ts +5 -0
  213. package/es/utils/index.js +5 -0
  214. package/es/utils/interpolation.d.ts +3 -0
  215. package/es/utils/interpolation.js +179 -0
  216. package/es/utils/math.d.ts +24 -0
  217. package/es/utils/math.js +165 -0
  218. package/es/utils/path.d.ts +15 -0
  219. package/es/utils/path.js +330 -0
  220. package/es/utils/raf.d.ts +3 -0
  221. package/es/utils/raf.js +16 -0
  222. package/es/utils/text.d.ts +2 -0
  223. package/es/utils/text.js +32 -0
  224. package/lib/AbstractRenderer.d.ts +26 -0
  225. package/lib/AbstractRenderer.js +49 -0
  226. package/lib/Canvas.d.ts +98 -0
  227. package/lib/Canvas.js +427 -0
  228. package/lib/DisplayObjectPool.d.ts +7 -0
  229. package/lib/DisplayObjectPool.js +35 -0
  230. package/lib/camera/Camera.d.ts +279 -0
  231. package/lib/camera/Camera.js +1046 -0
  232. package/lib/camera/Landmark.d.ts +28 -0
  233. package/lib/camera/Landmark.js +75 -0
  234. package/lib/camera/index.d.ts +2 -0
  235. package/lib/camera/index.js +31 -0
  236. package/lib/canvas-module.d.ts +1 -0
  237. package/lib/canvas-module.js +48 -0
  238. package/lib/components/Cullable.d.ts +14 -0
  239. package/lib/components/Cullable.js +36 -0
  240. package/lib/components/Geometry.d.ts +12 -0
  241. package/lib/components/Geometry.js +17 -0
  242. package/lib/components/Renderable.d.ts +24 -0
  243. package/lib/components/Renderable.js +25 -0
  244. package/lib/components/Sortable.d.ts +16 -0
  245. package/lib/components/Sortable.js +22 -0
  246. package/lib/components/Transform.d.ts +29 -0
  247. package/lib/components/Transform.js +72 -0
  248. package/lib/components/index.d.ts +5 -0
  249. package/lib/components/index.js +70 -0
  250. package/lib/display-objects/Circle.d.ts +12 -0
  251. package/lib/display-objects/Circle.js +34 -0
  252. package/lib/display-objects/CustomElement.d.ts +21 -0
  253. package/lib/display-objects/CustomElement.js +97 -0
  254. package/lib/display-objects/DisplayObject.d.ts +259 -0
  255. package/lib/display-objects/DisplayObject.js +877 -0
  256. package/lib/display-objects/Ellipse.d.ts +14 -0
  257. package/lib/display-objects/Ellipse.js +35 -0
  258. package/lib/display-objects/Group.d.ts +6 -0
  259. package/lib/display-objects/Group.js +36 -0
  260. package/lib/display-objects/HTML.d.ts +36 -0
  261. package/lib/display-objects/HTML.js +105 -0
  262. package/lib/display-objects/Image.d.ts +16 -0
  263. package/lib/display-objects/Image.js +33 -0
  264. package/lib/display-objects/Line.d.ts +23 -0
  265. package/lib/display-objects/Line.js +68 -0
  266. package/lib/display-objects/Path.d.ts +47 -0
  267. package/lib/display-objects/Path.js +143 -0
  268. package/lib/display-objects/Polygon.d.ts +12 -0
  269. package/lib/display-objects/Polygon.js +33 -0
  270. package/lib/display-objects/Polyline.d.ts +23 -0
  271. package/lib/display-objects/Polyline.js +85 -0
  272. package/lib/display-objects/Rect.d.ts +16 -0
  273. package/lib/display-objects/Rect.js +34 -0
  274. package/lib/display-objects/Text.d.ts +65 -0
  275. package/lib/display-objects/Text.js +69 -0
  276. package/lib/display-objects/index.d.ts +13 -0
  277. package/lib/display-objects/index.js +174 -0
  278. package/lib/dom/Animation.d.ts +132 -0
  279. package/lib/dom/Animation.js +511 -0
  280. package/lib/dom/AnimationEffectTiming.d.ts +58 -0
  281. package/lib/dom/AnimationEffectTiming.js +75 -0
  282. package/lib/dom/AnimationEvent.d.ts +11 -0
  283. package/lib/dom/AnimationEvent.js +42 -0
  284. package/lib/dom/AnimationTimeline.d.ts +37 -0
  285. package/lib/dom/AnimationTimeline.js +230 -0
  286. package/lib/dom/CustomElementRegistry.d.ts +15 -0
  287. package/lib/dom/CustomElementRegistry.js +50 -0
  288. package/lib/dom/CustomEvent.d.ts +16 -0
  289. package/lib/dom/CustomEvent.js +42 -0
  290. package/lib/dom/Document.d.ts +59 -0
  291. package/lib/dom/Document.js +184 -0
  292. package/lib/dom/Element.d.ts +149 -0
  293. package/lib/dom/Element.js +505 -0
  294. package/lib/dom/EventTarget.d.ts +40 -0
  295. package/lib/dom/EventTarget.js +170 -0
  296. package/lib/dom/FederatedEvent.d.ts +146 -0
  297. package/lib/dom/FederatedEvent.js +239 -0
  298. package/lib/dom/FederatedMouseEvent.d.ts +52 -0
  299. package/lib/dom/FederatedMouseEvent.js +133 -0
  300. package/lib/dom/FederatedPointerEvent.d.ts +69 -0
  301. package/lib/dom/FederatedPointerEvent.js +61 -0
  302. package/lib/dom/FederatedWheelEvent.d.ts +20 -0
  303. package/lib/dom/FederatedWheelEvent.js +35 -0
  304. package/lib/dom/KeyframeEffect.d.ts +47 -0
  305. package/lib/dom/KeyframeEffect.js +192 -0
  306. package/lib/dom/KeyframeList.d.ts +2 -0
  307. package/lib/dom/KeyframeList.js +183 -0
  308. package/lib/dom/Node.d.ts +106 -0
  309. package/lib/dom/Node.js +228 -0
  310. package/lib/dom/index.d.ts +17 -0
  311. package/lib/dom/index.js +226 -0
  312. package/lib/dom/interfaces.d.ts +324 -0
  313. package/lib/dom/interfaces.js +40 -0
  314. package/lib/global-module.d.ts +2 -0
  315. package/lib/global-module.js +192 -0
  316. package/lib/index.d.ts +14 -12
  317. package/lib/index.js +203 -24
  318. package/lib/plugins/CullingPlugin.d.ts +19 -0
  319. package/lib/plugins/CullingPlugin.js +90 -0
  320. package/lib/plugins/DirtyCheckPlugin.d.ts +10 -0
  321. package/lib/plugins/DirtyCheckPlugin.js +60 -0
  322. package/lib/plugins/EventPlugin.d.ts +27 -0
  323. package/lib/plugins/EventPlugin.js +297 -0
  324. package/lib/plugins/FrustumCullingStrategy.d.ts +20 -0
  325. package/lib/plugins/FrustumCullingStrategy.js +110 -0
  326. package/lib/plugins/PrepareRendererPlugin.d.ts +6 -0
  327. package/lib/plugins/PrepareRendererPlugin.js +73 -0
  328. package/lib/property-handlers/aabb.d.ts +2 -0
  329. package/lib/property-handlers/aabb.js +148 -0
  330. package/lib/property-handlers/anchor.d.ts +4 -0
  331. package/lib/property-handlers/anchor.js +32 -0
  332. package/lib/property-handlers/clipPath.d.ts +19 -0
  333. package/lib/property-handlers/clipPath.js +43 -0
  334. package/lib/property-handlers/color.d.ts +34 -0
  335. package/lib/property-handlers/color.js +274 -0
  336. package/lib/property-handlers/dimension.d.ts +18 -0
  337. package/lib/property-handlers/dimension.js +144 -0
  338. package/lib/property-handlers/filter.d.ts +8 -0
  339. package/lib/property-handlers/filter.js +56 -0
  340. package/lib/property-handlers/index.d.ts +18 -0
  341. package/lib/property-handlers/index.js +226 -0
  342. package/lib/property-handlers/interfaces.d.ts +20 -0
  343. package/lib/property-handlers/interfaces.js +18 -0
  344. package/lib/property-handlers/lineDash.d.ts +1 -0
  345. package/lib/property-handlers/lineDash.js +15 -0
  346. package/lib/property-handlers/localPosition.d.ts +2 -0
  347. package/lib/property-handlers/localPosition.js +16 -0
  348. package/lib/property-handlers/numeric.d.ts +5 -0
  349. package/lib/property-handlers/numeric.js +50 -0
  350. package/lib/property-handlers/offsetDistance.d.ts +5 -0
  351. package/lib/property-handlers/offsetDistance.js +27 -0
  352. package/lib/property-handlers/offsetPath.d.ts +5 -0
  353. package/lib/property-handlers/offsetPath.js +25 -0
  354. package/lib/property-handlers/origin.d.ts +11 -0
  355. package/lib/property-handlers/origin.js +79 -0
  356. package/lib/property-handlers/path.d.ts +4 -0
  357. package/lib/property-handlers/path.js +214 -0
  358. package/lib/property-handlers/points.d.ts +5 -0
  359. package/lib/property-handlers/points.js +33 -0
  360. package/lib/property-handlers/transform.d.ts +45 -0
  361. package/lib/property-handlers/transform.js +426 -0
  362. package/lib/property-handlers/zIndex.d.ts +2 -0
  363. package/lib/property-handlers/zIndex.js +23 -0
  364. package/lib/services/ContextService.d.ts +12 -0
  365. package/lib/services/ContextService.js +15 -0
  366. package/lib/services/EventService.d.ts +64 -0
  367. package/lib/services/EventService.js +960 -0
  368. package/lib/services/RenderingContext.d.ts +28 -0
  369. package/lib/services/RenderingContext.js +22 -0
  370. package/lib/services/RenderingService.d.ts +52 -0
  371. package/lib/services/RenderingService.js +159 -0
  372. package/lib/services/SceneGraphSelector.d.ts +20 -0
  373. package/lib/services/SceneGraphSelector.js +77 -0
  374. package/lib/services/SceneGraphService.d.ts +150 -0
  375. package/lib/services/SceneGraphService.js +902 -0
  376. package/lib/services/aabb/CircleUpdater.d.ts +10 -0
  377. package/lib/services/aabb/CircleUpdater.js +45 -0
  378. package/lib/services/aabb/EllipseUpdater.d.ts +10 -0
  379. package/lib/services/aabb/EllipseUpdater.js +47 -0
  380. package/lib/services/aabb/LineUpdater.d.ts +10 -0
  381. package/lib/services/aabb/LineUpdater.js +49 -0
  382. package/lib/services/aabb/PathUpdater.d.ts +10 -0
  383. package/lib/services/aabb/PathUpdater.js +183 -0
  384. package/lib/services/aabb/PolylineUpdater.d.ts +10 -0
  385. package/lib/services/aabb/PolylineUpdater.js +58 -0
  386. package/lib/services/aabb/RectUpdater.d.ts +10 -0
  387. package/lib/services/aabb/RectUpdater.js +66 -0
  388. package/lib/services/aabb/TextUpdater.d.ts +13 -0
  389. package/lib/services/aabb/TextUpdater.js +93 -0
  390. package/lib/services/aabb/index.d.ts +8 -0
  391. package/lib/services/aabb/index.js +84 -0
  392. package/lib/services/aabb/interfaces.d.ts +16 -0
  393. package/lib/services/aabb/interfaces.js +10 -0
  394. package/lib/services/index.d.ts +10 -0
  395. package/lib/services/index.js +122 -0
  396. package/lib/services/text/OffscreenCanvasCreator.d.ts +6 -0
  397. package/lib/services/text/OffscreenCanvasCreator.js +55 -0
  398. package/lib/services/text/index.d.ts +35 -0
  399. package/lib/services/text/index.js +364 -0
  400. package/lib/shapes/AABB.d.ts +34 -0
  401. package/lib/shapes/AABB.js +235 -0
  402. package/lib/shapes/BoundingSphere.d.ts +8 -0
  403. package/lib/shapes/BoundingSphere.js +41 -0
  404. package/lib/shapes/Frustum.d.ts +16 -0
  405. package/lib/shapes/Frustum.js +96 -0
  406. package/lib/shapes/Plane.d.ts +14 -0
  407. package/lib/shapes/Plane.js +51 -0
  408. package/lib/shapes/Point.d.ts +11 -0
  409. package/lib/shapes/Point.js +38 -0
  410. package/lib/shapes/Polygon.d.ts +9 -0
  411. package/lib/shapes/Polygon.js +71 -0
  412. package/lib/shapes/Ray.d.ts +24 -0
  413. package/lib/shapes/Ray.js +169 -0
  414. package/lib/shapes/Rect.d.ts +12 -0
  415. package/lib/shapes/Rect.js +31 -0
  416. package/lib/shapes/Rectangle.d.ts +12 -0
  417. package/lib/shapes/Rectangle.js +27 -0
  418. package/lib/shapes/index.d.ts +8 -13
  419. package/lib/shapes/index.js +108 -28
  420. package/lib/types.d.ts +220 -0
  421. package/lib/types.js +25 -0
  422. package/lib/utils/animation.d.ts +15 -0
  423. package/lib/utils/animation.js +275 -0
  424. package/lib/utils/bezier-easing.d.ts +20 -0
  425. package/lib/utils/bezier-easing.js +128 -0
  426. package/lib/utils/canvas.d.ts +5 -0
  427. package/lib/utils/canvas.js +21 -0
  428. package/lib/utils/custom-easing.d.ts +73 -0
  429. package/lib/utils/custom-easing.js +416 -0
  430. package/lib/utils/event.d.ts +11 -0
  431. package/lib/utils/event.js +88 -0
  432. package/lib/utils/index.d.ts +5 -0
  433. package/lib/utils/index.js +70 -0
  434. package/lib/utils/interpolation.d.ts +3 -0
  435. package/lib/utils/interpolation.js +194 -0
  436. package/lib/utils/math.d.ts +24 -0
  437. package/lib/utils/math.js +192 -0
  438. package/lib/utils/path.d.ts +15 -0
  439. package/lib/utils/path.js +356 -0
  440. package/lib/utils/raf.d.ts +3 -0
  441. package/lib/utils/raf.js +22 -0
  442. package/lib/utils/text.d.ts +2 -0
  443. package/lib/utils/text.js +41 -0
  444. package/package.json +35 -92
  445. package/dist/g.min.js +0 -17
  446. package/dist/g.min.js.map +0 -1
  447. package/esm/canvas.d.ts +0 -46
  448. package/esm/canvas.js +0 -380
  449. package/esm/canvas.js.map +0 -1
  450. package/esm/core/attribute.d.ts +0 -49
  451. package/esm/core/attribute.js +0 -277
  452. package/esm/core/attribute.js.map +0 -1
  453. package/esm/core/base.d.ts +0 -32
  454. package/esm/core/base.js +0 -190
  455. package/esm/core/base.js.map +0 -1
  456. package/esm/core/bbox.d.ts +0 -22
  457. package/esm/core/bbox.js +0 -34
  458. package/esm/core/bbox.js.map +0 -1
  459. package/esm/core/element.d.ts +0 -19
  460. package/esm/core/element.js +0 -203
  461. package/esm/core/element.js.map +0 -1
  462. package/esm/core/group.d.ts +0 -72
  463. package/esm/core/group.js +0 -437
  464. package/esm/core/group.js.map +0 -1
  465. package/esm/core/shape.d.ts +0 -35
  466. package/esm/core/shape.js +0 -158
  467. package/esm/core/shape.js.map +0 -1
  468. package/esm/core/timeline.d.ts +0 -15
  469. package/esm/core/timeline.js +0 -179
  470. package/esm/core/timeline.js.map +0 -1
  471. package/esm/event.d.ts +0 -25
  472. package/esm/event.js +0 -37
  473. package/esm/event.js.map +0 -1
  474. package/esm/index.d.ts +0 -13
  475. package/esm/index.js +0 -14
  476. package/esm/index.js.map +0 -1
  477. package/esm/interface.d.ts +0 -18
  478. package/esm/interface.js +0 -1
  479. package/esm/interface.js.map +0 -1
  480. package/esm/renderers/canvas/index.d.ts +0 -1
  481. package/esm/renderers/canvas/index.js +0 -2
  482. package/esm/renderers/canvas/index.js.map +0 -1
  483. package/esm/renderers/canvas/painter.d.ts +0 -17
  484. package/esm/renderers/canvas/painter.js +0 -152
  485. package/esm/renderers/canvas/painter.js.map +0 -1
  486. package/esm/renderers/canvas/util.d.ts +0 -2
  487. package/esm/renderers/canvas/util.js +0 -187
  488. package/esm/renderers/canvas/util.js.map +0 -1
  489. package/esm/renderers/index.d.ts +0 -3
  490. package/esm/renderers/index.js +0 -4
  491. package/esm/renderers/index.js.map +0 -1
  492. package/esm/renderers/svg/defs/arrow.d.ts +0 -15
  493. package/esm/renderers/svg/defs/arrow.js +0 -68
  494. package/esm/renderers/svg/defs/arrow.js.map +0 -1
  495. package/esm/renderers/svg/defs/clip.d.ts +0 -12
  496. package/esm/renderers/svg/defs/clip.js +0 -29
  497. package/esm/renderers/svg/defs/clip.js.map +0 -1
  498. package/esm/renderers/svg/defs/gradient.d.ts +0 -10
  499. package/esm/renderers/svg/defs/gradient.js +0 -117
  500. package/esm/renderers/svg/defs/gradient.js.map +0 -1
  501. package/esm/renderers/svg/defs/pattern.d.ts +0 -10
  502. package/esm/renderers/svg/defs/pattern.js +0 -46
  503. package/esm/renderers/svg/defs/pattern.js.map +0 -1
  504. package/esm/renderers/svg/defs/shadow.d.ts +0 -13
  505. package/esm/renderers/svg/defs/shadow.js +0 -62
  506. package/esm/renderers/svg/defs/shadow.js.map +0 -1
  507. package/esm/renderers/svg/defs.d.ts +0 -18
  508. package/esm/renderers/svg/defs.js +0 -90
  509. package/esm/renderers/svg/defs.js.map +0 -1
  510. package/esm/renderers/svg/get-shape.d.ts +0 -1
  511. package/esm/renderers/svg/get-shape.js +0 -28
  512. package/esm/renderers/svg/get-shape.js.map +0 -1
  513. package/esm/renderers/svg/index.d.ts +0 -2
  514. package/esm/renderers/svg/index.js +0 -3
  515. package/esm/renderers/svg/index.js.map +0 -1
  516. package/esm/renderers/svg/painter.d.ts +0 -32
  517. package/esm/renderers/svg/painter.js +0 -695
  518. package/esm/renderers/svg/painter.js.map +0 -1
  519. package/esm/shapes/arc.d.ts +0 -25
  520. package/esm/shapes/arc.js +0 -107
  521. package/esm/shapes/arc.js.map +0 -1
  522. package/esm/shapes/circle.d.ts +0 -17
  523. package/esm/shapes/circle.js +0 -62
  524. package/esm/shapes/circle.js.map +0 -1
  525. package/esm/shapes/dom.d.ts +0 -10
  526. package/esm/shapes/dom.js +0 -35
  527. package/esm/shapes/dom.js.map +0 -1
  528. package/esm/shapes/ellipse.d.ts +0 -18
  529. package/esm/shapes/ellipse.js +0 -88
  530. package/esm/shapes/ellipse.js.map +0 -1
  531. package/esm/shapes/fan.d.ts +0 -21
  532. package/esm/shapes/fan.js +0 -151
  533. package/esm/shapes/fan.js.map +0 -1
  534. package/esm/shapes/image.d.ts +0 -24
  535. package/esm/shapes/image.js +0 -154
  536. package/esm/shapes/image.js.map +0 -1
  537. package/esm/shapes/index.d.ts +0 -13
  538. package/esm/shapes/index.js +0 -14
  539. package/esm/shapes/index.js.map +0 -1
  540. package/esm/shapes/interface.d.ts +0 -3
  541. package/esm/shapes/interface.js +0 -1
  542. package/esm/shapes/interface.js.map +0 -1
  543. package/esm/shapes/line.d.ts +0 -22
  544. package/esm/shapes/line.js +0 -70
  545. package/esm/shapes/line.js.map +0 -1
  546. package/esm/shapes/marker/index.d.ts +0 -30
  547. package/esm/shapes/marker/index.js +0 -90
  548. package/esm/shapes/marker/index.js.map +0 -1
  549. package/esm/shapes/marker/symbols.d.ts +0 -14
  550. package/esm/shapes/marker/symbols.js +0 -39
  551. package/esm/shapes/marker/symbols.js.map +0 -1
  552. package/esm/shapes/math/arc.d.ts +0 -6
  553. package/esm/shapes/math/arc.js +0 -113
  554. package/esm/shapes/math/arc.js.map +0 -1
  555. package/esm/shapes/math/cubic.d.ts +0 -7
  556. package/esm/shapes/math/cubic.js +0 -141
  557. package/esm/shapes/math/cubic.js.map +0 -1
  558. package/esm/shapes/math/ellipse.d.ts +0 -4
  559. package/esm/shapes/math/ellipse.js +0 -13
  560. package/esm/shapes/math/ellipse.js.map +0 -1
  561. package/esm/shapes/math/line.d.ts +0 -5
  562. package/esm/shapes/math/line.js +0 -23
  563. package/esm/shapes/math/line.js.map +0 -1
  564. package/esm/shapes/math/quadratic.d.ts +0 -5
  565. package/esm/shapes/math/quadratic.js +0 -74
  566. package/esm/shapes/math/quadratic.js.map +0 -1
  567. package/esm/shapes/path.d.ts +0 -25
  568. package/esm/shapes/path.js +0 -270
  569. package/esm/shapes/path.js.map +0 -1
  570. package/esm/shapes/polygon.d.ts +0 -15
  571. package/esm/shapes/polygon.js +0 -103
  572. package/esm/shapes/polygon.js.map +0 -1
  573. package/esm/shapes/polyline.d.ts +0 -24
  574. package/esm/shapes/polyline.js +0 -171
  575. package/esm/shapes/polyline.js.map +0 -1
  576. package/esm/shapes/rect.d.ts +0 -19
  577. package/esm/shapes/rect.js +0 -107
  578. package/esm/shapes/rect.js.map +0 -1
  579. package/esm/shapes/text.d.ts +0 -35
  580. package/esm/shapes/text.js +0 -262
  581. package/esm/shapes/text.js.map +0 -1
  582. package/esm/shapes/util/arrow.d.ts +0 -3
  583. package/esm/shapes/util/arrow.js +0 -131
  584. package/esm/shapes/util/arrow.js.map +0 -1
  585. package/esm/shapes/util/inside.d.ts +0 -9
  586. package/esm/shapes/util/inside.js +0 -50
  587. package/esm/shapes/util/inside.js.map +0 -1
  588. package/esm/shapes/util/is-point-in-path-by-ctx.d.ts +0 -2
  589. package/esm/shapes/util/is-point-in-path-by-ctx.js +0 -8
  590. package/esm/shapes/util/is-point-in-path-by-ctx.js.map +0 -1
  591. package/esm/shapes/util/path-segment.d.ts +0 -18
  592. package/esm/shapes/util/path-segment.js +0 -594
  593. package/esm/shapes/util/path-segment.js.map +0 -1
  594. package/esm/util/format.d.ts +0 -7
  595. package/esm/util/format.js +0 -60
  596. package/esm/util/format.js.map +0 -1
  597. package/esm/util/path.d.ts +0 -11
  598. package/esm/util/path.js +0 -1327
  599. package/esm/util/path.js.map +0 -1
  600. package/lib/canvas.d.ts +0 -46
  601. package/lib/canvas.js +0 -382
  602. package/lib/canvas.js.map +0 -1
  603. package/lib/core/attribute.d.ts +0 -49
  604. package/lib/core/attribute.js +0 -279
  605. package/lib/core/attribute.js.map +0 -1
  606. package/lib/core/base.d.ts +0 -32
  607. package/lib/core/base.js +0 -192
  608. package/lib/core/base.js.map +0 -1
  609. package/lib/core/bbox.d.ts +0 -22
  610. package/lib/core/bbox.js +0 -36
  611. package/lib/core/bbox.js.map +0 -1
  612. package/lib/core/element.d.ts +0 -19
  613. package/lib/core/element.js +0 -205
  614. package/lib/core/element.js.map +0 -1
  615. package/lib/core/group.d.ts +0 -72
  616. package/lib/core/group.js +0 -439
  617. package/lib/core/group.js.map +0 -1
  618. package/lib/core/shape.d.ts +0 -35
  619. package/lib/core/shape.js +0 -160
  620. package/lib/core/shape.js.map +0 -1
  621. package/lib/core/timeline.d.ts +0 -15
  622. package/lib/core/timeline.js +0 -181
  623. package/lib/core/timeline.js.map +0 -1
  624. package/lib/event.d.ts +0 -25
  625. package/lib/event.js +0 -39
  626. package/lib/event.js.map +0 -1
  627. package/lib/index.js.map +0 -1
  628. package/lib/interface.d.ts +0 -18
  629. package/lib/interface.js +0 -3
  630. package/lib/interface.js.map +0 -1
  631. package/lib/renderers/canvas/index.d.ts +0 -1
  632. package/lib/renderers/canvas/index.js +0 -5
  633. package/lib/renderers/canvas/index.js.map +0 -1
  634. package/lib/renderers/canvas/painter.d.ts +0 -17
  635. package/lib/renderers/canvas/painter.js +0 -154
  636. package/lib/renderers/canvas/painter.js.map +0 -1
  637. package/lib/renderers/canvas/util.d.ts +0 -2
  638. package/lib/renderers/canvas/util.js +0 -191
  639. package/lib/renderers/canvas/util.js.map +0 -1
  640. package/lib/renderers/index.d.ts +0 -3
  641. package/lib/renderers/index.js +0 -7
  642. package/lib/renderers/index.js.map +0 -1
  643. package/lib/renderers/svg/defs/arrow.d.ts +0 -15
  644. package/lib/renderers/svg/defs/arrow.js +0 -70
  645. package/lib/renderers/svg/defs/arrow.js.map +0 -1
  646. package/lib/renderers/svg/defs/clip.d.ts +0 -12
  647. package/lib/renderers/svg/defs/clip.js +0 -31
  648. package/lib/renderers/svg/defs/clip.js.map +0 -1
  649. package/lib/renderers/svg/defs/gradient.d.ts +0 -10
  650. package/lib/renderers/svg/defs/gradient.js +0 -119
  651. package/lib/renderers/svg/defs/gradient.js.map +0 -1
  652. package/lib/renderers/svg/defs/pattern.d.ts +0 -10
  653. package/lib/renderers/svg/defs/pattern.js +0 -48
  654. package/lib/renderers/svg/defs/pattern.js.map +0 -1
  655. package/lib/renderers/svg/defs/shadow.d.ts +0 -13
  656. package/lib/renderers/svg/defs/shadow.js +0 -64
  657. package/lib/renderers/svg/defs/shadow.js.map +0 -1
  658. package/lib/renderers/svg/defs.d.ts +0 -18
  659. package/lib/renderers/svg/defs.js +0 -92
  660. package/lib/renderers/svg/defs.js.map +0 -1
  661. package/lib/renderers/svg/get-shape.d.ts +0 -1
  662. package/lib/renderers/svg/get-shape.js +0 -31
  663. package/lib/renderers/svg/get-shape.js.map +0 -1
  664. package/lib/renderers/svg/index.d.ts +0 -2
  665. package/lib/renderers/svg/index.js +0 -7
  666. package/lib/renderers/svg/index.js.map +0 -1
  667. package/lib/renderers/svg/painter.d.ts +0 -32
  668. package/lib/renderers/svg/painter.js +0 -697
  669. package/lib/renderers/svg/painter.js.map +0 -1
  670. package/lib/shapes/arc.d.ts +0 -25
  671. package/lib/shapes/arc.js +0 -109
  672. package/lib/shapes/arc.js.map +0 -1
  673. package/lib/shapes/circle.d.ts +0 -17
  674. package/lib/shapes/circle.js +0 -64
  675. package/lib/shapes/circle.js.map +0 -1
  676. package/lib/shapes/dom.d.ts +0 -10
  677. package/lib/shapes/dom.js +0 -37
  678. package/lib/shapes/dom.js.map +0 -1
  679. package/lib/shapes/ellipse.d.ts +0 -18
  680. package/lib/shapes/ellipse.js +0 -90
  681. package/lib/shapes/ellipse.js.map +0 -1
  682. package/lib/shapes/fan.d.ts +0 -21
  683. package/lib/shapes/fan.js +0 -153
  684. package/lib/shapes/fan.js.map +0 -1
  685. package/lib/shapes/image.d.ts +0 -24
  686. package/lib/shapes/image.js +0 -156
  687. package/lib/shapes/image.js.map +0 -1
  688. package/lib/shapes/index.js.map +0 -1
  689. package/lib/shapes/interface.d.ts +0 -3
  690. package/lib/shapes/interface.js +0 -3
  691. package/lib/shapes/interface.js.map +0 -1
  692. package/lib/shapes/line.d.ts +0 -22
  693. package/lib/shapes/line.js +0 -72
  694. package/lib/shapes/line.js.map +0 -1
  695. package/lib/shapes/marker/index.d.ts +0 -30
  696. package/lib/shapes/marker/index.js +0 -92
  697. package/lib/shapes/marker/index.js.map +0 -1
  698. package/lib/shapes/marker/symbols.d.ts +0 -14
  699. package/lib/shapes/marker/symbols.js +0 -41
  700. package/lib/shapes/marker/symbols.js.map +0 -1
  701. package/lib/shapes/math/arc.d.ts +0 -6
  702. package/lib/shapes/math/arc.js +0 -115
  703. package/lib/shapes/math/arc.js.map +0 -1
  704. package/lib/shapes/math/cubic.d.ts +0 -7
  705. package/lib/shapes/math/cubic.js +0 -148
  706. package/lib/shapes/math/cubic.js.map +0 -1
  707. package/lib/shapes/math/ellipse.d.ts +0 -4
  708. package/lib/shapes/math/ellipse.js +0 -19
  709. package/lib/shapes/math/ellipse.js.map +0 -1
  710. package/lib/shapes/math/line.d.ts +0 -5
  711. package/lib/shapes/math/line.js +0 -29
  712. package/lib/shapes/math/line.js.map +0 -1
  713. package/lib/shapes/math/quadratic.d.ts +0 -5
  714. package/lib/shapes/math/quadratic.js +0 -80
  715. package/lib/shapes/math/quadratic.js.map +0 -1
  716. package/lib/shapes/path.d.ts +0 -25
  717. package/lib/shapes/path.js +0 -272
  718. package/lib/shapes/path.js.map +0 -1
  719. package/lib/shapes/polygon.d.ts +0 -15
  720. package/lib/shapes/polygon.js +0 -105
  721. package/lib/shapes/polygon.js.map +0 -1
  722. package/lib/shapes/polyline.d.ts +0 -24
  723. package/lib/shapes/polyline.js +0 -173
  724. package/lib/shapes/polyline.js.map +0 -1
  725. package/lib/shapes/rect.d.ts +0 -19
  726. package/lib/shapes/rect.js +0 -109
  727. package/lib/shapes/rect.js.map +0 -1
  728. package/lib/shapes/text.d.ts +0 -35
  729. package/lib/shapes/text.js +0 -264
  730. package/lib/shapes/text.js.map +0 -1
  731. package/lib/shapes/util/arrow.d.ts +0 -3
  732. package/lib/shapes/util/arrow.js +0 -135
  733. package/lib/shapes/util/arrow.js.map +0 -1
  734. package/lib/shapes/util/inside.d.ts +0 -9
  735. package/lib/shapes/util/inside.js +0 -60
  736. package/lib/shapes/util/inside.js.map +0 -1
  737. package/lib/shapes/util/is-point-in-path-by-ctx.d.ts +0 -2
  738. package/lib/shapes/util/is-point-in-path-by-ctx.js +0 -11
  739. package/lib/shapes/util/is-point-in-path-by-ctx.js.map +0 -1
  740. package/lib/shapes/util/path-segment.d.ts +0 -18
  741. package/lib/shapes/util/path-segment.js +0 -596
  742. package/lib/shapes/util/path-segment.js.map +0 -1
  743. package/lib/util/format.d.ts +0 -7
  744. package/lib/util/format.js +0 -64
  745. package/lib/util/format.js.map +0 -1
  746. package/lib/util/path.d.ts +0 -11
  747. package/lib/util/path.js +0 -1338
  748. package/lib/util/path.js.map +0 -1
@@ -0,0 +1,15 @@
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=65)}([function(t,e,n){"use strict";n.r(e),function(t,r){n.d(e,"Container",(function(){return I})),n.d(e,"Contribution",(function(){return V})),n.d(e,"DefaultContributionProvider",(function(){return j})),n.d(e,"GlobalContainer",(function(){return R})),n.d(e,"Module",(function(){return G})),n.d(e,"OptionSymbol",(function(){return N})),n.d(e,"Provider",(function(){return D})),n.d(e,"Syringe",(function(){return o})),n.d(e,"SyringeModule",(function(){return F})),n.d(e,"Utils",(function(){return a})),n.d(e,"contrib",(function(){return U})),n.d(e,"inject",(function(){return P})),n.d(e,"injectable",(function(){return _})),n.d(e,"named",(function(){return S})),n.d(e,"register",(function(){return k})),n.d(e,"registerSideOption",(function(){return O})),n.d(e,"singleton",(function(){return x})),n.d(e,"transient",(function(){return A}));var i,o,a,s=n(6);function u(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 c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t){return(l="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 h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 p(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t){return function(t){if(Array.isArray(t))return g(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 g(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 g(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.")}
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
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.
12
+
13
+ See the Apache Version 2.0 License for specific language governing permissions
14
+ and limitations under the License.
15
+ ***************************************************************************** */()}function g(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 v(t,e){return e.lifecycle===o.Lifecycle.singleton?function(t){return t.inSingletonScope()}(t):function(t){return t.inTransientScope()}(t)}function m(t,e){t.whenTargetNamed(M(e))}function b(t,e){return e.container.bind(E(t))}function T(t,e){var n=e.container.parent,r=n&&n.isBound(E(t));return e.container.isBound(E(t))&&!r?e.container.rebind(E(t)):e.container.bind(E(t))}function M(t){return a.isDefinedToken(t)?t.symbol:t}function E(t){return a.isDefinedToken(t)?t.symbol:t}n.d(e,"decorate",(function(){return s.decorate})),n.d(e,"optional",(function(){return s.optional})),n.d(e,"postConstruct",(function(){return s.postConstruct})),n.d(e,"unmanaged",(function(){return s.unmanaged})),function(e){!function(n){var i="object"==typeof r?r:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=a(e);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=e: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 R(Object.create(null))}:s?function(){return R({__proto__:null})}:function(){return R({})},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(M(r)){if(!n)return;r=new f,d.set(t,r)}var i=r.get(e);if(M(i)){if(!n)return;i=new f,r.set(e,i)}return i}function g(t,e,n){var r=y(e,n,!1);return!M(r)&&!!r.has(t)}function v(t,e,n){var r=y(e,n,!1);if(!M(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(M(r))return n;for(var i=function(t){var e=N(t,o);if(!P(e))throw new TypeError;var n=e.call(t);if(!w(n))throw new TypeError;return n}(r.keys()),a=0;;){var s=O(i);if(!s)return n.length=a,n;var u=s.value;try{n[a]=u}catch(t){try{C(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 M(t){return void 0===t}function E(t){return null===t}function w(t){return"object"==typeof t?null!==t:"function"==typeof t}function _(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=N(t,i);if(void 0!==r){var o=r.call(t,n);if(w(o))throw new TypeError;return o}return function(t,e){if("string"===e){var n=t.toString;if(P(n))if(!w(i=n.call(t)))return i;if(P(r=t.valueOf))if(!w(i=r.call(t)))return i}else{var r;if(P(r=t.valueOf))if(!w(i=r.call(t)))return i;var i,o=t.toString;if(P(o))if(!w(i=o.call(t)))return i}throw new TypeError}(t,"default"===n?"number":n)}function x(t){var e=_(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function A(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function P(t){return"function"==typeof t}function S(t){return"function"==typeof t}function N(t,e){var n=t[e];if(null!=n){if(!P(n))throw new TypeError;return n}}function O(t){var e=t.next();return!e.done&&e}function C(t){var e=t.return;e&&e.call(t)}function I(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 R(t){return t.__=void 0,delete t.__,t}e("decorate",(function(t,e,n,r){if(M(n)){if(!A(t))throw new TypeError;if(!S(e))throw new TypeError;return function(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!M(r)&&!E(r)){if(!S(r))throw new TypeError;e=r}}return e}(t,e)}if(!A(t))throw new TypeError;if(!w(e))throw new TypeError;if(!w(r)&&!M(r)&&!E(r))throw new TypeError;return E(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(!M(o)&&!E(o)){if(!w(o))throw new TypeError;r=o}}return r}(t,e,n=x(n),r)})),e("metadata",(function(t,e){return function(n,r){if(!w(n))throw new TypeError;if(!M(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(!w(n))throw new TypeError;return M(r)||(r=x(r)),m(t,e,n,r)})),e("hasMetadata",(function(t,e,n){if(!w(e))throw new TypeError;return M(n)||(n=x(n)),function t(e,n,r){if(g(e,n,r))return!0;var i=I(n);return!E(i)&&t(e,i,r)}(t,e,n)})),e("hasOwnMetadata",(function(t,e,n){if(!w(e))throw new TypeError;return M(n)||(n=x(n)),g(t,e,n)})),e("getMetadata",(function(t,e,n){if(!w(e))throw new TypeError;return M(n)||(n=x(n)),function t(e,n,r){if(g(e,n,r))return v(e,n,r);var i=I(n);return E(i)?void 0:t(e,i,r)}(t,e,n)})),e("getOwnMetadata",(function(t,e,n){if(!w(e))throw new TypeError;return M(n)||(n=x(n)),v(t,e,n)})),e("getMetadataKeys",(function(t,e){if(!w(t))throw new TypeError;return M(e)||(e=x(e)),function t(e,n){var r=b(e,n),i=I(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(!w(t))throw new TypeError;return M(e)||(e=x(e)),b(t,e)})),e("deleteMetadata",(function(t,e,n){if(!w(e))throw new TypeError;M(n)||(n=x(n));var r=y(e,n,!1);if(M(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)}()}(i||(i={})),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;t.DefinedToken=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(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.isModule=function(t){return!!t&&"object"===l(t)&&"id"in t&&"registry"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(o||(o={})),function(t){t.maybeArrayToArray=function(t){return t instanceof Array?t:void 0!==t?[t]:[]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===l(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==l(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===l(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(a||(a={}));var w=new s.Container;function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(s.injectable)();return function(n){Reflect.defineMetadata(o.ClassOptionSymbol,c(c({},t),{},{target:n}),n),e(n)}}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _(c(c({},t),{},{lifecycle:o.Lifecycle.singleton}))}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _(c(c({},t),{},{lifecycle:o.Lifecycle.transient}))}function P(t){return Object(s.inject)(E(t))}function S(t){return Object(s.named)(M(t))}var N=Symbol("SyringeOptionSymbol"),O=function(t,e){Reflect.defineMetadata(N,t,e)};var C=function(){function t(e,n,r){h(this,t),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.context=void 0,this.mutiple=void 0,this.context=e,this.token=n,this.option=r,this.rawToken=a.isNamedToken(n)?n.token:n,this.named=a.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||a.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}return p(t,[{key:"resolve",value:function(){var t,e=this,n=this.context;(t=n)&&"object"===l(t)&&"container"in t&&"inversify"in t&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(t){a.isMultipleEnabled(t)?b(t,n).toService(e.generalToken):T(t,n).toService(e.generalToken)}))))}},{key:"resolveMono",value:function(t){var e=this;if("useValue"in this.option)return T(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var n=this.option.useDynamic[this.option.useDynamic.length-1];return v(T(this.generalToken,t).toDynamicValue((function(){return n({container:e.context})})),this.option)}if(this.option.useFactory.length>0){var r=this.option.useFactory[this.option.useFactory.length-1];return T(this.generalToken,t).toFactory((function(){return r({container:e.context})}))}if(this.option.useClass.length>0){var i=this.option.useClass[this.option.useClass.length-1];return v(T(this.generalToken,t).to(i),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return v(b(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return v(b(e.generalToken,t).toDynamicValue((function(){return n({container:e.context})})),e.option)})),i=this.option.useFactory.map((function(n){return b(e.generalToken,t).toFactory((function(){return n({container:e.context})}))})),o="useValue"in this.option?b(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&m(t,e.named)})),r.forEach((function(t){return e.named&&m(t,e.named)})),i.forEach((function(t){return e.named&&m(t,e.named)})),o&&m(o,this.named))}}],[{key:"resolveTarget",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var i=Reflect.getMetadata(N,n);i&&t.resolveOption(e,i)}catch(t){}if(a.isClass(n))if(r.useClass){var s=a.maybeArrayToArray(r.useClass);s.unshift(n),r.useClass=s}else r.useClass=[n];var u;try{u=Reflect.getMetadata(o.ClassOptionSymbol,n)}catch(t){}if((u=c(c({},u||{}),r)).token){var l=a.maybeArrayToArray(u.token);l.unshift(n),u.token=l}else u.token=[n];t.resolveOption(e,u)}catch(t){}}},{key:"resolveOption",value:function(e,n){var r=function(t){var e=a.maybeArrayToArray(t.token),n=a.maybeArrayToArray(t.useClass),r=a.maybeArrayToArray(t.useDynamic),i=a.maybeArrayToArray(t.useFactory),s=a.maybeArrayToArray(t.contrib),u=t.lifecycle||o.Lifecycle.transient,c={token:e,useClass:n,lifecycle:s.length>0?o.Lifecycle.singleton:u,contrib:s,useDynamic:r,useFactory:i};return"useValue"in t&&(c.useValue=t.useValue),c}(c(c({},t.globalConfig),n));(0!==r.useClass.length||0!==r.useDynamic.length||0!==r.useFactory.length||"useValue"in r)&&r.token.forEach((function(n){new t(e,n,c({},r)).resolve()}))}}]),t}();C.globalConfig=o.DefaultOption;var I=function(){function t(e){h(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new s.Container}return p(t,[{key:"load",value:function(t,e){!e&&this.loadedModules.includes(t.id)||(t.registry(this.register.bind(this),this.resolveContext()),this.loadedModules.push(t.id))}},{key:"remove",value:function(t){return this.container.unbind(E(t))}},{key:"get",value:function(t){return this.container.get(E(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(E(t),M(e))}},{key:"getAll",value:function(t){return this.container.getAll(E(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(E(t),M(e))}},{key:"isBound",value:function(t){return this.container.isBound(E(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(E(t),M(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]:{};a.isInjectOption(t)?C.resolveOption(this,t):C.resolveTarget(this,t,e)}},{key:"resolveContext",value:function(){return{container:this}}}],[{key:"config",value:function(t){C.globalConfig=t}}]),t}(),R=new I(w),k=R.register.bind(R),D=o.defineToken("ContributionProvider"),j=function(){function t(e,n,r){h(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=c(c({},this.option),r))}return p(t,[{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,y(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=c(c({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}]),t}();function B(t,e){return{token:{token:D,named:t},useDynamic:function(n){return new j(t,n.container,e)},lifecycle:o.Lifecycle.singleton}}function L(t,e,n){t({token:{token:D,named:e},useDynamic:function(t){return new j(e,t.container,n)},lifecycle:o.Lifecycle.singleton})}var F=function(){function t(e){h(this,t),this.id=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,t.moduleId+=1,this.id=t.moduleId,this.baseRegistry=e}return p(t,[{key:"registry",get:function(){var t=this;return function(e,n){t.baseRegistry&&t.baseRegistry(e,n),t.optionCollection&&t.optionCollection.forEach((function(t){return e(t)}))}}},{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(B(e))})),this}}]),t}();function G(t){return new F(t)}F.moduleId=0;var V,U=function(t){return function(e,n,r){S(t)(e,n,r),P(D)(e,n,r)}};!function(t){t.Provider=D,t.register=L}(V||(V={}))}.call(this,n(25),n(26))},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(53),e.SyncBailHook=n(54),e.SyncWaterfallHook=n(55),e.SyncLoopHook=n(56),e.AsyncParallelHook=n(57),e.AsyncParallelBailHook=n(58),e.AsyncSeriesHook=n(59),e.AsyncSeriesBailHook=n(60),e.AsyncSeriesLoopHook=n(61),e.AsyncSeriesWaterfallHook=n(62),e.HookMap=n(63),e.MultiHook=n(64)},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(1),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(21).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";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(1);e.METADATA_KEY=r;var i=n(27);Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return i.Container}});var o=n(8);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(43);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(44);Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return s.injectable}});var u=n(45);Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return u.tagged}});var c=n(46);Object.defineProperty(e,"named",{enumerable:!0,get:function(){return c.named}});var l=n(17);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(47);Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return h.optional}});var f=n(48);Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return f.unmanaged}});var p=n(49);Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return p.multiInject}});var d=n(50);Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return d.targetName}});var y=n(51);Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return y.postConstruct}});var g=n(15);Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return g.MetadataReader}});var v=n(11);Object.defineProperty(e,"id",{enumerable:!0,get:function(){return v.id}});var m=n(9);Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return m.decorate}});var b=n(20);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(12);Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return T.getServiceIdentifierAsString}});var M=n(52);Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return M.multiBindToService}})},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(1);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(14),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(13),i=n(20),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";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var r=n(1),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(1),o=n(4),a=n(9),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(1),i=n(11),o=n(4),a=n(34),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(13),i=n(14),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(1),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){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";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(28),s=n(3),u=n(8),c=n(1),l=n(15),h=n(29),f=n(36),p=n(38),d=n(11),y=n(12),g=n(41),v=n(42),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 v.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 v.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(g.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(8),i=n(11),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(30),i=n(3),o=n(8),a=n(1),s=n(16),u=n(12),c=n(31),l=n(4),h=n(32),f=n(33),p=n(35),d=n(18);function y(t){return t._bindingDictionary}function g(t,e,n,o,a){var s=v(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=v(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,v),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,v),new Error(s)}}(a.serviceIdentifier,c,a,n.container),c}function v(t,e){var n=[],r=y(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=v(t.parent,e)),n}e.getBindingDictionary=y,e.plan=function(t,e,n,r,y,v,m,b){void 0===b&&(b=!1);var T=new c.Context(e),M=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,"",v,m);try{return function t(e,n,r,a,s,u){var c,l;if(null===s){c=g(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=g(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,M),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(11),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(17),o=n(3),a=n(8),s=n(1),u=n(12);Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return u.getFunctionName}});var c=n(18);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,g=d.length>n.length,v=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||g?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,g=d.inject||d.multiInject,v=new c.Target(a.TargetTypeEnum.ClassProperty,y,g);v.metadata=p,o.push(v)}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([],v),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 g=new c.Target(a.TargetTypeEnum.ConstructorArgument,l.targetName,p);return g.metadata=u,g}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(11),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(8),o=n(16),a=n(12),s=n(37),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 g=a.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+g)}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(8),a=n(1);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(8),o=n(39),a=n(19),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(40),i=n(13),o=n(14),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(8),i=n(19),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(11),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(1);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(9);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(1),i=n(4),o=n(9);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(1),i=n(4),o=n(9);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(1),i=n(4),o=n(9);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(1),i=n(4),o=n(9);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(1),i=n(4),o=n(9);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(1),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(7);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(7);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(7);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(7);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(7);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(7);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(7);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(7);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(7);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(7);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(21),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,n){"use strict";n.r(e),n.d(e,"ManaSyringe",(function(){return c})),n.d(e,"SHAPE",(function(){return fo})),n.d(e,"CanvasConfig",(function(){return mo})),n.d(e,"Geometry",(function(){return Yo})),n.d(e,"Renderable",(function(){return $o})),n.d(e,"Transform",(function(){return Xo})),n.d(e,"Strategy",(function(){return Uo})),n.d(e,"Cullable",(function(){return Ko})),n.d(e,"Sortable",(function(){return Jo})),n.d(e,"ElementEvent",(function(){return Ki})),n.d(e,"DELEGATION_SPLITTER",(function(){return ta})),n.d(e,"EventTarget",(function(){return ea})),n.d(e,"Node",(function(){return na})),n.d(e,"Element",(function(){return ia})),n.d(e,"Document",(function(){return Kc})),n.d(e,"FederatedEvent",(function(){return Zo})),n.d(e,"FederatedMouseEvent",(function(){return oa})),n.d(e,"FederatedPointerEvent",(function(){return aa})),n.d(e,"FederatedWheelEvent",(function(){return sa})),n.d(e,"Animation",(function(){return jc})),n.d(e,"AnimationEvent",(function(){return kc})),n.d(e,"AnimationEffectTiming",(function(){return Fc})),n.d(e,"CustomEvent",(function(){return Qo})),n.d(e,"makeTiming",(function(){return qc})),n.d(e,"normalizeTimingInput",(function(){return Wc})),n.d(e,"numericTimingToObject",(function(){return zc})),n.d(e,"KeyframeEffect",(function(){return Hc})),n.d(e,"normalizeKeyframes",(function(){return Gc})),n.d(e,"compareAnimations",(function(){return Bc})),n.d(e,"AnimationTimeline",(function(){return Lc})),n.d(e,"CustomElementRegistry",(function(){return ul})),n.d(e,"AbstractRenderer",(function(){return cl})),n.d(e,"CanvasEvent",(function(){return Ol})),n.d(e,"Canvas",(function(){return Rl})),n.d(e,"DisplayObjectPool",(function(){return E})),n.d(e,"DefaultCamera",(function(){return gl})),n.d(e,"CAMERA_TYPE",(function(){return fl})),n.d(e,"CAMERA_TRACKING_MODE",(function(){return pl})),n.d(e,"CAMERA_PROJECTION_MODE",(function(){return dl})),n.d(e,"CAMERA_EVENT",(function(){return vl})),n.d(e,"Camera",(function(){return Tl})),n.d(e,"Landmark",(function(){return yl})),n.d(e,"sortByZIndex",(function(){return lo})),n.d(e,"dirtifyToRoot",(function(){return ho})),n.d(e,"SceneGraphService",(function(){return po})),n.d(e,"DefaultSceneGraphService",(function(){return yo})),n.d(e,"ContextService",(function(){return Vo})),n.d(e,"RENDER_REASON",(function(){return _o})),n.d(e,"RenderingContext",(function(){return qo})),n.d(e,"RenderingPluginContribution",(function(){return zo})),n.d(e,"RenderingService",(function(){return Ho})),n.d(e,"EventService",(function(){return ua})),n.d(e,"SceneGraphSelectorFactory",(function(){return so})),n.d(e,"SceneGraphSelector",(function(){return uo})),n.d(e,"DefaultSceneGraphSelector",(function(){return co})),n.d(e,"OffscreenCanvasCreator",(function(){return xo})),n.d(e,"TextService",(function(){return Oo})),n.d(e,"GeometryUpdaterFactory",(function(){return go})),n.d(e,"GeometryAABBUpdater",(function(){return vo})),n.d(e,"CircleUpdater",(function(){return bo})),n.d(e,"EllipseUpdater",(function(){return To})),n.d(e,"RectUpdater",(function(){return Mo})),n.d(e,"TextUpdater",(function(){return Co})),n.d(e,"LineUpdater",(function(){return Io})),n.d(e,"PolylineUpdater",(function(){return Ro})),n.d(e,"PathUpdater",(function(){return ko})),n.d(e,"AABB",(function(){return Hi})),n.d(e,"BoundingSphere",(function(){return $i})),n.d(e,"Mask",(function(){return Bi})),n.d(e,"Frustum",(function(){return Ji})),n.d(e,"Plane",(function(){return Xi})),n.d(e,"Ray",(function(){return ro})),n.d(e,"Point",(function(){return io})),n.d(e,"Rectangle",(function(){return oo})),n.d(e,"PolygonShape",(function(){return ao})),n.d(e,"getAngle",(function(){return ca})),n.d(e,"createVec3",(function(){return la})),n.d(e,"deg2rad",(function(){return ha})),n.d(e,"rad2deg",(function(){return fa})),n.d(e,"getScaling",(function(){return pa})),n.d(e,"getTranslation",(function(){return da})),n.d(e,"getRotationInRadians",(function(){return ya})),n.d(e,"getEuler",(function(){return ga})),n.d(e,"fromRotationTranslationScale",(function(){return va})),n.d(e,"makePerspective",(function(){return ma})),n.d(e,"convertEffectInput",(function(){return rs})),n.d(e,"equalizeSegments",(function(){return ws})),n.d(e,"getDrawDirection",(function(){return _s})),n.d(e,"getPathArea",(function(){return As})),n.d(e,"reverseCurve",(function(){return Ps})),n.d(e,"clonePath",(function(){return Ss})),n.d(e,"getRotatedCurve",(function(){return Ns})),n.d(e,"convertToPath",(function(){return Cs})),n.d(e,"requestAnimationFrame",(function(){return Rs})),n.d(e,"cancelAnimationFrame",(function(){return ks})),n.d(e,"toFontString",(function(){return wo})),n.d(e,"StylePropertyParser",(function(){return Do})),n.d(e,"StylePropertyParserFactory",(function(){return jo})),n.d(e,"StylePropertyUpdater",(function(){return Bo})),n.d(e,"StylePropertyUpdaterFactory",(function(){return Lo})),n.d(e,"StylePropertyMerger",(function(){return Fo})),n.d(e,"StylePropertyMergerFactory",(function(){return Go})),n.d(e,"updateAnchor",(function(){return Ds})),n.d(e,"updateGeometry",(function(){return vu})),n.d(e,"updateLocalPosition",(function(){return mu})),n.d(e,"numberToString",(function(){return bu})),n.d(e,"parseNumber",(function(){return Tu})),n.d(e,"mergeNumbers",(function(){return Mu})),n.d(e,"clampedMergeNumbers",(function(){return Eu})),n.d(e,"mergeNumberLists",(function(){return wu})),n.d(e,"PARSED_COLOR_TYPE",(function(){return Fs})),n.d(e,"parseColor",(function(){return yu})),n.d(e,"mergeColors",(function(){return gu})),n.d(e,"updateOffsetPath",(function(){return _u})),n.d(e,"updateOffsetDistance",(function(){return xu})),n.d(e,"updateClipPath",(function(){return Au})),n.d(e,"updateZIndex",(function(){return Pu})),n.d(e,"updateOrigin",(function(){return Bu})),n.d(e,"updateTransformOrigin",(function(){return Lu})),n.d(e,"parseTransform",(function(){return Hu})),n.d(e,"mergeTransforms",(function(){return Xu})),n.d(e,"updateTransform",(function(){return Ku})),n.d(e,"parseDimension",(function(){return Ou})),n.d(e,"mergeDimensions",(function(){return Cu})),n.d(e,"parseLength",(function(){return Iu})),n.d(e,"parseLengthOrPercent",(function(){return Ru})),n.d(e,"parseAngle",(function(){return ku})),n.d(e,"convertPercentUnit",(function(){return Du})),n.d(e,"convertAngleUnit",(function(){return ju})),n.d(e,"parsePath",(function(){return _c})),n.d(e,"mergePaths",(function(){return Ac})),n.d(e,"parsePoints",(function(){return Pc})),n.d(e,"parseParam",(function(){return Sc})),n.d(e,"parseFilter",(function(){return Oc})),n.d(e,"parseLineDash",(function(){return Cc})),n.d(e,"DisplayObject",(function(){return $c})),n.d(e,"CustomElement",(function(){return Jc})),n.d(e,"Circle",(function(){return Zc})),n.d(e,"Ellipse",(function(){return Qc})),n.d(e,"Group",(function(){return Xc})),n.d(e,"Image",(function(){return tl})),n.d(e,"Line",(function(){return el})),n.d(e,"Path",(function(){return nl})),n.d(e,"Polygon",(function(){return rl})),n.d(e,"Polyline",(function(){return il})),n.d(e,"Rect",(function(){return ol})),n.d(e,"Text",(function(){return al})),n.d(e,"HTML",(function(){return sl})),n.d(e,"globalContainer",(function(){return Ic})),n.d(e,"containerModule",(function(){return Rc}));var r={};n.r(r),n.d(r,"create",(function(){return J})),n.d(r,"fromMat4",(function(){return Z})),n.d(r,"clone",(function(){return Q})),n.d(r,"copy",(function(){return tt})),n.d(r,"fromValues",(function(){return et})),n.d(r,"set",(function(){return nt})),n.d(r,"identity",(function(){return rt})),n.d(r,"transpose",(function(){return it})),n.d(r,"invert",(function(){return ot})),n.d(r,"adjoint",(function(){return at})),n.d(r,"determinant",(function(){return st})),n.d(r,"multiply",(function(){return ut})),n.d(r,"translate",(function(){return ct})),n.d(r,"rotate",(function(){return lt})),n.d(r,"scale",(function(){return ht})),n.d(r,"fromTranslation",(function(){return ft})),n.d(r,"fromRotation",(function(){return pt})),n.d(r,"fromScaling",(function(){return dt})),n.d(r,"fromMat2d",(function(){return yt})),n.d(r,"fromQuat",(function(){return gt})),n.d(r,"normalFromMat4",(function(){return vt})),n.d(r,"projection",(function(){return mt})),n.d(r,"str",(function(){return bt})),n.d(r,"frob",(function(){return Tt})),n.d(r,"add",(function(){return Mt})),n.d(r,"subtract",(function(){return Et})),n.d(r,"multiplyScalar",(function(){return wt})),n.d(r,"multiplyScalarAndAdd",(function(){return _t})),n.d(r,"exactEquals",(function(){return xt})),n.d(r,"equals",(function(){return At})),n.d(r,"mul",(function(){return Pt})),n.d(r,"sub",(function(){return St}));var i={};n.r(i),n.d(i,"create",(function(){return Nt})),n.d(i,"clone",(function(){return Ot})),n.d(i,"copy",(function(){return Ct})),n.d(i,"fromValues",(function(){return It})),n.d(i,"set",(function(){return Rt})),n.d(i,"identity",(function(){return kt})),n.d(i,"transpose",(function(){return Dt})),n.d(i,"invert",(function(){return jt})),n.d(i,"adjoint",(function(){return Bt})),n.d(i,"determinant",(function(){return Lt})),n.d(i,"multiply",(function(){return Ft})),n.d(i,"translate",(function(){return Gt})),n.d(i,"scale",(function(){return Vt})),n.d(i,"rotate",(function(){return Ut})),n.d(i,"rotateX",(function(){return qt})),n.d(i,"rotateY",(function(){return Wt})),n.d(i,"rotateZ",(function(){return zt})),n.d(i,"fromTranslation",(function(){return Ht})),n.d(i,"fromScaling",(function(){return Yt})),n.d(i,"fromRotation",(function(){return $t})),n.d(i,"fromXRotation",(function(){return Xt})),n.d(i,"fromYRotation",(function(){return Kt})),n.d(i,"fromZRotation",(function(){return Jt})),n.d(i,"fromRotationTranslation",(function(){return Zt})),n.d(i,"fromQuat2",(function(){return Qt})),n.d(i,"getTranslation",(function(){return te})),n.d(i,"getScaling",(function(){return ee})),n.d(i,"getRotation",(function(){return ne})),n.d(i,"fromRotationTranslationScale",(function(){return re})),n.d(i,"fromRotationTranslationScaleOrigin",(function(){return ie})),n.d(i,"fromQuat",(function(){return oe})),n.d(i,"frustum",(function(){return ae})),n.d(i,"perspectiveNO",(function(){return se})),n.d(i,"perspective",(function(){return ue})),n.d(i,"perspectiveZO",(function(){return ce})),n.d(i,"perspectiveFromFieldOfView",(function(){return le})),n.d(i,"orthoNO",(function(){return he})),n.d(i,"ortho",(function(){return fe})),n.d(i,"orthoZO",(function(){return pe})),n.d(i,"lookAt",(function(){return de})),n.d(i,"targetTo",(function(){return ye})),n.d(i,"str",(function(){return ge})),n.d(i,"frob",(function(){return ve})),n.d(i,"add",(function(){return me})),n.d(i,"subtract",(function(){return be})),n.d(i,"multiplyScalar",(function(){return Te})),n.d(i,"multiplyScalarAndAdd",(function(){return Me})),n.d(i,"exactEquals",(function(){return Ee})),n.d(i,"equals",(function(){return we})),n.d(i,"mul",(function(){return _e})),n.d(i,"sub",(function(){return xe}));var o={};n.r(o),n.d(o,"create",(function(){return Ae})),n.d(o,"clone",(function(){return Pe})),n.d(o,"length",(function(){return Se})),n.d(o,"fromValues",(function(){return Ne})),n.d(o,"copy",(function(){return Oe})),n.d(o,"set",(function(){return Ce})),n.d(o,"add",(function(){return Ie})),n.d(o,"subtract",(function(){return Re})),n.d(o,"multiply",(function(){return ke})),n.d(o,"divide",(function(){return De})),n.d(o,"ceil",(function(){return je})),n.d(o,"floor",(function(){return Be})),n.d(o,"min",(function(){return Le})),n.d(o,"max",(function(){return Fe})),n.d(o,"round",(function(){return Ge})),n.d(o,"scale",(function(){return Ve})),n.d(o,"scaleAndAdd",(function(){return Ue})),n.d(o,"distance",(function(){return qe})),n.d(o,"squaredDistance",(function(){return We})),n.d(o,"squaredLength",(function(){return ze})),n.d(o,"negate",(function(){return He})),n.d(o,"inverse",(function(){return Ye})),n.d(o,"normalize",(function(){return $e})),n.d(o,"dot",(function(){return Xe})),n.d(o,"cross",(function(){return Ke})),n.d(o,"lerp",(function(){return Je})),n.d(o,"hermite",(function(){return Ze})),n.d(o,"bezier",(function(){return Qe})),n.d(o,"random",(function(){return tn})),n.d(o,"transformMat4",(function(){return en})),n.d(o,"transformMat3",(function(){return nn})),n.d(o,"transformQuat",(function(){return rn})),n.d(o,"rotateX",(function(){return on})),n.d(o,"rotateY",(function(){return an})),n.d(o,"rotateZ",(function(){return sn})),n.d(o,"angle",(function(){return un})),n.d(o,"zero",(function(){return cn})),n.d(o,"str",(function(){return ln})),n.d(o,"exactEquals",(function(){return hn})),n.d(o,"equals",(function(){return fn})),n.d(o,"sub",(function(){return dn})),n.d(o,"mul",(function(){return yn})),n.d(o,"div",(function(){return gn})),n.d(o,"dist",(function(){return vn})),n.d(o,"sqrDist",(function(){return mn})),n.d(o,"len",(function(){return bn})),n.d(o,"sqrLen",(function(){return Tn})),n.d(o,"forEach",(function(){return Mn}));var a={};n.r(a),n.d(a,"create",(function(){return En})),n.d(a,"clone",(function(){return wn})),n.d(a,"fromValues",(function(){return _n})),n.d(a,"copy",(function(){return xn})),n.d(a,"set",(function(){return An})),n.d(a,"add",(function(){return Pn})),n.d(a,"subtract",(function(){return Sn})),n.d(a,"multiply",(function(){return Nn})),n.d(a,"divide",(function(){return On})),n.d(a,"ceil",(function(){return Cn})),n.d(a,"floor",(function(){return In})),n.d(a,"min",(function(){return Rn})),n.d(a,"max",(function(){return kn})),n.d(a,"round",(function(){return Dn})),n.d(a,"scale",(function(){return jn})),n.d(a,"scaleAndAdd",(function(){return Bn})),n.d(a,"distance",(function(){return Ln})),n.d(a,"squaredDistance",(function(){return Fn})),n.d(a,"length",(function(){return Gn})),n.d(a,"squaredLength",(function(){return Vn})),n.d(a,"negate",(function(){return Un})),n.d(a,"inverse",(function(){return qn})),n.d(a,"normalize",(function(){return Wn})),n.d(a,"dot",(function(){return zn})),n.d(a,"cross",(function(){return Hn})),n.d(a,"lerp",(function(){return Yn})),n.d(a,"random",(function(){return $n})),n.d(a,"transformMat4",(function(){return Xn})),n.d(a,"transformQuat",(function(){return Kn})),n.d(a,"zero",(function(){return Jn})),n.d(a,"str",(function(){return Zn})),n.d(a,"exactEquals",(function(){return Qn})),n.d(a,"equals",(function(){return tr})),n.d(a,"sub",(function(){return er})),n.d(a,"mul",(function(){return nr})),n.d(a,"div",(function(){return rr})),n.d(a,"dist",(function(){return ir})),n.d(a,"sqrDist",(function(){return or})),n.d(a,"len",(function(){return ar})),n.d(a,"sqrLen",(function(){return sr})),n.d(a,"forEach",(function(){return ur}));var s={};n.r(s),n.d(s,"create",(function(){return cr})),n.d(s,"identity",(function(){return lr})),n.d(s,"setAxisAngle",(function(){return hr})),n.d(s,"getAxisAngle",(function(){return fr})),n.d(s,"getAngle",(function(){return pr})),n.d(s,"multiply",(function(){return dr})),n.d(s,"rotateX",(function(){return yr})),n.d(s,"rotateY",(function(){return gr})),n.d(s,"rotateZ",(function(){return vr})),n.d(s,"calculateW",(function(){return mr})),n.d(s,"exp",(function(){return br})),n.d(s,"ln",(function(){return Tr})),n.d(s,"pow",(function(){return Mr})),n.d(s,"slerp",(function(){return Er})),n.d(s,"random",(function(){return wr})),n.d(s,"invert",(function(){return _r})),n.d(s,"conjugate",(function(){return xr})),n.d(s,"fromMat3",(function(){return Ar})),n.d(s,"fromEuler",(function(){return Pr})),n.d(s,"str",(function(){return Sr})),n.d(s,"clone",(function(){return Dr})),n.d(s,"fromValues",(function(){return jr})),n.d(s,"copy",(function(){return Br})),n.d(s,"set",(function(){return Lr})),n.d(s,"add",(function(){return Fr})),n.d(s,"mul",(function(){return Gr})),n.d(s,"scale",(function(){return Vr})),n.d(s,"dot",(function(){return Ur})),n.d(s,"lerp",(function(){return qr})),n.d(s,"length",(function(){return Wr})),n.d(s,"len",(function(){return zr})),n.d(s,"squaredLength",(function(){return Hr})),n.d(s,"sqrLen",(function(){return Yr})),n.d(s,"normalize",(function(){return $r})),n.d(s,"exactEquals",(function(){return Xr})),n.d(s,"equals",(function(){return Kr})),n.d(s,"rotationTo",(function(){return Jr})),n.d(s,"sqlerp",(function(){return Zr})),n.d(s,"setAxes",(function(){return Qr}));var u={};n.r(u),n.d(u,"create",(function(){return ti})),n.d(u,"clone",(function(){return ei})),n.d(u,"fromValues",(function(){return ni})),n.d(u,"copy",(function(){return ri})),n.d(u,"set",(function(){return ii})),n.d(u,"add",(function(){return oi})),n.d(u,"subtract",(function(){return ai})),n.d(u,"multiply",(function(){return si})),n.d(u,"divide",(function(){return ui})),n.d(u,"ceil",(function(){return ci})),n.d(u,"floor",(function(){return li})),n.d(u,"min",(function(){return hi})),n.d(u,"max",(function(){return fi})),n.d(u,"round",(function(){return pi})),n.d(u,"scale",(function(){return di})),n.d(u,"scaleAndAdd",(function(){return yi})),n.d(u,"distance",(function(){return gi})),n.d(u,"squaredDistance",(function(){return vi})),n.d(u,"length",(function(){return mi})),n.d(u,"squaredLength",(function(){return bi})),n.d(u,"negate",(function(){return Ti})),n.d(u,"inverse",(function(){return Mi})),n.d(u,"normalize",(function(){return Ei})),n.d(u,"dot",(function(){return wi})),n.d(u,"cross",(function(){return _i})),n.d(u,"lerp",(function(){return xi})),n.d(u,"random",(function(){return Ai})),n.d(u,"transformMat2",(function(){return Pi})),n.d(u,"transformMat2d",(function(){return Si})),n.d(u,"transformMat3",(function(){return Ni})),n.d(u,"transformMat4",(function(){return Oi})),n.d(u,"rotate",(function(){return Ci})),n.d(u,"angle",(function(){return Ii})),n.d(u,"zero",(function(){return Ri})),n.d(u,"str",(function(){return ki})),n.d(u,"exactEquals",(function(){return Di})),n.d(u,"equals",(function(){return ji})),n.d(u,"len",(function(){return Li})),n.d(u,"sub",(function(){return Fi})),n.d(u,"mul",(function(){return Gi})),n.d(u,"div",(function(){return Vi})),n.d(u,"dist",(function(){return Ui})),n.d(u,"sqrDist",(function(){return qi})),n.d(u,"sqrLen",(function(){return Wi})),n.d(u,"forEach",(function(){return zi}));var c=n(0),l=n(10),h=function(t,e){return(h=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 f(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}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p=function(){return(p=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 d(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 y(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 g(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function v(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 m(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 b(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 T(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 M(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 E=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=y([Object(c.singleton)()],t)}(),w=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},_={}.toString,x=function(t,e){return _.call(t)==="[object "+e+"]"},A=function(t){return x(t,"Function")},P=function(t){return null==t},S=function(t){return Array.isArray?Array.isArray(t):x(t,"Array")},N=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var O=function(t,e){if(t)if(S(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(N(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break};Object.keys;var C=function(t){return"object"==typeof t&&null!==t};var I=function(t){if(S(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])},R=function(t){if(S(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])},k=Array.prototype,D=(k.splice,k.indexOf,Array.prototype.splice,function(t){return x(t,"String")});function j(t,e){void 0===e&&(e=new Map);var n=[];if(Array.isArray(t))for(var r=0,i=t.length;r<i;r++){var o=t[r];e.has(o)||(n.push(o),e.set(o,!0))}return n}Object.prototype.hasOwnProperty;var B=function(t,e,n){return t<e?e:t>n?n:t},L=function(t){return x(t,"Number")};Number.isInteger&&Number.isInteger;var F=function(t,e){return(t%e+e)%e},G=(Math.PI,parseInt,Math.PI/180),V=function(t){return G*t},U=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return O(t,(function(n,r){A(t)&&"prototype"===r||e.push(n)})),e};var q=function(t){return x(t,"Boolean")},W=(Object.prototype,function(t){return void 0===t});Object.prototype.hasOwnProperty;var z,H=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(D(t)||D(e))return!1;if(w(t)||w(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=H(t[r],e[r]));r++);return n}if(C(t)||C(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=H(t[i[r]],e[i[r]]));r++);return n}return!1},Y=H;Object.prototype.hasOwnProperty;(function(t,e){if(!A(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};n.cache=new Map})((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return z||(z=document.createElement("canvas").getContext("2d")),z.font=[o,a,i,n+"px",r].join(" "),z.measureText(D(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}([t],U(e)).join("")})),function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();var $=1e-6,X="undefined"!=typeof Float32Array?Float32Array:Array,K=Math.random;Math.PI;function J(){var t=new X(9);return X!=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 Z(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 Q(t){var e=new X(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 tt(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 et(t,e,n,r,i,o,a,s,u){var c=new X(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 nt(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 rt(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 it(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 ot(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 at(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 st(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 ut(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],g=n[4],v=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+g*a+v*c,t[4]=y*i+g*s+v*l,t[5]=y*o+g*u+v*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 ct(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 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=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 ht(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 ft(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 pt(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 dt(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 yt(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 gt(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,g=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=f+g,t[1]=l+v,t[4]=1-c-d,t[7]=p-y,t[2]=f-g,t[5]=p+y,t[8]=1-c-h,t}function vt(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],g=e[14],v=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,M=r*u-i*s,E=r*c-o*s,w=i*c-o*u,_=l*y-h*d,x=l*g-f*d,A=l*v-p*d,P=h*g-f*y,S=h*v-p*y,N=f*v-p*g,O=m*N-b*S+T*P+M*A-E*x+w*_;return O?(O=1/O,t[0]=(s*N-u*S+c*P)*O,t[1]=(u*A-a*N-c*x)*O,t[2]=(a*S-s*A+c*_)*O,t[3]=(i*S-r*N-o*P)*O,t[4]=(n*N-i*A+o*x)*O,t[5]=(r*A-n*S-o*_)*O,t[6]=(y*w-g*E+v*M)*O,t[7]=(g*T-d*w-v*b)*O,t[8]=(d*E-y*T+v*m)*O,t):null}function mt(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 bt(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Tt(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Mt(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 Et(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 wt(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 _t(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 xt(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 At(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],g=e[5],v=e[6],m=e[7],b=e[8];return Math.abs(n-h)<=$*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-f)<=$*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-p)<=$*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-d)<=$*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-y)<=$*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-g)<=$*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(u-v)<=$*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=$*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-b)<=$*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 Pt=ut,St=Et;function Nt(){var t=new X(16);return X!=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 Ot(t){var e=new X(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 Ct(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 It(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y){var g=new X(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=u,g[9]=c,g[10]=l,g[11]=h,g[12]=f,g[13]=p,g[14]=d,g[15]=y,g}function Rt(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y,g){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]=g,t}function kt(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 Dt(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 jt(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],g=e[14],v=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,M=r*u-i*s,E=r*c-o*s,w=i*c-o*u,_=l*y-h*d,x=l*g-f*d,A=l*v-p*d,P=h*g-f*y,S=h*v-p*y,N=f*v-p*g,O=m*N-b*S+T*P+M*A-E*x+w*_;return O?(O=1/O,t[0]=(s*N-u*S+c*P)*O,t[1]=(i*S-r*N-o*P)*O,t[2]=(y*w-g*E+v*M)*O,t[3]=(f*E-h*w-p*M)*O,t[4]=(u*A-a*N-c*x)*O,t[5]=(n*N-i*A+o*x)*O,t[6]=(g*T-d*w-v*b)*O,t[7]=(l*w-f*T+p*b)*O,t[8]=(a*S-s*A+c*_)*O,t[9]=(r*A-n*S-o*_)*O,t[10]=(d*E-y*T+v*m)*O,t[11]=(h*T-l*E-p*m)*O,t[12]=(s*x-a*P-u*_)*O,t[13]=(n*P-r*x+i*_)*O,t[14]=(y*b-d*M-g*m)*O,t[15]=(l*M-h*b+f*m)*O,t):null}function Bt(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],g=e[14],v=e[15];return t[0]=s*(f*v-p*g)-h*(u*v-c*g)+y*(u*p-c*f),t[1]=-(r*(f*v-p*g)-h*(i*v-o*g)+y*(i*p-o*f)),t[2]=r*(u*v-c*g)-s*(i*v-o*g)+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*v-p*g)-l*(u*v-c*g)+d*(u*p-c*f)),t[5]=n*(f*v-p*g)-l*(i*v-o*g)+d*(i*p-o*f),t[6]=-(n*(u*v-c*g)-a*(i*v-o*g)+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*v-p*y)-l*(s*v-c*y)+d*(s*p-c*h),t[9]=-(n*(h*v-p*y)-l*(r*v-o*y)+d*(r*p-o*h)),t[10]=n*(s*v-c*y)-a*(r*v-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*g-f*y)-l*(s*g-u*y)+d*(s*f-u*h)),t[13]=n*(h*g-f*y)-l*(r*g-i*y)+d*(r*f-i*h),t[14]=-(n*(s*g-u*y)-a*(r*g-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 Lt(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],g=t[15];return(e*a-n*o)*(h*g-f*y)-(e*s-r*o)*(l*g-f*d)+(e*u-i*o)*(l*y-h*d)+(n*s-r*a)*(c*g-f*p)-(n*u-i*a)*(c*y-h*p)+(r*u-i*s)*(c*d-l*p)}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=e[9],p=e[10],d=e[11],y=e[12],g=e[13],v=e[14],m=e[15],b=n[0],T=n[1],M=n[2],E=n[3];return t[0]=b*r+T*s+M*h+E*y,t[1]=b*i+T*u+M*f+E*g,t[2]=b*o+T*c+M*p+E*v,t[3]=b*a+T*l+M*d+E*m,b=n[4],T=n[5],M=n[6],E=n[7],t[4]=b*r+T*s+M*h+E*y,t[5]=b*i+T*u+M*f+E*g,t[6]=b*o+T*c+M*p+E*v,t[7]=b*a+T*l+M*d+E*m,b=n[8],T=n[9],M=n[10],E=n[11],t[8]=b*r+T*s+M*h+E*y,t[9]=b*i+T*u+M*f+E*g,t[10]=b*o+T*c+M*p+E*v,t[11]=b*a+T*l+M*d+E*m,b=n[12],T=n[13],M=n[14],E=n[15],t[12]=b*r+T*s+M*h+E*y,t[13]=b*i+T*u+M*f+E*g,t[14]=b*o+T*c+M*p+E*v,t[15]=b*a+T*l+M*d+E*m,t}function Gt(t,e,n){var r,i,o,a,s,u,c,l,h,f,p,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+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*g+h*v+e[12],t[13]=i*y+u*g+f*v+e[13],t[14]=o*y+c*g+p*v+e[14],t[15]=a*y+l*g+d*v+e[15]),t}function Vt(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 Ut(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d,y,g,v,m,b,T,M,E,w,_,x,A,P,S=r[0],N=r[1],O=r[2],C=Math.hypot(S,N,O);return C<$?null:(S*=C=1/C,N*=C,O*=C,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],g=e[9],v=e[10],m=e[11],b=S*S*a+o,T=N*S*a+O*i,M=O*S*a-N*i,E=S*N*a-O*i,w=N*N*a+o,_=O*N*a+S*i,x=S*O*a+N*i,A=N*O*a-S*i,P=O*O*a+o,t[0]=s*b+h*T+y*M,t[1]=u*b+f*T+g*M,t[2]=c*b+p*T+v*M,t[3]=l*b+d*T+m*M,t[4]=s*E+h*w+y*_,t[5]=u*E+f*w+g*_,t[6]=c*E+p*w+v*_,t[7]=l*E+d*w+m*_,t[8]=s*x+h*A+y*P,t[9]=u*x+f*A+g*P,t[10]=c*x+p*A+v*P,t[11]=l*x+d*A+m*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function qt(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 Wt(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 zt(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 Ht(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 Yt(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 $t(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return c<$?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 Xt(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 Kt(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 Jt(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 Zt(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,g=a*s,v=a*u,m=a*c;return t[0]=1-(p+y),t[1]=h+m,t[2]=f-v,t[3]=0,t[4]=h-m,t[5]=1-(l+y),t[6]=d+g,t[7]=0,t[8]=f+v,t[9]=d-g,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 Qt(t,e){var n=new X(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)),Zt(t,e,n),t}function te(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ee(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 ne(t,e){var n=new X(3);ee(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,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(h-p)/g,t[1]=(f-u)/g,t[2]=(s-c)/g):a>l&&a>d?(g=2*Math.sqrt(1+a-l-d),t[3]=(h-p)/g,t[0]=.25*g,t[1]=(s+c)/g,t[2]=(f+u)/g):l>d?(g=2*Math.sqrt(1+l-a-d),t[3]=(f-u)/g,t[0]=(s+c)/g,t[1]=.25*g,t[2]=(h+p)/g):(g=2*Math.sqrt(1+d-a-l),t[3]=(s-c)/g,t[0]=(f+u)/g,t[1]=(h+p)/g,t[2]=.25*g),t}function re(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,g=a*l,v=s*u,m=s*c,b=s*l,T=r[0],M=r[1],E=r[2];return t[0]=(1-(d+g))*T,t[1]=(f+b)*T,t[2]=(p-m)*T,t[3]=0,t[4]=(f-b)*M,t[5]=(1-(h+g))*M,t[6]=(y+v)*M,t[7]=0,t[8]=(p+m)*E,t[9]=(y-v)*E,t[10]=(1-(h+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ie(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,g=a*h,v=s*h,m=u*c,b=u*l,T=u*h,M=r[0],E=r[1],w=r[2],_=i[0],x=i[1],A=i[2],P=(1-(y+v))*M,S=(p+T)*M,N=(d-b)*M,O=(p-T)*E,C=(1-(f+v))*E,I=(g+m)*E,R=(d+b)*w,k=(g-m)*w,D=(1-(f+y))*w;return t[0]=P,t[1]=S,t[2]=N,t[3]=0,t[4]=O,t[5]=C,t[6]=I,t[7]=0,t[8]=R,t[9]=k,t[10]=D,t[11]=0,t[12]=n[0]+_-(P*_+O*x+R*A),t[13]=n[1]+x-(S*_+C*x+k*A),t[14]=n[2]+A-(N*_+I*x+D*A),t[15]=1,t}function oe(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,g=o*s,v=o*u;return t[0]=1-h-d,t[1]=l+v,t[2]=f-g,t[3]=0,t[4]=l-v,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=f+g,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 ae(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 se(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 ue=se;function ce(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 le(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 he(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 fe=he;function pe(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 de(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d=e[0],y=e[1],g=e[2],v=r[0],m=r[1],b=r[2],T=n[0],M=n[1],E=n[2];return Math.abs(d-T)<$&&Math.abs(y-M)<$&&Math.abs(g-E)<$?kt(t):(l=d-T,h=y-M,f=g-E,i=m*(f*=p=1/Math.hypot(l,h,f))-b*(h*=p),o=b*(l*=p)-v*f,a=v*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*g),t[13]=-(s*d+u*y+c*g),t[14]=-(l*d+h*y+f*g),t[15]=1,t)}function ye(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,g=s*h-u*l;return(p=d*d+y*y+g*g)>0&&(d*=p=1/Math.sqrt(p),y*=p,g*=p),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=h*g-f*y,t[5]=f*d-l*g,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 ge(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 ve(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 me(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 be(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 Te(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 Me(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 Ee(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 we(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],g=t[14],v=t[15],m=e[0],b=e[1],T=e[2],M=e[3],E=e[4],w=e[5],_=e[6],x=e[7],A=e[8],P=e[9],S=e[10],N=e[11],O=e[12],C=e[13],I=e[14],R=e[15];return Math.abs(n-m)<=$*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=$*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-T)<=$*Math.max(1,Math.abs(i),Math.abs(T))&&Math.abs(o-M)<=$*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-E)<=$*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(s-w)<=$*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(u-_)<=$*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(c-x)<=$*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(l-A)<=$*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(h-P)<=$*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(f-S)<=$*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(p-N)<=$*Math.max(1,Math.abs(p),Math.abs(N))&&Math.abs(d-O)<=$*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(y-C)<=$*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-I)<=$*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(v-R)<=$*Math.max(1,Math.abs(v),Math.abs(R))}var _e=Ft,xe=be;function Ae(){var t=new X(3);return X!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Pe(t){var e=new X(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Se(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Ne(t,e,n){var r=new X(3);return r[0]=t,r[1]=e,r[2]=n,r}function Oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ce(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ie(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Re(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function ke(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function De(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function je(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function Be(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Le(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 Fe(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 Ge(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function Ve(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Ue(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 qe(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 We(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 ze(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function He(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function Ye(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function $e(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 Xe(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ke(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 Je(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 Ze(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 Qe(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 tn(t,e){e=e||1;var n=2*K()*Math.PI,r=2*K()-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 en(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 nn(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 rn(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,g=2*a;return l*=g,h*=g,f*=g,p*=2,d*=2,y*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+y,t}function on(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 an(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 sn(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 un(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&&Xe(t,e)/u;return Math.acos(Math.min(Math.max(c,-1),1))}function cn(t){return t[0]=0,t[1]=0,t[2]=0,t}function ln(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function hn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function fn(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)<=$*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=$*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=$*Math.max(1,Math.abs(i),Math.abs(s))}var pn,dn=Re,yn=ke,gn=De,vn=qe,mn=We,bn=Se,Tn=ze,Mn=(pn=Ae(),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)pn[0]=t[a],pn[1]=t[a+1],pn[2]=t[a+2],i(pn,pn,o),t[a]=pn[0],t[a+1]=pn[1],t[a+2]=pn[2];return t});function En(){var t=new X(4);return X!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function wn(t){var e=new X(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _n(t,e,n,r){var i=new X(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function xn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function An(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function Pn(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 Sn(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 Nn(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 On(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 Cn(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 In(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 Rn(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 kn(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 Dn(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 jn(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 Bn(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 Ln(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 Fn(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 Gn(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function Vn(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function Un(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function qn(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 Wn(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 zn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Hn(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 Yn(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 $n(t,e){var n,r,i,o,a,s;e=e||1;do{a=(n=2*K()-1)*n+(r=2*K()-1)*r}while(a>=1);do{s=(i=2*K()-1)*i+(o=2*K()-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 Xn(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 Kn(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 Jn(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function Zn(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function Qn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function tr(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)<=$*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=$*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=$*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=$*Math.max(1,Math.abs(o),Math.abs(c))}var er=Sn,nr=Nn,rr=On,ir=Ln,or=Fn,ar=Gn,sr=Vn,ur=function(){var t=En();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 cr(){var t=new X(4);return X!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function lr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function hr(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 fr(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>$?(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 pr(t,e){var n=Ur(t,e);return Math.acos(2*n*n-1)}function dr(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 yr(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 gr(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 vr(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 mr(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 br(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 Tr(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 Mr(t,e,n){return Tr(t,e),Vr(t,t,n),br(t,t),t}function Er(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],g=n[3];return(o=c*p+l*d+h*y+f*g)<0&&(o=-o,p=-p,d=-d,y=-y,g=-g),1-o>$?(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*g,t}function wr(t){var e=K(),n=K(),r=K(),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 _r(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 xr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function Ar(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 Pr(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 Sr(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var Nr,Or,Cr,Ir,Rr,kr,Dr=wn,jr=_n,Br=xn,Lr=An,Fr=Pn,Gr=dr,Vr=jn,Ur=zn,qr=Yn,Wr=Gn,zr=Wr,Hr=Vn,Yr=Hr,$r=Wn,Xr=Qn,Kr=tr,Jr=(Nr=Ae(),Or=Ne(1,0,0),Cr=Ne(0,1,0),function(t,e,n){var r=Xe(e,n);return r<-.999999?(Ke(Nr,Or,e),bn(Nr)<1e-6&&Ke(Nr,Cr,e),$e(Nr,Nr),hr(t,Nr,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Ke(Nr,e,n),t[0]=Nr[0],t[1]=Nr[1],t[2]=Nr[2],t[3]=1+r,$r(t,t))}),Zr=(Ir=cr(),Rr=cr(),function(t,e,n,r,i,o){return Er(Ir,e,i,o),Er(Rr,n,r,o),Er(t,Ir,Rr,2*o*(1-o)),t}),Qr=(kr=J(),function(t,e,n,r){return kr[0]=n[0],kr[3]=n[1],kr[6]=n[2],kr[1]=r[0],kr[4]=r[1],kr[7]=r[2],kr[2]=-e[0],kr[5]=-e[1],kr[8]=-e[2],$r(t,Ar(t,kr))});function ti(){var t=new X(2);return X!=Float32Array&&(t[0]=0,t[1]=0),t}function ei(t){var e=new X(2);return e[0]=t[0],e[1]=t[1],e}function ni(t,e){var n=new X(2);return n[0]=t,n[1]=e,n}function ri(t,e){return t[0]=e[0],t[1]=e[1],t}function ii(t,e,n){return t[0]=e,t[1]=n,t}function oi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ai(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function si(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function ui(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function ci(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function li(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function hi(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function fi(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function pi(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function di(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function yi(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function gi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function vi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function mi(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function bi(t){var e=t[0],n=t[1];return e*e+n*n}function Ti(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Mi(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function Ei(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 wi(t,e){return t[0]*e[0]+t[1]*e[1]}function _i(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function xi(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 Ai(t,e){e=e||1;var n=2*K()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function Pi(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 Si(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 Ni(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 Oi(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 Ci(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 Ii(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 Ri(t){return t[0]=0,t[1]=0,t}function ki(t){return"vec2("+t[0]+", "+t[1]+")"}function Di(t,e){return t[0]===e[0]&&t[1]===e[1]}function ji(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=$*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=$*Math.max(1,Math.abs(r),Math.abs(o))}var Bi,Li=mi,Fi=ai,Gi=si,Vi=ui,Ui=gi,qi=vi,Wi=bi,zi=function(){var t=ti();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}}(),Hi=function(){function t(t,e){this.min=o.create(),this.max=o.create(),this.update(t,e)}return t.prototype.update=function(t,e){this.center=o.copy(o.create(),t||o.create()),this.halfExtents=o.copy(o.create(),e||o.fromValues(0,0,0)),this.min=o.sub(this.min,this.center,this.halfExtents),this.max=o.add(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){o.add(this.center,e,t),o.scale(this.center,this.center,.5),o.sub(this.halfExtents,e,t),o.scale(this.halfExtents,this.halfExtents,.5),o.copy(this.min,t),o.copy(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(t){var e=this.center,n=e[0],r=e[1],i=e[2],o=this.halfExtents,a=o[0],s=o[1],u=o[2],c=n-a,l=n+a,h=r-s,f=r+s,p=i-u,d=i+u,y=t.center,g=y[0],v=y[1],m=y[2],b=t.halfExtents,T=b[0],M=b[1],E=b[2],w=g-T,_=g+T,x=v-M,A=v+M,P=m-E,S=m+E;w<c&&(c=w),_>l&&(l=_),x<h&&(h=x),A>f&&(f=A),P<p&&(p=P),S>d&&(d=S),e[0]=.5*(c+l),e[1]=.5*(h+f),e[2]=.5*(p+d),o[0]=.5*(l-c),o[1]=.5*(f-h),o[2]=.5*(d-p),this.min[0]=c,this.min[1]=h,this.min[2]=p,this.max[0]=l,this.max[1]=f,this.max[2]=d},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,a=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],g=Math.abs(s),v=Math.abs(u),m=Math.abs(c),b=Math.abs(l),T=Math.abs(h),M=Math.abs(f),E=Math.abs(p),w=Math.abs(d),_=Math.abs(y);o.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]),o.set(r,g*a[0]+v*a[1]+m*a[2],b*a[0]+T*a[1]+M*a[2],E*a[0]+w*a[1]+_*a[2]),this.min=o.sub(this.min,n,r),this.max=o.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=o.max(o.create(),this.getMin(),e.getMin()),i=o.min(o.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?o.copy(o.create(),this.min):272===t.pnVertexFlag?o.fromValues(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?o.fromValues(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?o.fromValues(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?o.fromValues(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?o.fromValues(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?o.fromValues(this.max[0],this.max[1],this.min[2]):o.fromValues(this.max[0],this.max[1],this.max[2])},t.prototype.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?o.copy(o.create(),this.max):272===t.pnVertexFlag?o.fromValues(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?o.fromValues(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?o.fromValues(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?o.fromValues(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?o.fromValues(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?o.fromValues(this.min[0],this.min[1],this.max[2]):o.fromValues(this.min[0],this.min[1],this.min[2])},t}(),Yi=o.create(),$i=function(){function t(t,e){this.center=t||o.create(),this.radius=e||.5}return t.prototype.containsPoint=function(t){return o.sub(Yi,t,this.center),o.length(Yi)<this.radius*this.radius},t.prototype.intersects=function(t){o.sub(Yi,t.center,this.center);var e=t.radius+this.radius;return o.length(Yi)<=e*e},t}(),Xi=function(){function t(t,e){this.distance=t||0,this.normal=e||o.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 o.dot(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/o.len(this.normal);o.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)),a=i>=0&&i<=1;return a&&n&&o.lerp(n,t,e,i),a},t}();!function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"}(Bi||(Bi={}));var Ki,Ji=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Xi)}return t.prototype.extractFromVPMatrix=function(t){var e=T(t,16),n=e[0],r=e[1],i=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],g=e[13],v=e[14],m=e[15];o.set(this.planes[0].normal,a-n,l-s,d-h),this.planes[0].distance=m-y,o.set(this.planes[1].normal,a+n,l+s,d+h),this.planes[1].distance=m+y,o.set(this.planes[2].normal,a+r,l+u,d+f),this.planes[2].distance=m+g,o.set(this.planes[3].normal,a-r,l-u,d-f),this.planes[3].distance=m-g,o.set(this.planes[4].normal,a-i,l-c,d-p),this.planes[4].distance=m-v,o.set(this.planes[5].normal,a+i,l+c,d+p),this.planes[5].distance=m+v,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),Zi=o.create(),Qi=o.create(),to=o.create(),eo=o.create(),no=o.create(),ro=function(){function t(t,e){this.origin=t||o.create(),this.direction=e||o.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=o.sub(Zi,this.origin,t.center);o.normalize(Qi,o.copy(Qi,this.direction));var r=o.dot(n,Qi),i=o.dot(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var a=r*r-i;if(a<0)return!1;var s=Math.abs(-r-Math.sqrt(a));return e&&(o.copy(e,this.direction),o.scaleAndAdd(e,this.origin,e,s)),!0},t.prototype.intersectsPlane=function(t,e){var n=(t.distance-o.dot(t.normal,this.origin))/o.dot(t.normal,this.direction),r=n>=0;return r&&e&&o.scaleAndAdd(e,this.origin,this.direction,n),r},t.prototype.intersectsAABBWithoutIntersection=function(t){var e=Zi,n=Qi,r=to,i=eo,a=no,s=this.direction;return o.sub(e,this.origin,t.center),o.set(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),o.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)&&(o.set(a,Math.abs(s[0]),Math.abs(s[1]),Math.abs(s[2])),o.cross(n,s,e),o.set(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*a[2]+t.halfExtents[2]*a[1]||n[1]>t.halfExtents[0]*a[2]+t.halfExtents[2]*a[0]||n[2]>t.halfExtents[0]*a[1]+t.halfExtents[1]*a[0]))},t.prototype.intersectAABBWithIntersection=function(t,e){var n=o.copy(o.create(),t.getMin());o.sub(n,n,this.origin);var r=o.copy(o.create(),t.getMax());o.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 a=o.set(to,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),s=o.set(eo,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(a[0],a[1]),a[2]),l=u>=c&&c>=0;return l&&(o.copy(e,this.direction),o.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}(),oo=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}(),ao=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Array.isArray(t[0])?t[0]:t;if("number"!=typeof n[0]){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].x,n[i].y);n=r}this.points=n,this.closeStroke=!0}return t.prototype.clone=function(){var e=new t(this.points.slice());return e.closeStroke=this.closeStroke,e},t.prototype.contains=function(t,e){for(var n=!1,r=this.points.length/2,i=0,o=r-1;i<r;o=i++){var a=this.points[2*i],s=this.points[2*i+1],u=this.points[2*o],c=this.points[2*o+1];s>e!=c>e&&t<(e-s)/(c-s)*(u-a)+a&&(n=!n)}return n},t}(),so="SceneGraphSelectorFactory",uo="SceneGraphSelector",co=function(){function t(){}return t.prototype.selectOne=function(t,e){return t.startsWith("#")?e.find((function(e){return e.id===t.substring(1)})):null},t.prototype.selectAll=function(t,e){return t.startsWith(".")?e.findAll((function(e){return e.className===t.substring(1)})):t.startsWith("#")?e.findAll((function(e){return e.id===t.substring(1)})):t.startsWith("[name=")?e.findAll((function(e){return e.name===t.substring(7,t.length-2)})):e.findAll((function(e){return e.nodeName===t}))},t.prototype.is=function(){return!0},t=y([Object(c.singleton)()],t)}();function lo(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 ho(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(Ki.BOUNDS_CHANGED,{affectChildren:e})}!function(t){t.DESTROY="destroy",t.ATTRIBUTE_CHANGED="attribute-changed",t.INSERTED="inserted",t.CHILD_INSERTED="child-inserted",t.REMOVED="removed",t.CHILD_REMOVED="child-removed",t.MOUNTED="mounted",t.UNMOUNTED="unmounted",t.BOUNDS_CHANGED="bounds-changed"}(Ki||(Ki={}));var fo,po="SceneGraphService",yo=function(){function t(){var t,e,n,r,a,u=this;this.sort=function(t,e){if(!t.parentNode)return-1;if(!e.parentNode)return 1;var n=t.transformable.graphDepth-e.transformable.graphDepth,r=t,i=e;if(n<0){if((i=e.getAncestor(-n))===r)return-1}else if(n>0&&i===(r=t.getAncestor(n)))return 1;for(;r&&i&&r.parentNode!==i.parentNode;)r=r.parentNode,i=i.parentNode;var o=r.parentNode;if(o){var a=o.sortable;if(a)return a.sorted||(a.sorted=o.childNodes.slice()),a.dirty&&(a.sorted=o.childNodes.slice().sort(lo),a.dirty=!1),a.sorted.indexOf(r)-a.sorted.indexOf(i)}return-1},this.rotate=(t=s.create(),function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=o.fromValues(n,r,i));var a=e.transformable;if(null===e.parentNode)u.rotateLocal(e,n);else{var c=s.create();s.fromEuler(c,n[0],n[1],n[2]);var l=u.getRotation(e),h=u.getRotation(e.parentNode);s.copy(t,h),s.invert(t,t),s.multiply(t,t,c),s.multiply(a.localRotation,c,l),s.normalize(a.localRotation,a.localRotation),u.dirtifyLocal(e,a)}}),this.rotateLocal=(e=s.create(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=o.fromValues(n,r,i));var a=t.transformable;s.fromEuler(e,n[0],n[1],n[2]),s.mul(a.localRotation,a.localRotation,e),u.dirtifyLocal(t,a)}),this.setEulerAngles=(n=s.create(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=o.fromValues(e,r,i));var a=t.transformable;if(null===t.parentNode)u.setLocalEulerAngles(t,e);else{s.fromEuler(a.localRotation,e[0],e[1],e[2]);var c=u.getRotation(t.parentNode);s.copy(n,s.invert(s.create(),c)),s.mul(a.localRotation,a.localRotation,n),u.dirtifyLocal(t,a)}}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=o.fromValues(e,n,r));var i=t.transformable;o.equals(e,o.create())||(o.transformQuat(e,e,i.localRotation),o.add(i.localPosition,i.localPosition,e),u.dirtifyLocal(t,i))},this.setPosition=(r=i.create(),function(t,e){var n=t.transformable;if(e=o.fromValues(e[0],e[1],e[2]||n.position[2]),!o.equals(u.getPosition(t),e)){if(n.position=e,null===t.parentNode)o.copy(n.localPosition,e);else{var a=t.parentNode.transformable;i.copy(r,a.worldTransform),i.invert(r,r),o.transformMat4(n.localPosition,e,r)}u.dirtifyLocal(t,n)}}),this.translate=(a=o.create(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=o.fromValues(e,n,r)),o.equals(e,o.create())||(o.add(a,u.getPosition(t),e),u.setPosition(t,a))})}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,P(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0),this.updateGraphDepth(t);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;if(e){var n=this.getWorldTransform(t,e);i.getScaling(e.localScale,n),i.getTranslation(e.localPosition,n),i.getRotation(e.localRotation,n),e.localDirtyFlag=!0}var r=t.parentNode.sortable;r&&(r.dirty=!0);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,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=o.fromValues(e,n,r));var i=t.transformable;if(!o.equals(e,i.origin)){var a=i.origin;a[0]=e[0],a[1]=e[1],a[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=o.fromValues(e,n,r));var i=t.transformable;s.fromEuler(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.setLocalPosition=function(t,e){var n=t.transformable;e=o.fromValues(e[0],e[1],e[2]||n.localPosition[2]),o.equals(n.localPosition,e)||(o.copy(n.localPosition,e),this.dirtifyLocal(t,n))},t.prototype.scaleLocal=function(t,e){var n=t.transformable;o.multiply(n.localScale,n.localScale,o.fromValues(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=o.fromValues(e[0],e[1],e[2]||n.localScale[2]);o.equals(r,n.localScale)||(o.copy(n.localScale,r),this.dirtifyLocal(t,n))},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),ho(t,!0)},t.prototype.getPosition=function(t){var e=t.transformable;return i.getTranslation(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return i.getRotation(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return i.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&&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&&(i.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.localTransform},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(n){var r=new Hi;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r}return null},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 Hi(r.center,r.halfExtents)||null},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 Hi).update(r.center,r.halfExtents))}));var o=t.style.clipPath;if(o){var a=this.getTransformedGeometryBounds(o,!0),s=void 0;a&&(s=new Hi).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||null},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=i.create();t.parentNode.transformable&&(e=i.invert(i.create(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(n){var r=new Hi;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);i&&(r=new Hi).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=T(r.getMin(),2),s=a[0],u=a[1],c=T(r.getMax(),2),l=c[0],h=c[1];return new oo(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),l-s,h-u)}return new oo((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.emit(Ki.ATTRIBUTE_CHANGED,{attributeName:"modelMatrix",oldValue:null,newValue: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&&(i.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?i.multiply(e.worldTransform,r.worldTransform,e.localTransform):i.copy(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.updateGraphDepth=function(t){var e=t.transformable;t.parentNode?e.graphDepth=t.parentNode.transformable.graphDepth+1:e.graphDepth=0;for(var n=t.childNodes,r=0;r<n.length;r++)this.updateGraphDepth(n[r])},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},y([Object(c.inject)(so),g("design:type",Function)],t.prototype,"sceneGraphSelectorFactory",void 0),t=y([Object(c.singleton)()],t)}(),go="GeometryUpdaterFactory",vo="GeometryAABBGenerator";!function(t){t.Group="group",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"}(fo||(fo={}));var mo="CanvasConfig",bo=function(){function t(){}return t.prototype.update=function(t){var e=t.r,n=void 0===e?0:e,r=t.x,i=void 0===r?0:r,o=t.y;return{width:2*n,height:2*n,x:i,y:void 0===o?0:o}},t=y([Object(c.singleton)({token:{token:vo,named:fo.Circle}})],t)}(),To=function(){function t(){}return t.prototype.update=function(t){var e=t.rx,n=void 0===e?0:e,r=t.ry,i=void 0===r?0:r,o=t.x,a=void 0===o?0:o,s=t.y;return{width:2*n,height:2*i,x:a,y:void 0===s?0:s}},t=y([Object(c.singleton)({token:{token:vo,named:fo.Ellipse}})],t)}(),Mo=function(){function t(){}return t.prototype.update=function(t){var e,n,r=t.img,i=t.x,o=void 0===i?0:i,a=t.y,s=void 0===a?0:a,u=t.width,c=void 0===u?0:u,l=t.height,h=void 0===l?0:l;return r&&!D(r)&&(t.width||(e=r.width),t.height||(n=r.height)),{width:e||c,height:n||h,x:o,y:s}},t=y([Object(c.singleton)({token:[{token:vo,named:fo.Rect},{token:vo,named:fo.Image}]})],t)}(),Eo=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function wo(t){var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=L(e)?e+"px":e,s=n;Array.isArray(n)||(s=n.split(","));for(var u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&Eo.indexOf(c)<0&&(c='"'+c+'"'),s[u]=c}return r+" "+i+" "+o+" "+a+" "+s.join(",")}var _o,xo=function(){function t(){}return t.prototype.getOrCreateCanvas=function(){if(this.canvas)return this.canvas;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(){return this.context||this.getOrCreateCanvas(),this.context},t=y([Object(c.singleton)()],t)}(),Ao={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]},Po=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,So=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),No=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Oo=function(){function t(){var t=this;this.cache={},this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!No.exec(n)&&!So.exec(e))},this.trimByKinsokuShorui=function(t){var e=M([],T(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){if(this.cache[t])return this.cache[t];var e={ascent:0,descent:0,fontSize:0},n=this.offscreenCanvas.getOrCreateCanvas(),r=this.offscreenCanvas.getOrCreateContext();r.font=t;var i=Ao.MetricsString+Ao.BaselineSymbol,o=Math.ceil(r.measureText(i).width),a=Math.ceil(r.measureText(Ao.BaselineSymbol).width),s=Ao.HeightMultiplier*a;a=a*Ao.BaselineMultiplier|0,n.width=o,n.height=s,r.fillStyle="#f00",r.fillRect(0,0,o,s),r.font=t,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(i,0,a);var u=r.getImageData(0,0,o,s).data,c=u.length,l=4*o,h=0,f=0,p=!1;for(h=0;h<a;++h){for(var d=0;d<l;d+=4)if(255!==u[f+d]){p=!0;break}if(p)break;f+=l}for(e.ascent=a-h,f=c-l,p=!1,h=s;h>a;--h){for(d=0;d<l;d+=4)if(255!==u[f+d]){p=!0;break}if(p)break;f-=l}return e.descent=h-a,e.fontSize=e.ascent+e.descent,this.cache[t]=e,e},t.prototype.measureText=function(t,e){var n=e.fontSize,r=void 0===n?0:n,i=e.wordWrap,o=e.lineHeight,a=void 0===o?0:o,s=e.lineWidth,u=void 0===s?0:s,c=e.textBaseline,l=e.textAlign,h=e.letterSpacing,f=void 0===h?0:h,p=e.dropShadow,d=e.dropShadowDistance,y=void 0===d?0:d,g=e.leading,v=void 0===g?0:g,m=wo(e),b=this.measureFont(m);0===b.fontSize&&(b.fontSize=r,b.ascent=r);var T=this.offscreenCanvas.getOrCreateContext();T.font=m;for(var M=(i?this.wordWrap(t,e):t).split(/(?:\r\n|\r|\n)/),E=new Array(M.length),w=0,_=0;_<M.length;_++){var x=T.measureText(M[_]).width+(M[_].length-1)*f;E[_]=x,w=Math.max(w,x)}var A=w+u;p&&(A+=y);var P=a||b.fontSize+u,S=Math.max(P,b.fontSize+u)+(M.length-1)*(P+v);p&&(S+=y);var N=0;return"middle"===c?N=-S/2:"bottom"===c||"alphabetic"===c||"ideographic"===c?N=-S:"top"!==c&&"hanging"!==c||(N=0),{font:m,width:A,height:S,lines:M,lineWidths:E,lineHeight:P+=v,maxLineWidth:w,fontProperties:b,lineMetrics:E.map((function(t,e){var n=0;return"center"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new oo(n-u/2,N+e*P,t+u,P)}))}},t.prototype.wordWrap=function(t,e){var n=this,r=e.wordWrapWidth,i=void 0===r?0:r,o=e.letterSpacing,a=void 0===o?0:o,s=this.offscreenCanvas.getOrCreateContext(),u=i+a,c=[],l=0,h=0,f={},p=function(t){return n.getFromCache(t,a,f,s)};return Array.from(t).forEach((function(e,r){var i=t[r-1],o=t[r+1],a=p(e);if(n.isNewline(e))return l++,h=0,void(c[l]="");if(h>0&&h+a>u){if(l++,h=0,c[l]="",n.isBreakingSpace(e))return;n.canBreakInLastChar(e)||(c=n.trimToBreakable(c),h=n.sumTextWidthByCache(c[l]||"",f)),n.shouldBreakByKinsokuShorui(e,o)&&(c=n.trimByKinsokuShorui(c),h+=p(i||""))}h+=a,c[l]=(c[l]||"")+e})),c.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&Ao.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&Ao.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=M([],T(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||!Po.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(!Po.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},y([Object(c.inject)(xo),g("design:type",xo)],t.prototype,"offscreenCanvas",void 0),t=y([Object(c.singleton)()],t)}(),Co=function(){function t(){}return t.prototype.update=function(t){var e=t.text,n=void 0===e?"":e,r=t.textAlign,i=t.lineWidth,a=void 0===i?0:i,s=t.textBaseline,u=t.x,c=void 0===u?0:u,l=t.y,h=void 0===l?0:l,f=this.textService.measureText(n,t);t.metrics=f;var p=f.width,d=f.height,y=f.lineHeight,g=f.fontProperties,v=o.fromValues(p/2,d/2,0),m=[0,1],b=0;"center"===r?(b=a/2,m=[.5,1]):"right"!==r&&"end"!==r||(b=a,m=[1,1]),t.anchor=m;var T=0;return"middle"===s?T=v[1]:"top"===s||"hanging"===s?T=2*v[1]:"alphabetic"===s?T=y-g.ascent:"bottom"!==s&&"ideographic"!==s||(T=0),{width:2*v[0],height:2*v[1],x:c,y:h,offsetX:b,offsetY:T}},y([Object(c.inject)(Oo),g("design:type",Oo)],t.prototype,"textService",void 0),t=y([Object(c.singleton)({token:{token:vo,named:fo.Text}})],t)}(),Io=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,r),a=Math.max(e,r),s=Math.min(n,i);return{width:a-o,height:Math.max(n,i)-s,x:o,y:s}},t=y([Object(c.singleton)({token:{token:vo,named:fo.Line}})],t)}(),Ro=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,M([],T(e.map((function(t){return t[0]}))),!1)),r=Math.max.apply(Math,M([],T(e.map((function(t){return t[0]}))),!1)),i=Math.min.apply(Math,M([],T(e.map((function(t){return t[1]}))),!1));return{width:r-n,height:Math.max.apply(Math,M([],T(e.map((function(t){return t[1]}))),!1))-i,x:n,y:i}},t=y([Object(c.singleton)({token:[{token:vo,named:fo.Polyline},{token:vo,named:fo.Polygon}]})],t)}(),ko=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect,n=e.x,r=e.y;return{width:e.width,height:e.height,x:n,y:r}},t=y([Object(c.singleton)({token:{token:vo,named:fo.Path}})],t)}(),Do="StylePropertyParser",jo="StylePropertyParserFactory",Bo="StylePropertyUpdater",Lo="StylePropertyUpdaterFactory",Fo="StylePropertyMerger",Go="StylePropertyMergerFactory",Vo=c.Syringe.defineToken("ContextService",{multiple:!1});!function(t){t[t.CameraChanged=0]="CameraChanged",t[t.DisplayObjectChanged=1]="DisplayObjectChanged",t[t.DisplayObjectRemoved=2]="DisplayObjectRemoved",t[t.None=3]="None"}(_o||(_o={}));var Uo,qo="RenderingContext",Wo=n(2),zo=c.Syringe.defineToken("RenderingPluginContribution"),Ho=function(){function t(){this.inited=!1,this.hooks={init:new Wo.AsyncSeriesHook,prepare:new Wo.SyncWaterfallHook(["object"]),beginFrame:new Wo.SyncHook([]),beforeRender:new Wo.SyncHook(["objectToRender"]),render:new Wo.SyncHook(["objectToRender"]),afterRender:new Wo.SyncHook(["objectToRender"]),endFrame:new Wo.SyncHook([]),destroy:new Wo.SyncHook([]),pick:new Wo.AsyncSeriesWaterfallHook(["result"]),pointerDown:new Wo.SyncHook(["event"]),pointerUp:new Wo.SyncHook(["event"]),pointerMove:new Wo.SyncHook(["event"]),pointerOut:new Wo.SyncHook(["event"]),pointerOver:new Wo.SyncHook(["event"]),pointerWheel:new Wo.SyncHook(["event"])}}return t.prototype.init=function(){return v(this,void 0,void 0,(function(){var t=this;return m(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.render=function(){this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root),this.renderingContext.dirty?(this.hooks.endFrame.call(),this.renderingContext.dirty=!1):this.renderingContext.renderReasons.has(_o.DisplayObjectRemoved)&&(this.hooks.beginFrame.call(),this.hooks.endFrame.call()),this.renderingContext.renderReasons.clear())},t.prototype.renderDisplayObject=function(t){var e=this,n=this.hooks.prepare.call(t);n&&(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);var r=t.sortable;r.dirty&&(r.sorted=t.childNodes.slice().sort(lo),r.dirty=!1),(r.sorted||t.childNodes).forEach((function(t){e.renderDisplayObject(t)}))},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call()},t.prototype.dirtify=function(){this.renderingContext.renderReasons.add(_o.DisplayObjectChanged)},y([Object(c.contrib)(zo),g("design:type",Object)],t.prototype,"renderingPluginProvider",void 0),y([Object(c.inject)(qo),g("design:type",Object)],t.prototype,"renderingContext",void 0),y([Object(c.inject)(po),g("design:type",Object)],t.prototype,"sceneGraphService",void 0),t=y([Object(c.singleton)()],t)}(),Yo=function(){function t(){}return t.tag="c-geometry",t}(),$o=function(){function t(){this.boundsDirty=!0,this.renderBoundsDirty=!0,this.dirty=!1}return t.tag="c-renderable",t}(),Xo=function(){function t(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.graphDepth=0,this.localPosition=o.fromValues(0,0,0),this.localRotation=s.fromValues(0,0,0,1),this.localScale=o.fromValues(1,1,1),this.localTransform=i.create(),this.position=o.fromValues(0,0,0),this.rotation=s.fromValues(0,0,0,1),this.scaling=o.fromValues(1,1,1),this.worldTransform=i.create(),this.origin=o.fromValues(0,0,0)}return t.tag="c-transform",t}();!function(t){t[t.Standard=0]="Standard"}(Uo||(Uo={}));var Ko=function(){function t(){this.strategy=Uo.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}(),Jo=function(){function t(){this.dirty=!1}return t.tag="c-sortable",t}(),Zo=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,"originalEvent",{get:function(){return this.nativeEvent},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}(),Qo=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 f(e,t),e}(Zo),ta=":",ea=function(){function t(){this.emitter=new l.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=q(n)&&n||N(n)&&n.capture,i=N(n)&&n.once,o=A(e)?void 0:e,a=!1,s="";if(t.indexOf(ta)>-1){var u=T(t.split(ta),2),c=u[0];t=u[1],s=c,a=!0}if(t=r?t+"capture":t,e=A(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,M([],T(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=q(n)&&n||N(n)&&n.capture,i=A(e)?void 0:e;return t=r?t+"capture":t,e=A(e)?e:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new Qo(t,e))},t.prototype.dispatchEvent=function(t){var e,n;if(!(t instanceof Zo))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}(),na=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.textContent=null,e.parentNode=null,e}return f(e,t),e.isNode=function(t){return!!t.childNodes},e.prototype.getRootNode=function(){for(var t=this;t.parentNode;)t=t.parentNode;return t},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},e.prototype.compareDocumentPosition=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.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}(ea),ra=0,ia=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sceneGraphService=Ic.get(po),e.entity=ra++,e.renderable=new $o,e.cullable=new Ko,e.transformable=new Xo,e.sortable=new Jo,e.geometry=new Yo,e.scrollLeft=0,e.scrollTop=0,e.destroyed=!1,e.style={},e.parsedStyle={},e.attributes={},e}return f(e,t),e.isElement=function(t){return!!t.getAttribute},Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ")},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(Ki.CHILD_INSERTED,{child:t}),t.emit(Ki.INSERTED,{parent:this}),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.emit(Ki.REMOVED,{parent:this}),e&&(t.emit(Ki.DESTROY,{}),t.destroyed=!0),this.emit(Ki.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("#"+t,this)},e.prototype.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.prototype.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll("."+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=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=T(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,M([],T(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,M([],T(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,M([],T(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(Ki.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.getAttribute=function(t){var e=this.attributes[t];return P(e)?void 0:e},e.prototype.removeAttribute=function(t){delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){void 0===n&&(n=!1),this.attributes[t]=e},e}(na),oa=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 f(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}(Zo),aa=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 f(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}(oa),sa=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 f(e,t),e}(oa),ua=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.onPointerDown=function(t){return v(e,void 0,void 0,(function(){var e,n;return m(this,(function(r){switch(r.label){case 0:return t instanceof aa?[4,this.createPointerEvent(t)]:[2];case 1:return e=r.sent(),this.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType?this.dispatchEvent(e,"touchstart"):"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 v(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c;return m(this,(function(l){switch(l.label){case 0:return t instanceof aa?(e=performance.now(),[4,this.createPointerEvent(t)]):[2];case 1:if(n=l.sent(),this.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?this.dispatchEvent(n,"touchend"):"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")),na.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?this.dispatchEvent(u,"click"):"touch"===u.pointerType?this.dispatchEvent(u,"tap"):this.dispatchEvent(u,"pointertap"),this.freeEvent(u)),this.freeEvent(n),[2]}}))}))},e.onPointerMove=function(t){return v(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,l,h;return m(this,(function(f){switch(f.label){case 0:return t instanceof aa?[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"),na.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&&na.isNode(i)&&i.parentNode;l&&l!==(na.isNode(this.rootTarget)&&this.rootTarget.parentNode)&&l!==e.target;)l=l.parentNode;if(!l||l===(na.isNode(this.rootTarget)&&this.rootTarget.parentNode)){for((h=this.clonePointerEvent(e,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==i&&h.target!==(na.isNode(this.rootTarget)&&this.rootTarget.parentNode);)h.currentTarget=h.target,this.notifyTarget(h),n&&this.notifyTarget(h,"mouseenter"),na.isNode(h.target)&&(h.target=h.target.parentNode);this.freeEvent(h)}this.freeEvent(c)}return this.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&this.dispatchEvent(e,"touchmove"),n&&(this.dispatchEvent(e,"mousemove"),this.cursor=this.getCursor(e.target)),r.overTargets=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerOut=function(t){return v(e,void 0,void 0,(function(){var e,n,r,i,o;return m(this,(function(a){switch(a.label){case 0:return t instanceof aa?(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!==(na.isNode(this.rootTarget)&&this.rootTarget.parentNode);)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),na.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 v(e,void 0,void 0,(function(){var e,n,r,i;return m(this,(function(o){switch(o.label){case 0:return t instanceof aa?(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!==(na.isNode(this.rootTarget)&&this.rootTarget.parentNode);)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,"mouseenter"),na.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 v(e,void 0,void 0,(function(){var e,n,r,i;return m(this,(function(o){switch(o.label){case 0:return t instanceof aa?(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?this.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||this.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),na.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}return this.freeEvent(r),[2]}}))}))},e.onWheel=function(t){return v(e,void 0,void 0,(function(){var e;return m(this,(function(n){switch(n.label){case 0:return t instanceof sa?[4,this.createWheelEvent(t)]:[2];case 1:return e=n.sent(),this.dispatchEvent(e),this.freeEvent(e),[2]}}))}))},e}return f(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)},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(),a=this.canvasConfig,s=a.width,u=a.height,c=r.getPerspectiveInverse(),l=r.getWorldTransform(),h=i.multiply(i.create(),l,c),f=o.fromValues(e/s*2-1,2*(1-n/u)-1,0);return o.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(),a=i.multiply(i.create(),n,r),s=o.fromValues(t.x,t.y,0);o.transformMat4(s,s,a);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 "+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){t.eventPhase=t.BUBBLING_PHASE;for(r=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++)na.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.prototype.hitTest=function(t){return v(this,void 0,void 0,(function(){var e,n,r,i,o;return m(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.createPointerEvent=function(t,e,n){return v(this,void 0,void 0,(function(){var r,i,o;return m(this,(function(a){switch(a.label){case 0:return r=this.allocateEvent(aa),this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,r._originalEvent=t,i=r,null==n?[3,1]:(o=n,[3,3]);case 1:return[4,this.hitTest({clientX:r.clientX,clientY:r.clientY,viewportX:r.viewportX,viewportY:r.viewportY,x:r.global.x,y:r.global.y})];case 2:o=a.sent(),a.label=3;case 3:return i.target=o,"string"==typeof e&&(r.type=e),[2,r]}}))}))},e.prototype.createWheelEvent=function(t){return v(this,void 0,void 0,(function(){var e,n;return m(this,(function(r){switch(r.label){case 0:return e=this.allocateEvent(sa),this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e._originalEvent=t,n=e,[4,this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.global.x,y:e.global.y})];case 1:return n.target=r.sent(),[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(aa);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 aa&&e instanceof aa&&(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 oa&&e instanceof oa&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,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.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?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(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(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||na.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.prototype.getCursor=function(t){for(var e=t;e;){var n=ia.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=na.isNode(e)&&e.parentNode}},y([Object(c.inject)(qo),g("design:type",Object)],e.prototype,"renderingContext",void 0),y([Object(c.inject)(Vo),g("design:type",Object)],e.prototype,"contextService",void 0),y([Object(c.inject)(mo),g("design:type",Object)],e.prototype,"canvasConfig",void 0),y([Object(c.postConstruct)(),g("design:type",Function),g("design:paramtypes",[]),g("design:returntype",void 0)],e.prototype,"init",null),e=y([Object(c.singleton)()],e)}(l.EventEmitter);function ca(t){return void 0===t?0:t>360||t<-360?t%360:t}function la(t,e,n){return L(t)?o.fromValues(t,e,n):3===t.length?o.clone(t):o.fromValues(t[0],t[1],t[2]||0)}function ha(t){return t*(Math.PI/180)}function fa(t){return t*(180/Math.PI)}function pa(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 da(t,e){return t[0]=e[6],t[1]=e[7],t}function ya(t){return Math.atan2(t[1],t[4])}function ga(t,e){return 16===e.length?function(t,e){var n,r,a=.5*Math.PI,s=T(i.getScaling(o.create(),e),3),u=s[0],c=s[1],l=s[2],h=Math.asin(-e[2]/u);return h<a?h>-a?(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 va(t,e,n,i,o){var a=Math.cos(t),s=Math.sin(t);return r.fromValues(i*a,o*s,0,-i*s,o*a,0,e,n,1)}function ma(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}var ba="function"==typeof Float32Array,Ta=function(t,e){return 1-3*e+3*t},Ma=function(t,e){return 3*e-6*t},Ea=function(t){return 3*t},wa=function(t,e,n){return((Ta(e,n)*t+Ma(e,n))*t+Ea(e))*t},_a=function(t,e,n){return 3*Ta(e,n)*t*t+2*Ma(e,n)*t+Ea(e)},xa=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=ba?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=wa(.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=_a(a,t,n);return s>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=_a(e,n,r);if(0===o)return e;e-=(wa(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=wa(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:wa(a(t),e,r)}},Aa=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substr(1):t},Pa=function(t,e,n){return Math.min(Math.max(t,e),n)},Sa=function(t){return Math.pow(t,2)},Na=function(t){return Math.pow(t,3)},Oa=function(t){return Math.pow(t,4)},Ca=function(t){return Math.pow(t,5)},Ia=function(t){return Math.pow(t,6)},Ra=function(t){return 1-Math.cos(t*Math.PI/2)},ka=function(t){return 1-Math.sqrt(1-t*t)},Da=function(t){return t*t*(3*t-2)},ja=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)},Ba=function(t,e){void 0===e&&(e=[]);var n=T(e,2),r=n[0],i=void 0===r?1:r,o=n[1],a=void 0===o?.5:o,s=Pa(Number(i),1,10),u=Pa(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)},La=function(t,e,n){void 0===e&&(e=[]);var r=T(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=Pa(o,.1,1e3),s=Pa(s,.1,1e3),c=Pa(c,.1,1e3),h=Pa(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,g=n?n*t/1e3:t;return g=p<1?Math.exp(-g*p*f)*(1*Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*f),0===t||1===t?t:1-g},Fa=(new Map,function(t,e){void 0===e&&(e=[]);var n=T(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(Pa(t,0,1)*i)/i}),Ga=function(t,e){void 0===e&&(e=[]);var n=T(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return xa(r,i,o,a)(t)},Va=xa(.42,0,1,1),Ua=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},qa=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}},Wa=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}},za={steps:Fa,"step-start":function(t){return Fa(t,[1,"start"])},"step-end":function(t){return Fa(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Ga,ease:function(t){return Ga(t,[.25,.1,.25,1])},in:Va,out:Ua(Va),"in-out":qa(Va),"out-in":Wa(Va),"in-quad":Sa,"out-quad":Ua(Sa),"in-out-quad":qa(Sa),"out-in-quad":Wa(Sa),"in-cubic":Na,"out-cubic":Ua(Na),"in-out-cubic":qa(Na),"out-in-cubic":Wa(Na),"in-quart":Oa,"out-quart":Ua(Oa),"in-out-quart":qa(Oa),"out-in-quart":Wa(Oa),"in-quint":Ca,"out-quint":Ua(Ca),"in-out-quint":qa(Ca),"out-in-quint":Wa(Ca),"in-expo":Ia,"out-expo":Ua(Ia),"in-out-expo":qa(Ia),"out-in-expo":Wa(Ia),"in-sine":Ra,"out-sine":Ua(Ra),"in-out-sine":qa(Ra),"out-in-sine":Wa(Ra),"in-circ":ka,"out-circ":Ua(ka),"in-out-circ":qa(ka),"out-in-circ":Wa(ka),"in-back":Da,"out-back":Ua(Da),"in-out-back":qa(Da),"out-in-back":Wa(Da),"in-bounce":ja,"out-bounce":Ua(ja),"in-out-bounce":qa(ja),"out-in-bounce":Wa(ja),"in-elastic":Ba,"out-elastic":Ua(Ba),"in-out-elastic":qa(Ba),"out-in-elastic":Wa(Ba),spring:La,"spring-in":La,"spring-out":Ua(La),"spring-in-out":qa(La),"spring-out-in":Wa(La)},Ha=function(t){return za[function(t){return Aa(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||za.linear},Ya=function(t){return t};function $a(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var Xa="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Ka=new RegExp("cubic-bezier\\("+Xa+","+Xa+","+Xa+","+Xa+"\\)"),Ja=/steps\(\s*(\d+)\s*\)/,Za=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Qa(t){var e=Ka.exec(t);if(e)return xa.apply(void 0,M([],T(e.slice(1).map(Number)),!1));var n=Ja.exec(t);if(n)return $a(Number(n[1]),0);var r=Za.exec(t);return r?$a(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Ha(t)}function ts(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 es(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.delay+t+n.endDelay;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t,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 ns={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)"};Object.keys(ns);function rs(t,e,n){var r=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(is(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Qa(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:os(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)is(n)&&(t.style[n]=null)}}function is(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}function os(t,e,n,r){var i=e,o=n,a=Ic.get(jo)(t),s=Ic.get(Go)(t);a&&(i=a(e,r),o=a(n,r));var u=s&&s(i,o,r);if(u){var c=as.apply(void 0,M([],T(u),!1));return function(t){return 0===t?e:1===t?n:c(t)}}return as(!1,!0,(function(t){return t?n:e}))}var as=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 ss(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function us(t,e){return Math.abs(t-e)<.001}function cs(t,e){var n=R(t),r=R(e);return{x:n,y:r,width:I(t)-n,height:I(e)-r}}function ls(t){return(t+2*Math.PI)%(2*Math.PI)}var hs={box:function(t,e,n,r){return cs([t,n],[e,r])},length:function(t,e,n,r){return ss(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?ss(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?ss(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(u.exactEquals(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];u.normalize(s,s);var c=[i-t,o-e];return Math.abs(u.dot(c,s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function fs(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(null,t.concat([p])),i.apply(null,e.concat([p]))];(m=ss(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 g=a-h,v=a+h,m=(d=[i.apply(null,t.concat([g])),i.apply(null,e.concat([g]))],ss(u[0],u[1],d[0],d[1]));if(g>=0&&m<s)a=g,s=m;else{var b=[i.apply(null,t.concat([v])),i.apply(null,e.concat([v]))],T=ss(u[0],u[1],b[0],b[1]);v<=1&&T<s?(a=v,s=T):h*=.5}}return{x:i.apply(null,t.concat([a])),y:i.apply(null,e.concat([a]))}}function ps(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 ds(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 ys(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(us(s,0))us(u,0)||(i=-c/u)>=0&&i<=1&&l.push(i);else{var h=u*u-4*s*c;us(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 gs(t,e,n,r,i,o,a,s,u){var c=ps(t,n,i,a,u),l=ps(e,r,o,s,u),h=hs.pointAt(t,e,n,r,u),f=hs.pointAt(n,r,i,o,u),p=hs.pointAt(i,o,a,s,u),d=hs.pointAt(h.x,h.y,f.x,f.y,u),y=hs.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 vs(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+=ss(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=gs(t,e,n,r,i,o,a,s,.5),l=M(M([],T(c[0]),!1),[u-1],!1),h=M(M([],T(c[1]),!1),[u-1],!1);return vs.apply(null,l)+vs.apply(null,h)}var ms={extrema:ys,box:function(t,e,n,r,i,o,a,s){for(var u=[t,a],c=[e,s],l=ys(t,n,i,a),h=ys(e,r,o,s),f=0;f<l.length;f++)u.push(ps(t,n,i,a,l[f]));for(f=0;f<h.length;f++)c.push(ps(e,r,o,s,h[f]));return cs(u,c)},length:function(t,e,n,r,i,o,a,s){return vs(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,u,c,l){return fs([t,n,i,a],[e,r,o,s],u,c,ps,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 ss(h.x,h.y,u,c)},interpolationAt:ps,pointAt:function(t,e,n,r,i,o,a,s,u){return{x:ps(t,n,i,a,u),y:ps(e,r,o,s,u)}},divide:function(t,e,n,r,i,o,a,s,u){return gs(t,e,n,r,i,o,a,s,u)},tangentAngle:function(t,e,n,r,i,o,a,s,u){var c=ds(t,n,i,a,u),l=ds(e,r,o,s,u);return ls(Math.atan2(l,c))}};function bs(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+=ss(r[0],r[1],i[0],i[1])}return e}var Ts=function(t){return bs(t)};function Ms(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function Es(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?ms.length.apply(ms,M([],T(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=Ms(n,r,e),s=Ms(r,i,e),u=Ms(i,o,e),c=Ms(a,s,e),l=Ms(s,u,e),h=Ms(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function ws(t,e,n){var r=Es(t),i=Es(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:ws(y[0],y[1],h)}function _s(t){return As(t)>=0}function xs(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 As(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=xs.apply(0,[e,n].concat(t.slice(1))),a=T(t.slice(-2),2),e=a[0],n=a[1],o}})).reduce((function(t,e){return t+e}),0)}function Ps(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 Ss(t){return t.map((function(t){return Array.isArray(t)?Ss(t):Number.isNaN(+t)?t:+t}))}function Ns(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 Os(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 Cs(t){var e=t.getLocalTransform(),n=(t.style.anchor,[]);switch(t.nodeName){case fo.Line:var r=t.parsedStyle;n=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(r.x1,r.y1,r.x2,r.y2);break;case fo.Circle:var i=t.parsedStyle,a=i.r,s=i.x,u=void 0===s?0:s,c=i.y;n=Os(a,a,u,void 0===c?0:c);break;case fo.Ellipse:var l=t.parsedStyle,h=l.rx,f=l.ry,p=l.x,d=void 0===p?0:p,y=l.y;n=Os(h,f,d,void 0===y?0:y);break;case fo.Polyline:case fo.Polygon:n=function(t){return t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t.parsedStyle.points.points);break;case fo.Rect:var g=t.parsedStyle;n=function(t,e,n,r){return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(g.width,g.height,g.x,g.y);break;case fo.Path:n=t.parsedStyle.path.curve}if(n.length)return function(t,e,n,r){var i=r.x,a=r.y;return t.reduce((function(t,n){var r="";if("M"===n[0]||"L"===n[0]){var s=o.fromValues(n[1]-i,n[2]-a,0);o.transformMat4(s,s,e),r=""+n[0]+s[0]+","+s[1]}else if("Z"===n[0])r=n[0];else if("C"===n[0]){var u=o.fromValues(n[1]-i,n[2]-a,0),c=o.fromValues(n[3]-i,n[4]-a,0),l=o.fromValues(n[5]-i,n[6]-a,0);o.transformMat4(u,u,e),o.transformMat4(c,c,e),o.transformMat4(l,l,e),r=""+n[0]+u[0]+","+u[1]+","+c[0]+","+c[1]+","+l[0]+","+l[1]}return t+r}),"")}(n,e,0,t.parsedStyle)}function Is(t){return(Is="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 Rs(t){return("object"===("undefined"==typeof window?"undefined":Is(window))&&window.requestAnimationFrame?window.requestAnimationFrame:function(t){return setTimeout(t,16)})(t)}function ks(t){return("object"===("undefined"==typeof window?"undefined":Is(window))&&window.cancelAnimationFrame?window.cancelAnimationFrame:clearTimeout)(t)}function Ds(t,e,n){var r=n.getGeometryBounds();if(r){var i=n.geometry;if(i&&i.contentBounds){var a=o.multiply(o.create(),o.fromValues.apply(o,M([],T(r.halfExtents.map((function(t){return 2*t}))),!1)),o.subtract(o.create(),la(e||o.create()),la(t||o.create())));i.contentBounds.update(o.subtract(i.contentBounds.center,i.contentBounds.center,a),i.contentBounds.halfExtents),i.renderBounds.update(o.subtract(i.renderBounds.center,i.renderBounds.center,a),i.renderBounds.halfExtents),ho(n)}}}var js=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Bs(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ls(){}var Fs,Gs="\\s*([+-]?\\d+)\\s*",Vs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Us="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qs=/^#([0-9a-f]{3,8})$/,Ws=new RegExp("^rgb\\("+[Gs,Gs,Gs]+"\\)$"),zs=new RegExp("^rgb\\("+[Us,Us,Us]+"\\)$"),Hs=new RegExp("^rgba\\("+[Gs,Gs,Gs,Vs]+"\\)$"),Ys=new RegExp("^rgba\\("+[Us,Us,Us,Vs]+"\\)$"),$s=new RegExp("^hsl\\("+[Vs,Us,Us]+"\\)$"),Xs=new RegExp("^hsla\\("+[Vs,Us,Us,Vs]+"\\)$"),Ks={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 Js(){return this.rgb().formatHex()}function Zs(){return this.rgb().formatRgb()}function Qs(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=qs.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tu(e):3===n?new ru(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?eu(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?eu(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=Ws.exec(t))?new ru(e[1],e[2],e[3],1):(e=zs.exec(t))?new ru(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Hs.exec(t))?eu(e[1],e[2],e[3],e[4]):(e=Ys.exec(t))?eu(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$s.exec(t))?su(e[1],e[2]/100,e[3]/100,1):(e=Xs.exec(t))?su(e[1],e[2]/100,e[3]/100,e[4]):Ks.hasOwnProperty(t)?tu(Ks[t]):"transparent"===t?new ru(NaN,NaN,NaN,0):null}function tu(t){return new ru(t>>16&255,t>>8&255,255&t,1)}function eu(t,e,n,r){return r<=0&&(t=e=n=NaN),new ru(t,e,n,r)}function nu(t){return t instanceof Ls||(t=Qs(t)),t?new ru((t=t.rgb()).r,t.g,t.b,t.opacity):new ru}function ru(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function iu(){return"#"+au(this.r)+au(this.g)+au(this.b)}function ou(){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 au(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function su(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new cu(t,e,n,r)}function uu(t){if(t instanceof cu)return new cu(t.h,t.s,t.l,t.opacity);if(t instanceof Ls||(t=Qs(t)),!t)return new cu;if(t instanceof cu)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 cu(a,s,u,t.opacity)}function cu(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function lu(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}js(Ls,Qs,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Js,formatHex:Js,formatHsl:function(){return uu(this).formatHsl()},formatRgb:Zs,toString:Zs}),js(ru,(function(t,e,n,r){return 1===arguments.length?nu(t):new ru(t,e,n,null==r?1:r)}),Bs(Ls,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ru(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ru(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:iu,formatHex:iu,formatRgb:ou,toString:ou})),js(cu,(function(t,e,n,r){return 1===arguments.length?uu(t):new cu(t,e,n,null==r?1:r)}),Bs(Ls,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cu(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 ru(lu(t>=240?t-240:t+120,i,r),lu(t,i,r),lu(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+")")}})),function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t[t.Pattern=3]="Pattern"}(Fs||(Fs={}));var hu=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,fu=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,pu=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,du=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function yu(t){if(void 0===t&&(t=""),"transparent"===t)return{type:Fs.Constant,value:[0,0,0,0],formatted:"rgba(0,0,0,0)"};var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=function(t){var e,n=hu.exec(t);if(n){var r=parseFloat(n[1])%360*(Math.PI/180),i=(null===(e=n[2].match(du))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[],o=T([1,1],2),a=o[0],s=o[1],u=T([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,g=p*(f.x-h.x+p*(f.y-h.y))/(d+1)+h.y;return{x0:h.x,y0:h.y,x1:y,y1:g,steps:i,hash:t}}return null}(t);if(n)return{type:Fs.LinearGradient,value:n,formatted:""}}else if("r"===e){var r=function(t){var e,n=fu.exec(t);if(n){var r=parseFloat(n[1]),i=parseFloat(n[2]),o=parseFloat(n[3]),a=(null===(e=n[4].match(du))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[];if(0===o){var s=n[4].match(du);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(!D(r))return{type:Fs.RadialGradient,value:r,formatted:""};t=r}}else if("p"===e){var i=function(t){var e=pu.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{type:Fs.Pattern,value:i,formatted:""}}var o=Qs(t),a=[0,0,0,0];return null!==o&&(a[0]=o.r/255,a[1]=o.g/255,a[2]=o.b/255,a[3]=o.opacity),{type:Fs.Constant,value:a,formatted:o&&"rgba("+o.r+","+o.g+","+o.b+","+o.opacity+")"||"rgba(0,0,0,0)"}}function gu(t,e){if(t.type===Fs.Constant&&e.type===Fs.Constant)return[t.value,e.value,function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(B(255*e[n],0,255));return e[3]=B(e[3],0,1),"rgba("+e.join(",")+")"}]}function vu(t,e,n){var r=Ic.get(go)(n.nodeName);if(r){var i=n.geometry;i.contentBounds||(i.contentBounds=new Hi),i.renderBounds||(i.renderBounds=new Hi);var a=r.update(n.parsedStyle,n),s=a.width,u=a.height,c=a.depth,l=void 0===c?0:c,h=a.x,f=void 0===h?0:h,p=a.y,d=void 0===p?0:p,y=a.offsetX,g=void 0===y?0:y,v=a.offsetY,m=void 0===v?0:v,b=a.offsetZ,T=void 0===b?0:b;n.parsedStyle.width=s,n.parsedStyle.height=u,n.parsedStyle.depth=l,n.nodeName===fo.Line||n.nodeName===fo.Polyline||n.nodeName===fo.Polygon||n.nodeName===fo.Path?(n.parsedStyle.offsetX=f-(n.parsedStyle.defX||0),n.parsedStyle.offsetY=d-(n.parsedStyle.defY||0),n.parsedStyle.defX=f,n.parsedStyle.defY=d,n.translateLocal(n.parsedStyle.offsetX,n.parsedStyle.offsetY),n.parsedStyle.x=n.style.x,n.parsedStyle.y=n.style.y):(n.parsedStyle.x=f,n.parsedStyle.y=d);var M=o.fromValues(s/2,u/2,l/2),E=n.parsedStyle,w=E.lineWidth,_=void 0===w?0:w,x=E.anchor,A=void 0===x?[0,0]:x,P=E.shadowColor,S=E.filter,N=void 0===S?[]:S;n.nodeName===fo.Text&&delete n.parsedStyle.anchor;var O=o.fromValues((1-2*A[0])*M[0]+g,(1-2*A[1])*M[1]+m,(1-2*(A[2]||0))*M[2]+T);if(i.contentBounds.update(O,M),_&&o.add(M,M,o.fromValues(_/2,_/2,0)),i.renderBounds.update(O,M),P&&P.type===Fs.Constant){var C=i.renderBounds,I=C.min,R=C.max,k=n.parsedStyle,D=k.shadowBlur,j=void 0===D?0:D,B=k.shadowOffsetX,L=void 0===B?0:B,F=k.shadowOffsetY,G=void 0===F?0:F,V=I[0]-j+L,U=R[0]+j+L,q=I[1]-j+G,W=R[1]+j+G;I[0]=Math.min(I[0],V),R[0]=Math.max(R[0],U),I[1]=Math.min(I[1],q),R[1]=Math.max(R[1],W),i.renderBounds.setMinMax(I,R)}N.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var r=n[0].value;i.renderBounds.update(i.renderBounds.center,o.add(i.renderBounds.halfExtents,i.renderBounds.halfExtents,o.fromValues(r,r,0)))}else if("drop-shadow"===e){var a=n[0].value,s=n[1].value,u=n[2].value,c=i.renderBounds,l=c.min,h=c.max,f=l[0]-u+a,p=h[0]+u+a,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),i.renderBounds.setMinMax(l,h)}})),ho(n)}}function mu(t,e,n){var r=n.parsedStyle,i=r.x,o=void 0===i?0:i,a=r.y,s=void 0===a?0:a;n.setLocalPosition(o,s)}function bu(t){return t.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function Tu(t){return"number"==typeof t?t:/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Number(t):0}function Mu(t,e){return[t,e,bu]}function Eu(t,e){return function(n,r){return[n,r,function(n){return bu(B(n,t,e))}]}}function wu(t,e){if(t.length==e.length)return[t,e,function(t){return t}]}function _u(t,e,n){if(t&&t!==e&&t.style.offsetPathTargets){var r=t.style.offsetPathTargets.indexOf(n);t.style.offsetPathTargets.splice(r,1)}e&&(e.style.offsetPathTargets||(e.style.offsetPathTargets=[]),e.style.offsetPathTargets.push(n))}function xu(t,e,n){if(n.attributes.offsetPath){var r=n.attributes.offsetPath.nodeName;if(r===fo.Line||r===fo.Path||r===fo.Polyline){var i=n.attributes.offsetPath.getPoint(e);i&&n.setLocalPosition(i.x,i.y)}}}function Au(t,e,n){if(t&&t!==e&&t.style.clipPathTargets){var r=t.style.clipPathTargets.indexOf(n);t.style.clipPathTargets.splice(r,1)}e&&(e.style.clipPathTargets||(e.style.clipPathTargets=[]),e.style.clipPathTargets.push(n)),ho(n)}function Pu(t,e,n){if(n.parentNode){var r=n.parentNode,i=r.renderable,o=r.sortable;i&&(i.dirty=!0),o&&(o.dirty=!0)}}function Su(t){return"px"===t||"%"===t}function Nu(t){return"deg"===t||"rad"===t||"turn"===t}function Ou(t,e){if("0"===(e=e.trim().toLowerCase())){if("px".search(t)>=0)return{unit:"px",value:0};if("%".search(t)>=0)return{unit:"%",value:0}}if(n=Number(e),L(n)&&isFinite(n))return{unit:"",value:Number(e)};var n,r=[];e=e.replace(t,(function(t){return r.push(t),"U"+t}));var i="U("+t.source+")";return r.map((function(t){return{unit:t,value:Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(i,"g"),"*0"))}}))[0]}function Cu(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=0);var o=t.unit,a=t.value||0,s=e.value||0;return(Su(t.unit)||Su(e.unit))&&(a=Du(t,i,r),s=Du(e,i,r),o="px"),(Nu(t.unit)||Nu(e.unit))&&(a=ju(t),s=ju(e),o="deg"),[a,s,function(t){return n&&(t=Math.max(t,0)),bu(t)+o}]}var Iu=Ou.bind(null,new RegExp("px","g")),Ru=Ou.bind(null,new RegExp("px|%","g")),ku=Ou.bind(null,/deg|rad|grad|turn/g);function Du(t,e,n){if("px"===t.unit)return Number(t.value);if("%"===t.unit&&n){var r=n.getBounds(),i=0;return r&&(i=2*r.halfExtents[e]),Number(t.value)/100*i}return 0}function ju(t){var e=0;return"deg"===t.unit?e=Number(t.value):"rad"===t.unit?e=fa(Number(t.value)):"turn"===t.unit&&(e=360*Number(t.value)),e}function Bu(t,e,n){n.setOrigin(e[0],e[1],e[2])}function Lu(t,e,n){var r,i,o=e.split(" ");if(1===o.length&&("top"===o[0]||"bottom"===o[0]?(o[1]=o[0],o[0]="center"):o[1]="center"),2===o.length){var a=Ru(Fu(o[0])),s=Ru(Fu(o[1]));a&&(r=Du(a,0,n)),s&&(i=Du(s,1,n))}P(r)||P(i)||n.setOrigin([r,i])}function Fu(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var Gu=null,Vu={unit:"px",value:0},Uu={unit:"deg",value:0};function qu(t){return function(e){var n=0;return t.map((function(t){return t===Gu?e[n++]:t}))}}function Wu(t){return t}var zu={rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],scale:["Nn",qu([Gu,Gu,1]),Wu],scalex:["N",qu([Gu,1,1]),qu([Gu,1])],scaley:["N",qu([1,Gu,1]),qu([1,Gu])],scalez:["N",qu([1,1,Gu])],scale3d:["NNN",Wu],translate:["Tt",qu([Gu,Gu,Vu]),Wu],translatex:["T",qu([Gu,Vu,Vu]),qu([Gu,Vu])],translatey:["T",qu([Vu,Gu,Vu]),qu([Vu,Gu])],translatez:["L",qu([Vu,Vu,Gu])],translate3d:["TTL",Wu]};function Hu(t){if("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[];i=e.index+e[0].length;var o=e[1],a=zu[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()?Uu:ku(t)},N:Tu,T:Ru,L:Iu}[f.toUpperCase()](h):{a:Uu,n:c[0],t:Vu}[f]))return[];c.push(p)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function Yu(t){return t.replace(/[xy]/,"")}function $u(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function Xu(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?a:{unit:t.unit,value:a}}))})},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=zu[h],g=zu[f],v=void 0;if(s=f,("perspective"!==(a=h)||"perspective"!==s)&&("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){if(h===f)v=h;else if(y[2]&&g[2]&&Yu(h)===Yu(f))v=Yu(h),p=y[2](p),d=g[2](d);else{if(!y[1]||!g[1]||$u(h)!==$u(f))break;v=$u(h),p=y[1](p),d=g[1](d)}for(var m=[],b=[],T=[],M=0;M<p.length;M++){var E=("number"==typeof p[M]?Mu:Cu)(p[M],d[M],!1,n,M);m[M]=E[0],b[M]=E[1],T.push(E[2])}u.push(m),c.push(b),l.push([v,T])}}if(r){var w=u;u=c,c=w}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 Ku(t,e,n){j(M(M([],T((t||[]).map((function(t){return t.t}))),!1),T((e||[]).map((function(t){return t.t}))),!1)).forEach((function(r){var i=(e||[]).find((function(t){return t.t===r})),o=(t||[]).find((function(t){return t.t===r}));if("scale"===r){var a=i&&i.d||[1,1],s=o&&o.d||[1,1];n.scaleLocal(a[0]/s[0],a[1]/s[1],1)}else if("scalex"===r){a=i&&i.d||[1],s=o&&o.d||[1];n.scaleLocal(a[0]/s[0],1,1)}else if("scaley"===r){a=i&&i.d||[1],s=o&&o.d||[1];n.scaleLocal(1,a[0]/s[0],1)}else if("scalez"===r){a=i&&i.d||[1],s=o&&o.d||[1];n.scaleLocal(1,1,a[0]/s[0])}else if("scale3d"===r){a=i&&i.d||[1,1,1],s=o&&o.d||[1,1,1];n.scaleLocal(a[0]/s[0],a[1]/s[1],a[2]/s[2])}else if("translate"===r){var u=i&&i.d||[Vu,Vu],c=o&&o.d||[Vu,Vu];n.translateLocal(u[0].value-c[0].value,u[1].value-c[1].value,0)}else if("translatex"===r){u=i&&i.d||[Vu],c=o&&o.d||[Vu];n.translateLocal(u[0].value-c[0].value,0,0)}else if("translatey"===r){u=i&&i.d||[Vu],c=o&&o.d||[Vu];n.translateLocal(0,u[0].value-c[0].value,0)}else if("translatez"===r){u=i&&i.d||[Vu],c=o&&o.d||[Vu];n.translateLocal(0,0,u[0].value-c[0].value)}else if("translate3d"===r){u=i&&i.d||[Vu,Vu,Vu],c=o&&o.d||[Vu,Vu,Vu];n.translateLocal(u[0].value-c[0].value,u[1].value-c[1].value,u[2].value-c[2].value)}else if("rotate"===r){var l=i&&i.d||[Uu],h=o&&o.d||[Uu];n.rotateLocal(0,0,l[0].value-h[0].value)}else if("rotatex"===r){l=i&&i.d||[Uu],h=o&&o.d||[Uu];n.rotateLocal(l[0].value-h[0].value,0,0)}else if("rotatey"===r){l=i&&i.d||[Uu],h=o&&o.d||[Uu];n.rotateLocal(0,l[0].value-h[0].value,0)}else if("rotatez"===r){l=i&&i.d||[Uu],h=o&&o.d||[Uu];n.rotateLocal(0,0,l[0].value-h[0].value)}}))}var Ju=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,Zu=/[^\s\,]+/gi;var Qu=function(t){var e=t||[];return S(e)?e:D(e)?(e=e.match(Ju),O(e,(function(t,n){if((t=t.match(Zu))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}O(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0};var tc="\t\n\v\f\r   ᠎              \u2028\u2029",ec=new RegExp("([a-z])["+tc+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+tc+"]*,?["+tc+"]*)+)","ig"),nc=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+tc+"]*,?["+tc+"]*","ig");var rc=/[a-z]/;function ic(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function oc(t){var e=function(t){if(!t)return null;if(S(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(ec,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(nc,(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(rc.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=[],g=(i=p[0]).toUpperCase();if(i!==g)switch(y[0]=g,g){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 v=1,m=p.length;v<m;v++)y[v]=+p[v]+(v%2?a:s)}else y=e[r];switch(g){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=ic([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,M=ic([d[T-4],d[T-3]],[d[T-2],d[T-1]]);y=["C",M[0],M[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 ac=2*Math.PI,sc=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}},uc=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}]},cc=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)},lc=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*ac/360),y=Math.cos(u*ac/360),g=y*(e-r)/2+d*(n-i)/2,v=-d*(e-r)/2+y*(n-i)/2;if(0===g&&0===v)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(g,2)/Math.pow(o,2)+Math.pow(v,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),g=f*p-f*y-p*d;g<0&&(g=0),g/=f*y+p*d;var v=(g=Math.sqrt(g)*(a===s?-1:1))*i/o*h,m=g*-o/i*l,b=c*v-u*m+(t+n)/2,T=u*v+c*m+(e+r)/2,M=(l-v)/i,E=(h-m)/o,w=(-l-v)/i,_=(-h-m)/o,x=cc(1,0,M,E),A=cc(M,E,w,_);return 0===s&&A>0&&(A-=ac),1===s&&A<0&&(A+=ac),[b,T,x,A]}(e,n,r,i,o,a,l,f,d,y,g,v),T=b[0],M=b[1],E=b[2],w=b[3],_=Math.abs(w)/(ac/4);Math.abs(1-_)<1e-7&&(_=1);var x=Math.max(Math.ceil(_),1);w/=x;for(var A=0;A<x;A++)p.push(uc(E,w)),E+=w;return p.map((function(t){var e=sc(t[0],o,a,y,d,T,M),n=e.x,r=e.y,i=sc(t[1],o,a,y,d,T,M),s=i.x,u=i.y,c=sc(t[2],o,a,y,d,T,M);return{x1:n,y1:r,x2:s,y2:u,x:c.x,y:c.y}}))};function hc(t,e,n,r,i,o,a,s,u){return lc({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 fc(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 pc(t,e,n,r){return[t,e,n,r,n,r]}function dc(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(hc.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=r,e.qy=i,["C"].concat(fc.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(pc(e.x1,e.y1,t[1],t[2]));case"H":return["C"].concat(pc(e.x1,e.y1,t[1],e.y1));case"V":return["C"].concat(pc(e.x1,e.y1,e.x1,t[1]));case"Z":return["C"].concat(pc(e.x1,e.y1,e.x,e.y))}return t}function yc(t,e){void 0===e&&(e=!1);for(var n,r,i=oc(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]=dc(i[l],o),gc(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}function gc(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)}}function vc(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function mc(t,e){return vc(t)*vc(e)?(t[0]*e[0]+t[1]*e[1])/(vc(t)*vc(e)):1}function bc(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(mc(t,e))}function Tc(t,e){return t[0]===e[0]&&t[1]===e[1]}function Mc(t,e){var n=e[1],r=e[2],i=F(V(e[3]),2*Math.PI),o=e[4],a=e[5],s=t[0],u=t[1],c=e[6],l=e[7],h=Math.cos(i)*(s-c)/2+Math.sin(i)*(u-l)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(u-l)/2,p=h*h/(n*n)+f*f/(r*r);p>1&&(n*=Math.sqrt(p),r*=Math.sqrt(p));var d=n*n*(f*f)+r*r*(h*h),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*f/r:0,v=n?y*-r*h/n:0,m=(s+c)/2+Math.cos(i)*g-Math.sin(i)*v,b=(u+l)/2+Math.sin(i)*g+Math.cos(i)*v,T=[(h-g)/n,(f-v)/r],M=[(-1*h-g)/n,(-1*f-v)/r],E=bc([1,0],T),w=bc(T,M);return mc(T,M)<=-1&&(w=Math.PI),mc(T,M)>=1&&(w=0),0===a&&w>0&&(w-=2*Math.PI),1===a&&w<0&&(w+=2*Math.PI),{cx:m,cy:b,rx:Tc(t,[c,l])?0:n,ry:Tc(t,[c,l])?0:r,startAngle:E,endAngle:E+w,xRotation:i,arcFlag:o,sweepFlag:a}}function Ec(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var wc=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,this.width=n,this.height=r,this.x=t,this.y=e}return t.prototype.toJSON=function(){},t}();function _c(t){var e=oc(t),n=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}(e),r=e.slice(),i=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}}(r),o=i.polygons,a=i.polylines,s=T(yc(r,!0),2),u=s[0],c=s[1],l=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=(t=Qu(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=Mc(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]&&Tc(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=Ec((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 g=[u[1],u[2]],v=[u[3],u[4]];l.startTangent=[d[0]-g[0],d[1]-g[1]],l.endTangent=[n[0]-v[0],n[1]-v[1]],0===l.startTangent[0]&&0===l.startTangent[1]&&(l.startTangent=[g[0]-v[0],g[1]-v[1]]),0===l.endTangent[0]&&0===l.endTangent[1]&&(l.endTangent=[v[0]-g[0],v[1]-g[1]])}else if("S"===c){var m;g=Ec((m=e[s-1]).currentPoint,d),v=[u[1],u[2]];"C"===m.command?(l.command="C",l.startTangent=[d[0]-g[0],d[1]-g[1]],l.endTangent=[n[0]-v[0],n[1]-v[1]]):(l.command="SQ",l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-v[0],n[1]-v[1]])}else if("A"===c){var b=.001,T=l.arcParams||{},M=T.cx,E=void 0===M?0:M,w=T.cy,_=void 0===w?0:w,x=T.rx,A=void 0===x?0:x,P=T.ry,S=void 0===P?0:P,N=T.sweepFlag,O=void 0===N?0:N,C=T.startAngle,I=void 0===C?0:C,R=T.endAngle,k=void 0===R?0:R;0===O&&(b*=-1);var D=A*Math.cos(I-b)+E,j=S*Math.sin(I-b)+_;l.startTangent=[D-i[0],j-i[1]];var B=A*Math.cos(I+k+b)+E,L=S*Math.sin(I+k-b)+_;l.endTangent=[d[0]-B,d[1]-L]}e.push(l)}return e}(r),h=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+=ms.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=ms.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}}(u);return{absolutePath:e,hasArc:n,segments:l,polygons:o,polylines:a,curve:u,totalLength:h.totalLength,curveSegments:h.curveSegments,zCommandIndexes:c,rect:xc(u)}}function xc(t){var e=0,n=0,r=[],i=[];t.forEach((function(t){var o=T(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=ms.box.apply(ms,M([],T([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 wc(o,a,s-o,u-a)}function Ac(t,e){var n=t.curve,r=e.curve,i=[n,r];n.length!==r.length&&(i=ws(n,r));var o=_s(i[0])!==_s(i[1])?Ps(i[0]):Ss(i[0]);return[o,Ns(i[1],o),function(t){return t}]}function Pc(t){var e,n,r=[],i=0,o=Ts(t);return t.forEach((function(a,s){t[s+1]&&((e=[0,0])[0]=i/o,n=hs.length(a[0],a[1],t[s+1][0],t[s+1][1]),i+=n,e[1]=i/o,r.push(e))})),{points:t,totalLength:o,segments:r}}var Sc=Ou.bind(null,/deg|rad|grad|turn|px|%/g),Nc=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Oc(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,Nc.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return Sc(t)||yu(t)}))}),n.lastIndex===t.length)return r}return[]}function Cc(t){return t&&1===t.length?[t[0],t[0]]:[t[0],t[1]]}var Ic=c.GlobalContainer,Rc=Object(c.Module)((function(t){function e(e,n,r,i){n&&t({token:{token:Do,named:e},useValue:n}),r&&t({token:{token:Fo,named:e},useValue:r}),i&&t({token:{token:Bo,named:e},useValue:i})}function n(t,n,r,i){for(var o=0;o<t.length;o++)e(t[o],n,r,i)}Object(c.decorate)(Object(c.injectable)(),l.EventEmitter),t(E),t({token:uo,useClass:co}),t({token:so,useFactory:function(t){return function(){return t.container.get(uo)}}}),t({token:po,useClass:yo}),t(xo),t(Oo),t(bo),t(To),t(Mo),t(Co),t(Io),t(Ro),t(ko),t({token:go,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(vo,n)&&(e[n]=t.container.getNamed(vo,n)),e[n]}}}),t({token:jo,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Do,n)&&(e[n]=t.container.getNamed(Do,n)),e[n]}}}),t({token:Lo,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Bo,n)&&(e[n]=t.container.getAllNamed(Bo,n)),e[n]}}}),t({token:Go,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Fo,n)&&(e[n]=t.container.getNamed(Fo,n)),e[n]}}}),n(["opacity","fillOpacity","strokeOpacity","offsetDistance"],Tu,Eu(0,1),void 0),n(["r","rx","ry","lineWidth","width","height","shadowBlur"],Tu,Eu(0,1/0),void 0),n(["lineDash"],Cc,wu,void 0),n(["x1","x2","y1","y2","lineDashOffset","shadowOffsetX","shadowOffsetY"],Tu,Mu,void 0),n(["x1","x2","y1","y2","r","rx","ry","width","height","path","points","text","shadowBlur","shadowOffsetX","shadowOffsetY","lineWidth","filter","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","padding","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","whiteSpace"],void 0,void 0,vu),n(["fill","stroke","shadowColor"],yu,gu,void 0),e("clipPath",void 0,void 0,Au),e("zIndex",void 0,void 0,Pu),e("offsetPath",void 0,void 0,_u),e("offsetDistance",void 0,void 0,xu),e("origin",void 0,void 0,Bu),e("transformOrigin",void 0,void 0,Lu),e("transform",Hu,Xu,Ku),e("path",_c,Ac,void 0),e("points",Pc,void 0,void 0),n(["x","y","points","path","x1","x2","y1","y2"],void 0,void 0,mu),e("filter",Oc,void 0,void 0),e("anchor",void 0,void 0,Ds)})),kc=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 f(e,t),e}(Zo),Dc=0,jc=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=""+Dc++,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().activeDuration)},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 kc(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 kc(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}();function Bc(t,e){return Number(t.id)-Number(e.id)}var Lc=function(){function t(){var t=this;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(e){t.currentTime=e,t.discardAnimations(),0===t.animations.length?t.timelineTicking=!1:t.requestAnimationFrame(t.webAnimationsNextTick)},this.processRafCallbacks=function(e){var n=t.rafCallbacks;t.rafCallbacks=[],e<Number(t.currentTime)&&(e=Number(t.currentTime)),t.animations.sort(Bc),t.animations=t.tick(e,!0,t.animations)[0],n.forEach((function(t){t[1](e)})),t.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 jc(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(Bc),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(){ks(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=Rs(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,M([],T(a),!1)),(i=this.pendingEffects).push.apply(i,M([],T(s),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),Fc=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Ya,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=Qa(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function Gc(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(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 Vc="backwards|forwards|both|none".split("|"),Uc="reverse|alternate|alternate-reverse".split("|");function qc(t,e){var n=new Fc;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===Vc.indexOf(t[e]))return;if("direction"===e&&-1===Uc.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function Wc(t,e){return qc(t=zc(null!=t?t:{duration:"auto"}),e)}function zc(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var Hc=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=Wc(n,!1),this.timing.effect=this,this.timing.activeDuration=ts(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Gc(e,this.timing),this.interpolations=rs(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=es(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=Gc(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}(),Yc={anchor:[0,0,0],origin:[0,0,0],opacity:1,fillOpacity:1,strokeOpacity:1},$c=function(t){function e(e){var n,r,i,o=t.call(this)||this;return o.activeAnimations=[],o.stylePropertyUpdaterFactory=Ic.get(Lo),o.stylePropertyParserFactory=Ic.get(jo),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.className=o.config.className||"",o.interactive=null===(r=o.config.interactive)||void 0===r||r,o.nodeName=o.config.type||fo.Group,o.config.style=p(p(p(p({},Yc),{zIndex:null!==(i=o.config.zIndex)&&void 0!==i?i:0,visibility:!1===o.config.visible?"hidden":"visible"}),o.config.style),o.config.attrs),o.style=new Proxy(o.attributes,{get:function(t,e){return o.getAttribute(e)},set:function(t,e,n){return o.setAttribute(e,n),!0}}),o.initAttributes(o.config.style),Ic.get(E).add(o.entity,o),o}return f(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),Ic.get(E).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:p({},this.style)});return t&&this.children.forEach((function(n){var r=n.cloneNode(t);e.appendChild(r)})),e},e.prototype.initAttributes=function(t){var e=this;void 0===t&&(t={});var n=this.renderable;for(var r in t){var i=t[r];this.attributes[r]=i,this.parseStyleProperty(r,i)}var o={x:1e3,y:1e3};Object.keys(t).sort((function(t,e){return(o[t]||0)-(o[e]||0)})).forEach((function(t){e.updateStyleProperty(t,void 0,e.parsedStyle[t])})),n.dirty=!0},e.prototype.setAttribute=function(e,n,r){void 0===r&&(r=!1),!r&&Y(n,this.attributes[e])&&"transformOrigin"!==e&&"visibility"!==e||("visibility"===e?this.forEach((function(t){t.changeAttribute(e,n)})):this.changeAttribute(e,n),t.prototype.setAttribute.call(this,e,n))},e.prototype.parseStyleProperty=function(t,e){var n=this.stylePropertyParserFactory(t);this.parsedStyle[t]=n?n(e,this):e},e.prototype.updateStyleProperty=function(t,e,n){var r=this,i=this.stylePropertyUpdaterFactory(t);i&&i.forEach((function(t){t(e,n,r,r.sceneGraphService)}))},e.prototype.changeAttribute=function(t,e){var n=this,r=this.renderable,i=this.attributes[t],o=this.parsedStyle[t];this.attributes[t]=e,this.parseStyleProperty(t,e),this.updateStyleProperty(t,o,this.parsedStyle[t]),this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&this.attributes.clipPathTargets.forEach((function(t){ho(t),t.emit(Ki.ATTRIBUTE_CHANGED,{attributeName:"clipPath",oldValue:n,newValue:n})})),r.dirty=!0,this.emit(Ki.ATTRIBUTE_CHANGED,{attributeName:t,oldValue:i,newValue:e})},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,la(t,e,n)),this.attributes.origin=this.getOrigin(),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,la(t,e,n)),this.syncLocalPosition(),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,la(t,e,n)),this.syncLocalPosition(),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,la(t,e,n)),this.syncLocalPosition(),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,la(t,e,n)),this.syncLocalPosition(),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=la(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=la(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=T(ga(o.create(),this.sceneGraphService.getWorldTransform(this)),3);t[0],t[1];return fa(t[2])},e.prototype.getLocalEulerAngles=function(){var t=T(ga(o.create(),this.sceneGraphService.getLocalRotation(this)),3);t[0],t[1];return fa(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 P(e)&&P(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return P(e)&&P(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),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.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},e.prototype.syncLocalPosition=function(){var t=this.getLocalPosition();this.attributes.x=t[0],this.attributes.y=t[1]},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 this.parsedStyle.transform=void 0,i?i.play(new Hc(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=this.cullable;return"visible"===this.style.visibility&&(!t||t&&!t.isCulled())},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,M([],T(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,M([],T(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=T(e,2),i=r[0],o=r[1];return i?N(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(){var t=this.getWorldTransform(),e=T(i.getTranslation(o.create(),t),2),n=e[0],r=e[1],a=T(i.getScaling(o.create(),t),2),u=a[0],c=a[1],l=i.getRotation(s.create(),t),h=T(ga(o.create(),l),3),f=h[0],p=(h[1],h[2]);return va(f||p,n,r,u,c)},e.prototype.setMatrix=function(t){var e=t[0],n=t[3],r=t[1],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=Math.atan2(n,e);this.setEulerAngles(s).setPosition(t[6],t[7]).setLocalScale(o,a)},e}(ia),Xc=function(t){function e(e){var n=e||{},r=n.style,i=d(n,["style"]);return t.call(this,p({type:fo.Group,style:p({},r)},i))||this}return f(e,t),e}($c),Kc=function(t){function e(){var e=t.call(this)||this;return e.defaultView=null,e.ownerDocument=null,e.nodeName="document",e.timeline=new Lc,e.documentElement=new Xc({id:"g-root"}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return f(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){return new(this.defaultView.customElements.get(t))(e)},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.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}(na),Jc=function(t){function e(e){var n=t.call(this,e)||this;return n.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.detail,r=e.attributeName,i=e.oldValue,o=e.newValue;n.attributeChangedCallback&&n.attributeChangedCallback(r,i,o)}},n.attributeChangedCallback&&n.addEventListener(Ki.ATTRIBUTE_CHANGED,n.handleAttributeChanged),n.connectedCallback&&n.addEventListener(Ki.MOUNTED,n.handleMounted),n.disconnectedCallback&&n.addEventListener(Ki.UNMOUNTED,n.handleUnmounted),n}return f(e,t),e}($c),Zc=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Circle,style:p({r:0,anchor:[.5,.5]},n)},r))||this}return f(e,t),e}($c),Qc=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Ellipse,style:p({rx:0,ry:0,anchor:[.5,.5]},n)},r))||this}return f(e,t),e}($c),tl=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Image,style:p({img:""},n)},r))||this}return f(e,t),e}($c),el=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Line,style:p({x1:0,y1:0,x2:0,y2:0,lineJoin:"miter",lineCap:"butt",lineWidth:1},n)},r))||this}return f(e,t),e.prototype.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=hs.pointAt(n,r,i,o,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 hs.length(e,n,r,i)},e}($c),nl=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Path,style:p({path:"",lineJoin:"miter",lineCap:"butt",lineWidth:1},n)},r))||this}return f(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(P(i)||P(n))return null;var o=i.length,a=r[n+1],s=ms.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}($c),rl=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Polygon,style:p({points:[]},n)},r))||this}return f(e,t),e}($c),il=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Polyline,style:p({points:[],lineJoin:"miter",lineCap:"butt",lineWidth:1},n)},r))||this}return f(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=hs.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}($c),ol=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Rect,style:p({width:0,height:0},n)},r))||this}return f(e,t),e}($c),al=function(t){function e(e){var n=e.style,r=d(e,["style"]);return t.call(this,p({type:fo.Text,style:p({text:"",fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"alphabetic",dropShadow:!1,dropShadowDistance:5,fill:"#000",letterSpacing:0,lineHeight:0,lineJoin:"miter",lineCap:"butt",lineWidth:0,miterLimit:10,padding:0,stroke:"#000",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},n)},r))||this}return f(e,t),e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e}($c),sl=function(t){function e(e){var n=e.style,r=d(e,["style"]),i=t.call(this,p({type:fo.HTML,style:p({innerHTML:"",className:"",style:""},n)},r))||this;return i.cullable.enable=!1,i}return f(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,a=n.top-r.top,s=new Hi;return s.setMinMax(o.fromValues(i,a,0),o.fromValues(i+n.width,a+n.height,0)),s}return null},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=i.invert(i.create(),this.parentNode.getWorldTransform()),e=this.getBounds();if(e){var n=new Hi;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}($c),ul=function(){function t(){this.registry={},this.define(fo.Circle,Zc),this.define(fo.Ellipse,Qc),this.define(fo.Rect,ol),this.define(fo.Image,tl),this.define(fo.Line,el),this.define(fo.Group,Xc),this.define(fo.Path,nl),this.define(fo.Polygon,rl),this.define(fo.Polyline,il),this.define(fo.Text,al),this.define(fo.HTML,sl)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),cl=function(){function t(t){this.plugins=[],this.config=p({enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableTAA:!1},t)}return t.prototype.registerPlugin=function(t){this.plugins.push(t)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}(),ll={},hl=0;var fl,pl,dl,yl=function(){function t(t,e){this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.name=t,this.matrix=i.clone(e.matrix),this.right=o.clone(e.right),this.up=o.clone(e.up),this.forward=o.clone(e.forward),this.position=o.clone(e.position),this.focalPoint=o.clone(e.focalPoint),this.distanceVector=o.clone(e.distanceVector),this.azimuth=e.azimuth,this.elevation=e.elevation,this.roll=e.roll,this.relAzimuth=e.relAzimuth,this.relElevation=e.relElevation,this.relRoll=e.relRoll,this.dollyingStep=e.dollyingStep,this.distance=e.distance}return t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getRoll=function(){return this.roll},t.prototype.retrieve=function(t){t.matrix=i.copy(t.matrix,this.matrix),t.right=o.copy(t.right,this.right),t.up=o.copy(t.up,this.up),t.forward=o.copy(t.forward,this.forward),t.position=o.copy(t.position,this.position),t.focalPoint=o.copy(t.focalPoint,this.focalPoint),t.distanceVector=o.copy(t.distanceVector,this.distanceVector),t.azimuth=this.azimuth,t.elevation=this.elevation,t.roll=this.roll,t.relAzimuth=this.relAzimuth,t.relElevation=this.relElevation,t.relRoll=this.relRoll,t.dollyingStep=this.dollyingStep,t.distance=this.distance},t}(),gl="DefaultCamera";!function(t){t.ORBITING="ORBITING",t.EXPLORING="EXPLORING",t.TRACKING="TRACKING"}(fl||(fl={})),function(t){t.DEFAULT="DEFAULT",t.ROTATIONAL="ROTATIONAL",t.TRANSLATIONAL="TRANSLATIONAL",t.CINEMATIC="CINEMATIC"}(pl||(pl={})),function(t){t.ORTHOGRAPHIC="ORTHOGRAPHIC",t.PERSPECTIVE="PERSPECTIVE"}(dl||(dl={}));var vl={Updated:"updated"},ml=Math.PI/180,bl=180/Math.PI,Tl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.matrix=i.create(),e.right=o.fromValues(1,0,0),e.up=o.fromValues(0,1,0),e.forward=o.fromValues(0,0,1),e.position=o.fromValues(0,0,1),e.focalPoint=o.fromValues(0,0,0),e.distanceVector=o.fromValues(0,0,0),e.distance=1,e.azimuth=0,e.elevation=0,e.roll=0,e.relAzimuth=0,e.relElevation=0,e.relRoll=0,e.dollyingStep=0,e.maxDistance=1/0,e.minDistance=-1/0,e.zoom=1,e.rotateWorld=!1,e.fov=30,e.near=.1,e.far=1e4,e.aspect=1,e.projectionMatrix=i.create(),e.projectionMatrixInverse=i.create(),e.jitteredProjectionMatrix=void 0,e.following=void 0,e.type=fl.EXPLORING,e.trackingMode=pl.DEFAULT,e.projectionMode=dl.PERSPECTIVE,e.frustum=new Ji,e.landmarks=[],e.orthoMatrix=i.create(),e}return f(e,t),e.prototype.clone=function(){var t=new e;return t.setType(this.type,void 0),t},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.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.setType=function(t,e){return this.type=t,this.type===fl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===fl.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!==fl.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){this.rotateWorld=t,this._getAngles()},e.prototype.getViewTransform=function(){return i.invert(i.create(),this.matrix)},e.prototype.getWorldTransform=function(){return this.matrix},e.prototype.jitterProjectionMatrix=function(t,e){var n=i.fromTranslation(i.create(),[t,e,0]);this.jitteredProjectionMatrix=i.multiply(i.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){this.setPerspective(this.near,this.far,t,this.aspect)},e.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.prototype.setNear=function(t){return this.projectionMode===dl.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===dl.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===dl.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===dl.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===dl.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===dl.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.prototype.setPerspective=function(t,e,n,r){this.projectionMode=dl.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var o=this.near*Math.tan(.5*ml*this.fov)/this.zoom,a=2*o,s=this.aspect*a,u=-.5*s;if(void 0!==this.view&&this.view.enabled){var c=this.view.fullWidth,l=this.view.fullHeight;u+=this.view.offsetX*s/c,o-=this.view.offsetY*a/l,s*=this.view.width/c,a*=this.view.height/l}return ma(this.projectionMatrix,u,u+s,o-a,o,t,this.far),i.invert(this.projectionMatrixInverse,this.projectionMatrix),this.emit(vl.Updated),this},e.prototype.setOrthographic=function(t,e,n,r,o,a){this.projectionMode=dl.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=o,this.far=a;var s=(this.rright-this.left)/(2*this.zoom),u=(this.top-this.bottom)/(2*this.zoom),c=(this.rright+this.left)/2,l=(this.top+this.bottom)/2,h=c-s,f=c+s,p=l+u,d=l-u;if(void 0!==this.view&&this.view.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f=(h+=y*this.view.offsetX)+y*this.view.width,d=(p-=g*this.view.offsetY)-g*this.view.height}return i.ortho(this.projectionMatrix,h,f,d,p,o,a),i.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.emit(vl.Updated),this},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this._setPosition(t,e,n),this.setFocalPoint(this.focalPoint),this},e.prototype.setFocalPoint=function(t,e,n){var r=o.fromValues(0,1,0);if(this.focalPoint=la(t,e,n),this.trackingMode===pl.CINEMATIC){var a=o.subtract(o.create(),this.focalPoint,this.position);t=a[0],e=a[1],n=a[2];var s=o.length(a),u=Math.asin(e/s)*bl,c=90+Math.atan2(n,t)*bl,l=i.create();i.rotateY(l,l,c*ml),i.rotateX(l,l,u*ml),r=o.transformMat4(o.create(),[0,1,0],l)}return i.invert(this.matrix,i.lookAt(i.create(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this},e.prototype.setDistance=function(t){if(!(this.distance===t||t<0)){this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=o.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}},e.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},e.prototype.setMinDistance=function(t){return this.minDistance=t,this},e.prototype.changeAzimuth=function(t){return this.setAzimuth(this.azimuth+t),this},e.prototype.changeElevation=function(t){return this.setElevation(this.elevation+t),this},e.prototype.changeRoll=function(t){return this.setRoll(this.roll+t),this},e.prototype.setAzimuth=function(t){return this.azimuth=ca(t),this.computeMatrix(),this._getAxes(),this.type===fl.ORBITING||this.type===fl.EXPLORING?this._getPosition():this.type===fl.TRACKING&&this._getFocalPoint(),this},e.prototype.getAzimuth=function(){return this.azimuth},e.prototype.setElevation=function(t){return this.elevation=ca(t),this.computeMatrix(),this._getAxes(),this.type===fl.ORBITING||this.type===fl.EXPLORING?this._getPosition():this.type===fl.TRACKING&&this._getFocalPoint(),this},e.prototype.setRoll=function(t){return this.roll=ca(t),this.computeMatrix(),this._getAxes(),this.type===fl.ORBITING||this.type===fl.EXPLORING?this._getPosition():this.type===fl.TRACKING&&this._getFocalPoint(),this},e.prototype.rotate=function(t,e,n){if(this.relElevation=ca(e),this.relAzimuth=ca(t),this.relRoll=ca(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===fl.EXPLORING){var r=s.setAxisAngle(s.create(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*ml),o=s.setAxisAngle(s.create(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*ml),a=s.setAxisAngle(s.create(),[0,0,1],this.relRoll*ml),u=s.multiply(s.create(),o,r);u=s.multiply(s.create(),u,a);var c=i.fromQuat(i.create(),u);i.translate(this.matrix,this.matrix,[0,0,-this.distance]),i.multiply(this.matrix,this.matrix,c),i.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return;this.computeMatrix()}return this._getAxes(),this.type===fl.ORBITING||this.type===fl.EXPLORING?this._getPosition():this.type===fl.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=la(t,e,0),r=o.clone(this.position);return o.add(r,r,o.scale(o.create(),this.right,n[0])),o.add(r,r,o.scale(o.create(),this.up,n[1])),this._setPosition(r),this.emit(vl.Updated),this},e.prototype.dolly=function(t){var e=this.forward,n=o.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===fl.ORBITING||this.type===fl.EXPLORING?this._getDistance():this.type===fl.TRACKING&&o.add(this.focalPoint,n,this.distanceVector),this.emit(vl.Updated),this},e.prototype.createLandmark=function(t,e){var n=this.clone();n.setPosition(e.position),n.setFocalPoint(e.focalPoint),void 0!==e.roll&&n.setRoll(e.roll);var r=new yl(t,n);return this.landmarks.push(r),r},e.prototype.setLandmark=function(t){var e=new yl(t,this);return this.landmarks.push(e),this},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e=1e3);var r=this.landmarks.find((function(e){return e.name===t}));if(r){if(0===e)return void r.retrieve(this);void 0!==this.landmarkAnimationID&&ks(this.landmarkAnimationID);var i,a=r.getPosition(),s=r.getFocalPoint(),u=r.getRoll();Rs((function t(r){void 0===i&&(i=r);var c,l=r-i,h=(1-Math.cos(l/e*Math.PI))/2,f=o.create(),p=o.create();if(o.lerp(f,n.focalPoint,s,h),o.lerp(p,n.position,a,h),c=n.roll*(1-h)+u*h,n.setFocalPoint(f),n.setPosition(p),n.setRoll(c),n.computeMatrix(),n.emit(vl.Updated),!(o.dist(f,s)+o.dist(p,a)>.01))return n.setFocalPoint(f),n.setPosition(p),n.setRoll(c),void n.computeMatrix();l<e&&(n.landmarkAnimationID=Rs(t))}))}},e.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.emit(vl.Updated)},e.prototype.computeMatrix=function(){var t=s.setAxisAngle(s.create(),[0,0,1],this.roll*ml);i.identity(this.matrix);var e=s.setAxisAngle(s.create(),[1,0,0],(this.rotateWorld&&this.type!==fl.TRACKING||this.type===fl.TRACKING?1:-1)*this.elevation*ml),n=s.setAxisAngle(s.create(),[0,1,0],(this.rotateWorld&&this.type!==fl.TRACKING||this.type===fl.TRACKING?1:-1)*this.azimuth*ml),r=s.multiply(s.create(),n,e);r=s.multiply(s.create(),r,t);var o=i.fromQuat(i.create(),r);this.type===fl.ORBITING||this.type===fl.EXPLORING?(i.translate(this.matrix,this.matrix,this.focalPoint),i.multiply(this.matrix,this.matrix,o),i.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===fl.TRACKING&&(i.translate(this.matrix,this.matrix,this.position),i.multiply(this.matrix,this.matrix,o))},e.prototype._setPosition=function(t,e,n){this.position=la(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(){o.copy(this.right,la(a.transformMat4(a.create(),[1,0,0,0],this.matrix))),o.copy(this.up,la(a.transformMat4(a.create(),[0,1,0,0],this.matrix))),o.copy(this.forward,la(a.transformMat4(a.create(),[0,0,1,0],this.matrix))),o.normalize(this.right,this.right),o.normalize(this.up,this.up),o.normalize(this.forward,this.forward)},e.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=o.length(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===fl.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*bl,this.azimuth=Math.atan2(-t,-n)*bl):(this.elevation=-Math.asin(e/r)*bl,this.azimuth=-Math.atan2(-t,-n)*bl)},e.prototype._getPosition=function(){o.copy(this.position,la(a.transformMat4(a.create(),[0,0,0,1],this.matrix))),this._getDistance()},e.prototype._getFocalPoint=function(){o.transformMat3(this.distanceVector,[0,0,-this.distance],r.fromMat4(r.create(),this.matrix)),o.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e.prototype._getDistance=function(){this.distanceVector=o.subtract(o.create(),this.focalPoint,this.position),this.distance=o.length(this.distanceVector),this.dollyingStep=this.distance/100},e.prototype._getOrthoMatrix=function(){if(this.projectionMode===dl.ORTHOGRAPHIC){var t=this.position,e=s.setAxisAngle(s.create(),[0,0,1],-this.roll*Math.PI/180);i.fromRotationTranslationScaleOrigin(this.orthoMatrix,e,o.fromValues((this.rright-this.left)/2-t[0],(this.bottom-this.top)/2-t[1],0),o.fromValues(this.zoom,this.zoom,1),t)}},e.ProjectionMode={ORTHOGRAPHIC:"ORTHOGRAPHIC",PERSPECTIVE:"PERSPECTIVE"},e}(l.EventEmitter),Ml=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this;t.hooks.prepare.tap(e.tag,(function(t){if(t){var e=n.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering;return t.renderable.dirty||n.renderingContext.renderReasons.has(_o.CameraChanged)||!e?t:null}return t}))},t.tag="DirtyCheckPlugin",y([Object(c.inject)(mo),g("design:type",Object)],t.prototype,"canvasConfig",void 0),y([Object(c.inject)(qo),g("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=y([Object(c.singleton)({contrib:zo})],t)}(),El=c.Syringe.defineToken("CullingStrategyContribution"),wl=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=this.strategyProvider.getContributions();t.hooks.prepare.tap(e.tag,(function(t){if(t){var e=t.cullable;if(0===r.length?e.visible=!0:e.visible=r.every((function(e){return e.isVisible(t)})),t.isVisible())return t;if(n.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering){var i=t.getRenderBounds();i&&(n.renderingContext.removedRenderBoundsList.push(i),n.renderingContext.renderReasons.add(_o.DisplayObjectRemoved))}return null}return t})),t.hooks.afterRender.tap(e.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},t.tag="CullingPlugin",y([Object(c.inject)(mo),g("design:type",Object)],t.prototype,"canvasConfig",void 0),y([Object(c.contrib)(El),g("design:type",Object)],t.prototype,"strategyProvider",void 0),y([Object(c.inject)(qo),g("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=y([Object(c.singleton)({contrib:zo})],t)}(),_l=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(){n.renderingContext.renderReasons.add(_o.DisplayObjectChanged)},i=function(){t.dirtify()},o=function(e){ho(e.target),t.dirtify()},a=function(e){ho(e.target),t.dirtify()};t.hooks.init.tap(e.tag,(function(){n.renderingContext.root.addEventListener(Ki.MOUNTED,o),n.renderingContext.root.addEventListener(Ki.UNMOUNTED,a),n.renderingContext.root.addEventListener(Ki.ATTRIBUTE_CHANGED,r),n.renderingContext.root.addEventListener(Ki.BOUNDS_CHANGED,i)})),t.hooks.destroy.tap(e.tag,(function(){n.renderingContext.root.removeEventListener(Ki.MOUNTED,o),n.renderingContext.root.removeEventListener(Ki.UNMOUNTED,a),n.renderingContext.root.removeEventListener(Ki.ATTRIBUTE_CHANGED,r),n.renderingContext.root.removeEventListener(Ki.BOUNDS_CHANGED,i)}))},t.tag="PrepareRendererPlugin",y([Object(c.inject)(qo),g("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=y([Object(c.singleton)({contrib:zo})],t)}(),xl=function(){function t(){}return t.prototype.isVisible=function(t){return!0},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n){if(e===Bi.OUTSIDE||e===Bi.INSIDE)return e;for(var r=Bi.INSIDE,i=0,a=n.length;i<a;++i){var s=i<31?1<<i:0;if(!(i<31&&0==(e&s))){var u=n[i],c=u.normal,l=u.distance;if(o.dot(c,t.getPositiveFarPoint(n[i]))+l<0)return Bi.OUTSIDE;o.dot(c,t.getNegativeFarPoint(n[i]))+l<0&&(r|=s)}}return r},t=y([Object(c.singleton)({contrib:El})],t)}(),Al=!!self.TouchEvent,Pl=!!self.PointerEvent,Sl={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Nl(t){var e=[];if(function(t){return Al&&t instanceof TouchEvent}(t))for(var n=0;n<t.changedTouches.length;n++){var r=t.changedTouches[n];W(r.button)&&(r.button=t.touches.length?1:0),W(r.buttons)&&(r.buttons=t.touches.length?1:0),W(r.isPrimary)&&(r.isPrimary=1===t.touches.length&&"touchstart"===t.type),W(r.width)&&(r.width=r.radiusX||1),W(r.height)&&(r.height=r.radiusY||1),W(r.tiltX)&&(r.tiltX=0),W(r.tiltY)&&(r.tiltY=0),W(r.pointerType)&&(r.pointerType="touch"),W(r.pointerId)&&(r.pointerId=r.identifier||0),W(r.pressure)&&(r.pressure=r.force||.5),W(r.twist)&&(r.twist=0),W(r.tangentialPressure)&&(r.tangentialPressure=0),r.isNormalized=!0,r.type=t.type,e.push(r)}else if(function(t){return!self.MouseEvent||t instanceof MouseEvent&&(!Pl||!(t instanceof self.PointerEvent))}(t)){var i=t;W(i.isPrimary)&&(i.isPrimary=!0),W(i.width)&&(i.width=1),W(i.height)&&(i.height=1),W(i.tiltX)&&(i.tiltX=0),W(i.tiltY)&&(i.tiltY=0),W(i.pointerType)&&(i.pointerType="mouse"),W(i.pointerId)&&(i.pointerId=1),W(i.pressure)&&(i.pressure=.5),W(i.twist)&&(i.twist=0),W(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,e.push(i)}else e.push(t);return e}var Ol,Cl=function(){function t(){var t=this;this.autoPreventDefault=!0,this.rootPointerEvent=new aa(null),this.rootWheelEvent=new sa(null),this.onPointerMove=function(e){var n,r;if(!Al||"touch"!==e.pointerType){var i=Nl(e);try{for(var o=b(i),a=o.next();!a.done;a=o.next()){var s=a.value,u=t.bootstrapEvent(t.rootPointerEvent,s);t.eventService.mapEvent(u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}t.setCursor(t.eventService.cursor)}}}var e;return e=t,t.prototype.apply=function(t){var n=this;this.eventService.setPickHandler((function(t){return v(n,void 0,void 0,(function(){return m(this,(function(e){switch(e.label){case 0:return[4,this.renderingService.hooks.pick.promise({position:t,picked:null})];case 1:return[2,e.sent().picked]}}))}))})),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){var e,r;if(!Al||"touch"!==t.pointerType){var i=Nl(t);if(n.autoPreventDefault&&i[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();try{for(var o=b(i),a=o.next();!a.done;a=o.next()){var s=a.value,u=n.bootstrapEvent(n.rootPointerEvent,s);n.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}n.setCursor(n.eventService.cursor)}})),t.hooks.pointerUp.tap(e.tag,(function(t){var e,r;if(!Al||"touch"!==t.pointerType){var i=n.contextService.getDomElement(),o=i&&t.target&&t.target!==i&&i.contains&&!i.contains(t.target)?"outside":"",a=Nl(t);try{for(var s=b(a),u=s.next();!u.done;u=s.next()){var c=u.value,l=n.bootstrapEvent(n.rootPointerEvent,c);l.type+=o,n.eventService.mapEvent(l)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}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.prototype.bootstrapEvent=function(t,e){t._originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var n=this.eventService.client2Viewport(new io(e.clientX,e.clientY)),r=n.x,i=n.y;t.viewport.x=r,t.viewport.y=i;var o=this.eventService.viewport2Canvas(t.viewport),a=o.x,s=o.y;return t.canvas.x=a,t.canvas.y=s,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Sl[t.type]||t.type),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.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,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.tag="EventPlugin",y([Object(c.inject)(mo),g("design:type",Object)],t.prototype,"canvasConfig",void 0),y([Object(c.inject)(Vo),g("design:type",Object)],t.prototype,"contextService",void 0),y([Object(c.inject)(Ho),g("design:type",Ho)],t.prototype,"renderingService",void 0),y([Object(c.inject)(ua),g("design:type",ua)],t.prototype,"eventService",void 0),t=e=y([Object(c.singleton)({contrib:zo})],t)}(),Il=Object(c.Module)((function(t,e){e.container.isBound(Ho)?(e.container.remove(zo),e.container.remove(Ho),e.container.remove(xl)):(c.Contribution.register(t,zo,{cache:!1}),c.Contribution.register(t,El,{cache:!1})),t(Ho),t(ua),t(Cl),t(_l),t(Ml),t(wl),t(xl)}));!function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize"}(Ol||(Ol={}));var Rl=function(t){function e(e){var n,r,i,o=t.call(this)||this;o.container=Ic.createChild(),o.Element=$c,o.document=new Kc,o.document.defaultView=o,o.customElements=new ul,n=e.container,r=o,i="string"==typeof n?n:n.id||hl++,ll[i]&&ll[i].destroy(),ll[i]=r;var a=p(p({},e),{cursor:"default"});return o.initRenderingContext(a),o.initDefaultCamera(a.width,a.height),o.initRenderer(a.renderer),o}return f(e,t),e.prototype.initRenderingContext=function(t){var e=this;this.container.register({token:mo,useValue:t}),this.container.register({token:qo,useValue:{root:this.document.documentElement,removedRenderBoundsList:[],renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(Ki.CHILD_INSERTED,(function(t){e.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(Ki.CHILD_REMOVED,(function(t){e.unmountChildren(t.detail.child)}))},e.prototype.initDefaultCamera=function(t,e){var n=(new Tl).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/-2,e/2,.1,1e3),r=this.container.get(qo);n.on(vl.Updated,(function(){r.renderReasons.add(_o.CameraChanged)})),this.container.register({token:gl,useValue:n})},e.prototype.getConfig=function(){return this.container.get(mo)},e.prototype.getContainer=function(){return this.container},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.container.get(gl)},e.prototype.getContextService=function(){return this.container.get(Vo)},e.prototype.getEventService=function(){return this.container.get(ua)},e.prototype.getRenderingService=function(){return this.container.get(Ho)},e.prototype.getRenderingContext=function(){return this.container.get(qo)},e.prototype.getComputedStyle=function(t){return t.parsedStyle},e.prototype.destroy=function(t){void 0===t&&(t=!0),this.emit(Ol.BEFORE_DESTROY,(function(){})),this.frameId&&ks(this.frameId);var e=this.getRoot();this.unmountChildren(e),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),this.emit(Ol.AFTER_DESTROY,{})},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.container.get(mo);n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.container.get(gl);r.getProjectionMode()===dl.ORTHOGRAPHIC?r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/-2,e/2,r.getNear(),r.getFar()):r.setAspect(t/e),this.emit(Ol.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(Ol.BEFORE_RENDER,{}),this.container.isBound(Ho))&&this.container.get(Ho).render();this.emit(Ol.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.loadCommonContainerModule(),this.loadRendererContainerModule(t);var n=this.container.get(Vo),r=this.container.get(Ho);n.init(),r.init().then((function(){e.emit(Ol.READY,{})})),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.load(Il,!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.unmountChildren=function(t){var e=[];t.forEach((function(t){t.isConnected&&e.push(t)})),e.reverse().forEach((function(t){t.emit(Ki.UNMOUNTED,{}),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(Ki.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}(ea);Ic.load(Rc)}])}));