binbot-charts 0.0.1 → 0.0.4

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 (350) hide show
  1. package/README.md +5 -7
  2. package/babel.config.json +18 -0
  3. package/dist/TVChartContainer.js +85 -0
  4. package/dist/ar-tv-chart.f0bc1e45.html +1 -0
  5. package/dist/bundles/0.d46f0b5e9380d7893de5.js +334 -0
  6. package/dist/bundles/0579d40b812fa2c3ffe72e5803a6e14c.cur +0 -0
  7. package/{public/put-charting-library-here → dist/bundles/1.92647ec0a7beb8b2898d.css} +0 -0
  8. package/{public/put-datafeeds-here → dist/bundles/1.92647ec0a7beb8b2898d.rtl.css} +0 -0
  9. package/dist/bundles/1.f02c87d35fbc8ffcaedb.js +3 -0
  10. package/dist/bundles/10.21e665b7935d5bc4ba64.js +807 -0
  11. package/dist/bundles/11.8b65dc2e0d8b6e5041c4.css +1 -0
  12. package/dist/bundles/11.8b65dc2e0d8b6e5041c4.rtl.css +1 -0
  13. package/dist/bundles/11.df012db70159a159d927.js +3 -0
  14. package/dist/bundles/12.37750b21f6d8d35c6e6e.js +3 -0
  15. package/dist/bundles/12.ef8057448f3a7ae1c3d8.css +1 -0
  16. package/dist/bundles/12.ef8057448f3a7ae1c3d8.rtl.css +1 -0
  17. package/dist/bundles/13.699469c73d09b7add56d.js +3 -0
  18. package/dist/bundles/13.9240f13280154f2593b7.css +1 -0
  19. package/dist/bundles/13.9240f13280154f2593b7.rtl.css +1 -0
  20. package/dist/bundles/14.8095b40dd1e7deedf401.css +1 -0
  21. package/dist/bundles/14.8095b40dd1e7deedf401.rtl.css +1 -0
  22. package/dist/bundles/14.d1148b38d59df9ca5061.js +3 -0
  23. package/dist/bundles/15.44f2acca80348a1da1a6.js +526 -0
  24. package/dist/bundles/16.680572949c1125757d35.js +3 -0
  25. package/dist/bundles/16.d567c9db608f3d98d8de.css +1 -0
  26. package/dist/bundles/16.d567c9db608f3d98d8de.rtl.css +1 -0
  27. package/dist/bundles/17.404a01f527881dfff424.js +3 -0
  28. package/dist/bundles/17.ec35a19db935279c5b42.css +1 -0
  29. package/dist/bundles/17.ec35a19db935279c5b42.rtl.css +1 -0
  30. package/dist/bundles/18.78de69cfba051874e071.js +569 -0
  31. package/dist/bundles/19.048f7f5d36fef428ca8d.js +3 -0
  32. package/dist/bundles/19.75c30426f9d3ad5ca0c5.css +1 -0
  33. package/dist/bundles/19.75c30426f9d3ad5ca0c5.rtl.css +1 -0
  34. package/dist/bundles/1df47f578aeef40dd1f2328338a133be.png +0 -0
  35. package/dist/bundles/2.60931787a6734697ac13.js +507 -0
  36. package/dist/bundles/20.bc09ed47c5a62e1bc5c2.js +540 -0
  37. package/dist/bundles/21.4c7b5cccb67a95e7e782.js +3 -0
  38. package/dist/bundles/21.8153544955cdc47262e3.css +1 -0
  39. package/dist/bundles/21.8153544955cdc47262e3.rtl.css +1 -0
  40. package/dist/bundles/22.ca4300bcf614d8d5f4ab.js +3 -0
  41. package/dist/bundles/22.da9773799a06c6066d1e.css +1 -0
  42. package/dist/bundles/22.da9773799a06c6066d1e.rtl.css +1 -0
  43. package/dist/bundles/23.256ba98e6a03200bdeba.js +3 -0
  44. package/dist/bundles/23.ee754f50171546186397.css +1 -0
  45. package/dist/bundles/23.ee754f50171546186397.rtl.css +1 -0
  46. package/dist/bundles/24.bc4fafedb1730259aa10.js +3 -0
  47. package/dist/bundles/24.e70c1623e0c74477ef2e.css +1 -0
  48. package/dist/bundles/24.e70c1623e0c74477ef2e.rtl.css +1 -0
  49. package/dist/bundles/25.7416db26ed3dcc87c05a.js +2731 -0
  50. package/dist/bundles/26.3aeec391d4e6e19989ee.js +3 -0
  51. package/dist/bundles/26.69139a843bc1c84f790b.css +1 -0
  52. package/dist/bundles/26.69139a843bc1c84f790b.rtl.css +1 -0
  53. package/dist/bundles/27.e3ec08b1fb9df5f36ada.js +477 -0
  54. package/dist/bundles/28.3140e8cb507ad2593c76.css +1 -0
  55. package/dist/bundles/28.3140e8cb507ad2593c76.rtl.css +1 -0
  56. package/dist/bundles/28.9f103042c27ea2df422f.js +3 -0
  57. package/dist/bundles/29.07af6dca962ea27209f0.css +1 -0
  58. package/dist/bundles/29.07af6dca962ea27209f0.rtl.css +1 -0
  59. package/dist/bundles/29.3df8712b85d45a626aa0.js +3 -0
  60. package/dist/bundles/3.76c398b01b707e5b251c.js +3 -0
  61. package/dist/bundles/3.eeb90413029441681f91.css +1 -0
  62. package/dist/bundles/3.eeb90413029441681f91.rtl.css +1 -0
  63. package/dist/bundles/30.0b732ccb122d160480b6.js +1244 -0
  64. package/dist/bundles/31.8d2b7a538755fd1bb760.js +935 -0
  65. package/dist/bundles/32.13ce02217cf8f9dd6d90.js +636 -0
  66. package/dist/bundles/3293616ec0c605c7c2db25829a0a509e.woff +0 -0
  67. package/dist/bundles/33.02ed7df481ae8243d2f2.css +1 -0
  68. package/dist/bundles/33.02ed7df481ae8243d2f2.rtl.css +1 -0
  69. package/dist/bundles/33.4d0dd1f7001fc02099bb.js +3 -0
  70. package/dist/bundles/34.4b6099931f57311efc1a.css +1 -0
  71. package/dist/bundles/34.4b6099931f57311efc1a.rtl.css +1 -0
  72. package/dist/bundles/34.c9baa59add71a1e48fd2.js +3 -0
  73. package/dist/bundles/35.999f0e072062b7369a1a.css +1 -0
  74. package/dist/bundles/35.999f0e072062b7369a1a.rtl.css +1 -0
  75. package/dist/bundles/35.ed9e360f9686ad3a9497.js +3 -0
  76. package/dist/bundles/36.1882d1a8d312a0e193e9.js +3 -0
  77. package/dist/bundles/36.f315a19c17d5636af8f7.css +1 -0
  78. package/dist/bundles/36.f315a19c17d5636af8f7.rtl.css +1 -0
  79. package/dist/bundles/37.90129e4904155350d6a1.js +1288 -0
  80. package/dist/bundles/38.41f3d509b61c8af47de3.js +502 -0
  81. package/dist/bundles/39.74a7bc3b464cd284827f.css +1 -0
  82. package/dist/bundles/39.74a7bc3b464cd284827f.rtl.css +1 -0
  83. package/dist/bundles/39.bc1e9ce938fd5152831f.js +3 -0
  84. package/dist/bundles/4.92647ec0a7beb8b2898d.css +0 -0
  85. package/dist/bundles/4.92647ec0a7beb8b2898d.rtl.css +0 -0
  86. package/dist/bundles/4.c7430b8d89cddcf51345.js +3 -0
  87. package/dist/bundles/40.b59f41ba4cacbfb8acc3.js +255 -0
  88. package/dist/bundles/40566afd832a155e5e370a8bd423de4b.svg +1 -0
  89. package/dist/bundles/40f9a03d174178efb12303caa9bc7cd8.woff2 +0 -0
  90. package/dist/bundles/41.8fa0fb0bd4ad0241ef2f.css +1 -0
  91. package/dist/bundles/41.8fa0fb0bd4ad0241ef2f.rtl.css +1 -0
  92. package/dist/bundles/41.a19b0ae5d68f855d2753.js +3 -0
  93. package/dist/bundles/42.494986b0981f6d116fef.js +3 -0
  94. package/dist/bundles/42.9078fb8f1629e3eee9bd.css +1 -0
  95. package/dist/bundles/42.9078fb8f1629e3eee9bd.rtl.css +1 -0
  96. package/dist/bundles/43.619c5ed4a592cc2965a4.js +3 -0
  97. package/dist/bundles/43.8bf90585004742c338c5.css +1 -0
  98. package/dist/bundles/43.8bf90585004742c338c5.rtl.css +1 -0
  99. package/dist/bundles/44.0a7df307e4f397763ce8.js +3474 -0
  100. package/dist/bundles/45.12a19785e3864bd62a76.css +1 -0
  101. package/dist/bundles/45.12a19785e3864bd62a76.rtl.css +1 -0
  102. package/dist/bundles/45.db9dbd3e9bfeca5333da.js +3 -0
  103. package/dist/bundles/46.f1d4cfe6d6f830b4a011.js +495 -0
  104. package/dist/bundles/47.a3da3f774c90bd22798e.js +555 -0
  105. package/dist/bundles/48.a3fdb9dd54af71b3bda6.css +1 -0
  106. package/dist/bundles/48.a3fdb9dd54af71b3bda6.rtl.css +1 -0
  107. package/dist/bundles/48.a93f9cb8b1bcc0e0f21e.js +3 -0
  108. package/dist/bundles/49.bacd609f7eb77a4a4b68.js +3 -0
  109. package/dist/bundles/49.d723843c9192493b8c13.css +1 -0
  110. package/dist/bundles/49.d723843c9192493b8c13.rtl.css +1 -0
  111. package/dist/bundles/4a9abefd31dab7c8239e02e925aacd78.png +0 -0
  112. package/dist/bundles/4fafff07d8914dc11f6d335f606ff47c.png +0 -0
  113. package/dist/bundles/5.5e97b270ab80d99e9085.js +335 -0
  114. package/dist/bundles/50.8d5cba5b90176d3d2e3d.css +1 -0
  115. package/dist/bundles/50.8d5cba5b90176d3d2e3d.rtl.css +1 -0
  116. package/dist/bundles/50.b282667dddcb7fe1569a.js +3 -0
  117. package/dist/bundles/51.11871c50951db825ace3.js +3 -0
  118. package/dist/bundles/51.300c3df03ca063ec03a0.css +1 -0
  119. package/dist/bundles/51.300c3df03ca063ec03a0.rtl.css +1 -0
  120. package/dist/bundles/52.0379a85baae3ab43b15c.js +3 -0
  121. package/dist/bundles/52.29cec22b3525b47af67e.css +1 -0
  122. package/dist/bundles/52.29cec22b3525b47af67e.rtl.css +1 -0
  123. package/dist/bundles/53.1d3ec98cfb8e19affb1c.js +808 -0
  124. package/dist/bundles/54.bb5888ae55ea0a253a5b.js +1083 -0
  125. package/dist/bundles/55.3c35a629db21ab961f11.js +1733 -0
  126. package/dist/bundles/56.b3e69145c0fee614443d.js +723 -0
  127. package/dist/bundles/57.236996ec416da4c1f683.js +473 -0
  128. package/dist/bundles/58.7ffac4ba908b95705e63.js +410 -0
  129. package/dist/bundles/59.397cb6699b74d64072a8.js +3 -0
  130. package/dist/bundles/59.418f1db161eefae63284.css +1 -0
  131. package/dist/bundles/59.418f1db161eefae63284.rtl.css +1 -0
  132. package/dist/bundles/6.2221bb6a5d920bbb4bb2.css +1 -0
  133. package/dist/bundles/6.2221bb6a5d920bbb4bb2.rtl.css +1 -0
  134. package/dist/bundles/6.2d67b0ae77825dbd455d.js +3 -0
  135. package/dist/bundles/60.6b5eced2ef8fa856be88.js +3 -0
  136. package/dist/bundles/60.d4583c71cca790a25900.css +1 -0
  137. package/dist/bundles/60.d4583c71cca790a25900.rtl.css +1 -0
  138. package/dist/bundles/61.38a3040c925fadff7b64.js +743 -0
  139. package/dist/bundles/62.63b309f5f8da9ca013b8.js +309 -0
  140. package/dist/bundles/63.8255c7f5191bcafcee7c.js +3 -0
  141. package/dist/bundles/63.898a61bf08239711dc74.css +1 -0
  142. package/dist/bundles/63.898a61bf08239711dc74.rtl.css +1 -0
  143. package/dist/bundles/64.6f232bdb0fb4cdcc2d7d.css +1 -0
  144. package/dist/bundles/64.6f232bdb0fb4cdcc2d7d.rtl.css +1 -0
  145. package/dist/bundles/64.ec4b4d03b28c77658dde.js +3 -0
  146. package/dist/bundles/65.556980fc277562af83c8.css +1 -0
  147. package/dist/bundles/65.556980fc277562af83c8.rtl.css +1 -0
  148. package/dist/bundles/65.f895a78b4e04257983ff.js +3 -0
  149. package/dist/bundles/66.2979e9b7c35e7bf03a37.js +3 -0
  150. package/dist/bundles/66.84b4001b5c622a569dde.css +1 -0
  151. package/dist/bundles/66.84b4001b5c622a569dde.rtl.css +1 -0
  152. package/dist/bundles/67.19c83a0c303c290216d2.css +1 -0
  153. package/dist/bundles/67.19c83a0c303c290216d2.rtl.css +1 -0
  154. package/dist/bundles/67.25fd4b78c8c514988aeb.js +3 -0
  155. package/dist/bundles/68.8b4124c875484d11fd94.js +3 -0
  156. package/dist/bundles/68.fa7424ae9c5fe5483aac.css +1 -0
  157. package/dist/bundles/68.fa7424ae9c5fe5483aac.rtl.css +1 -0
  158. package/dist/bundles/69.094b4a764d3dc17820cf.css +1 -0
  159. package/dist/bundles/69.094b4a764d3dc17820cf.rtl.css +1 -0
  160. package/dist/bundles/69.43756a5c7477730eb0c4.js +3 -0
  161. package/dist/bundles/7.2c7c4f8a49c6380227de.js +315 -0
  162. package/dist/bundles/70.c27146ec029eda556108.css +1 -0
  163. package/dist/bundles/70.c27146ec029eda556108.rtl.css +1 -0
  164. package/dist/bundles/70.cb9d1bb5a00896c1bb97.js +3 -0
  165. package/dist/bundles/71.15e639d294c4209f256e.css +1 -0
  166. package/dist/bundles/71.15e639d294c4209f256e.rtl.css +1 -0
  167. package/dist/bundles/71.6a9d0842f5e48f68399c.js +3 -0
  168. package/dist/bundles/72.07441fd67b864b86147b.css +1 -0
  169. package/dist/bundles/72.07441fd67b864b86147b.rtl.css +1 -0
  170. package/dist/bundles/72.e3925aaf38d2c8997638.js +3 -0
  171. package/dist/bundles/73.6b8b9e5e2c8e2b753cb8.css +1 -0
  172. package/dist/bundles/73.6b8b9e5e2c8e2b753cb8.rtl.css +1 -0
  173. package/dist/bundles/73.8ca1a096c5bdc2e5fb8a.js +3 -0
  174. package/dist/bundles/7393f661fc7d4389ea6d4dabd2a5aeea.png +0 -0
  175. package/dist/bundles/74.34dcc0d3cd1bbfa5e951.js +3 -0
  176. package/dist/bundles/74.8c591c252b2e7ad8f744.css +1 -0
  177. package/dist/bundles/74.8c591c252b2e7ad8f744.rtl.css +1 -0
  178. package/dist/bundles/75.1c9a3a6524248ddf88bf.js +3 -0
  179. package/dist/bundles/75.fefbc386c59bf7d4f9f7.css +1 -0
  180. package/dist/bundles/75.fefbc386c59bf7d4f9f7.rtl.css +1 -0
  181. package/dist/bundles/76.5d20bed213399f326603.js +3 -0
  182. package/dist/bundles/76.f14d71a31295d8cd8d8b.css +1 -0
  183. package/dist/bundles/76.f14d71a31295d8cd8d8b.rtl.css +1 -0
  184. package/dist/bundles/77.3e4ccccc7d3eb03c488f.js +3 -0
  185. package/dist/bundles/77.9c35f7046b848fbfd7f5.css +1 -0
  186. package/dist/bundles/77.9c35f7046b848fbfd7f5.rtl.css +1 -0
  187. package/dist/bundles/78.0d502ab4d94441708606.css +1 -0
  188. package/dist/bundles/78.0d502ab4d94441708606.rtl.css +1 -0
  189. package/dist/bundles/78.1d1d47a915b06f1496fb.js +3 -0
  190. package/dist/bundles/79.86e92b77f8cf32e6bc37.js +3 -0
  191. package/dist/bundles/79.b990749a4839f9123f26.css +1 -0
  192. package/dist/bundles/79.b990749a4839f9123f26.rtl.css +1 -0
  193. package/dist/bundles/7e0cc5f7d7f5151500dd60b8d6ca60a1.png +0 -0
  194. package/dist/bundles/8.e66ab8f27911a033604f.css +1 -0
  195. package/dist/bundles/8.e66ab8f27911a033604f.rtl.css +1 -0
  196. package/dist/bundles/8.ffab20b86db484062268.js +3 -0
  197. package/dist/bundles/80.5bdd53d5fc42d40eee28.css +1 -0
  198. package/dist/bundles/80.5bdd53d5fc42d40eee28.rtl.css +1 -0
  199. package/dist/bundles/80.b5bc6acec3b531a510a9.js +3 -0
  200. package/dist/bundles/81.552e046aa828739c508b.css +1 -0
  201. package/dist/bundles/81.552e046aa828739c508b.rtl.css +1 -0
  202. package/dist/bundles/81.e6a1f76017a44b03480b.js +3 -0
  203. package/dist/bundles/82.8c2919e6c8f54e36e9e6.js +3 -0
  204. package/dist/bundles/82.e06fe84c8cdead4bd52e.css +1 -0
  205. package/dist/bundles/82.e06fe84c8cdead4bd52e.rtl.css +1 -0
  206. package/dist/bundles/83.e238aa056c5d4827cbdd.css +1 -0
  207. package/dist/bundles/83.e238aa056c5d4827cbdd.rtl.css +1 -0
  208. package/dist/bundles/83.f3e53bb5a5940e084955.js +3 -0
  209. package/dist/bundles/84.8acc496b4deeeeefb5af.js +3 -0
  210. package/dist/bundles/84.bb4fc57627c8626019fd.css +1 -0
  211. package/dist/bundles/84.bb4fc57627c8626019fd.rtl.css +1 -0
  212. package/dist/bundles/85.39c78fbeaabae306f343.js +3 -0
  213. package/dist/bundles/85.e0ba32bafcab02208901.css +1 -0
  214. package/dist/bundles/85.e0ba32bafcab02208901.rtl.css +1 -0
  215. package/dist/bundles/86.4bbbb9e6262243419986.js +3 -0
  216. package/dist/bundles/86.9244fc2bcc2370425a15.css +1 -0
  217. package/dist/bundles/86.9244fc2bcc2370425a15.rtl.css +1 -0
  218. package/dist/bundles/87.605cbc508223ec27341c.css +1 -0
  219. package/dist/bundles/87.605cbc508223ec27341c.rtl.css +1 -0
  220. package/dist/bundles/87.cf03fa0a76bfcadd157d.js +3 -0
  221. package/dist/bundles/88.158dd8a18e176936a343.css +1 -0
  222. package/dist/bundles/88.158dd8a18e176936a343.rtl.css +1 -0
  223. package/dist/bundles/88.d1e3aec63ece25f6b8a9.js +3 -0
  224. package/dist/bundles/89.5f142643917701de773b.css +1 -0
  225. package/dist/bundles/89.5f142643917701de773b.rtl.css +1 -0
  226. package/dist/bundles/89.d8aa43b4b9378722d572.js +3 -0
  227. package/dist/bundles/898929f1acdb622689e0fc0c95c8fcd0.png +0 -0
  228. package/dist/bundles/9.84ecbc930e51cb26d06a.js +3 -0
  229. package/dist/bundles/9.8ab09f93a5113a634119.css +1 -0
  230. package/dist/bundles/9.8ab09f93a5113a634119.rtl.css +1 -0
  231. package/dist/bundles/90.877114560c4828a97702.css +1 -0
  232. package/dist/bundles/90.877114560c4828a97702.rtl.css +1 -0
  233. package/dist/bundles/90.ce47bb68fc3fc88b5590.js +3 -0
  234. package/dist/bundles/91.2142b248a2bb29549a99.css +1 -0
  235. package/dist/bundles/91.2142b248a2bb29549a99.rtl.css +1 -0
  236. package/dist/bundles/91.a9b79ef7ba0a62311a53.js +3 -0
  237. package/dist/bundles/92.76d5ca7ebec10a1a7a12.js +3 -0
  238. package/dist/bundles/92.e46f0aa06bcdbddf3831.css +1 -0
  239. package/dist/bundles/92.e46f0aa06bcdbddf3831.rtl.css +1 -0
  240. package/dist/bundles/93.17d34ca77a7fc85a24d9.css +1 -0
  241. package/dist/bundles/93.17d34ca77a7fc85a24d9.rtl.css +1 -0
  242. package/dist/bundles/93.6de56ef1975f4a31e542.js +3 -0
  243. package/dist/bundles/94.231bea5fb12b806ef287.js +3 -0
  244. package/dist/bundles/94.b204218cb73b576333a1.css +1 -0
  245. package/dist/bundles/94.b204218cb73b576333a1.rtl.css +1 -0
  246. package/dist/bundles/95.51244d1c4baf49d08807.css +1 -0
  247. package/dist/bundles/95.51244d1c4baf49d08807.rtl.css +1 -0
  248. package/dist/bundles/95.6f7da80aac5cf2bf77d6.js +3 -0
  249. package/dist/bundles/96.43bb935eee30715afff7.js +3 -0
  250. package/dist/bundles/96.be9ad3d6a7c91501bb55.css +1 -0
  251. package/dist/bundles/96.be9ad3d6a7c91501bb55.rtl.css +1 -0
  252. package/dist/bundles/a6506134daec7169f68f563f084a9d41.svg +1 -0
  253. package/dist/bundles/add-compare-dialog.f980c19f222ff9cb8fe6.js +1285 -0
  254. package/dist/bundles/b1a63a011fd92dfb93db6db243bb036c.woff2 +0 -0
  255. package/dist/bundles/change-interval-dialog.e928f8dec65c9244cafe.js +260 -0
  256. package/dist/bundles/chart-bottom-toolbar.b2e895a5fd3f204fb6b6.js +2205 -0
  257. package/dist/bundles/chart-event-hint.94e94e93f9fdee936b66.js +367 -0
  258. package/dist/bundles/chart-screenshot-hint.14bfec43c52bc3d28f82.js +228 -0
  259. package/dist/bundles/chart-widget-gui.226991e9f53aba124fc2.js +4265 -0
  260. package/dist/bundles/compare-model.0e6bbdc5f5942c9a716e.js +667 -0
  261. package/dist/bundles/context-menu-renderer.7f6f59270ef0f3afa2ed.js +432 -0
  262. package/dist/bundles/currency-label-menu.a7a0c0e44d64b092f2cc.js +724 -0
  263. package/dist/bundles/custom-intervals-add-dialog.bb64431fb1c6d852f9f1.js +440 -0
  264. package/dist/bundles/drawing-toolbar.8cc497633535648562e7.js +1814 -0
  265. package/dist/bundles/ed68e83c16f77203e73dbc4c3a7c7fa1.cur +0 -0
  266. package/dist/bundles/export-data.c819cfa996e2815ff11d.js +238 -0
  267. package/dist/bundles/f55394b616ed1ae9462c37daab941d93.png +0 -0
  268. package/dist/bundles/floating-toolbars.d78a058b82ab09013aac.js +2373 -0
  269. package/dist/bundles/full-tooltips-popup.96fc751e06523b742440.js +423 -0
  270. package/dist/bundles/general-chart-properties-dialog.b08948e0c90aebf07ebd.js +656 -0
  271. package/dist/bundles/general-property-page.32bdfdbafbd81d9e83c6.js +604 -0
  272. package/dist/bundles/go-to-date-dialog-impl.3481c4fcfde2f4d46426.js +2313 -0
  273. package/dist/bundles/hammerjs.e5489031ed611f47bf09.js +993 -0
  274. package/dist/bundles/header-toolbar.4bff61e047f9b8379494.js +1293 -0
  275. package/dist/bundles/library.579e6e3fd95b660ad833.css +1 -0
  276. package/dist/bundles/library.579e6e3fd95b660ad833.rtl.css +1 -0
  277. package/dist/bundles/library.8b0dd8732414a2bcbcb1.js +1 -0
  278. package/dist/bundles/line-tools-icons.090f39d92664af3915a5.js +349 -0
  279. package/dist/bundles/load-chart-dialog.6cc1a47b17698c0108cb.js +683 -0
  280. package/dist/bundles/lollipop-tooltip-renderer.6705b971a2e73c26ecad.js +573 -0
  281. package/dist/bundles/lt-pane-views.4d2ee6c5330cd3760eb0.js +11748 -0
  282. package/dist/bundles/lt-property-pages-with-definitions.a5e8283e77afa66b5636.js +3491 -0
  283. package/dist/bundles/manage-drawings-dialog.1c0c3737002fa63fe6a6.js +81 -0
  284. package/dist/bundles/moment.78e587a83a009ca48cda.js +2059 -0
  285. package/dist/bundles/new-confirm-inputs-dialog.00d79c2263e005170345.js +305 -0
  286. package/dist/bundles/new-edit-object-dialog.0ed1c3834cfc0e834aed.js +2953 -0
  287. package/dist/bundles/object-tree-dialog.8e2b7eb9ba2f1dbfbc11.js +7693 -0
  288. package/dist/bundles/react.9f2899b40ad0e104f6c9.js +7156 -0
  289. package/dist/bundles/redux.43c3f6d214bcf2d1fbd1.js +1691 -0
  290. package/dist/bundles/restricted-toolset.08fefbae2bc0877b0ef2.js +3692 -0
  291. package/dist/bundles/runtime.dfe30490f666a6b5d4fe.js +654 -0
  292. package/dist/bundles/series-icons-map.ec8043f64d8b06dbce29.js +53 -0
  293. package/dist/bundles/series-pane-views.eefe35e1c508ac16c102.js +113 -0
  294. package/dist/bundles/share-chart-to-social-utils.c225af2051efd23269e0.js +44 -0
  295. package/dist/bundles/show-theme-save-dialog.f81ebf1b2ce08f4399fd.js +60 -0
  296. package/dist/bundles/simple-dialog.bd79f02afd512f0f36dd.js +919 -0
  297. package/dist/bundles/source-properties-editor.e858d44541ebb6f974a2.js +265 -0
  298. package/dist/bundles/study-market.3efd7bf7bc6e6fc7db2d.js +1030 -0
  299. package/dist/bundles/study-pane-views.9a873dcf74adedf7600b.js +682 -0
  300. package/dist/bundles/study-property-pages-with-definitions.ca4fc2ef5a4deff8c0bb.js +502 -0
  301. package/dist/bundles/study-template-dialog.fe56a9893a3695e93531.js +1598 -0
  302. package/dist/bundles/symbol-info-dialog-impl.17daedab6f893acdeae4.js +642 -0
  303. package/dist/bundles/symbol-search-dialog.fd3311eee8604f807c80.js +112 -0
  304. package/dist/bundles/take-chart-image-impl.c0e6073dcac3041eecf2.js +153 -0
  305. package/dist/bundles/vendors.6f5e0d8d267cb3e63ee0.js +5316 -0
  306. package/dist/charting_library.cjs.js +499 -0
  307. package/dist/charting_library.d.ts +2087 -0
  308. package/dist/charting_library.esm.js +503 -0
  309. package/dist/charting_library.js +506 -0
  310. package/dist/charting_library.standalone.js +500 -0
  311. package/dist/cs-tv-chart.f0bc1e45.html +1 -0
  312. package/dist/da_DK-tv-chart.f0bc1e45.html +1 -0
  313. package/dist/datafeed-api.d.ts +274 -0
  314. package/dist/de-tv-chart.f0bc1e45.html +1 -0
  315. package/dist/el-tv-chart.f0bc1e45.html +1 -0
  316. package/dist/en-tv-chart.f0bc1e45.html +1 -0
  317. package/dist/es-tv-chart.f0bc1e45.html +1 -0
  318. package/dist/et_EE-tv-chart.f0bc1e45.html +1 -0
  319. package/dist/fa-tv-chart.f0bc1e45.html +1 -0
  320. package/dist/fr-tv-chart.f0bc1e45.html +1 -0
  321. package/dist/he_IL-tv-chart.f0bc1e45.html +1 -0
  322. package/dist/hu_HU-tv-chart.f0bc1e45.html +1 -0
  323. package/dist/id_ID-tv-chart.f0bc1e45.html +1 -0
  324. package/dist/it-tv-chart.f0bc1e45.html +1 -0
  325. package/dist/ja-tv-chart.f0bc1e45.html +1 -0
  326. package/dist/ko-tv-chart.f0bc1e45.html +1 -0
  327. package/dist/ms_MY-tv-chart.f0bc1e45.html +1 -0
  328. package/dist/nl_NL-tv-chart.f0bc1e45.html +1 -0
  329. package/dist/no-tv-chart.f0bc1e45.html +1 -0
  330. package/dist/package.json +8 -0
  331. package/dist/pl-tv-chart.f0bc1e45.html +1 -0
  332. package/dist/pt-tv-chart.f0bc1e45.html +1 -0
  333. package/dist/ro-tv-chart.f0bc1e45.html +1 -0
  334. package/dist/ru-tv-chart.f0bc1e45.html +1 -0
  335. package/dist/sk_SK-tv-chart.f0bc1e45.html +1 -0
  336. package/dist/sv-tv-chart.f0bc1e45.html +1 -0
  337. package/dist/th-tv-chart.f0bc1e45.html +1 -0
  338. package/dist/tr-tv-chart.f0bc1e45.html +1 -0
  339. package/dist/vi-tv-chart.f0bc1e45.html +1 -0
  340. package/dist/zh-tv-chart.f0bc1e45.html +1 -0
  341. package/dist/zh_TW-tv-chart.f0bc1e45.html +1 -0
  342. package/package.json +10 -6
  343. package/src/App.jsx +2 -2
  344. package/src/components/TVChartContainer.jsx +17 -30
  345. package/src/components/datafeed.js +201 -0
  346. package/src/components/helpers.js +32 -0
  347. package/src/components/streaming.js +136 -0
  348. package/copy_charting_library_files.sh +0 -30
  349. package/public/charting_library/yarn.lock +0 -4
  350. package/src/charting_library/yarn.lock +0 -4
@@ -0,0 +1,4265 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.assign.js");
4
+
5
+ require("core-js/modules/web.dom-collections.iterator.js");
6
+
7
+ require("core-js/modules/es.array.reduce.js");
8
+
9
+ require("core-js/modules/es.promise.js");
10
+
11
+ require("core-js/modules/es.parse-int.js");
12
+
13
+ require("core-js/modules/es.array.sort.js");
14
+
15
+ require("core-js/modules/es.array.includes.js");
16
+
17
+ require("core-js/modules/es.string.includes.js");
18
+
19
+ require("core-js/modules/es.symbol.description.js");
20
+
21
+ require("core-js/modules/es.regexp.to-string.js");
22
+
23
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
+
25
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
26
+
27
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
28
+
29
+ (window.webpackJsonp = window.webpackJsonp || []).push([["chart-widget-gui"], {
30
+ "+xKI": function xKI(e, t) {
31
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 7" width="7" height="7"><path fill="currentColor" d="M3.5 7L7 4H4V0H3V4H0L3.5 7Z"/></svg>';
32
+ },
33
+ "/NcV": function NcV(e, t) {
34
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.5 1.5l5 5.5-5 5.5"/></svg>';
35
+ },
36
+ "0jws": function jws(e, t, s) {
37
+ e.exports = {
38
+ blockHidden: "blockHidden-xPfK7aM7",
39
+ "pane-button": "pane-button-xPfK7aM7"
40
+ };
41
+ },
42
+ "1INk": function INk(e, t) {
43
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 7" width="7" height="7"><path fill="currentColor" d="M3.5 0L0 3h3v4h1V3h3L3.5 0z"/></svg>';
44
+ },
45
+ "1Wf8": function Wf8(e, t) {
46
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M3.5 2.8a.7.7 0 0 0-.7.7V6H1.2V3.5a2.3 2.3 0 0 1 2.3-2.3h11a2.3 2.3 0 0 1 2.3 2.3V6h-1.6V3.5a.7.7 0 0 0-.7-.7h-11z" class="bracket-up"/><path fill="currentColor" d="M3.5 15.2a.7.7 0 0 1-.7-.7V12H1.2v2.5a2.3 2.3 0 0 0 2.3 2.3h11a2.3 2.3 0 0 0 2.3-2.3V12h-1.6v2.5a.7.7 0 0 1-.7.7h-11z" class="bracket-down"/></svg>';
47
+ },
48
+ "2CEX": function CEX(e, t) {
49
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 22" width="24" height="22" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M6 6.5A2.5 2.5 0 0 1 8.5 4H10v1H8.5C7.67 5 7 5.67 7 6.5v1.15a3.5 3.5 0 0 1-1.93 3.13l-.45.22.45.22A3.5 3.5 0 0 1 7 14.35v1.15c0 .83.67 1.5 1.5 1.5H10v1H8.5A2.5 2.5 0 0 1 6 15.5v-1.15a2.5 2.5 0 0 0-1.38-2.23l-1.34-.67a.5.5 0 0 1 0-.9l1.34-.67A2.5 2.5 0 0 0 6 7.65V6.5zM15.5 5H14V4h1.5A2.5 2.5 0 0 1 18 6.5v1.15c0 .94.54 1.8 1.38 2.23l1.34.67a.5.5 0 0 1 0 .9l-1.34.67A2.5 2.5 0 0 0 18 14.35v1.15a2.5 2.5 0 0 1-2.5 2.5H14v-1h1.5c.83 0 1.5-.67 1.5-1.5v-1.15a3.5 3.5 0 0 1 1.93-3.13l.45-.22-.45-.22A3.5 3.5 0 0 1 17 7.65V6.5c0-.83-.67-1.5-1.5-1.5z"/></svg>';
50
+ },
51
+ "4nwx": function nwx(e, t, s) {
52
+ "use strict";
53
+
54
+ s.r(t), s.d(t, "monthsFullNames", function () {
55
+ return l;
56
+ }), s.d(t, "monthsShortNames", function () {
57
+ return n;
58
+ }), s.d(t, "weekDaysFullNames", function () {
59
+ return a;
60
+ }), s.d(t, "weekDaysShortNames", function () {
61
+ return r;
62
+ }), s.d(t, "weekDaysMiniNames", function () {
63
+ return d;
64
+ });
65
+ var i = s("YFKU"),
66
+ o = s("99ZO");
67
+ const l = {
68
+ [o.Months.JANUARY]: Object(i.t)("January"),
69
+ [o.Months.FEBRUARY]: Object(i.t)("February"),
70
+ [o.Months.MARCH]: Object(i.t)("March"),
71
+ [o.Months.APRIL]: Object(i.t)("April"),
72
+ [o.Months.MAY]: Object(i.t)("May"),
73
+ [o.Months.JUNE]: Object(i.t)("June"),
74
+ [o.Months.JULY]: Object(i.t)("July"),
75
+ [o.Months.AUGUST]: Object(i.t)("August"),
76
+ [o.Months.SEPTEMBER]: Object(i.t)("September"),
77
+ [o.Months.OCTOBER]: Object(i.t)("October"),
78
+ [o.Months.NOVEMBER]: Object(i.t)("November"),
79
+ [o.Months.DECEMBER]: Object(i.t)("December")
80
+ },
81
+ n = {
82
+ [o.Months.JANUARY]: Object(i.t)("Jan"),
83
+ [o.Months.FEBRUARY]: Object(i.t)("Feb"),
84
+ [o.Months.MARCH]: Object(i.t)("Mar"),
85
+ [o.Months.APRIL]: Object(i.t)("Apr"),
86
+ [o.Months.MAY]: Object(i.t)("May", {
87
+ context: "short"
88
+ }),
89
+ [o.Months.JUNE]: Object(i.t)("Jun"),
90
+ [o.Months.JULY]: Object(i.t)("Jul"),
91
+ [o.Months.AUGUST]: Object(i.t)("Aug"),
92
+ [o.Months.SEPTEMBER]: Object(i.t)("Sep"),
93
+ [o.Months.OCTOBER]: Object(i.t)("Oct"),
94
+ [o.Months.NOVEMBER]: Object(i.t)("Nov"),
95
+ [o.Months.DECEMBER]: Object(i.t)("Dec")
96
+ },
97
+ a = {
98
+ [o.WeekDays.SUNDAY]: Object(i.t)("Sunday"),
99
+ [o.WeekDays.MONDAY]: Object(i.t)("Monday"),
100
+ [o.WeekDays.TUESDAY]: Object(i.t)("Tuesday"),
101
+ [o.WeekDays.WEDNESDAY]: Object(i.t)("Wednesday"),
102
+ [o.WeekDays.THURSDAY]: Object(i.t)("Thursday"),
103
+ [o.WeekDays.FRIDAY]: Object(i.t)("Friday"),
104
+ [o.WeekDays.SATURDAY]: Object(i.t)("Saturday")
105
+ },
106
+ r = {
107
+ [o.WeekDays.SUNDAY]: Object(i.t)("Sun"),
108
+ [o.WeekDays.MONDAY]: Object(i.t)("Mon"),
109
+ [o.WeekDays.TUESDAY]: Object(i.t)("Tue"),
110
+ [o.WeekDays.WEDNESDAY]: Object(i.t)("Wed"),
111
+ [o.WeekDays.THURSDAY]: Object(i.t)("Thu"),
112
+ [o.WeekDays.FRIDAY]: Object(i.t)("Fri"),
113
+ [o.WeekDays.SATURDAY]: Object(i.t)("Sat")
114
+ },
115
+ d = {
116
+ [o.WeekDays.SUNDAY]: Object(i.t)("Su", {
117
+ context: "day_of_week"
118
+ }),
119
+ [o.WeekDays.MONDAY]: Object(i.t)("Mo", {
120
+ context: "day_of_week"
121
+ }),
122
+ [o.WeekDays.TUESDAY]: Object(i.t)("Tu", {
123
+ context: "day_of_week"
124
+ }),
125
+ [o.WeekDays.WEDNESDAY]: Object(i.t)("We", {
126
+ context: "day_of_week"
127
+ }),
128
+ [o.WeekDays.THURSDAY]: Object(i.t)("Th", {
129
+ context: "day_of_week"
130
+ }),
131
+ [o.WeekDays.FRIDAY]: Object(i.t)("Fr", {
132
+ context: "day_of_week"
133
+ }),
134
+ [o.WeekDays.SATURDAY]: Object(i.t)("Sa", {
135
+ context: "day_of_week"
136
+ })
137
+ };
138
+ },
139
+ "5Alx": function Alx(e, t, s) {
140
+ e.exports = {
141
+ marginlegendhoriz: "4px",
142
+ legend: "legend-2KhwsEwE",
143
+ item: "item-2KhwsEwE",
144
+ withAction: "withAction-2KhwsEwE",
145
+ selected: "selected-2KhwsEwE",
146
+ last: "last-2KhwsEwE",
147
+ text: "text-2KhwsEwE",
148
+ noWrapWrapper: "noWrapWrapper-2KhwsEwE",
149
+ noWrap: "noWrap-2KhwsEwE",
150
+ series: "series-2KhwsEwE",
151
+ valuesAdditionalWrapper: "valuesAdditionalWrapper-2KhwsEwE",
152
+ valueItem: "valueItem-2KhwsEwE",
153
+ valueTitle: "valueTitle-2KhwsEwE",
154
+ valueValue: "valueValue-2KhwsEwE",
155
+ valuesWrapper: "valuesWrapper-2KhwsEwE",
156
+ directionColumn: "directionColumn-2KhwsEwE",
157
+ titleWrapper: "titleWrapper-2KhwsEwE",
158
+ button: "button-2KhwsEwE",
159
+ statusesWrapper: "statusesWrapper-2KhwsEwE",
160
+ buttonsWrapper: "buttonsWrapper-2KhwsEwE",
161
+ buttons: "buttons-2KhwsEwE",
162
+ noActions: "noActions-2KhwsEwE",
163
+ title: "title-2KhwsEwE",
164
+ title2nd: "title2nd-2KhwsEwE",
165
+ disabled: "disabled-2KhwsEwE",
166
+ disabledOnInterval: "disabledOnInterval-2KhwsEwE",
167
+ withCustomTextColor: "withCustomTextColor-2KhwsEwE",
168
+ study: "study-2KhwsEwE",
169
+ title1st: "title1st-2KhwsEwE",
170
+ hideValues: "hideValues-2KhwsEwE",
171
+ has5Buttons: "has5Buttons-2KhwsEwE",
172
+ stayInHoveredMode: "stayInHoveredMode-2KhwsEwE",
173
+ withTail: "withTail-2KhwsEwE",
174
+ loading: "loading-2KhwsEwE",
175
+ loader: "loader-2KhwsEwE",
176
+ withDot: "withDot-2KhwsEwE",
177
+ title3rd: "title3rd-2KhwsEwE",
178
+ title4th: "title4th-2KhwsEwE",
179
+ miniHidden2Title: "miniHidden2Title-2KhwsEwE",
180
+ microHidden2Title: "microHidden2Title-2KhwsEwE",
181
+ hidden3Title: "hidden3Title-2KhwsEwE",
182
+ flagged: "flagged-2KhwsEwE",
183
+ medium: "medium-2KhwsEwE",
184
+ minimized: "minimized-2KhwsEwE",
185
+ micro: "micro-2KhwsEwE",
186
+ onlyOneButtonCanBeStick: "onlyOneButtonCanBeStick-2KhwsEwE",
187
+ touchMode: "touchMode-2KhwsEwE",
188
+ buttonIcon: "buttonIcon-2KhwsEwE",
189
+ flag: "flag-2KhwsEwE",
190
+ invisibleHover: "invisibleHover-2KhwsEwE",
191
+ eye: "eye-2KhwsEwE",
192
+ hiddenLoading: "hiddenLoading-2KhwsEwE",
193
+ "eye-animation": "eye-animation-2KhwsEwE",
194
+ markerContainer: "markerContainer-2KhwsEwE",
195
+ flagWrapper: "flagWrapper-2KhwsEwE",
196
+ sourcesWrapper: "sourcesWrapper-2KhwsEwE",
197
+ newCollapser: "newCollapser-2KhwsEwE",
198
+ sources: "sources-2KhwsEwE",
199
+ toggler: "toggler-2KhwsEwE pane-button-xPfK7aM7",
200
+ counter: "counter-2KhwsEwE",
201
+ iconArrow: "iconArrow-2KhwsEwE",
202
+ objectTree: "objectTree-2KhwsEwE",
203
+ onlyOneSourceShown: "onlyOneSourceShown-2KhwsEwE",
204
+ closed: "closed-2KhwsEwE",
205
+ objectsTreeCanBeShown: "objectsTreeCanBeShown-2KhwsEwE"
206
+ };
207
+ },
208
+ "61S9": function S9(e, t) {
209
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 22" width="30" height="24" fill="none"><g fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" class="normal-eye"><path d="M18 7.91C16.7 6.5 14.7 5 12 5S7.3 6.49 6 7.91C6 7.91 4 10 4 11s2 3.09 2 3.09C7.3 15.5 9.3 17 12 17s4.7-1.49 6-2.91c0 0 2-2.09 2-3.09s-2-3.09-2-3.09zm-11.26 5.5C7.94 14.74 9.7 16 12 16s4.05-1.26 5.25-2.59c0 0 1.75-1.91 1.75-2.41 0-.5-1.75-2.41-1.75-2.41C16.05 7.26 14.3 6 12 6S7.95 7.26 6.74 8.59C6.74 8.59 5 10.5 5 11c0 .5 1.74 2.41 1.74 2.41z"/><path d="M12 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></g><g fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" class="crossed-eye"><path d="M8.85 16.27c.92.44 1.97.73 3.15.73 2.7 0 4.7-1.49 6-2.91 0 0 2-2.09 2-3.09s-2-3.09-2-3.09l-.39-.4-.7.7.34.38S19 10.5 19 11c0 .5-1.75 2.41-1.75 2.41C16.05 14.74 14.3 16 12 16c-.88 0-1.68-.18-2.4-.48l-.75.75zM7.1 13.78l-.36-.37S5 11.5 5 11c0-.5 1.74-2.41 1.74-2.41C7.94 7.26 9.7 6 12 6c.88 0 1.68.18 2.4.48l.75-.75A7.17 7.17 0 0 0 12 5C9.3 5 7.3 6.49 6 7.91 6 7.91 4 10 4 11s2 3.09 2 3.09l.39.4.7-.7z"/><path d="M11.22 13.9a3 3 0 0 0 3.68-3.68l-.9.9A2 2 0 0 1 12.13 13l-.9.9zm.66-4.9A2 2 0 0 0 10 10.88l-.9.9a3 3 0 0 1 3.68-3.68l-.9.9zM5.65 16.65l12-12 .7.7-12 12-.7-.7z"/></g><g class="loading-eye"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M18 7.91C16.7 6.5 14.7 5 12 5S7.3 6.49 6 7.91C6 7.91 4 10 4 11s2 3.09 2 3.09C7.3 15.5 9.3 17 12 17s4.7-1.49 6-2.91c0 0 2-2.09 2-3.09s-2-3.09-2-3.09zm-11.26 5.5C7.94 14.74 9.7 16 12 16s4.05-1.26 5.25-2.59c0 0 1.75-1.91 1.75-2.41 0-.5-1.75-2.41-1.75-2.41C16.05 7.26 14.3 6 12 6S7.95 7.26 6.74 8.59C6.74 8.59 5 10.5 5 11c0 .5 1.74 2.41 1.74 2.41z"/></g><g class="animated-loading-eye"><path stroke="currentColor" stroke-linecap="round" d="M14.5 11a2.5 2.5 0 1 0-2.5 2.5"/></g></svg>';
210
+ },
211
+ "6dGu": function dGu(e, t) {
212
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15"><path fill="currentColor" d="M3.5 5.58c.24-.28.65-.3.92-.07L7.5 8.14l3.08-2.63a.65.65 0 1 1 .84.98L7.5 9.86 3.58 6.49a.65.65 0 0 1-.07-.91z"/></svg>';
213
+ },
214
+ "94TV": function TV(e, t) {
215
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.5 1.5l5 5.5-5 5.5M3 4l2.5 3L3 10"/></svg>';
216
+ },
217
+ "956S": function S(e, t) {
218
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><circle fill="currentColor" cx="15" cy="9" r="1.5"/><circle fill="currentColor" cx="9" cy="9" r="1.5"/><circle fill="currentColor" cx="3" cy="9" r="1.5"/></svg>';
219
+ },
220
+ "9Crk": function Crk(e, t) {
221
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M13.4 5.9c-.41 1.62-1.16 2.43-2.25 2.43-.52 0-1.25-.15-2.2-.45-.93-.3-1.58-.45-1.96-.45-.55 0-.98.3-1.27.9H4.66c.1-.67.36-1.24.76-1.71.4-.48.86-.72 1.4-.72.56 0 1.31.16 2.27.46.95.3 1.62.45 2.01.45.64 0 1.06-.3 1.27-.9h1.03zm0 3.87c-.41 1.62-1.16 2.43-2.25 2.43-.52 0-1.25-.15-2.2-.45-.93-.3-1.58-.46-1.96-.46-.55 0-.98.3-1.27.9H4.66c.1-.67.36-1.24.76-1.7.4-.48.86-.72 1.4-.72.56 0 1.31.15 2.27.46.95.3 1.62.44 2.01.44.64 0 1.06-.3 1.27-.9h1.03z"/></svg>';
222
+ },
223
+ "9lPX": function lPX(e, t) {
224
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><rect width="10" height="4" fill="currentColor" rx="2" x="4" y="7"/></svg>';
225
+ },
226
+ AH3n: function AH3n(e, t) {
227
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M13 12.78V5.22a.3.3 0 0 0-.51-.2L8.7 8.78a.3.3 0 0 0 0 .42L12.5 13a.3.3 0 0 0 .51-.21zM8 12.78V5.22a.3.3 0 0 0-.51-.2L3.7 8.78a.3.3 0 0 0 0 .42L7.5 13a.3.3 0 0 0 .51-.21z"/></svg>';
228
+ },
229
+ AvGy: function AvGy(e, t, s) {
230
+ "use strict";
231
+
232
+ s.d(t, "a", function () {
233
+ return o;
234
+ });
235
+ var i = s("qFKp");
236
+ const o = i.CheckMobile.any();
237
+ },
238
+ D8x7: function D8x7(e, t) {
239
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 22" width="24" height="22" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M17.35 6.35l-10 10-.7-.7 10-10 .7.7z"/><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M6.65 6.35l10 10 .7-.7-10-10-.7.7z"/></svg>';
240
+ },
241
+ EV8o: function EV8o(e, t, s) {
242
+ "use strict";
243
+
244
+ s.d(t, "a", function () {
245
+ return o;
246
+ });
247
+ var i = s("ogJP");
248
+
249
+ function o(e, t, s, o, l) {
250
+ const n = document.createElement("div");
251
+ n.className = t, n.classList.toggle(o, !e.visible.value()), Object.assign(n.dataset, e.dataset), void 0 !== e.className && n.classList.add(e.className), void 0 !== e.title && (n.classList.add("apply-common-tooltip"), n.setAttribute("title", e.title.value()), void 0 !== e.hotKeyTitle && (n.dataset.tooltipHotkey = e.hotKeyTitle)), n.addEventListener("touchend", e.action), n.addEventListener("mousedown", t => {
252
+ 0 === t.button && e.action(t);
253
+ });
254
+ const a = document.createElement("div");
255
+ a.classList.add(s);
256
+ const r = e.iconMap.get(l) || "";
257
+ return Object(i.isString)(r) ? a.innerHTML = r : a.appendChild(r), n.appendChild(a), n;
258
+ }
259
+ },
260
+ G2LI: function G2LI(e, t) {
261
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M12.57 5.5h-.07a3.5 3.5 0 1 0 .07 7A4.98 4.98 0 0 1 4 9a5 5 0 0 1 8.57-3.5z"/></svg>';
262
+ },
263
+ GOhO: function GOhO(e, t, s) {
264
+ "use strict";
265
+
266
+ var i = s("+DwS");
267
+ s("tc+8");
268
+ var o = s("m/cY");
269
+
270
+ function l(e) {
271
+ for (var _len = arguments.length, t = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
272
+ t[_key - 1] = arguments[_key];
273
+ }
274
+
275
+ const s = () => e(...t.map(e => e.value())),
276
+ i = Object(o.a)(s()),
277
+ l = () => i.setValue(s()),
278
+ n = {};
279
+
280
+ for (const e of t) e.subscribe(n, l);
281
+
282
+ return i.destroy = () => {
283
+ t.forEach(e => e.unsubscribeAll(n));
284
+ }, i;
285
+ }
286
+
287
+ s.d(t, "b", function () {
288
+ return i.a;
289
+ }), s.d(t, "a", function () {
290
+ return l;
291
+ });
292
+ },
293
+ "Gp/h": function GpH(e, t) {
294
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M12.22 11.78A3.47 3.47 0 0 0 9 6.98a3.48 3.48 0 0 0-3.22 4.8 6.97 6.97 0 0 1 6.44 0zM4.18 9.83L2.1 9.28l.33-1.24 2.07.55-.33 1.24zM6.38 6.36l-.9-1.94 1.16-.54.9 1.94-1.16.54zM10.46 5.82l.9-1.94 1.16.54-.9 1.94-1.16-.54zM13.49 8.6l2.07-.56.33 1.24-2.07.55-.33-1.24z"/></svg>';
295
+ },
296
+ Jjb7: function Jjb7(e, t) {
297
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.5 4.5l-9 9M4.5 4.5l9 9"/></svg>';
298
+ },
299
+ JmzL: function JmzL(e, t) {
300
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9 4c-.79 0-1.38.7-1.25 1.48l.67 4.03a.59.59 0 0 0 1.16 0l.67-4.03A1.27 1.27 0 0 0 9 4zm0 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>';
301
+ },
302
+ LIcf: function LIcf(e, t) {
303
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M7.9 5.87v2.17h3.07v1.4H7.9v2.8h4.22v1.46H6.25V4.4h5.94v1.47H7.9z"/></svg>';
304
+ },
305
+ LVLx: function LVLx(e, t, s) {
306
+ "use strict";
307
+
308
+ (e => {
309
+ function t(e) {
310
+ return e instanceof Node ? e : document.createTextNode(String(e));
311
+ }
312
+
313
+ for (const s of e) {
314
+ if (s.hasOwnProperty("append")) return;
315
+ Object.defineProperty(s, "append", {
316
+ configurable: !0,
317
+ enumerable: !0,
318
+ writable: !0,
319
+ value: function value() {
320
+ for (var _len2 = arguments.length, e = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
321
+ e[_key2] = arguments[_key2];
322
+ }
323
+
324
+ if (1 === e.length) return void this.appendChild(t(e[0]));
325
+ const s = document.createDocumentFragment();
326
+
327
+ for (const i of e) s.appendChild(t(i));
328
+
329
+ this.appendChild(s);
330
+ }
331
+ });
332
+ }
333
+ })([Element.prototype, Document.prototype, DocumentFragment.prototype]);
334
+ },
335
+ M3mX: function M3mX(e, t) {
336
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9 2.5c-1.06 0-1.88.93-1.75 1.98l.63 5.03a1.13 1.13 0 0 0 2.25 0l.62-5.03A1.77 1.77 0 0 0 9 2.5zm0 10a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"/></svg>';
337
+ },
338
+ MQEA: function MQEA(e, t) {
339
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 7" width="9" height="7"><path fill="currentColor" d="M8.5 3.5L5 0v3H0v1h5v3z"/></svg>';
340
+ },
341
+ MjtL: function MjtL(e, t) {
342
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.5 1.5L3.5 7l5 5.5"/></svg>';
343
+ },
344
+ "MyT/": function MyT(e, t) {
345
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><circle fill="currentColor" cx="9" cy="9" r="4"/></svg>';
346
+ },
347
+ OJSF: function OJSF(e, t) {
348
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15"><path fill="currentColor" d="M11.65 12.35l-9-9 .7-.7 9 9-.7.7z"/><path fill="currentColor" d="M2.65 11.65l9-9 .7.7-9 9-.7-.7z"/></svg>';
349
+ },
350
+ OcaN: function OcaN(e, t, s) {
351
+ e.exports = {
352
+ loader: "loader-1pOK1lo2",
353
+ loaderItem: "loaderItem-1pOK1lo2",
354
+ "loader-animation": "loader-animation-1pOK1lo2",
355
+ touchMode: "touchMode-1pOK1lo2"
356
+ };
357
+ },
358
+ PXSR: function PXSR(e, t) {
359
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15"><path fill="currentColor" d="M11.83 6.12l-.66.76L8 4.1V12H7V4.1L3.83 6.88l-.66-.76L7.5 2.34l4.33 3.78z"/></svg>';
360
+ },
361
+ QEZv: function QEZv(e, t) {
362
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15"><path fill="currentColor" d="M11.83 8.88l-.66-.76L8 10.9V3H7v7.9L3.83 8.12l-.66.76 4.33 3.78 4.33-3.78z"/></svg>';
363
+ },
364
+ QkND: function QkND(e, t) {
365
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M13.29 4.8h-.09a4.2 4.2 0 1 0 .09 8.4 6 6 0 1 1 0-8.4z"/></svg>';
366
+ },
367
+ R5JZ: function R5JZ(e, t, s) {
368
+ "use strict";
369
+
370
+ function i(e, t, s, i, o) {
371
+ function l(o) {
372
+ if (e > o.timeStamp) return;
373
+ const l = o.target;
374
+ void 0 !== s && null !== t && null !== l && l.ownerDocument === i && (t.contains(l) || s(o));
375
+ }
376
+
377
+ return o.click && i.addEventListener("click", l, !1), o.mouseDown && i.addEventListener("mousedown", l, !1), o.touchEnd && i.addEventListener("touchend", l, !1), o.touchStart && i.addEventListener("touchstart", l, !1), () => {
378
+ i.removeEventListener("click", l, !1), i.removeEventListener("mousedown", l, !1), i.removeEventListener("touchend", l, !1), i.removeEventListener("touchstart", l, !1);
379
+ };
380
+ }
381
+
382
+ s.d(t, "a", function () {
383
+ return i;
384
+ });
385
+ },
386
+ RgOa: function RgOa(e, t) {
387
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14" fill="none"><path fill="currentColor" fill-rule="evenodd" d="M8.63 1.08a2.04 2.04 0 0 1-3.26 0c-.51.14-1 .35-1.45.6l.01.2A2.05 2.05 0 0 1 1.7 3.93a6.1 6.1 0 0 0-.6 1.45 2.04 2.04 0 0 1 0 3.26c.13.51.34 1 .6 1.45l.2-.01a2.05 2.05 0 0 1 2.03 2.24c.45.26.94.47 1.45.6a2.04 2.04 0 0 1 3.26 0c.51-.13 1-.34 1.45-.6l-.01-.2a2.05 2.05 0 0 1 2.24-2.03c.26-.45.47-.94.6-1.45a2.04 2.04 0 0 1 0-3.26 6.1 6.1 0 0 0-.6-1.45 2.05 2.05 0 0 1-2.23-2.23 6.1 6.1 0 0 0-1.45-.6zM7.84.42c.17-.24.43-.47.72-.4.84.18 1.62.5 2.32.96.23.15.26.48.22.76a1.03 1.03 0 0 0 1.16 1.16c.28-.04.6-.01.76.22.45.7.78 1.48.97 2.32.06.29-.17.55-.41.72a1.02 1.02 0 0 0 0 1.68c.24.17.47.43.4.72a7.12 7.12 0 0 1-.96 2.32c-.15.23-.48.26-.76.22a1.03 1.03 0 0 0-1.17 1.01l.01.15c.04.28.01.6-.22.76-.7.45-1.48.78-2.32.97-.29.06-.55-.17-.72-.41a1.02 1.02 0 0 0-1.68 0c-.17.24-.43.47-.72.4a7.12 7.12 0 0 1-2.32-.96c-.23-.15-.26-.48-.22-.76v-.15a1.02 1.02 0 0 0-1.16-1c-.28.03-.6 0-.76-.23A7.12 7.12 0 0 1 0 8.56c-.06-.29.17-.55.41-.72a1.02 1.02 0 0 0 0-1.68c-.24-.17-.47-.43-.4-.72.18-.84.5-1.62.96-2.32.15-.23.48-.26.76-.22h.15a1.02 1.02 0 0 0 1-1.16c-.03-.28 0-.6.23-.76C3.82.53 4.6.2 5.44 0c.29-.06.55.17.72.41a1.02 1.02 0 0 0 1.68 0zM9 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm1 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/></svg>';
388
+ },
389
+ S48P: function S48P(e, t) {
390
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M12.58 12.1A3.86 3.86 0 0 0 9 6.75a3.87 3.87 0 0 0-3.58 5.33 7.74 7.74 0 0 1 7.16 0zM3.64 9.93l-2.3-.62.37-1.38 2.3.62-.37 1.38zM6.1 6.07L5.07 3.92l1.3-.6 1 2.15-1.29.6zM10.62 5.47l1-2.16 1.3.6-1.01 2.16-1.3-.6zM13.99 8.55l2.3-.62.36 1.38-2.3.62L14 8.55z"/></svg>';
391
+ },
392
+ TGRH: function TGRH(e, t, s) {
393
+ "use strict";
394
+
395
+ s.r(t), s.d(t, "ControlBarNavigation", function () {
396
+ return A;
397
+ });
398
+
399
+ var i = s("Eyy1"),
400
+ o = (s("YFKU"), s("8+VR")),
401
+ l = s("Kxc7"),
402
+ n = s("1ANp"),
403
+ a = s("Ialn"),
404
+ r = s("gWrr"),
405
+ d = s("/DW5"),
406
+ h = s("qFKp"),
407
+ u = (s("JWMC"), s("MjtL")),
408
+ c = s("e8Rm"),
409
+ _ = s("e2QN"),
410
+ p = s("vg09"),
411
+ m = s("/NcV"),
412
+ b = s("94TV"),
413
+ g = s("qfuz"),
414
+ w = s("MQEA"),
415
+ v = s("1INk"),
416
+ y = s("+xKI"),
417
+ S = s("eYcT"),
418
+ M = s("nFx7");
419
+
420
+ s("jrhZ");
421
+ const f = Object(d.b)({
422
+ keys: ["Alt", "R"],
423
+ text: "{0} + {1}"
424
+ }),
425
+ E = Object(d.b)({
426
+ keys: ["Alt", "Click", "Alt", "Enter"],
427
+ text: "{0} + {1}, {2} + {3}"
428
+ }),
429
+ C = Object(d.b)({
430
+ keys: [g],
431
+ text: "{0}"
432
+ }),
433
+ k = Object(d.b)({
434
+ keys: [w],
435
+ text: "{0}"
436
+ }),
437
+ V = Object(d.b)({
438
+ keys: ["Ctrl", v],
439
+ text: "{0} + {1}"
440
+ }),
441
+ x = Object(d.b)({
442
+ keys: ["Ctrl", y],
443
+ text: "{0} + {1}"
444
+ }),
445
+ W = "<div class=\"control-bar-wrapper\">\n\t<div class=\"control-bar control-bar--hidden\">\n\t\t<div class=\"control-bar__group js-btn-group js-btn-group-zoom\">\n\t\t\t<div class=\"control-bar__btn control-bar__btn--zoom-out apply-common-tooltip\" title=\"".concat(window.t("Zoom Out"), "\" data-tooltip-hotkey=\"").concat(x, "\">\n\t\t\t\t").concat(c, "\n\t\t\t</div>\n\t\t\t<div class=\"control-bar__btn control-bar__btn--zoom-in apply-common-tooltip\" title=\"").concat(window.t("Zoom In"), "\" data-tooltip-hotkey=\"").concat(V, "\">\n\t\t\t\t").concat(p, "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"control-bar__group js-btn-group js-btn-group-maximize\">\n\t\t\t<div class=\"control-bar__btn control-bar__btn--maximize apply-common-tooltip\" title=\"").concat(window.t("Maximize chart"), "\" data-tooltip-hotkey=\"").concat(E, "\">\n\t\t\t\t").concat(S, "\n\t\t\t</div>\n\t\t\t<div class=\"control-bar__btn control-bar__btn--minimize js-hidden apply-common-tooltip\" title=\"").concat(window.t("Restore chart"), "\" data-tooltip-hotkey=\"").concat(E, "\">\n\t\t\t\t").concat(M, "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"control-bar__group js-btn-group js-btn-group-scroll\">\n\t\t\t<div class=\"control-bar__btn control-bar__btn--move-left apply-common-tooltip\" title=\"").concat(window.t("Scroll to the Left"), "\" data-tooltip-hotkey=\"").concat(C, "\">\n\t\t\t\t").concat(u, "\n\t\t\t</div>\n\t\t\t<div class=\"control-bar__btn control-bar__btn--move-right apply-common-tooltip\" title=\"").concat(window.t("Scroll to the Right"), "\" data-tooltip-hotkey=\"").concat(k, "\">\n\t\t\t\t").concat(m, "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"control-bar__group js-btn-group js-btn-group-reset-scale\">\n\t\t\t<div class=\"control-bar__btn control-bar__btn--turn-button control-bar__btn--btn-hidden apply-common-tooltip js-btn-reset\" title=\"").concat(window.t("Reset Chart"), "\" data-tooltip-hotkey=\"").concat(f, "\">\n\t\t\t\t").concat(_, "\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>"),
446
+ T = "<div class=\"control-bar control-bar__btn control-bar__btn--back-present control-bar__btn--btn-hidden apply-common-tooltip\" title=\"".concat(window.t("Scroll to the Most Recent Bar"), "\">\n\t").concat(b, "\n</div>"),
447
+ L = h.CheckMobile.any(),
448
+ O = {
449
+ zoomInOut: !0,
450
+ maximize: !0,
451
+ scrollLeftRight: !0,
452
+ resetScale: !0,
453
+ goToRealtime: !0
454
+ };
455
+
456
+ class A {
457
+ constructor(e, t, s) {
458
+ this._widget = Object(i.ensureNotNull)(Object(r.a)(W).querySelector(".control-bar-wrapper")), this._controlBar = Object(i.ensureNotNull)(this._widget.querySelector(".control-bar")), this._back = Object(i.ensureNotNull)(Object(r.a)(T).querySelector(".control-bar__btn--back-present")), this._btnGroups = Array.from(this._controlBar.querySelectorAll(".js-btn-group")), this._backButtonVisible = !1, this._boundMouseHandler = null, this._chartModel = null, this._checkIntervalId = 0, this._controlBarVisible = !1, this._priceAxisChanged = null, this._resetAvailabilityChanged = null, this._priceAxisName = "right", this._rafId = 0, this._visibilityTypeProperty = null, this._boundUpdateMaximizeButtonsVisibility = this._updateMaximizeButtonsVisibility.bind(this), this._boundToggleFullscreenButtons = this._toggleFullscreenButtons.bind(this), this._paneWidth = 0, this._leftPriceScaleWidth = 0, this._rightPriceScaleWidth = 0, this._chart = e, this._parent = t, this._options = Object.assign({}, O, s), this._visibilityPrioritizedGroups = this._initGroupDescriptions(), this._init(), this._initHandlers(), this.updatePosition();
459
+ }
460
+
461
+ destroy() {
462
+ if (null !== this._visibilityTypeProperty && (this._visibilityTypeProperty.unsubscribe(this, this._onVisibilityTypeChange), this._visibilityTypeProperty = null), null !== this._boundMouseHandler && (this._parent.removeEventListener("mousemove", this._boundMouseHandler, !1), this._parent.removeEventListener("mouseleave", this._boundMouseHandler, !1), this._boundMouseHandler = null), null !== this._priceAxisChanged && (this._priceAxisChanged.unsubscribe(this, this._updateBackBtnPosition), this._priceAxisChanged = null), clearInterval(this._checkIntervalId), null !== this._resetAvailabilityChanged) {
463
+ this._resetAvailabilityChanged.unsubscribe(this, this._updateResetScalesButtonVisibility);
464
+
465
+ const e = this._chart.getResizerDetacher();
466
+
467
+ e.fullscreenable.unsubscribe(this._boundUpdateMaximizeButtonsVisibility), e.fullscreen.unsubscribe(this._boundToggleFullscreenButtons), this._resetAvailabilityChanged = null;
468
+ }
469
+
470
+ this._chart = null;
471
+ }
472
+
473
+ updatePosition() {
474
+ const e = this._chart.paneWidgets();
475
+
476
+ if (0 === e.length) return;
477
+ this._paneWidth = e[0].width(), this._leftPriceScaleWidth = this._chart.getPriceAxisMaxWidthByName("left"), this._rightPriceScaleWidth = this._chart.getPriceAxisMaxWidthByName("right");
478
+
479
+ const t = this._chart.timeAxisHeight() + this._bottomMargin();
480
+
481
+ this._widget.style.bottom = t + "px", this._back.style.bottom = t + "px", this._updateBtnGroupVisibility();
482
+ }
483
+
484
+ _bottomMargin() {
485
+ var e;
486
+
487
+ const t = this._chart.paneWidgets();
488
+
489
+ return (null !== (e = this._chart.maximizedPaneWidget()) && void 0 !== e ? e : t[t.length - 1]).containsMainSeries() ? 32 : 5;
490
+ }
491
+
492
+ _init() {
493
+ if (h.CheckMobile.any()) for (const e of this._btnGroups) e.classList.add("js-hidden");
494
+ this._buttons = {
495
+ zoomIn: this._widget.querySelector(".control-bar__btn--zoom-in"),
496
+ zoomOut: this._widget.querySelector(".control-bar__btn--zoom-out"),
497
+ moveLeft: this._widget.querySelector(".control-bar__btn--move-left"),
498
+ moveRight: this._widget.querySelector(".control-bar__btn--move-right"),
499
+ turn: this._widget.querySelector(".control-bar__btn--turn-button"),
500
+ maximize: this._widget.querySelector(".control-bar__btn--maximize"),
501
+ minimize: this._widget.querySelector(".control-bar__btn--minimize")
502
+ }, this._initVisibility(), this._parent.appendChild(this._widget), this._parent.appendChild(this._back), this._backButtonVisible = !1, this._priceAxisName = Object(a.isRtl)() ? "left" : "right", this._chart.withModel(this, () => {
503
+ this._chartModel = this._chart.model(), this._priceAxisChanged = this._chart.getPriceAxisWidthChangedByName(this._priceAxisName), this._resetAvailabilityChanged = this._chartModel.model().isScalesResetAvailableChanged(), this._priceAxisChanged.subscribe(this, this._updateBackBtnPosition), this._resetAvailabilityChanged.subscribe(this, this._updateResetScalesButtonVisibility);
504
+
505
+ const e = this._chart.getResizerDetacher();
506
+
507
+ e.fullscreenable.subscribe(this._boundUpdateMaximizeButtonsVisibility), e.fullscreen.subscribe(this._boundToggleFullscreenButtons), this._updateMaximizeButtonsVisibility(), this._updateBackBtnPosition(), this._back.addEventListener("click", () => {
508
+ null !== this._chartModel && this._chartModel.timeScale().scrollToRealtime(!0);
509
+ }), this._checkIntervalId = setInterval(() => this._check(), 1e3);
510
+ });
511
+ }
512
+
513
+ _initHandlers() {
514
+ const e = o.mobiletouch ? "touchstart" : "mousedown",
515
+ t = o.mobiletouch ? ["touchend"] : ["mouseup", "mouseout"];
516
+ this._buttons.moveLeft.addEventListener(e, e => {
517
+ e.preventDefault(), this._chart.scrollHelper().moveByBar(1), this._trackEvent("Move Left");
518
+ }), this._buttons.moveRight.addEventListener(e, e => {
519
+ e.preventDefault(), this._chart.scrollHelper().moveByBar(-1), this._trackEvent("Move Right");
520
+ });
521
+
522
+ for (const e of t) this._buttons.moveLeft.addEventListener(e, () => this._chart.scrollHelper().stopMoveByBar()), this._buttons.moveRight.addEventListener(e, () => this._chart.scrollHelper().stopMoveByBar());
523
+
524
+ this._buttons.turn.addEventListener("click", e => {
525
+ e.preventDefault(), this._chart.GUIResetScales(), this._trackEvent("Reset to Default Settings");
526
+ }), this._buttons.zoomOut.addEventListener("click", e => {
527
+ e.preventDefault(), null !== this._chartModel && this._chartModel.zoomOut(), this._trackEvent("Zoom Out");
528
+ }), this._buttons.zoomIn.addEventListener("click", e => {
529
+ e.preventDefault(), null !== this._chartModel && this._chartModel.zoomIn(), this._trackEvent("Zoom In");
530
+ }), this._buttons.maximize.addEventListener("click", e => {
531
+ e.preventDefault(), this._chart.setActive(!0), this._chart.getResizerDetacher().requestFullscreen(), this._trackEvent(" Maximize Chart");
532
+ }), this._buttons.minimize.addEventListener("click", e => {
533
+ e.preventDefault(), this._chart.getResizerDetacher().exitFullscreen(), this._trackEvent(" Restore Chart");
534
+ });
535
+
536
+ const s = e => e.addEventListener("contextmenu", e => e.preventDefault());
537
+
538
+ s(this._buttons.moveLeft), s(this._buttons.moveRight), s(this._buttons.turn), s(this._buttons.zoomOut), s(this._buttons.zoomIn), s(this._buttons.minimize), s(this._buttons.maximize);
539
+ }
540
+
541
+ _initGroupDescriptions() {
542
+ return [{
543
+ shouldBeHiddenOnMobile: !1,
544
+ available: this._isMaximizeButtonAvailable.bind(this),
545
+ className: "js-btn-group-maximize",
546
+ element: this._getBtnGroup("js-btn-group-maximize"),
547
+ totalWidth: 50
548
+ }, {
549
+ shouldBeHiddenOnMobile: !1,
550
+ available: () => this._options.resetScale,
551
+ className: "js-btn-group-reset-scale",
552
+ element: this._getBtnGroup("js-btn-group-reset-scale"),
553
+ totalWidth: 50
554
+ }, {
555
+ shouldBeHiddenOnMobile: !l.enabled("show_zoom_and_move_buttons_on_touch"),
556
+ available: () => this._options.zoomInOut,
557
+ className: "js-btn-group-zoom",
558
+ element: this._getBtnGroup("js-btn-group-zoom"),
559
+ totalWidth: 86
560
+ }, {
561
+ shouldBeHiddenOnMobile: !l.enabled("show_zoom_and_move_buttons_on_touch"),
562
+ available: () => this._options.scrollLeftRight,
563
+ className: "js-btn-group-scroll",
564
+ element: this._getBtnGroup("js-btn-group-scroll"),
565
+ totalWidth: 86
566
+ }];
567
+ }
568
+
569
+ _check() {
570
+ if (null === this._chartModel || !this._options.goToRealtime) return;
571
+ const e = this._chartModel.timeScale().rightOffset() < 0;
572
+ e !== this._backButtonVisible && (this._backButtonVisible = e, this._back.classList.toggle("control-bar__btn--btn-hidden", !this._backButtonVisible));
573
+ }
574
+
575
+ _initVisibility() {
576
+ this._visibilityTypeProperty = Object(n.actualBehavior)(), this._visibilityTypeProperty.subscribe(this, this._onVisibilityTypeChange), this._onVisibilityTypeChange();
577
+ }
578
+
579
+ _onVisibilityTypeChange() {
580
+ if (null === this._visibilityTypeProperty) return;
581
+
582
+ const e = this._visibilityTypeProperty.value();
583
+
584
+ "alwaysOn" === e || "alwaysOff" === e ? (this._controlBarVisible = "alwaysOn" === e, null !== this._boundMouseHandler && (this._parent.removeEventListener("mousemove", this._boundMouseHandler, !1), this._parent.removeEventListener("mouseleave", this._boundMouseHandler, !1), this._boundMouseHandler = null)) : (this._controlBarVisible = !1, this._boundMouseHandler || (this._boundMouseHandler = this._visibilityMouseHandler.bind(this), this._parent.addEventListener("mousemove", this._boundMouseHandler), this._parent.addEventListener("mouseleave", this._boundMouseHandler))), this._updateControlBarVisibility();
585
+ }
586
+
587
+ _visibilityMouseHandler(e) {
588
+ if (e.buttons) return;
589
+ if (null !== this._chartModel && this._chartModel.lineBeingCreated()) return;
590
+ let t = "mouseleave" !== e.type;
591
+
592
+ if ("mousemove" === e.type) {
593
+ const s = this._widget.getBoundingClientRect(),
594
+ i = 100 - this._bottomMargin();
595
+
596
+ t = e.clientX >= s.left - 100 && e.clientX <= s.right + 100 && e.clientY >= s.top - i && e.clientY <= s.bottom + 100;
597
+ }
598
+
599
+ this._controlBarVisible !== t && (this._controlBarVisible = t, null === this._rafId && (this._rafId = this._controlBar.ownerDocument.defaultView.requestAnimationFrame(this._updateControlBarVisibility.bind(this))));
600
+ }
601
+
602
+ _updateControlBarVisibility() {
603
+ this._rafId = null, this._controlBar.classList.toggle("control-bar--hidden", !this._controlBarVisible);
604
+ }
605
+
606
+ _updateBackBtnPosition() {
607
+ if ("left" === this._priceAxisName || "right" === this._priceAxisName) {
608
+ const e = this._chart.getPriceAxisMaxWidthByName(this._priceAxisName) + 14;
609
+ e && (this._back.style.marginRight = e + "px");
610
+ }
611
+ }
612
+
613
+ _updateBtnGroupVisibility() {
614
+ const e = this._leftPriceScaleWidth + this._paneWidth,
615
+ t = (e + this._rightPriceScaleWidth) / 2;
616
+ let s = 2 * Math.min(e - t, t - this._leftPriceScaleWidth) - 50 - 50,
617
+ i = !1;
618
+
619
+ for (const e of this._visibilityPrioritizedGroups) {
620
+ e.enoughSpaceForGroup = !1;
621
+ e.available() && (!L || !e.shouldBeHiddenOnMobile) && (s -= e.totalWidth, e.enoughSpaceForGroup = s >= 0 && !i, i = i || !e.enoughSpaceForGroup), !e.enoughSpaceForGroup !== e.element.classList.contains("js-hidden") && e.element.classList.toggle("js-hidden", !e.enoughSpaceForGroup);
622
+ }
623
+
624
+ this._updateControlBarPosition();
625
+ }
626
+
627
+ _getBtnGroup(e) {
628
+ return Object(i.ensureDefined)(this._btnGroups.find(t => t.classList.contains(e)));
629
+ }
630
+
631
+ _updateControlBarPosition() {
632
+ const e = this._visibilityPrioritizedGroups.reduce((e, t) => e + (t.enoughSpaceForGroup ? t.totalWidth : 0), 0),
633
+ t = (this._paneWidth + this._leftPriceScaleWidth + this._rightPriceScaleWidth) / 2 - Math.ceil(e / 2);
634
+
635
+ this._widget.style.left = t + "px";
636
+ }
637
+
638
+ _updateResetScalesButtonVisibility() {
639
+ if (null === this._chartModel) return;
640
+
641
+ const e = this._chartModel.model().isScalesResetAvailable();
642
+
643
+ this._buttons.turn.classList.toggle("control-bar__btn--btn-hidden", !e);
644
+ }
645
+
646
+ _updateMaximizeButtonsVisibility() {
647
+ this._updateBtnGroupVisibility();
648
+ }
649
+
650
+ _toggleFullscreenButtons() {
651
+ const e = this._chart.getResizerDetacher().fullscreen.value();
652
+
653
+ this._buttons.maximize.classList.toggle("js-hidden", e), this._buttons.minimize.classList.toggle("js-hidden", !e);
654
+ }
655
+
656
+ _isMaximizeButtonAvailable() {
657
+ return this._options.maximize, !1;
658
+ }
659
+
660
+ _trackEvent(e) {
661
+ 0;
662
+ }
663
+
664
+ }
665
+ },
666
+ Tq3g: function Tq3g(e, t) {
667
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M14.48 5.1c-.52 2.03-1.46 3.04-2.82 3.04-.64 0-1.55-.19-2.74-.56-1.17-.38-1.99-.57-2.46-.57-.69 0-1.22.37-1.58 1.13H3.55A4.3 4.3 0 0 1 4.5 6c.5-.6 1.08-.9 1.74-.9.7 0 1.65.2 2.84.58 1.2.37 2.04.55 2.52.55.8 0 1.32-.37 1.59-1.13h1.29zm0 4.84c-.52 2.02-1.46 3.03-2.82 3.03-.64 0-1.55-.19-2.74-.56-1.17-.38-1.99-.57-2.46-.57-.69 0-1.22.38-1.58 1.13H3.55a4.3 4.3 0 0 1 .95-2.14c.5-.6 1.08-.9 1.74-.9.7 0 1.65.2 2.84.58 1.2.37 2.04.56 2.52.56.8 0 1.32-.38 1.59-1.13h1.29z"/></svg>';
668
+ },
669
+ Uua9: function Uua9(e, t) {
670
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M7.65 5.16v2.68h3.78v1.73H7.65V13h5.19v1.8H5.62V3.35h7.3v1.8H7.65z"/></svg>';
671
+ },
672
+ VrXG: function VrXG(e, t) {
673
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M7.57 14.8H5.03V3.36c1.62-.05 2.64-.08 3.06-.08 1.66 0 2.98.49 3.96 1.47a5.23 5.23 0 0 1 1.47 3.88c0 4.11-1.99 6.17-5.95 6.17zm-.5-9.66v7.8c.32.04.67.06 1.05.06 1.03 0 1.83-.38 2.41-1.12.58-.75.88-1.79.88-3.13 0-2.44-1.14-3.67-3.42-3.67-.22 0-.53.02-.93.06z"/></svg>';
674
+ },
675
+ VrrN: function VrrN(e, t) {
676
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M7.84 13.7H5.78V4.4l2.48-.06c1.35 0 2.42.4 3.22 1.2.8.78 1.19 1.83 1.19 3.15 0 3.34-1.61 5.01-4.83 5.01zm-.41-7.85v6.35c.26.02.55.03.86.03.83 0 1.48-.3 1.95-.9.48-.6.72-1.46.72-2.54 0-2-.93-2.99-2.78-2.99-.18 0-.43.02-.75.05z"/></svg>';
677
+ },
678
+ WYzw: function WYzw(e, t) {
679
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M19.32 6H8.68A2.68 2.68 0 0 0 6 8.68V11h1V8.68C7 7.75 7.75 7 8.68 7h10.64c.93 0 1.68.75 1.68 1.68V11h1V8.68C22 7.2 20.8 6 19.32 6zM7 19.32c0 .93.75 1.68 1.68 1.68h10.64c.93 0 1.68-.75 1.68-1.68V17h1v2.32C22 20.8 20.8 22 19.32 22H8.68A2.68 2.68 0 0 1 6 19.32V17h1v2.32z"/></svg>';
680
+ },
681
+ "Y+EN": function YEN(e, t) {
682
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15"><path fill="currentColor" d="M7.23 2.58a.5.5 0 0 1 .54 0l5.5 3.5a.5.5 0 0 1 0 .84l-5.5 3.5a.5.5 0 0 1-.54 0l-5.5-3.5a.5.5 0 0 1 0-.84l5.5-3.5zM2.93 6.5L7.5 9.4l4.57-2.9L7.5 3.6 2.93 6.5z"/><path fill="currentColor" d="M1.58 9.23a.5.5 0 0 1 .69-.15L7.5 12.4l5.23-3.33a.5.5 0 0 1 .54.84l-5.5 3.5a.5.5 0 0 1-.54 0l-5.5-3.5a.5.5 0 0 1-.15-.69z"/></svg>';
683
+ },
684
+ YGQl: function YGQl(e, t) {
685
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.7" d="M12.5 5.5l-7 7m0-7l7 7"/></svg>';
686
+ },
687
+ ZKFq: function ZKFq(e, t, s) {
688
+ e.exports = {
689
+ "css-value-pane-controls-padding-left": "1px",
690
+ "css-value-pane-controls-padding-right": "5px",
691
+ paneControls: "paneControls-2fnY2ZKI",
692
+ hasTopMargin: "hasTopMargin-2fnY2ZKI",
693
+ hidden: "hidden-2fnY2ZKI",
694
+ forceHidden: "forceHidden-2fnY2ZKI",
695
+ button: "button-2fnY2ZKI pane-button-xPfK7aM7",
696
+ buttonIcon: "buttonIcon-2fnY2ZKI",
697
+ minimize: "minimize-2fnY2ZKI",
698
+ newButton: "newButton-2fnY2ZKI",
699
+ touchMode: "touchMode-2fnY2ZKI",
700
+ maximize: "maximize-2fnY2ZKI",
701
+ "maximize-animation-up-bracket": "maximize-animation-up-bracket-2fnY2ZKI",
702
+ "maximize-animation-down-bracket": "maximize-animation-down-bracket-2fnY2ZKI",
703
+ "minimize-animation-up-bracket": "minimize-animation-up-bracket-2fnY2ZKI",
704
+ "minimize-animation-down-bracket": "minimize-animation-down-bracket-2fnY2ZKI",
705
+ up: "up-2fnY2ZKI",
706
+ "up-animation": "up-animation-2fnY2ZKI",
707
+ down: "down-2fnY2ZKI",
708
+ "down-animation": "down-animation-2fnY2ZKI",
709
+ buttonsWrapper: "buttonsWrapper-2fnY2ZKI"
710
+ };
711
+ },
712
+ bNWL: function bNWL(e, t) {
713
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 2 30 24" width="30" height="24" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M15.82 14l5.36-5.36-.82-.82L15 13.18 9.64 7.82l-.82.82L14.18 14l-5.36 5.36.82.82L15 14.82l5.36 5.36.82-.82L15.82 14z"/></svg>';
714
+ },
715
+ cbig: function cbig(e, t) {
716
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M9.3 9l.9-4.53a1.23 1.23 0 1 0-2.4 0L8.7 9l-.9 4.53a1.23 1.23 0 1 0 2.4 0L9.3 9z"/><path fill="currentColor" d="M9.15 9.26l4.38-1.48a1.23 1.23 0 1 0-1.21-2.09L8.85 8.74l-4.38 1.48a1.23 1.23 0 1 0 1.21 2.09l3.47-3.05z"/><path fill="currentColor" d="M9.15 8.74L5.68 5.69a1.23 1.23 0 1 0-1.2 2.09l4.37 1.48 3.47 3.05a1.23 1.23 0 1 0 1.2-2.09L9.16 8.74z"/></svg>';
717
+ },
718
+ e2QN: function e2QN(e, t) {
719
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 18" width="14" height="18"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"><path d="M1 10a6 6 0 1 0 6-6H3"/><path d="M5 1L2.5 4 5 7"/></g></svg>';
720
+ },
721
+ e8Rm: function e8Rm(e, t) {
722
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M2 7h10"/></svg>';
723
+ },
724
+ eYcT: function eYcT(e, t) {
725
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g class="corner-left-top"><path fill="currentColor" d="M6 9C6 7.89543 6.89543 7 8 7H10C10.5523 7 11 7.44772 11 8C11 8.55228 10.5523 9 10 9H8V11C8 11.5523 7.55228 12 7 12C6.44772 12 6 11.5523 6 11V9Z"/></g><g class="corner-right-top"><path fill="currentColor" d="M17 8C17 7.44772 17.4477 7 18 7H20C21.1046 7 22 7.89543 22 9V11C22 11.5523 21.5523 12 21 12C20.4477 12 20 11.5523 20 11V9H18C17.4477 9 17 8.55228 17 8Z"/></g><g class="corner-right-bottom"><path fill="currentColor" d="M21 16C21.5523 16 22 16.4477 22 17V19C22 20.1046 21.1046 21 20 21H18C17.4477 21 17 20.5523 17 20C17 19.4477 17.4477 19 18 19H20V17C20 16.4477 20.4477 16 21 16Z"/></g><g class="corner-left-bottom"><path fill="currentColor" d="M7 16C7.55228 16 8 16.4477 8 17V19H10C10.5523 19 11 19.4477 11 20C11 20.5523 10.5523 21 10 21H8C6.89543 21 6 20.1046 6 19V17C6 16.4477 6.44772 16 7 16Z"/></g></svg>';
726
+ },
727
+ fk9O: function fk9O(e, t) {
728
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M13.5 6.35l6.32 5.27-.64.76L14 8.07V21h-1V8.07l-5.18 4.31-.64-.76 6.32-5.27z"/></svg>';
729
+ },
730
+ gKdq: function gKdq(e, t) {
731
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M14 7v12.93l5.18-4.31.64.76-6.32 5.27-6.32-5.27.64-.76L13 19.93V7h1z"/></svg>';
732
+ },
733
+ i9xP: function i9xP(e, t) {
734
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15"><circle fill="currentColor" cx="12.75" cy="7.5" r="1.25"/><circle fill="currentColor" cx="7.5" cy="7.5" r="1.25"/><circle fill="currentColor" cx="2.25" cy="7.5" r="1.25"/></svg>';
735
+ },
736
+ jXu8: function jXu8(e, t) {
737
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><circle fill="currentColor" cx="9" cy="9" r="5"/></svg>';
738
+ },
739
+ jrhZ: function jrhZ(e, t, s) {
740
+ e.exports = {
741
+ "animation-minimize-corner-left-top": "animation-minimize-corner-left-top-1yUqeyiZ",
742
+ "animation-minimize-corner-right-top": "animation-minimize-corner-right-top-1yUqeyiZ",
743
+ "animation-minimize-corner-right-bottom": "animation-minimize-corner-right-bottom-1yUqeyiZ",
744
+ "animation-minimize-corner-left-bottom": "animation-minimize-corner-left-bottom-1yUqeyiZ",
745
+ "animation-maximize-corner-left-top": "animation-maximize-corner-left-top-1yUqeyiZ",
746
+ "animation-maximize-corner-right-top": "animation-maximize-corner-right-top-1yUqeyiZ",
747
+ "animation-maximize-corner-right-bottom": "animation-maximize-corner-right-bottom-1yUqeyiZ",
748
+ "animation-maximize-corner-left-bottom": "animation-maximize-corner-left-bottom-1yUqeyiZ"
749
+ };
750
+ },
751
+ ku84: function ku84(e, t) {
752
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15" fill="none"><path fill="currentColor" d="M4.5 12A1.5 1.5 0 0 1 3 10.5V9H2v1.5A2.5 2.5 0 0 0 4.5 13h6a2.5 2.5 0 0 0 2.5-2.5V9h-1v1.5c0 .83-.67 1.5-1.5 1.5h-6z" class="bracket-up"/><path fill="currentColor" d="M4.5 3C3.67 3 3 3.67 3 4.5V6H2V4.5A2.5 2.5 0 0 1 4.5 2h6A2.5 2.5 0 0 1 13 4.5V6h-1V4.5c0-.83-.67-1.5-1.5-1.5h-6z" class="bracket-down"/></svg>';
753
+ },
754
+ lvAK: function lvAK(e, t, s) {
755
+ "use strict";
756
+
757
+ s.r(t);
758
+ var i = s("8+VR"),
759
+ o = s("RspR"),
760
+ l = s("3ClC"),
761
+ n = (s("LVLx"), s("Eyy1")),
762
+ a = s("eJTA"),
763
+ r = s("AvGy"),
764
+ d = s("EV8o"),
765
+ h = s("ZKFq"),
766
+ u = s("0jws");
767
+
768
+ class c {
769
+ constructor(e, t, s) {
770
+ this._parentEl = document.createElement("div"), this._listActionsWrapperEl = null, this._listActionsElements = {}, this._actionsSpawns = {}, this._onMouseEnterLeaveEventHandler = null, this._mouseOverWidget = !1, this._wrapEl = e, this._onMouseEnterLeaveEventHandler = this._onMouseEnterLeaveEvent.bind(this), this._wrapEl.addEventListener("mouseenter", this._onMouseEnterLeaveEventHandler), this._wrapEl.addEventListener("mouseleave", this._onMouseEnterLeaveEventHandler), this._actions = t, this._globalVisibility = s.globalVisibility.spawn(), this._globalVisibility.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)), this._visibilityType = s.visibilityType.spawn(), this._visibilityType.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)), this._doNotSwitchToContextMenuMode = s.doNotSwitchToContextMenuMode, this._themedColor = s.themedColor.spawn(), this._themedColor.subscribe(this._updateThemedColor.bind(this));
771
+
772
+ for (const [e, t] of Object.entries(this._actions)) {
773
+ const s = e;
774
+ this._actionsSpawns[s] = {
775
+ visible: t.visible.spawn(),
776
+ title: void 0 === t.title ? null : t.title.spawn()
777
+ }, this._actionsSpawns[s].visible.subscribe(this._updateActionVisibilities.bind(this, s));
778
+ const i = this._actionsSpawns[s].title;
779
+ null !== i && i.subscribe(this._updateActionTitle.bind(this, s));
780
+ }
781
+
782
+ this._render(), this._updatePaneControlsWidgetVisibility(), this._updateThemedColor(this._themedColor.value()), this._parentEl.classList.toggle(h.touchMode, r.a), this._parentEl.addEventListener("contextmenu", e => e.preventDefault());
783
+ }
784
+
785
+ destroy() {
786
+ this._visibilityType.destroy(), this._themedColor.destroy();
787
+
788
+ for (const e of Object.keys(this._actionsSpawns)) {
789
+ const t = e;
790
+
791
+ this._actionsSpawns[t].visible.destroy();
792
+
793
+ const s = this._actionsSpawns[t].title;
794
+ null !== s && s.destroy();
795
+ }
796
+
797
+ null !== this._onMouseEnterLeaveEventHandler && (this._wrapEl.removeEventListener("mouseenter", this._onMouseEnterLeaveEventHandler), this._wrapEl.removeEventListener("mouseleave", this._onMouseEnterLeaveEventHandler), this._onMouseEnterLeaveEventHandler = null), this._parentEl.innerHTML = "", delete this._parentEl;
798
+ }
799
+
800
+ getElement() {
801
+ return this._parentEl;
802
+ }
803
+
804
+ updateWidgetModeByWidth(e) {
805
+ const t = !this._doNotSwitchToContextMenuMode.value() && e < 356,
806
+ s = !this._doNotSwitchToContextMenuMode.value() && e < 666.65,
807
+ i = Object(n.ensureNotNull)(this._listActionsWrapperEl),
808
+ o = Object(n.ensureNotNull)(this._listActionsElements.more);
809
+ i.classList.toggle(u.blockHidden, t || s), o.classList.toggle(u.blockHidden, t || !s || !this._actions.more.visible.value());
810
+ }
811
+
812
+ _render() {
813
+ this._renderActions(), this._parentEl.classList.add(h.paneControls), this._wrapEl.append(this._parentEl);
814
+ }
815
+
816
+ _renderActions() {
817
+ null === this._listActionsWrapperEl && (this._listActionsWrapperEl = document.createElement("div"), this._listActionsWrapperEl.classList.add(h.buttonsWrapper), this._parentEl.append(this._listActionsWrapperEl));
818
+ const e = r.a ? "large" : "small";
819
+ this._listActionsElements.up = Object(d.a)(this._actions.up, h.button, h.buttonIcon, u.blockHidden, e), this._listActionsElements.down = Object(d.a)(this._actions.down, h.button, h.buttonIcon, u.blockHidden, e), this._listActionsElements.close = Object(d.a)(this._actions.close, h.button, h.buttonIcon, u.blockHidden, e), this._listActionsElements.maximize = Object(d.a)(this._actions.maximize, h.button, h.buttonIcon, u.blockHidden, e), this._listActionsElements.minimize = Object(d.a)(this._actions.minimize, h.button, h.buttonIcon, u.blockHidden, e), this._listActionsWrapperEl.append(this._listActionsElements.up, this._listActionsElements.down, this._listActionsElements.close, this._listActionsElements.maximize, this._listActionsElements.minimize), this._listActionsElements.more = Object(d.a)(this._actions.more, h.button, h.buttonIcon, u.blockHidden, e);
820
+
821
+ for (const e of Object.keys(this._listActionsElements)) Object(n.ensureNotNull)(this._listActionsElements[e]).classList.add(h.newButton);
822
+
823
+ this._parentEl.append(this._listActionsElements.more);
824
+ }
825
+
826
+ _updateActionVisibilities(e, t) {
827
+ Object(n.ensureNotNull)(this._listActionsElements[e]).classList.toggle(u.blockHidden, !t);
828
+ }
829
+
830
+ _updateActionTitle(e, t) {
831
+ Object(n.ensureNotNull)(this._listActionsElements[e]).setAttribute("title", t);
832
+ }
833
+
834
+ _onMouseEnterLeaveEvent(e) {
835
+ this._mouseOverWidget = "mouseenter" === e.type, "visibleOnMouseOver" === this._visibilityType.value() && this._updatePaneControlsWidgetVisibility();
836
+ }
837
+
838
+ _updatePaneControlsWidgetVisibility() {
839
+ let e,
840
+ t = !1;
841
+
842
+ switch (this._visibilityType.value()) {
843
+ case "alwaysOff":
844
+ e = !1, t = !0;
845
+ break;
846
+
847
+ case "alwaysOn":
848
+ e = this._globalVisibility.value();
849
+ break;
850
+
851
+ case "visibleOnMouseOver":
852
+ e = this._globalVisibility.value() && this._mouseOverWidget;
853
+ }
854
+
855
+ this._parentEl.classList.toggle(h.hidden, !e), this._parentEl.classList.toggle(h.forceHidden, !this._globalVisibility.value() || t);
856
+ }
857
+
858
+ _updateThemedColor(e) {
859
+ if (e.length > 0) {
860
+ const [t, s, i] = Object(a.parseRgb)(e);
861
+ this._parentEl.style.color = Object(a.rgbaToString)([t, s, i, Object(a.normalizeAlphaComponent)(.8)]);
862
+ } else this._parentEl.style.removeProperty("color");
863
+ }
864
+
865
+ }
866
+
867
+ var _ = s("7KDR"),
868
+ p = s("5VQP"),
869
+ m = s("obM5"),
870
+ b = s("fk9O"),
871
+ g = s("gKdq"),
872
+ w = s("WYzw");
873
+
874
+ function v(e, t) {
875
+ const s = Object(n.ensureNotNull)(t.target);
876
+ return function (e) {
877
+ const t = [];
878
+
879
+ if (e.maximize.visible.value()) {
880
+ const s = Object(n.ensure)(e.maximize.title),
881
+ i = Object(n.ensureNotNull)(e.maximize.action);
882
+ t.push(new _.Action({
883
+ icon: w,
884
+ label: s.value(),
885
+ statName: "Maximize Pane",
886
+ shortcutHint: y,
887
+ onExecute: () => i()
888
+ }));
889
+ } else if (e.minimize.visible.value()) {
890
+ const s = Object(n.ensure)(e.minimize.title),
891
+ i = Object(n.ensureNotNull)(e.minimize.action);
892
+ t.push(new _.Action({
893
+ icon: w,
894
+ label: s.value(),
895
+ statName: "Minimize Pane",
896
+ shortcutHint: y,
897
+ onExecute: () => i()
898
+ }));
899
+ }
900
+
901
+ if (e.up.visible.value()) {
902
+ const s = Object(n.ensure)(e.up.title),
903
+ i = Object(n.ensureNotNull)(e.up.action);
904
+ t.push(new _.Action({
905
+ icon: b,
906
+ label: s.value(),
907
+ statName: "Move pane up",
908
+ onExecute: () => i()
909
+ }));
910
+ }
911
+
912
+ if (e.down.visible.value()) {
913
+ const s = Object(n.ensure)(e.down.title),
914
+ i = Object(n.ensureNotNull)(e.down.action);
915
+ t.push(new _.Action({
916
+ icon: g,
917
+ label: s.value(),
918
+ statName: "Move pane down",
919
+ onExecute: () => i()
920
+ }));
921
+ }
922
+
923
+ if (e.close.visible.value()) {
924
+ const s = Object(n.ensure)(e.close.title),
925
+ i = Object(n.ensureNotNull)(e.close.action);
926
+ t.push(new _.Action({
927
+ icon: m,
928
+ label: s.value(),
929
+ statName: "Delete pane",
930
+ onExecute: () => i()
931
+ }));
932
+ }
933
+
934
+ return p.ContextMenuManager.createMenu(t);
935
+ }(e).then(e => (e.show(e => {
936
+ const t = s.getBoundingClientRect();
937
+ return {
938
+ clientX: t.right - e,
939
+ clientY: t.top + t.height + 3
940
+ };
941
+ }), e));
942
+ }
943
+
944
+ const y = window.t("Double click");
945
+ var S = s("hY0g"),
946
+ M = s.n(S),
947
+ f = s("EsvI"),
948
+ E = s("/DW5"),
949
+ C = s("OJSF"),
950
+ k = s("PXSR"),
951
+ V = s("QEZv"),
952
+ x = s("ku84"),
953
+ W = s("i9xP"),
954
+ T = s("1Wf8"),
955
+ L = s("956S");
956
+ s.d(t, "PaneControlsWidget", function () {
957
+ return I;
958
+ });
959
+ const O = i.mobiletouch,
960
+ A = window.t("Delete pane"),
961
+ D = window.t("Move pane up"),
962
+ H = window.t("Move pane down"),
963
+ B = window.t("Maximize pane"),
964
+ P = window.t("Restore pane"),
965
+ z = window.t("Manage panes"),
966
+ j = window.t("Double click"),
967
+ N = Object(E.b)({
968
+ keys: [""],
969
+ text: j
970
+ });
971
+
972
+ class I {
973
+ constructor(e, t, s, i, l) {
974
+ this._actions = {}, this._moreActionCM = null, this._themedColor = new M.a(""), this._model = e, this._paneWidget = t, this._callbacks = i, this._closeButtonVisibility = new M.a(this._getCloseButtonVisibility()), this._upButtonVisibility = new M.a(this._getUpButtonVisibility()), this._downButtonVisibility = new M.a(this._getDownButtonVisibility()), this._maximizeButtonVisibility = new M.a(this._getMaximizeButtonVisibility()), this._minimizeButtonVisibility = new M.a(this._getMinimizeButtonVisibility()), this._createActions(), this._visibilityTypeProperty = Object(o.actualBehavior)(), this._visibilityTypeProperty.subscribe(this, e => {
975
+ this._visibilityType.setValue(e.value());
976
+ }), this._visibilityType = new M.a(this._visibilityTypeProperty.value()), this._isPaneMaximize = new M.a(this._getIsPaneMaximizeValue()), this._isWidgetShow = new M.a(this._getIsWidgetShow()), this._backgroundThemeName = s.backgroundThemeName, this._renderer = new c(l, this._actions, {
977
+ visibilityType: this._visibilityType.readonly(),
978
+ globalVisibility: this._isWidgetShow.readonly(),
979
+ doNotSwitchToContextMenuMode: this._isPaneMaximize.readonly(),
980
+ themedColor: this._themedColor.readonly()
981
+ });
982
+ }
983
+
984
+ destroy() {
985
+ this._visibilityTypeProperty.unsubscribeAll(this), this._renderer.destroy();
986
+ }
987
+
988
+ getElement() {
989
+ return this._renderer.getElement();
990
+ }
991
+
992
+ action() {
993
+ return this._actions;
994
+ }
995
+
996
+ update() {
997
+ this._updateButtonsVisibility(), this._isPaneMaximize.setValue(this._getIsPaneMaximizeValue()), this._isWidgetShow.setValue(this._getIsWidgetShow());
998
+ }
999
+
1000
+ updateWidgetModeByWidth(e) {
1001
+ this._renderer.updateWidgetModeByWidth(e);
1002
+ }
1003
+
1004
+ updateThemedColors(e) {
1005
+ null === e && (e = Object(f.getStdThemedValue)("chartProperties.paneProperties.background", this._backgroundThemeName.value())), this._themedColor.setValue(e || "");
1006
+ }
1007
+
1008
+ _updateButtonsVisibility() {
1009
+ this._closeButtonVisibility.setValue(this._getCloseButtonVisibility()), this._upButtonVisibility.setValue(this._getUpButtonVisibility()), this._downButtonVisibility.setValue(this._getDownButtonVisibility()), this._maximizeButtonVisibility.setValue(this._getMaximizeButtonVisibility()), this._minimizeButtonVisibility.setValue(this._getMinimizeButtonVisibility());
1010
+ }
1011
+
1012
+ _createActions() {
1013
+ this._actions.up = {
1014
+ iconMap: new Map([["large", k], ["small", k]]),
1015
+ action: this._onUpDownButton.bind(this, "up"),
1016
+ visible: this._upButtonVisibility,
1017
+ title: new M.a(D),
1018
+ className: h.up,
1019
+ dataset: {
1020
+ name: "pane-button-up"
1021
+ }
1022
+ }, this._actions.down = {
1023
+ iconMap: new Map([["large", V], ["small", V]]),
1024
+ action: this._onUpDownButton.bind(this, "down"),
1025
+ visible: this._downButtonVisibility,
1026
+ title: new M.a(H),
1027
+ className: h.down,
1028
+ dataset: {
1029
+ name: "pane-button-down"
1030
+ }
1031
+ }, this._actions.close = {
1032
+ iconMap: new Map([["large", C], ["small", C]]),
1033
+ action: this._onCloseButton.bind(this),
1034
+ visible: this._closeButtonVisibility,
1035
+ title: new M.a(A),
1036
+ dataset: {
1037
+ name: "pane-button-close"
1038
+ }
1039
+ }, this._actions.maximize = {
1040
+ iconMap: new Map([["large", T], ["small", x]]),
1041
+ action: this._onToggleMaximizeButton.bind(this),
1042
+ visible: this._maximizeButtonVisibility,
1043
+ title: new M.a(B),
1044
+ hotKeyTitle: N,
1045
+ className: h.maximize,
1046
+ dataset: {
1047
+ name: "pane-button-maximize"
1048
+ }
1049
+ }, this._actions.minimize = {
1050
+ iconMap: new Map([["large", T], ["small", x]]),
1051
+ action: this._onToggleMaximizeButton.bind(this),
1052
+ visible: this._minimizeButtonVisibility,
1053
+ title: new M.a(P),
1054
+ hotKeyTitle: N,
1055
+ className: h.minimize,
1056
+ dataset: {
1057
+ name: "pane-button-minimize"
1058
+ }
1059
+ }, this._actions.more = {
1060
+ iconMap: new Map([["large", L], ["small", W]]),
1061
+ action: this._showButtonsInContextMenu.bind(this),
1062
+ visible: new M.a(!O),
1063
+ title: new M.a(z),
1064
+ dataset: {
1065
+ name: "pane-button-more"
1066
+ }
1067
+ };
1068
+ }
1069
+
1070
+ _getCloseButtonVisibility() {
1071
+ const e = this._paneWidget.state();
1072
+
1073
+ let t = !1;
1074
+ return e.containsMainSeries() || e.isMaximized() || O || (t = e.dataSources().some(e => Object(l.isStudy)(e))), t;
1075
+ }
1076
+
1077
+ _onCloseButton() {
1078
+ const e = this._model.model().panes().indexOf(this._paneWidget.state());
1079
+
1080
+ this._model.removePane(e);
1081
+ }
1082
+
1083
+ _getUpButtonVisibility() {
1084
+ const e = this._paneWidget.state();
1085
+
1086
+ return this._model.model().panes().indexOf(e) > 0 && !e.isMaximized() && !O;
1087
+ }
1088
+
1089
+ _getDownButtonVisibility() {
1090
+ const e = this._paneWidget.state(),
1091
+ t = this._model.model().panes();
1092
+
1093
+ return t.indexOf(e) < t.length - 1 && !e.isMaximized() && !O;
1094
+ }
1095
+
1096
+ _onUpDownButton(e) {
1097
+ const t = this._model.model().panes().indexOf(this._paneWidget.state());
1098
+
1099
+ this._model.rearrangePanes(t, e);
1100
+ }
1101
+
1102
+ _getMaximizeButtonVisibility() {
1103
+ const e = this._paneWidget.state();
1104
+
1105
+ return this._model.model().panes().length > 1 && !e.isMaximized() && !O;
1106
+ }
1107
+
1108
+ _getMinimizeButtonVisibility() {
1109
+ const e = this._paneWidget.state();
1110
+
1111
+ return this._model.model().panes().length > 1 && e.isMaximized();
1112
+ }
1113
+
1114
+ _onToggleMaximizeButton() {
1115
+ this._callbacks.toggleMaximizePane(this._paneWidget);
1116
+ }
1117
+
1118
+ _showButtonsInContextMenu(e) {
1119
+ e.preventDefault(), null !== this._moreActionCM && this._moreActionCM.isShown() ? this._moreActionCM = null : v(this._actions, e).then(e => {
1120
+ this._moreActionCM = e;
1121
+ });
1122
+ }
1123
+
1124
+ _getIsPaneMaximizeValue() {
1125
+ return this._paneWidget.state().isMaximized();
1126
+ }
1127
+
1128
+ _getIsWidgetShow() {
1129
+ return this._model.model().panes().length > 1;
1130
+ }
1131
+
1132
+ }
1133
+ },
1134
+ nFx7: function nFx7(e, t) {
1135
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g class="corner-left-top"><path fill="currentColor" d="M10 7C10.5523 7 11 7.44772 11 8V10C11 11.1046 10.1046 12 9 12H7C6.44772 12 6 11.5523 6 11C6 10.4477 6.44772 10 7 10H9V8C9 7.44772 9.44772 7 10 7Z"/></g><g class="corner-right-top"><path fill="currentColor" d="M18 7C18.5523 7 19 7.44772 19 8V10H21C21.5523 10 22 10.4477 22 11C22 11.5523 21.5523 12 21 12H19C17.8954 12 17 11.1046 17 10V8C17 7.44772 17.4477 7 18 7Z"/></g><g class="corner-right-bottom"><path fill="currentColor" d="M17 18C17 16.8954 17.8954 16 19 16H21C21.5523 16 22 16.4477 22 17C22 17.5523 21.5523 18 21 18H19V20C19 20.5523 18.5523 21 18 21C17.4477 21 17 20.5523 17 20V18Z"/></g><g class="corner-left-bottom"><path fill="currentColor" d="M6 17C6 16.4477 6.44772 16 7 16H9C10.1046 16 11 16.8954 11 18V20C11 20.5523 10.5523 21 10 21C9.44772 21 9 20.5523 9 20V18H7C6.44772 18 6 17.5523 6 17Z"/></g></svg>';
1136
+ },
1137
+ obM5: function obM5(e, t) {
1138
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M7.65 8.35l.7-.7 6.15 6.14 6.15-6.14.7.7-6.14 6.15 6.14 6.15-.7.7-6.15-6.14-6.15 6.14-.7-.7 6.14-6.15-6.14-6.15z"/></svg>';
1139
+ },
1140
+ qfuz: function qfuz(e, t) {
1141
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 7" width="9" height="7"><path fill="currentColor" d="M.5 3.5L4 0v3h5v1H4v3z"/></svg>';
1142
+ },
1143
+ rGGD: function rGGD(e, t) {
1144
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M2.4 5.46a.8.8 0 0 1 1.14-.05L8 9.42l4.46-4.01a.8.8 0 0 1 1.08 1.18L8 11.58 2.47 6.59a.8.8 0 0 1-.06-1.13z"/></svg>';
1145
+ },
1146
+ rh3U: function rh3U(e, t, s) {
1147
+ e.exports = {
1148
+ "css-value-small-size": "18px",
1149
+ "css-value-border-radius-small-size": "9px",
1150
+ "css-value-large-size": "22px",
1151
+ "css-value-border-radius-large-size": "11px",
1152
+ statuses: "statuses-1Ho_ylkC",
1153
+ statusItem: "statusItem-1Ho_ylkC",
1154
+ small: "small-1Ho_ylkC",
1155
+ large: "large-1Ho_ylkC",
1156
+ blinking: "blinking-1Ho_ylkC",
1157
+ oneWidgetsVisible: "oneWidgetsVisible-1Ho_ylkC",
1158
+ twoWidgetsVisible: "twoWidgetsVisible-1Ho_ylkC",
1159
+ threeWidgetsVisible: "threeWidgetsVisible-1Ho_ylkC",
1160
+ "blinking-animation": "blinking-animation-1Ho_ylkC",
1161
+ marketStatusOpen: "marketStatusOpen-1Ho_ylkC",
1162
+ marketStatusClose: "marketStatusClose-1Ho_ylkC",
1163
+ marketStatusPre: "marketStatusPre-1Ho_ylkC",
1164
+ marketStatusPost: "marketStatusPost-1Ho_ylkC",
1165
+ marketStatusHoliday: "marketStatusHoliday-1Ho_ylkC",
1166
+ invalidSymbol: "invalidSymbol-1Ho_ylkC",
1167
+ replayMode: "replayMode-1Ho_ylkC",
1168
+ notAccurate: "notAccurate-1Ho_ylkC",
1169
+ delay: "delay-1Ho_ylkC",
1170
+ eod: "eod-1Ho_ylkC",
1171
+ dataProblemHigh: "dataProblemHigh-1Ho_ylkC",
1172
+ dataProblemLow: "dataProblemLow-1Ho_ylkC"
1173
+ };
1174
+ },
1175
+ sAH5: function sAH5(e, t, s) {
1176
+ "use strict";
1177
+
1178
+ s.r(t);
1179
+
1180
+ var i = s("Eyy1"),
1181
+ o = s("hY0g"),
1182
+ l = s.n(o),
1183
+ n = s("ogJP"),
1184
+ a = s("ikwP"),
1185
+ r = s("eJTA"),
1186
+ d = s("Kxc7"),
1187
+ h = s("AvGy"),
1188
+ u = (s("LVLx"), s("MjAr")),
1189
+ c = s("EV8o"),
1190
+ _ = s("S8xo"),
1191
+ p = s("GUQs"),
1192
+ m = s("0jws");
1193
+
1194
+ var b = s("OcaN");
1195
+
1196
+ class g extends class {
1197
+ constructor(e) {
1198
+ let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1199
+ this._loadingEl = document.createElement("span"), this._renderLoading(t), this.toggleVisibility(!1), e.appendChild(this._loadingEl);
1200
+ }
1201
+
1202
+ toggleVisibility(e) {
1203
+ this._loadingEl.classList.toggle(m.blockHidden, !e);
1204
+ }
1205
+
1206
+ _renderLoading(e) {
1207
+ const {
1208
+ className: t
1209
+ } = e;
1210
+ t && this._loadingEl.classList.add(t);
1211
+ }
1212
+
1213
+ } {
1214
+ _renderLoading(e) {
1215
+ super._renderLoading(e), this._loadingEl.innerHTML = "\n\t\t\t<span class=\"".concat(b.loaderItem, "\"></span>\n\t\t\t<span class=\"").concat(b.loaderItem, "\"></span>\n\t\t\t<span class=\"").concat(b.loaderItem, "\"></span>\n\t\t"), this._loadingEl.classList.add(b.loader);
1216
+ }
1217
+
1218
+ }
1219
+
1220
+ var w = s("qFKp");
1221
+
1222
+ function v(e, t) {
1223
+ null === e.firstChild ? e.textContent = t : e.firstChild.nodeValue = t;
1224
+ }
1225
+
1226
+ var y = s("5Alx");
1227
+ const S = w.CheckMobile.any(),
1228
+ M = [y.title1st, y.title2nd, y.title3rd, y.title4th];
1229
+
1230
+ class f {
1231
+ constructor(e, t, s) {
1232
+ this._el = null, this._firstBlockWrapper = null, this._titleParentEl = null, this._titleElements = [], this._valuesParentEl = null, this._valuesAdditionalWrapperEl = null, this._valuesElements = [], this._actionsParentEl = null, this._actionAdditionalWrapperEl = null, this._stayInHoveredMode = !1, this._mode = 4, this._statusesWrapper = null, this._resizeObserver = null, this._hideInvisibleHover = null, this._hideValues = null, this._allButtonsWidth = null, this._lastStatusesWrapperWidth = null, this._lastActionsWrapperWidth = null, this._showActionsHandler = null, this._hideActionsHandler = null, this._selectedSourceHandler = null, this._mouseEventHandlers = [], this._disableTimeout = null, this._loader = null, this._model = e, this._parentEl = t, this._disabled = this._model.disabled().spawn(), this._disabled.subscribe(this._updateDisabledState.bind(this)), this._disabledOnInterval = this._model.disabledOnInterval().spawn(), this._disabledOnInterval.subscribe(this._updateDisabledOnIntervalState.bind(this)), this._selected = this._model.selected().spawn(), this._selected.subscribe(this._updateSelectedState.bind(this)), this._loading = this._model.loading().spawn(), this._loading.subscribe(function (e, t) {
1233
+ let s = 0;
1234
+ return i => {
1235
+ clearTimeout(s), Boolean(i) ? e() : s = setTimeout(e, t, !1);
1236
+ };
1237
+ }(this._updateLoadingState.bind(this), 700)), this._isTitleHidden = this._model.isTitleHidden().spawn(), this._isValuesHidden = this._model.isValuesHidden().spawn(), this._isRowHidden = this._model.isRowHidden().spawn(), this._isTitleHidden.subscribe(this._updateShowTitles.bind(this)), this._isValuesHidden.subscribe(this._updateShowValues.bind(this)), this._isRowHidden.subscribe(this._updateShowLine.bind(this)), this._titlesSpawns = this._model.titles().map(e => e.spawn());
1238
+
1239
+ for (let e = 0; e < this._titlesSpawns.length; e++) this._titlesSpawns[e].subscribe(this._updateTitlesHandler.bind(this, e));
1240
+
1241
+ this._values = this._model.values().spawn(), this._values.subscribe(this._updateValues.bind(this)), this._createValuesSpawns(), this._addValuesSpawnsSubscriptions(), this._actionsSpawnArray = this._model.actions().map(e => ({
1242
+ visible: e.visible.spawn(),
1243
+ title: void 0 === e.title ? null : e.title.spawn()
1244
+ }));
1245
+
1246
+ for (let e = 0; e < this._actionsSpawnArray.length; e++) {
1247
+ this._actionsSpawnArray[e].visible.subscribe(this._updateActionVisibilities.bind(this, e));
1248
+
1249
+ const t = this._actionsSpawnArray[e].title;
1250
+ null !== t && t.subscribe(this._updateActionTitle.bind(this, e));
1251
+ }
1252
+
1253
+ this._withActions = s.withActions, this._render(), this._updateStates(), this._updateShowTitles(), this._updateShowValues(), this._updateShowLine(), null !== this._valuesParentEl && (this._loader = new g(this._valuesParentEl, {
1254
+ className: y.loader
1255
+ })), this._customTextColor = s.customTextColor.spawn(), this._customTextColor.subscribe(this._updateCustomTextColor.bind(this)), this._updateCustomTextColor(), this._withActions && (this._showActionsHandler = Object(p.c)(this._showActions.bind(this)), this._hideActionsHandler = Object(p.c)(this._hideActions.bind(this)), this._selectedSourceHandler = Object(p.c)(this._model.setSourceSelected.bind(this._model)), null !== this._titleParentEl && (this._titleParentEl.addEventListener("touchend", this._selectedSourceHandler), this._titleParentEl.addEventListener("mousedown", this._selectedSourceHandler), S || (this._titleParentEl.addEventListener("mouseenter", this._showActionsHandler), this._titleParentEl.addEventListener("mouseleave", this._hideActionsHandler)), this._mouseEventHandlers.push(new _.MouseEventHandler(this._titleParentEl, {
1256
+ mouseDoubleClickEvent: this._model.onShowSettings.bind(this._model),
1257
+ doubleTapEvent: this._model.onShowSettings.bind(this._model)
1258
+ }))), null === this._actionAdditionalWrapperEl || null === this._actionsParentEl || S || (this._actionAdditionalWrapperEl.addEventListener("mouseenter", this._showActionsHandler), this._actionAdditionalWrapperEl.addEventListener("mouseleave", this._hideActionsHandler), this._actionsParentEl.addEventListener("contextmenu", e => {
1259
+ e.preventDefault(), e.stopPropagation();
1260
+ })));
1261
+ }
1262
+
1263
+ destroy() {
1264
+ var e, t;
1265
+ this._disabled.destroy(), this._disabledOnInterval.destroy(), this._selected.destroy(), this._loading.destroy(), this._isTitleHidden.destroy(), this._isValuesHidden.destroy(), this._isRowHidden.destroy(), this._customTextColor.destroy(), null !== this._disableTimeout && clearTimeout(this._disableTimeout);
1266
+
1267
+ for (const e of this._titlesSpawns) e.destroy();
1268
+
1269
+ if (null !== this._titleParentEl) {
1270
+ for (const e of this._mouseEventHandlers) e.destroy();
1271
+
1272
+ this._titleElements = [], this._withActions && null !== this._selectedSourceHandler && null !== this._showActionsHandler && null !== this._hideActionsHandler && (this._titleParentEl.removeEventListener("touchend", this._selectedSourceHandler), this._titleParentEl.removeEventListener("mousedown", this._selectedSourceHandler), S || (this._titleParentEl.removeEventListener("mouseenter", this._showActionsHandler), this._titleParentEl.removeEventListener("mouseleave", this._hideActionsHandler))), this._titleParentEl = null;
1273
+ }
1274
+
1275
+ for (const e of this._actionsSpawnArray) {
1276
+ e.visible.destroy();
1277
+ const t = e.title;
1278
+ null !== t && t.destroy();
1279
+ }
1280
+
1281
+ if (null !== this._actionAdditionalWrapperEl && (this._withActions && null !== this._showActionsHandler && null !== this._hideActionsHandler && !S && (this._actionAdditionalWrapperEl.removeEventListener("mouseenter", this._showActionsHandler), this._actionAdditionalWrapperEl.removeEventListener("mouseleave", this._hideActionsHandler)), this._actionAdditionalWrapperEl = null), this._actionsParentEl = null, this._removeValuesSpawnsSubscriptions(), this._values.destroy(), null !== this._valuesParentEl && (this._valuesElements = [], this._valuesParentEl = null), null === (e = this._hideInvisibleHover) || void 0 === e || e.destroy(), null === (t = this._hideValues) || void 0 === t || t.destroy(), null !== this._resizeObserver && (this._resizeObserver.disconnect(), this._resizeObserver = null), null !== this._el) {
1282
+ Object(i.ensureNotNull)(this._el.parentNode).removeChild(this._el), this._el = null;
1283
+ }
1284
+ }
1285
+
1286
+ getHeight() {
1287
+ return null === this._el ? null : 24;
1288
+ }
1289
+
1290
+ updateMode(e) {
1291
+ this._mode === e && null !== this._allButtonsWidth || (this._mode = e, this._updateAllButtonsWidth());
1292
+ }
1293
+
1294
+ _render() {
1295
+ this._renderTitle(), this._renderActions(), this._renderValues(), this._el = document.createElement("div"), this._firstBlockWrapper = document.createElement("div"), this._firstBlockWrapper.classList.add(y.noWrapWrapper), this._firstBlockWrapper.appendChild(Object(i.ensureNotNull)(this._titleParentEl)), null !== this._actionsParentEl && this._firstBlockWrapper.appendChild(this._actionsParentEl), this._el.appendChild(this._firstBlockWrapper), this._el.appendChild(Object(i.ensureNotNull)(this._valuesParentEl)), this._parentEl.append(this._el);
1296
+ }
1297
+
1298
+ _renderTitle() {
1299
+ null === this._titleParentEl && (this._titleParentEl = document.createElement("div"), this._titleParentEl.classList.add(y.titleWrapper));
1300
+ const e = this._titleParentEl;
1301
+
1302
+ for (let t = 0; t < this._titlesSpawns.length; t++) {
1303
+ const s = document.createElement("div");
1304
+ s.classList.add(y.title, M[t], "apply-overflow-tooltip"), s.dataset.name = "legend-source-title";
1305
+
1306
+ const i = this._titlesSpawns[t].value();
1307
+
1308
+ i.length > 0 ? (s.appendChild(document.createTextNode(i)), s.classList.add(y.withDot)) : s.classList.add(m.blockHidden), e.appendChild(s), this._titleElements.push(s);
1309
+ }
1310
+ }
1311
+
1312
+ _renderActions() {
1313
+ if (!this._withActions) return;
1314
+ null === this._actionsParentEl && (this._actionsParentEl = document.createElement("div"), this._actionsParentEl.classList.add(y.buttonsWrapper), this._parentEl.append(this._actionsParentEl), this._actionAdditionalWrapperEl = document.createElement("div"), this._actionAdditionalWrapperEl.classList.add(y.buttons), this._actionsParentEl.appendChild(this._actionAdditionalWrapperEl));
1315
+ const e = Object(i.ensureNotNull)(this._actionAdditionalWrapperEl),
1316
+ t = h.a ? "large" : "small";
1317
+
1318
+ for (const s of this._model.actions()) {
1319
+ const i = Object(c.a)(s, y.button, y.buttonIcon, m.blockHidden, t);
1320
+ e.appendChild(i);
1321
+ }
1322
+ }
1323
+
1324
+ _isWidthButtonsMode() {
1325
+ return null !== this._el && (this._el.classList.contains(y.withAction) || this._disabled.value() || this._selected.value() || this._stayInHoveredMode);
1326
+ }
1327
+
1328
+ _updateTitlesHandler(e, t) {
1329
+ const s = Object(i.ensureNotNull)(this._titleElements[e]),
1330
+ o = 0 === t.length;
1331
+ s.classList.toggle(m.blockHidden, o), s.classList.toggle(y.withDot, !o), v(s, t);
1332
+ }
1333
+
1334
+ _updateStates(e) {
1335
+ this._updateDisabledState(), this._updateDisabledOnIntervalState(), this._updateSelectedState(), this._updateLoadingState(), e && this._clearDisableState();
1336
+ }
1337
+
1338
+ _updateValuesHTMLElHandler(e, t) {
1339
+ v(Object(i.ensure)(this._valuesElements[e].value), t), this._updateShowValues();
1340
+ }
1341
+
1342
+ _updateValueColorHandler(e) {
1343
+ let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
1344
+ Object(i.ensure)(this._valuesElements[e].value).style.color = t;
1345
+ }
1346
+
1347
+ _updateValueVisibleHandler(e, t) {
1348
+ const s = Object(i.ensure)(this._valuesElements[e].value).closest("." + y.valueItem);
1349
+ null !== s && s.classList.toggle(m.blockHidden, !t);
1350
+ }
1351
+
1352
+ _updateShowLine() {
1353
+ null !== this._el && this._el.classList.toggle(m.blockHidden, this._isRowHidden.value());
1354
+ }
1355
+
1356
+ _createValuesSpawns() {
1357
+ this._valuesSpawnArray = this._values.value().map(e => ({
1358
+ value: e.value.spawn(),
1359
+ color: e.color.spawn(),
1360
+ visible: e.visible.spawn()
1361
+ }));
1362
+ }
1363
+
1364
+ _removeValuesSpawnsSubscriptions() {
1365
+ for (const e of this._valuesSpawnArray) e.value.destroy(), e.color.destroy(), e.visible.destroy();
1366
+
1367
+ this._valuesSpawnArray = [];
1368
+ }
1369
+
1370
+ _addValuesSpawnsSubscriptions() {
1371
+ for (let e = 0; e < this._valuesSpawnArray.length; e++) {
1372
+ const t = this._valuesSpawnArray[e];
1373
+ t.value.subscribe(this._updateValuesHTMLElHandler.bind(this, e)), t.color.subscribe(this._updateValueColorHandler.bind(this, e)), t.visible.subscribe(this._updateValueVisibleHandler.bind(this, e));
1374
+ }
1375
+ }
1376
+
1377
+ _updateShowValues() {
1378
+ null !== this._valuesAdditionalWrapperEl && this._valuesAdditionalWrapperEl.classList.toggle(m.blockHidden, this._isValuesShouldBeHidden());
1379
+ }
1380
+
1381
+ _isValuesShouldBeHidden() {
1382
+ return !this._valuesSpawnArray.some(e => e.value.value().length > 0);
1383
+ }
1384
+
1385
+ _addStatusesWidget(e, t, s) {
1386
+ this._statusesWrapper = document.createElement("div"), this._statusesWrapper.classList.add(y.statusesWrapper), this._statusesWrapper.appendChild(e), Object(i.ensureNotNull)(this._firstBlockWrapper).appendChild(this._statusesWrapper), this._hideInvisibleHover = t.spawn(), this._hideInvisibleHover.subscribe(this._updateInvisibleHoverMode.bind(this), {
1387
+ callWithLast: !0
1388
+ }), this._hideValues = s.spawn(), this._hideValues.subscribe(this._updateHideValuesMode.bind(this), {
1389
+ callWithLast: !0
1390
+ }), this._updateStatusWidgetVisibility(this._disabled.value()), this._resizeObserver = new u.default(this._handlerRestrictTitleWidth.bind(this)), null !== this._actionsParentEl && this._resizeObserver.observe(this._actionsParentEl), this._resizeObserver.observe(this._statusesWrapper);
1391
+ }
1392
+
1393
+ _updateTitleMaxWidth() {
1394
+ if (null === this._firstBlockWrapper) return;
1395
+ const e = this._allButtonsWidth || 0,
1396
+ t = (this._lastActionsWrapperWidth || 0) + (this._lastStatusesWrapperWidth || 0);
1397
+ this._isWidthButtonsMode() ? this._firstBlockWrapper.style.maxWidth = "calc(100% - ".concat(Math.max(e, t), "px)") : this._firstBlockWrapper.style.maxWidth = t > 0 ? "calc(100% - ".concat(t, "px)") : "";
1398
+ }
1399
+
1400
+ _updateAllButtonsWidth() {
1401
+ this._allButtonsWidth = this._getButtonsCount() * N + 1, this._updateTitleMaxWidth();
1402
+ }
1403
+
1404
+ _updateInvisibleHoverMode(e) {
1405
+ null !== this._el && this._el.classList.toggle(y.invisibleHover, !e);
1406
+ }
1407
+
1408
+ _updateHideValuesMode(e) {
1409
+ null !== this._el && this._el.classList.toggle(y.hideValues, e);
1410
+ }
1411
+
1412
+ _showActions() {
1413
+ if (null === this._el || !this._withActions) return;
1414
+
1415
+ this._el.classList.add(y.withAction);
1416
+
1417
+ const e = null !== this._valuesParentEl && null !== this._titleParentEl && this._valuesParentEl.offsetTop === this._titleParentEl.offsetTop;
1418
+ this._el.classList.toggle(y.withTail, e), this._updateTitleMaxWidth();
1419
+ }
1420
+
1421
+ _hideActions() {
1422
+ null !== this._el && this._withActions && !this._stayInHoveredMode && (this._el.classList.remove(y.withAction), null !== this._valuesParentEl && this._valuesParentEl.classList.remove(y.withTail), this._updateTitleMaxWidth());
1423
+ }
1424
+
1425
+ _handlerRestrictTitleWidth(e) {
1426
+ if (null === this._actionsParentEl || null === this._firstBlockWrapper) return;
1427
+ let t = null,
1428
+ s = null;
1429
+
1430
+ for (const i of e) i.target === this._statusesWrapper && (t = i.contentRect.width), i.target === this._actionsParentEl && (s = i.contentRect.width);
1431
+
1432
+ t === this._lastStatusesWrapperWidth && s === this._lastActionsWrapperWidth || (null !== t && (this._lastStatusesWrapperWidth = t), null !== s && (this._lastActionsWrapperWidth = s), this._updateTitleMaxWidth());
1433
+ }
1434
+
1435
+ _clearDesabledTimeout() {
1436
+ null !== this._disableTimeout && (clearTimeout(this._disableTimeout), this._disableTimeout = null);
1437
+ }
1438
+
1439
+ _updateDisabledState() {
1440
+ null !== this._el && (this._el.classList.remove("tempDisabled"), this._el.classList.remove(y.hiddenLoading), this._clearDesabledTimeout(), this._disabled.value() ? (this._el.classList.add(y.disabled), this._updateStatusWidgetVisibility(!0)) : (this._el.classList.add("tempDisabled"), this._el.classList.add(y.hiddenLoading), this._disableTimeout = setTimeout(() => {
1441
+ null !== this._el && (!this._loading.value() && this._el.classList.contains("tempDisabled") && (this._el.classList.remove("tempDisabled"), this._el.classList.remove(y.hiddenLoading), this._el.classList.toggle(y.disabled, this._disabled.value()), this._updateStatusWidgetVisibility(!1)), this._clearDesabledTimeout());
1442
+ }, 1e3)), this._updateTitleMaxWidth());
1443
+ }
1444
+
1445
+ _clearDisableState() {
1446
+ null !== this._el && (this._el.classList.remove(y.hiddenLoading), this._el.classList.remove(y.disabled), this._el.classList.remove("tempDisabled"), this._updateStatusWidgetVisibility(this._disabled.value()), this._updateTitleMaxWidth());
1447
+ }
1448
+
1449
+ _updateDisabledOnIntervalState() {
1450
+ var e;
1451
+ null === (e = this._el) || void 0 === e || e.classList.toggle(y.disabledOnInterval, this._disabledOnInterval.value());
1452
+ }
1453
+
1454
+ _updateSelectedState() {
1455
+ null !== this._el && this._withActions && this._el.classList.toggle(y.selected, this._selected.value());
1456
+ }
1457
+
1458
+ _updateLoadingState() {
1459
+ if (null === this._el) return;
1460
+ this._el.classList.contains("tempDisabled") && (this._loading.value() ? this._el.classList.add(y.hiddenLoading) : this._clearDisableState());
1461
+
1462
+ const e = this._loading.value();
1463
+
1464
+ this._el.classList.toggle(y.loading, e), null !== this._loader && this._loader.toggleVisibility(e);
1465
+ }
1466
+
1467
+ _updateShowTitles() {
1468
+ null !== this._titleParentEl && (this._titleParentEl.classList.toggle(m.blockHidden, this._isTitleHidden.value()), null !== this._actionsParentEl && this._actionsParentEl.classList.toggle(m.blockHidden, this._isTitleHidden.value()));
1469
+ }
1470
+
1471
+ _updateValues() {
1472
+ this._removeValuesSpawnsSubscriptions(), this._createValuesSpawns(), null !== this._valuesParentEl && null !== this._valuesAdditionalWrapperEl && (this._valuesElements = [], this._valuesAdditionalWrapperEl.innerHTML = ""), this._renderValues(), this._addValuesSpawnsSubscriptions(), this._updateShowValues();
1473
+ }
1474
+
1475
+ _updateActionVisibilities(e) {
1476
+ null !== this._actionsParentEl && this._actionsParentEl.querySelectorAll("." + y.button)[e].classList.toggle(m.blockHidden, !this._actionsSpawnArray[e].visible.value());
1477
+ }
1478
+
1479
+ _updateActionTitle(e) {
1480
+ const t = this._actionsSpawnArray[e].title;
1481
+ null !== this._actionsParentEl && null !== t && this._actionsParentEl.querySelectorAll("." + y.button)[e].setAttribute("title", t.value());
1482
+ }
1483
+
1484
+ _updateCustomTextColor() {
1485
+ const e = this._customTextColor.value() || "";
1486
+
1487
+ for (const t of this._titleElements) null !== t && (t.style.color = e);
1488
+
1489
+ const t = Object(i.ensureNotNull)(this._valuesParentEl).querySelectorAll("." + y.valueTitle);
1490
+
1491
+ for (let s = 0; s < t.length; s++) t[s].style.color = e;
1492
+
1493
+ Object(i.ensureNotNull)(this._el).classList.toggle(y.withCustomTextColor, Boolean(e));
1494
+ }
1495
+
1496
+ _updateStatusWidgetVisibility(e) {
1497
+ null !== this._statusesWrapper && this._statusesWrapper.classList.toggle(m.blockHidden, e);
1498
+ }
1499
+
1500
+ }
1501
+
1502
+ class E extends f {
1503
+ constructor(e, t, s) {
1504
+ super(e, t, s), this._clientHeight = null, this._flagged = this._model.flagged().spawn(), this._flagged.subscribe(this._updateFlaggedState.bind(this)), this._updateStates(), s.statusWidgetEl && this._addStatusesWidget(s.statusWidgetEl, s.hideInvisibleHover, s.hideValues), this._selected.subscribe(this._updateTitleMaxWidth.bind(this));
1505
+ }
1506
+
1507
+ destroy() {
1508
+ super.destroy(), void 0 !== this._flagged && this._flagged.destroy();
1509
+ }
1510
+
1511
+ getHeight() {
1512
+ return null === this._el ? null : (null === this._clientHeight && (this._clientHeight = this._el.clientHeight, 0 === this._clientHeight && (this._clientHeight = null)), this._clientHeight);
1513
+ }
1514
+
1515
+ _getButtonsCount() {
1516
+ return 1 === this._mode ? 1 : 3;
1517
+ }
1518
+
1519
+ _render() {
1520
+ super._render();
1521
+
1522
+ const e = Object(i.ensureNotNull)(this._el);
1523
+ e.classList.add(y.item, y.series), e.classList.toggle(y.onlyOneButtonCanBeStick, this._model.isOneButtonCanBeStick()), e.dataset.name = "legend-series-item";
1524
+ }
1525
+
1526
+ _updateStates() {
1527
+ super._updateStates(), this._updateFlaggedState();
1528
+ }
1529
+
1530
+ _renderValues() {
1531
+ null === this._valuesParentEl && (this._valuesParentEl = document.createElement("div"), this._valuesParentEl.classList.add(y.valuesWrapper), this._valuesAdditionalWrapperEl = document.createElement("div"), this._valuesAdditionalWrapperEl.classList.add(y.valuesAdditionalWrapper), this._valuesParentEl.appendChild(this._valuesAdditionalWrapperEl));
1532
+
1533
+ const e = Object(i.ensureNotNull)(this._valuesAdditionalWrapperEl),
1534
+ t = this._values.value();
1535
+
1536
+ for (const s of t) {
1537
+ const t = document.createElement("div");
1538
+ t.classList.add(y.valueItem), t.classList.toggle(m.blockHidden, !s.visible.value());
1539
+ const i = document.createElement("div"),
1540
+ o = s.title.value() || "";
1541
+ i.classList.add(y.valueTitle), i.classList.toggle(m.blockHidden, 0 === o.length), i.appendChild(document.createTextNode(o)), t.appendChild(i);
1542
+ const l = document.createElement("div");
1543
+ l.classList.add(y.valueValue), l.style.color = s.color.value() || "", l.appendChild(document.createTextNode(s.value.value())), t.appendChild(l), this._valuesElements.push({
1544
+ title: i,
1545
+ value: l
1546
+ }), e.appendChild(t);
1547
+ }
1548
+ }
1549
+
1550
+ _createValuesSpawns() {
1551
+ super._createValuesSpawns(), this._values.value().forEach((e, t) => {
1552
+ this._valuesSpawnArray[t].title = e.title.spawn();
1553
+ });
1554
+ }
1555
+
1556
+ _removeValuesSpawnsSubscriptions() {
1557
+ for (const e of this._valuesSpawnArray) e.title.destroy();
1558
+
1559
+ super._removeValuesSpawnsSubscriptions();
1560
+ }
1561
+
1562
+ _addValuesSpawnsSubscriptions() {
1563
+ super._addValuesSpawnsSubscriptions();
1564
+
1565
+ for (let e = 0; e < this._valuesSpawnArray.length; e++) this._valuesSpawnArray[e].title.subscribe(this._updateValuesTitleHTMLElHandler.bind(this, e));
1566
+ }
1567
+
1568
+ _isValuesShouldBeHidden() {
1569
+ return !this._valuesSpawnArray.some(e => e.value.value().length > 0 || (e.title.value() || "").length > 0);
1570
+ }
1571
+
1572
+ _updateValuesTitleHTMLElHandler(e) {
1573
+ let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
1574
+ const s = Object(i.ensure)(this._valuesElements[e].title);
1575
+ v(s, t), s.classList.toggle(m.blockHidden, 0 === t.length), this._updateShowValues();
1576
+ }
1577
+
1578
+ _isWidthButtonsMode() {
1579
+ return null !== this._el && (void 0 !== this._flagged && Boolean(this._flagged.value()) || super._isWidthButtonsMode());
1580
+ }
1581
+
1582
+ _updateFlaggedState() {
1583
+ if (void 0 === this._flagged) return;
1584
+ Object(i.ensureNotNull)(this._el).classList.toggle(y.flagged, Boolean(this._flagged.value())), this._updateTitleMaxWidth();
1585
+ }
1586
+
1587
+ }
1588
+
1589
+ const C = w.isSafari ? "click" : "auxclick";
1590
+
1591
+ class k extends f {
1592
+ constructor(e, t, s) {
1593
+ super(e, t, s), this._wheelClickHandler = null, this._canUpdateRowVisibility = !0, this._globalRowVisibility = this._model.globalVisibility().spawn(), this._globalRowVisibility.subscribe(this._updateShowLine.bind(this), {
1594
+ callWithLast: !0
1595
+ }), this._has5Buttons = this._model.isPineScriptDataSource().spawn(), this._has5Buttons.subscribe(this._update5ButtonsStyles.bind(this)), this._updateStates(!this._disabled.value()), s.statusWidgetEl && this._addStatusesWidget(s.statusWidgetEl, s.hideInvisibleHover, s.hideValues), this._selected.subscribe(this._updateTitleMaxWidth.bind(this)), s.withActions && (this._wheelClickHandler = this._onWheelClicked.bind(this), null !== this._titleParentEl && this._titleParentEl.addEventListener(C, this._wheelClickHandler));
1596
+ }
1597
+
1598
+ destroy() {
1599
+ super.destroy(), this._has5Buttons.destroy(), this._globalRowVisibility && this._globalRowVisibility.destroy(), null !== this._wheelClickHandler && null !== this._titleParentEl && this._titleParentEl.removeEventListener(C, this._wheelClickHandler);
1600
+ }
1601
+
1602
+ _updateShowLine() {
1603
+ if (null === this._el || !this._canUpdateRowVisibility) return;
1604
+ const e = !this._globalRowVisibility.value();
1605
+ e ? this._el.classList.toggle(m.blockHidden, e) : super._updateShowLine();
1606
+ }
1607
+
1608
+ _getButtonsCount() {
1609
+ switch (this._mode) {
1610
+ case 4:
1611
+ return this._has5Buttons.value() ? 5 : 4;
1612
+
1613
+ case 3:
1614
+ return 3;
1615
+
1616
+ default:
1617
+ return 2;
1618
+ }
1619
+ }
1620
+
1621
+ _render() {
1622
+ super._render();
1623
+
1624
+ const e = Object(i.ensureNotNull)(this._el);
1625
+ e.classList.add(y.item, y.study), e.dataset.name = "legend-source-item";
1626
+ }
1627
+
1628
+ _renderValues() {
1629
+ null === this._valuesParentEl && (this._valuesParentEl = document.createElement("div"), this._valuesParentEl.classList.add(y.valuesWrapper), this._valuesAdditionalWrapperEl = document.createElement("div"), this._valuesAdditionalWrapperEl.classList.add(y.valuesAdditionalWrapper), this._valuesParentEl.appendChild(this._valuesAdditionalWrapperEl));
1630
+
1631
+ const e = Object(i.ensureNotNull)(this._valuesAdditionalWrapperEl),
1632
+ t = this._values.value();
1633
+
1634
+ for (const s of t) {
1635
+ const t = document.createElement("div");
1636
+ t.classList.add(y.valueItem), t.classList.toggle(m.blockHidden, !s.visible.value());
1637
+ const i = document.createElement("div");
1638
+ i.classList.add(y.valueValue), i.style.color = s.color.value() || "", i.appendChild(document.createTextNode(s.value.value())), t.appendChild(i), this._valuesElements.push({
1639
+ value: i
1640
+ }), e.appendChild(t);
1641
+ }
1642
+ }
1643
+
1644
+ _update5ButtonsStyles(e) {
1645
+ null !== this._el && (this._el.classList.toggle(y.has5Buttons, e), this._updateAllButtonsWidth());
1646
+ }
1647
+
1648
+ _onWheelClicked(e) {
1649
+ 1 === e.button && this._model.onRemoveSource();
1650
+ }
1651
+
1652
+ }
1653
+
1654
+ var V = s("JWMC");
1655
+
1656
+ function x(e) {
1657
+ Object(V.trackEvent)("GUI", "Legend action", e);
1658
+ }
1659
+
1660
+ var W = s("6dGu"),
1661
+ T = s("rGGD"),
1662
+ L = s("Y+EN"),
1663
+ O = s("vYP1");
1664
+ const A = window.t("Hide Indicator Legend"),
1665
+ D = window.t("Show Indicator Legend"),
1666
+ H = window.t("Show Object Tree");
1667
+
1668
+ class B {
1669
+ constructor(e, t, s) {
1670
+ this._el = null, this._counterEl = null, this._arrowIconEL = null, this._objectTreeEl = null, this._mode = 0, this._parentEl = e, this._themedColor = t.spawn(), this._themedColor.subscribe(this._updateThemedColor.bind(this)), this._sourceCount = s.visibleDataSourceCount.spawn(), this._sourceCount.subscribe(this._updateSourceCount.bind(this)), this._isStateOpen = s.isDataSourcesCollapsed.spawn(), this._isStateOpen.subscribe(this._updateState.bind(this)), this._showObjectsTree = s.showObjectsTree.spawn(), this._showObjectsTree.subscribe(this._updateObjectTreeVisibility.bind(this)), this._render(), this._updateState(), this._updateThemedColor(this._themedColor.value()), this._updateObjectTreeVisibility(this._showObjectsTree.value()), this._toggleStateHandler = Object(p.c)(s.onCollapseDataSources), this._showObjectTreeHandler = Object(p.c)(s.onShowObjectsTreeDialog), null !== this._el && (this._el.addEventListener("touchend", this._toggleStateHandler), this._el.addEventListener("click", this._toggleStateHandler), this._el.addEventListener("contextmenu", e => {
1671
+ e.preventDefault(), e.stopPropagation();
1672
+ })), null !== this._objectTreeEl && (this._objectTreeEl.addEventListener("touchend", this._showObjectTreeHandler), this._objectTreeEl.addEventListener("click", this._showObjectTreeHandler));
1673
+ }
1674
+
1675
+ destroy() {
1676
+ this._sourceCount.destroy(), this._isStateOpen.destroy(), null !== this._objectTreeEl && (this._objectTreeEl.removeEventListener("touchend", this._showObjectTreeHandler), this._objectTreeEl.removeEventListener("click", this._showObjectTreeHandler), this._objectTreeEl = null), this._arrowIconEL = null, this._counterEl = null, null !== this._el && (this._el.removeEventListener("touchend", this._toggleStateHandler), this._el.removeEventListener("click", this._toggleStateHandler), this._el.innerHTML = "", this._el = null);
1677
+ }
1678
+
1679
+ setMode(e) {
1680
+ this._mode = e ? 1 : 0, this._updateTooltip();
1681
+ }
1682
+
1683
+ _render() {
1684
+ this._el = document.createElement("div"), this._el.className = y.toggler + " apply-common-tooltip", this._arrowIconEL = document.createElement("div"), this._arrowIconEL.classList.add(y.iconArrow), this._arrowIconEL.innerHTML = h.a ? T : W, this._el.appendChild(this._arrowIconEL), this._objectTreeEl = document.createElement("div"), this._objectTreeEl.classList.add(y.objectTree), this._objectTreeEl.innerHTML = h.a ? O : L, this._el.appendChild(this._objectTreeEl), this._counterEl = document.createElement("div"), this._counterEl.classList.add(y.counter), this._counterEl.appendChild(document.createTextNode(String(this._sourceCount.value()))), this._el.appendChild(this._counterEl), this._parentEl.appendChild(this._el);
1685
+ }
1686
+
1687
+ _updateThemedColor(e) {
1688
+ if (null !== this._el) if (e.length > 0) {
1689
+ const [t, s, i] = Object(r.parseRgb)(e);
1690
+ this._el.style.backgroundColor = Object(r.rgbaToString)([t, s, i, Object(r.normalizeAlphaComponent)(.8)]);
1691
+ } else this._el.style.removeProperty("background-color");
1692
+ }
1693
+
1694
+ _updateSourceCount(e) {
1695
+ v(Object(i.ensureNotNull)(this._counterEl), String(e));
1696
+ {
1697
+ const t = Object(i.ensureNotNull)(this._el),
1698
+ s = e < 1;
1699
+ t.classList.toggle(m.blockHidden, s);
1700
+ const o = 1 === e;
1701
+ t.classList.toggle(y.onlyOneSourceShown, o);
1702
+ }
1703
+ }
1704
+
1705
+ _updateCounterVisibility(e) {
1706
+ if (null === this._counterEl) return;
1707
+ const t = 1 === e;
1708
+
1709
+ this._counterEl.classList.toggle(m.blockHidden, t);
1710
+ }
1711
+
1712
+ _updateState() {
1713
+ const e = !this._isStateOpen.value();
1714
+ this._parentEl.classList.toggle(y.closed, e), this._updateTooltip(), x((e ? "Hide" : "Show") + " not main sources");
1715
+ }
1716
+
1717
+ _tooltip() {
1718
+ return 1 === this._mode ? H : this._isStateOpen.value() ? A : D;
1719
+ }
1720
+
1721
+ _updateTooltip() {
1722
+ null !== this._el && this._el.setAttribute("title", this._tooltip());
1723
+ }
1724
+
1725
+ _updateObjectTreeVisibility(e) {
1726
+ Object(i.ensureNotNull)(this._el).classList.toggle(y.objectsTreeCanBeShown, e);
1727
+ }
1728
+
1729
+ }
1730
+
1731
+ var P = s("+6II"),
1732
+ z = s("R5JZ");
1733
+
1734
+ function j(e, t) {
1735
+ const s = new l.a(t(e.value()));
1736
+ e.subscribe(e => {
1737
+ s.setValue(t(e));
1738
+ });
1739
+ return s.readonly().spawn(() => e.unsubscribe());
1740
+ }
1741
+
1742
+ const N = h.a ? 44 : 28,
1743
+ I = d.enabled("object_tree_legend_mode");
1744
+
1745
+ class R {
1746
+ constructor(e, t) {
1747
+ this._renderToggler = null, this._mainDataSourceRenderer = null, this._dataSourceRenderers = [], this._wrapText = null, this._parentEl = document.createElement("div"), this._mainDataSourceEl = null, this._dataSourcesEl = null, this._dataSourcesAdditionalWrapperEl = null, this._collapsedDataSourcesWrapperEl = null, this._collapsedDataSourcesEl = null, this._outsideEventForCollapsedTooltip = null, this._options = e, this._togglerOptions = t, this._isStudiesLegendHidden = e.isStudiesLegendHidden.spawn(), this._isStudiesLegendHidden.subscribe(this._updateLegendVisibility.bind(this)), this._isAllLegendHidden = e.isAllLegendHidden.spawn(), this._isAllLegendHidden.subscribe(this._updateLegendVisibility.bind(this)), this._updateLegendVisibility(), this._themedColor = e.themedColor.spawn(), this._themedColor.subscribe(this._setCustomBg.bind(this)), this._showBackground = e.showBackground.spawn(), this._showBackground.subscribe(this._setCustomBg.bind(this)), this._backgroundTransparency = e.backgroundTransparency.spawn(), this._backgroundTransparency.subscribe(this._setCustomBg.bind(this)), this._collapsedDataSourcesCountSpawn = e.collapsedDataSourcesCount.spawn(), this._collapsedDataSourcesCountSpawn.subscribe(this._updateCollapsedSourcesCount.bind(this)), this._showCollapsedDataSourcesTooltipHandler = this._showCollapsedDataSourcesTooltip.bind(this), h.a || (this._wrapText = e.wrapText.spawn(), this._wrapText.subscribe(this._updateWrapText.bind(this)), this._updateWrapText(this._wrapText.value())), this._parentEl.classList.add(y.legend), this._parentEl.classList.toggle(y.noActions, !this._options.withActions), this._parentEl.classList.toggle(y.touchMode, h.a), this._parentEl.classList.toggle(y.newCollapser, !0), this._parentEl.dataset.name = "legend", this._parentEl.style.setProperty("--legend-source-item-button-width", N + "px"), this._parentEl.addEventListener("contextmenu", t => {
1748
+ t.preventDefault(), e.showLegendWidgetContextMenu(t);
1749
+ });
1750
+ }
1751
+
1752
+ destroy() {
1753
+ if (this._isStudiesLegendHidden.destroy(), this._isAllLegendHidden.destroy(), this._themedColor.destroy(), this._showBackground.destroy(), this._backgroundTransparency.destroy(), this._collapsedDataSourcesCountSpawn.destroy(), h.a && null !== this._collapsedDataSourcesWrapperEl && this._collapsedDataSourcesWrapperEl.removeEventListener("touchend", this._showCollapsedDataSourcesTooltipHandler), this._outsideEventForCollapsedTooltip && this._outsideEventForCollapsedTooltip(), null !== this._wrapText && this._wrapText.destroy(), null !== this._dataSourcesAdditionalWrapperEl && (this._dataSourcesAdditionalWrapperEl.innerHTML = "", this._dataSourcesAdditionalWrapperEl = null), null !== this._dataSourcesEl && (this._dataSourcesEl.innerHTML = "", this._dataSourcesEl = null), null !== this._renderToggler && (this._renderToggler.destroy(), this._renderToggler = null), null !== this._mainDataSourceRenderer && (this._mainDataSourceRenderer.destroy(), this._mainDataSourceRenderer = null), 0 !== this._dataSourceRenderers.length) {
1754
+ for (const e of this._dataSourceRenderers) e.destroy();
1755
+
1756
+ this._dataSourceRenderers = [];
1757
+ }
1758
+
1759
+ this._parentEl.innerHTML = "", delete this._parentEl;
1760
+ }
1761
+
1762
+ addMainDataSource(e, t) {
1763
+ this._renderMainDataSourceEl(), this._mainDataSourceRenderer = new E(e, Object(i.ensureNotNull)(this._mainDataSourceEl), {
1764
+ withActions: this._options.withActions,
1765
+ customTextColor: this._options.customTextColor,
1766
+ statusWidgetEl: t.getElement(),
1767
+ hideInvisibleHover: j(t.visibleWidgetsCount, e => Boolean(e)),
1768
+ hideValues: t.errorWidgetIsShown
1769
+ }), this._updateLegendVisibility(), e.onDestroy().subscribe(this, () => {
1770
+ null !== this._mainDataSourceRenderer && (this._mainDataSourceRenderer.destroy(), this._mainDataSourceRenderer = null);
1771
+ }, !0);
1772
+ }
1773
+
1774
+ addDataSources(e, t) {
1775
+ this._renderDataSourcesEl();
1776
+
1777
+ const s = Object(i.ensureNotNull)(this._dataSourcesAdditionalWrapperEl);
1778
+
1779
+ for (let i = 0; i < e.length; i++) {
1780
+ const o = e[i],
1781
+ l = new k(o, s, {
1782
+ withActions: this._options.withActions,
1783
+ customTextColor: this._options.customTextColor,
1784
+ statusWidgetEl: t[i].getElement(),
1785
+ hideInvisibleHover: j(t[i].visibleWidgetsCount, e => Boolean(e)),
1786
+ hideValues: t[i].errorWidgetIsShown
1787
+ });
1788
+ this._dataSourceRenderers.push(l), this._updateLegendVisibility(), o.onDestroy().subscribe(this, () => {
1789
+ const e = this._dataSourceRenderers.indexOf(l);
1790
+
1791
+ -1 !== e && (this._dataSourceRenderers[e].destroy(), this._dataSourceRenderers.splice(e, 1));
1792
+ }, !0);
1793
+ }
1794
+ }
1795
+
1796
+ addCustomWidget(e, t) {
1797
+ if (0 === t.block) {
1798
+ this._renderMainDataSourceEl();
1799
+
1800
+ const s = Object(i.ensureNotNull)(this._mainDataSourceEl);
1801
+ 1 === t.position && e.renderTo(s, s.firstChild), 0 === t.position && e.renderTo(s);
1802
+ }
1803
+
1804
+ if (1 === t.block) {
1805
+ this._renderDataSourcesEl();
1806
+
1807
+ const s = Object(i.ensureNotNull)(this._dataSourcesAdditionalWrapperEl);
1808
+ 1 === t.position && e.renderTo(s, s.firstChild), 0 === t.position && e.renderTo(s);
1809
+ }
1810
+ }
1811
+
1812
+ firstTitle() {
1813
+ return this._parentEl.firstElementChild;
1814
+ }
1815
+
1816
+ getElement() {
1817
+ return this._parentEl;
1818
+ }
1819
+
1820
+ updateMode(e) {
1821
+ const t = I && e < 112 ? 1 : e < 205 ? 2 : e < 222 ? 3 : 4;
1822
+ null !== this._mainDataSourceRenderer && this._mainDataSourceRenderer.updateMode(t);
1823
+
1824
+ for (const e of this._dataSourceRenderers) e.updateMode(t);
1825
+
1826
+ this._parentEl.classList.toggle(y.medium, 3 === t), this._parentEl.classList.toggle(y.minimized, 2 === t), this._parentEl.classList.toggle(y.micro, 1 === t), null !== this._renderToggler && this._renderToggler.setMode(1 === t);
1827
+ const s = h.a || e < 542;
1828
+
1829
+ this._parentEl.classList.toggle(y.directionColumn, s);
1830
+ }
1831
+
1832
+ getMainSourceHeight() {
1833
+ return null === this._mainDataSourceRenderer ? 0 : this._mainDataSourceRenderer.getHeight();
1834
+ }
1835
+
1836
+ getDataSourceHeight() {
1837
+ return 0 === this._dataSourceRenderers.length ? 0 : this._dataSourceRenderers[0].getHeight();
1838
+ }
1839
+
1840
+ _renderMainDataSourceEl() {
1841
+ null === this._mainDataSourceEl && (this._mainDataSourceEl = document.createElement("div"), this._parentEl.insertBefore(this._mainDataSourceEl, this._dataSourcesEl));
1842
+ }
1843
+
1844
+ _renderDataSourcesEl() {
1845
+ null === this._dataSourcesEl && (this._dataSourcesEl = document.createElement("div"), this._dataSourcesEl.classList.add(y.sourcesWrapper), this._renderToggle(this._dataSourcesEl), this._dataSourcesAdditionalWrapperEl = document.createElement("div"), this._dataSourcesAdditionalWrapperEl.classList.add(y.sources), this._dataSourcesEl.appendChild(this._dataSourcesAdditionalWrapperEl), this._renderCollapsedCounter(this._dataSourcesAdditionalWrapperEl), this._parentEl.appendChild(this._dataSourcesEl));
1846
+ }
1847
+
1848
+ _renderToggle(e) {
1849
+ this._options.showToggleButton && (this._renderToggler = new B(e, this._options.themedColor, this._togglerOptions));
1850
+ }
1851
+
1852
+ _renderCollapsedCounter(e) {
1853
+ this._collapsedDataSourcesWrapperEl = document.createElement("div"), this._collapsedDataSourcesWrapperEl.className = "".concat(y.item, " ").concat(y.last), this._collapsedDataSourcesEl = document.createElement("span"), this._collapsedDataSourcesEl.className = y.text + " apply-common-tooltip", this._collapsedDataSourcesWrapperEl.append(this._collapsedDataSourcesEl), e.append(this._collapsedDataSourcesWrapperEl), h.a && this._collapsedDataSourcesWrapperEl.addEventListener("touchend", this._showCollapsedDataSourcesTooltipHandler), this._updateCollapsedSourcesCount(this._collapsedDataSourcesCountSpawn.value());
1854
+ }
1855
+
1856
+ _showCollapsedDataSourcesTooltip() {
1857
+ Object(P.c)(this._collapsedDataSourcesEl, {
1858
+ text: this._options.collapsedDataSourcesTitle.value()
1859
+ }), this._addOutsideEventForHideTooltip();
1860
+ }
1861
+
1862
+ _addOutsideEventForHideTooltip() {
1863
+ null !== this._outsideEventForCollapsedTooltip && this._outsideEventForCollapsedTooltip(), this._outsideEventForCollapsedTooltip = Object(z.a)(new CustomEvent("timestamp").timeStamp, this._collapsedDataSourcesWrapperEl, () => {
1864
+ null !== this._outsideEventForCollapsedTooltip && this._outsideEventForCollapsedTooltip(), Object(P.a)();
1865
+ }, window.document, {
1866
+ touchEnd: !0
1867
+ });
1868
+ }
1869
+
1870
+ _updateCollapsedSourcesCount(e) {
1871
+ if (null === this._collapsedDataSourcesWrapperEl || null === this._collapsedDataSourcesEl) return;
1872
+ const t = 0 === e;
1873
+ this._collapsedDataSourcesWrapperEl.classList.toggle(m.blockHidden, t), t || (v(this._collapsedDataSourcesEl, "+" + e), this._collapsedDataSourcesEl.setAttribute("title", this._options.collapsedDataSourcesTitle.value()));
1874
+ }
1875
+
1876
+ _updateLegendVisibility() {
1877
+ this._parentEl.classList.toggle(m.blockHidden, this._isAllLegendHidden.value()), null !== this._dataSourcesEl && this._dataSourcesEl.classList.toggle(m.blockHidden, this._isStudiesLegendHidden.value());
1878
+ }
1879
+
1880
+ _setCustomBg() {
1881
+ const e = this._showBackground.value(),
1882
+ t = this._themedColor.value(),
1883
+ s = this._backgroundTransparency.value();
1884
+
1885
+ let i = "";
1886
+
1887
+ if (e) {
1888
+ const [e, o, l] = Object(r.parseRgb)(t);
1889
+ i = Object(r.rgbaToString)([e, o, l, Object(r.normalizeAlphaComponent)(1 - s / 100)]);
1890
+ }
1891
+
1892
+ this._parentEl.style.color = i;
1893
+ }
1894
+
1895
+ _updateWrapText(e) {
1896
+ this._parentEl.classList.toggle(y.noWrap, !e);
1897
+ }
1898
+
1899
+ }
1900
+
1901
+ var F = s("Tmoa"),
1902
+ K = s("aIyQ"),
1903
+ U = s.n(K),
1904
+ Y = s("Ialn"),
1905
+ G = s("QloM"),
1906
+ Z = s("1AAW"),
1907
+ X = s("CLNU");
1908
+
1909
+ function $(e) {
1910
+ return void 0 !== e ? F.resetTransparency(e) : e;
1911
+ }
1912
+
1913
+ const q = window.t("Show"),
1914
+ J = window.t("Hide");
1915
+
1916
+ class Q {
1917
+ constructor(e, t, s, i, o) {
1918
+ this._values = new l.a([]), this._actions = [], this._onDestroy = new U.a(), this._loading = new l.a(!1), this._moreActionCM = null, this._model = e, this._source = t, this._options = s, this._callbacks = i, this._contextMenuOptions = o, this._disabled = new l.a(this._getDisabledState()), this._disabledOnInterval = new l.a(this._getDisabledOnIntervalState()), this._selected = new l.a(!1), this._isTitleHidden = new l.a(this._getTitleHiddenValue()), this._isValuesHidden = new l.a(this._getValuesHiddenValue()), this._isRowHidden = new l.a(this._getRowHiddenValue()), Object(Z.a)(() => ({}), this._isTitleHidden, this._isValuesHidden, this._disabled).subscribe(this._updateRowVisibilities.bind(this)), this._values.subscribe(() => {
1919
+ this._isValuesHidden.setValue(this._getValuesHiddenValue());
1920
+ });
1921
+ }
1922
+
1923
+ destroy() {}
1924
+
1925
+ onDestroy() {
1926
+ return this._onDestroy;
1927
+ }
1928
+
1929
+ titles() {
1930
+ return this._titles.map(e => e.readonly());
1931
+ }
1932
+
1933
+ values() {
1934
+ return this._values.readonly();
1935
+ }
1936
+
1937
+ actions() {
1938
+ return this._actions;
1939
+ }
1940
+
1941
+ disabled() {
1942
+ return this._disabled.readonly();
1943
+ }
1944
+
1945
+ disabledOnInterval() {
1946
+ return this._disabledOnInterval.readonly();
1947
+ }
1948
+
1949
+ selected() {
1950
+ return this._selected.readonly();
1951
+ }
1952
+
1953
+ loading() {
1954
+ return this._loading.readonly();
1955
+ }
1956
+
1957
+ isTitleHidden() {
1958
+ return this._isTitleHidden.readonly();
1959
+ }
1960
+
1961
+ isValuesHidden() {
1962
+ return this._isValuesHidden.readonly();
1963
+ }
1964
+
1965
+ isRowHidden() {
1966
+ return this._isRowHidden.readonly();
1967
+ }
1968
+
1969
+ update() {
1970
+ this._updateTitle(), this._updateValues(), this._updateStates();
1971
+ }
1972
+
1973
+ updateSource(e) {
1974
+ this._source !== e && (this._source = e, this.update(), this._isTitleHidden.setValue(this._getTitleHiddenValue()), this._isValuesHidden.setValue(this._getValuesHiddenValue()));
1975
+ }
1976
+
1977
+ onToggleDisabled() {
1978
+ const e = this._source.properties().childs().visible,
1979
+ t = !e.value();
1980
+
1981
+ this._model.setProperty(e, t, "".concat(t ? "Show" : "Hide", " ").concat(this._source.title())), x((t ? "Show" : "Hide") + " source");
1982
+ }
1983
+
1984
+ onShowSettings() {
1985
+ this._source.userEditEnabled() && (this.setSourceSelected(), this._callbacks.showChartPropertiesForSource(this._source, G.TabNames.style), x("Settings for source"));
1986
+ }
1987
+
1988
+ onShowMoreActions(e) {
1989
+ return this._options.readOnlyMode ? Promise.resolve(null) : (this._callbacks.updateActions(), x("Show source context menu"), this._callbacks.showContextMenuForSources([this._source], this._calcNewPosition(e), this._contextMenuOptions));
1990
+ }
1991
+
1992
+ setSourceSelected() {
1993
+ this._model.selectionMacro(e => {
1994
+ e.clearSelection(), e.addSourceToSelection(this._source);
1995
+ });
1996
+ }
1997
+
1998
+ _moreActionHandler(e) {
1999
+ e.preventDefault(), null !== this._moreActionCM && this._moreActionCM.isShown() ? this._moreActionCM = null : (this.setSourceSelected(), this.onShowMoreActions(e).then(e => {
2000
+ this._moreActionCM = e;
2001
+ }));
2002
+ }
2003
+
2004
+ _updateTitle() {
2005
+ const e = this._source.statusView();
2006
+
2007
+ if (null === e) return;
2008
+ const t = e.getSplitTitle();
2009
+
2010
+ for (let e = 0; e < this._titles.length; e++) {
2011
+ const s = t[e],
2012
+ i = Object(X.clean)(Array.isArray(s) ? s.join(" ") : s || "", !0);
2013
+
2014
+ this._titles[e].setValue(i);
2015
+ }
2016
+ }
2017
+
2018
+ _updateStates() {
2019
+ this._disabled.setValue(this._getDisabledState()), this._disabledOnInterval.setValue(this._getDisabledOnIntervalState()), this._selected.setValue(this._model.selection().isSelected(this._source)), this._loading.setValue(Boolean(this._source.isLoading()));
2020
+ }
2021
+
2022
+ _hasValues() {
2023
+ return this._values.value().length > 0;
2024
+ }
2025
+
2026
+ _getEyeTitle() {
2027
+ return this._disabled.value() ? q : J;
2028
+ }
2029
+
2030
+ _getDisabledState() {
2031
+ return !this._source.properties().visible.value();
2032
+ }
2033
+
2034
+ _updateRowVisibilities() {
2035
+ this._isRowHidden.setValue(this._getRowHiddenValue());
2036
+ }
2037
+
2038
+ _getRowHiddenValue() {
2039
+ return this._options.readOnlyMode && this._disabled.value() || this._isTitleHidden.value() && (this._isValuesHidden.value() || this._disabled.value());
2040
+ }
2041
+
2042
+ _calcNewPosition(e) {
2043
+ let t = {};
2044
+ if (e.hasOwnProperty("touches") && e.touches.length > 0) t = {
2045
+ clientX: e.touches[0].clientX,
2046
+ clientY: e.touches[0].clientY
2047
+ };else if (null !== e.target) {
2048
+ const s = e.target.getBoundingClientRect();
2049
+ t = {
2050
+ clientX: Object(Y.isRtl)() ? s.right : s.left,
2051
+ clientY: s.top + s.height + 3
2052
+ };
2053
+ } else {
2054
+ const s = e;
2055
+ t = {
2056
+ clientX: s.clientX,
2057
+ clientY: s.clientY
2058
+ };
2059
+ }
2060
+ return t;
2061
+ }
2062
+
2063
+ }
2064
+
2065
+ var ee = s("z4c1"),
2066
+ te = s("61S9"),
2067
+ se = s("vWJB"),
2068
+ ie = s("wZiV");
2069
+ const oe = window.t("More"),
2070
+ le = window.t("Flag Symbol"),
2071
+ ne = window.t("Unflag Symbol"),
2072
+ ae = d.enabled("show_hide_button_in_legend");
2073
+
2074
+ class re extends Q {
2075
+ constructor(e, t, s, i, o) {
2076
+ super(e, t, s, i, o), this._titles = [new l.a(""), new l.a(""), new l.a(""), new l.a("")], this._symbolMarker = null, this._symbolMarkerIcon = null, this._flagged = new l.a(null), this._symbolAction = null, this._symbol = null, this._isOneButtonCanBeStick = !1, this._createActions(), this._updateSymbolMarker(), this._model.model().properties().paneProperties.legendProperties.showSeriesTitle.subscribe(this, () => {
2077
+ this._isTitleHidden.setValue(this._getTitleHiddenValue());
2078
+ });
2079
+ const n = [this._model.model().properties().paneProperties.legendProperties.showSeriesOHLC, this._model.model().properties().paneProperties.legendProperties.showBarChange];
2080
+
2081
+ for (const e of n) e.subscribe(this, () => {
2082
+ this._isValuesHidden.setValue(this._getValuesHiddenValue());
2083
+ });
2084
+
2085
+ this.update(), this._source.onStatusChanged().subscribe(this, () => {
2086
+ this._loading.setValue(this._source.isLoading());
2087
+ });
2088
+ }
2089
+
2090
+ destroy() {
2091
+ super.destroy(), this._model.model().properties().paneProperties.legendProperties.showSeriesTitle.unsubscribeAll(this), this._model.model().properties().paneProperties.legendProperties.showSeriesOHLC.unsubscribeAll(this), this._model.model().properties().paneProperties.legendProperties.showBarChange.unsubscribeAll(this), this._source.onStatusChanged().unsubscribeAll(this), this._onDestroy.fire();
2092
+ }
2093
+
2094
+ flagged() {
2095
+ return this._flagged.readonly();
2096
+ }
2097
+
2098
+ onShowSettings() {
2099
+ this._source.userEditEnabled() && this._callbacks.showGeneralChartProperties(G.TabNames.symbol);
2100
+ }
2101
+
2102
+ isOneButtonCanBeStick() {
2103
+ return this._isOneButtonCanBeStick;
2104
+ }
2105
+
2106
+ _updateValues() {
2107
+ const e = this._source.legendView(),
2108
+ t = this._values.value(),
2109
+ s = e.marketTitle(),
2110
+ i = e.marketTitle().length > 0;
2111
+
2112
+ if (0 === t.length) {
2113
+ const t = {
2114
+ value: new l.a(""),
2115
+ color: new l.a(""),
2116
+ visible: new l.a(i),
2117
+ title: new l.a(s)
2118
+ },
2119
+ o = e.items().map(e => ({
2120
+ value: new l.a(e.value()),
2121
+ color: new l.a($(e.color())),
2122
+ visible: new l.a(e.visible()),
2123
+ title: new l.a(e.title())
2124
+ }));
2125
+
2126
+ this._values.setValue([t].concat(o));
2127
+ } else {
2128
+ t[0].title.setValue(s), t[0].visible.setValue(i);
2129
+ const o = e.items();
2130
+
2131
+ for (let e = 0; e < o.length; e++) {
2132
+ const s = o[e];
2133
+ t[e + 1].value.setValue(s.value()), t[e + 1].color.setValue($(s.color())), t[e + 1].visible.setValue(s.visible()), t[e + 1].title.setValue(s.title());
2134
+ }
2135
+ }
2136
+ }
2137
+
2138
+ _updateStates() {
2139
+ super._updateStates(), this._updateSymbolMarker();
2140
+ }
2141
+
2142
+ _getDisabledOnIntervalState() {
2143
+ return !1;
2144
+ }
2145
+
2146
+ _getTitleHiddenValue() {
2147
+ return !this._model.model().properties().paneProperties.legendProperties.showSeriesTitle.value();
2148
+ }
2149
+
2150
+ _getValuesHiddenValue() {
2151
+ return !this._hasValues() || !this._model.model().properties().paneProperties.legendProperties.showSeriesOHLC.value() && !this._model.model().properties().paneProperties.legendProperties.showBarChange.value();
2152
+ }
2153
+
2154
+ _createActions() {
2155
+ if (ae) {
2156
+ const e = {
2157
+ iconMap: new Map([["large", te], ["small", ee]]),
2158
+ action: Object(p.c)(this.onToggleDisabled.bind(this)),
2159
+ visible: new l.a(!0),
2160
+ className: y.eye,
2161
+ title: new l.a(this._getEyeTitle()),
2162
+ dataset: {
2163
+ name: "legend-show-hide-action"
2164
+ }
2165
+ };
2166
+ this._actions.push(e), this._disabled.subscribe(() => {
2167
+ e.title.setValue(this._getEyeTitle());
2168
+ });
2169
+ }
2170
+
2171
+ this._actions.push({
2172
+ iconMap: new Map([["large", ie], ["small", se]]),
2173
+ action: this._moreActionHandler.bind(this),
2174
+ visible: new l.a(!0),
2175
+ title: new l.a(oe),
2176
+ dataset: {
2177
+ name: "legend-more-action"
2178
+ }
2179
+ });
2180
+ }
2181
+
2182
+ _getMarkerTitle() {
2183
+ return null !== this._symbolMarker ? this._symbolMarker.isMarked() ? ne : le : "";
2184
+ }
2185
+
2186
+ _symbolActionHandler() {
2187
+ null !== this._symbolMarker && (this._updateSymbolMarker(), x("Change flag state"));
2188
+ }
2189
+
2190
+ _updateSymbolMarker() {
2191
+ this._isOneButtonCanBeStick = !0;
2192
+ }
2193
+
2194
+ }
2195
+
2196
+ var de = s("3ClC"),
2197
+ he = s("fZEr");
2198
+
2199
+ var ue = s("z61+"),
2200
+ ce = s("txPx"),
2201
+ _e = s("RgOa"),
2202
+ pe = s("2CEX"),
2203
+ me = s("D8x7"),
2204
+ be = s("bNWL"),
2205
+ ge = s("cKqi"),
2206
+ we = s("YzC7");
2207
+
2208
+ Object(ce.getLogger)("Chart.LegendWidget");
2209
+ const ve = window.t("Settings"),
2210
+ ye = window.t("Source code"),
2211
+ Se = window.t("Remove"),
2212
+ Me = window.t("More"),
2213
+ fe = (window.t("Error"), window.t("Could not get Pine source code."), d.enabled("study_buttons_in_legend"), d.enabled("show_hide_button_in_legend")),
2214
+ Ee = d.enabled("property_pages"),
2215
+ Ce = d.enabled("format_button_in_legend"),
2216
+ ke = d.enabled("delete_button_in_legend");
2217
+
2218
+ class Ve extends Q {
2219
+ constructor(e, t, s, i, o) {
2220
+ super(e, t, s, i, o), this._titles = [new l.a(""), new l.a("")], this._error = new l.a(!1), this._isPineScriptDataSource = new l.a(!1), this._pineAction = null, this._globalVisibility = new l.a(!0), this._createActions();
2221
+ const n = [this._model.model().properties().paneProperties.legendProperties.showSeriesTitle, this._model.model().properties().paneProperties.legendProperties.showStudyTitles];
2222
+
2223
+ for (const e of n) e.subscribe(this, () => {
2224
+ this._isTitleHidden.setValue(this._getTitleHiddenValue());
2225
+ });
2226
+
2227
+ const a = [this._model.model().properties().paneProperties.legendProperties.showSeriesOHLC, this._model.model().properties().paneProperties.legendProperties.showBarChange, this._model.model().properties().paneProperties.legendProperties.showStudyValues];
2228
+
2229
+ for (const e of a) e.subscribe(this, () => {
2230
+ this._isValuesHidden.setValue(this._getValuesHiddenValue());
2231
+ });
2232
+
2233
+ this.update();
2234
+ }
2235
+
2236
+ destroy() {
2237
+ super.destroy();
2238
+
2239
+ const e = this._model.model().properties().paneProperties.legendProperties;
2240
+
2241
+ e.showSeriesTitle.unsubscribeAll(this), e.showStudyTitles.unsubscribeAll(this), e.showSeriesOHLC.unsubscribeAll(this), e.showBarChange.unsubscribeAll(this), e.showStudyValues.unsubscribeAll(this), this._onDestroy.fire();
2242
+ }
2243
+
2244
+ error() {
2245
+ return this._error.readonly();
2246
+ }
2247
+
2248
+ isPineScriptDataSource() {
2249
+ return this._isPineScriptDataSource.readonly();
2250
+ }
2251
+
2252
+ updateSource(e) {
2253
+ this._source !== e && (this._values.setValue([]), super.updateSource(e), this._updateAbleShowSourceCode());
2254
+ }
2255
+
2256
+ onRemoveSource() {
2257
+ var e;
2258
+ this._source.isUserDeletable() && (this._source.hasChildren() ? (e = this._model.removeSource.bind(this._model, this._source, !1), Object(he.showConfirm)({
2259
+ title: window.t("Confirm Remove Study Tree"),
2260
+ text: window.t("Do you really want to delete study and all of it's children?"),
2261
+ onConfirm: _ref => {
2262
+ let {
2263
+ dialogClose: t
2264
+ } = _ref;
2265
+ e(), t();
2266
+ }
2267
+ })) : this._model.removeSource(this._source, !1), x("Remove sources"));
2268
+ }
2269
+
2270
+ onShowSourceCode() {
2271
+ 0;
2272
+ }
2273
+
2274
+ setGlobalVisibility(e) {
2275
+ this._globalVisibility.setValue(e);
2276
+ }
2277
+
2278
+ globalVisibility() {
2279
+ return this._globalVisibility.readonly();
2280
+ }
2281
+
2282
+ getFullTitle() {
2283
+ return this._titles.map(e => e.value()).join(" ");
2284
+ }
2285
+
2286
+ _updateValues() {
2287
+ const e = this._source.legendView();
2288
+
2289
+ if (null === e) return;
2290
+ if (0 === e.items().length) return;
2291
+
2292
+ const t = this._values.value();
2293
+
2294
+ if (0 === t.length) {
2295
+ const t = e.items().map(e => ({
2296
+ value: new l.a(e.value()),
2297
+ color: new l.a($(e.color())),
2298
+ visible: new l.a(e.visible())
2299
+ }));
2300
+
2301
+ this._values.setValue(t);
2302
+ } else {
2303
+ const s = e.items();
2304
+
2305
+ for (let e = 0; e < s.length; e++) {
2306
+ const i = t[e],
2307
+ o = s[e];
2308
+ i.value.setValue(o.value()), i.color.setValue($(o.color())), i.visible.setValue(o.visible());
2309
+ }
2310
+ }
2311
+ }
2312
+
2313
+ _updateStates() {
2314
+ super._updateStates(), void 0 !== this._error && this._error.setValue(Boolean(this._source.isFailed()));
2315
+ }
2316
+
2317
+ _getTitleHiddenValue() {
2318
+ return this._isSymbolLikeStudy() ? !this._model.model().properties().paneProperties.legendProperties.showSeriesTitle.value() : !this._model.model().properties().paneProperties.legendProperties.showStudyTitles.value();
2319
+ }
2320
+
2321
+ _getDisabledOnIntervalState() {
2322
+ return !(!Object(de.isStudy)(this._source) && !Object(de.isStudyStub)(this._source)) && !this._source.isActualInterval();
2323
+ }
2324
+
2325
+ _getValuesHiddenValue() {
2326
+ return !this._hasValues() || (this._isSymbolLikeStudy() ? !this._model.model().properties().paneProperties.legendProperties.showSeriesOHLC.value() && !this._model.model().properties().paneProperties.legendProperties.showBarChange.value() : !this._model.model().properties().paneProperties.legendProperties.showStudyValues.value());
2327
+ }
2328
+
2329
+ _isSymbolLikeStudy() {
2330
+ return this._source instanceof ge.study_Overlay || this._source instanceof we.a;
2331
+ }
2332
+
2333
+ _updateAbleShowSourceCode() {
2334
+ 0;
2335
+ }
2336
+
2337
+ _updateVisibilityPineAction(e) {
2338
+ null !== this._pineAction && (this._pineAction.visible.setValue(e), this._isPineScriptDataSource.setValue(e));
2339
+ }
2340
+
2341
+ _createActions() {
2342
+ if (!this._options.readOnlyMode) {
2343
+ if (this._pineAction = {
2344
+ iconMap: new Map([["large", pe], ["small", pe]]),
2345
+ action: Object(p.c)(this.onShowSourceCode.bind(this)),
2346
+ visible: new l.a(!1),
2347
+ title: new l.a(ye),
2348
+ dataset: {
2349
+ name: "legend-pine-action"
2350
+ }
2351
+ }, fe) {
2352
+ const e = {
2353
+ iconMap: new Map([["large", te], ["small", ee]]),
2354
+ action: Object(p.c)(this.onToggleDisabled.bind(this)),
2355
+ visible: new l.a(!0),
2356
+ className: y.eye,
2357
+ title: new l.a(this._getEyeTitle()),
2358
+ dataset: {
2359
+ name: "legend-show-hide-action"
2360
+ }
2361
+ };
2362
+ this._actions.push(e), this._disabled.subscribe(() => {
2363
+ e.title.setValue(this._getEyeTitle());
2364
+ });
2365
+ }
2366
+
2367
+ Ee && Ce && (!Object(de.isStudy)(this._source) || new ue.a(this._source.metaInfo()).hasUserEditableOptions()) && this._actions.push({
2368
+ iconMap: new Map([["large", _e], ["small", _e]]),
2369
+ action: Object(p.c)(this.onShowSettings.bind(this)),
2370
+ visible: new l.a(!0),
2371
+ title: new l.a(ve),
2372
+ dataset: {
2373
+ name: "legend-settings-action"
2374
+ }
2375
+ }), ke && this._actions.push({
2376
+ iconMap: new Map([["large", be], ["small", me]]),
2377
+ action: Object(p.c)(this.onRemoveSource.bind(this)),
2378
+ visible: new l.a(!0),
2379
+ title: new l.a(Se),
2380
+ dataset: {
2381
+ name: "legend-delete-action"
2382
+ }
2383
+ }), this._actions.push({
2384
+ iconMap: new Map([["large", ie], ["small", se]]),
2385
+ action: this._moreActionHandler.bind(this),
2386
+ visible: new l.a(!0),
2387
+ title: new l.a(Me),
2388
+ dataset: {
2389
+ name: "legend-more-action"
2390
+ }
2391
+ });
2392
+ }
2393
+ }
2394
+
2395
+ }
2396
+
2397
+ var xe = s("7KDR"),
2398
+ We = s("5VQP"),
2399
+ Te = s("x2L+"),
2400
+ Le = s("2uTr"),
2401
+ Oe = s("MXV9");
2402
+
2403
+ function Ae(e, t, s) {
2404
+ e.setProperty(t, !t.value(), s);
2405
+ }
2406
+
2407
+ function De(e, t, s, i, o, l) {
2408
+ return function (e, t, s, i, o) {
2409
+ const l = [],
2410
+ n = i.get(0);
2411
+
2412
+ if (void 0 !== n) {
2413
+ const e = n.get(1);
2414
+ void 0 !== e && e.length > 0 && (l.push(...e), l.push(new xe.Separator()));
2415
+ }
2416
+
2417
+ const a = e.model().properties().paneProperties.legendProperties;
2418
+ l.push(new xe.Action({
2419
+ checkable: !0,
2420
+ checked: a.showSeriesTitle.value(),
2421
+ label: He,
2422
+ statName: "Show Symbol",
2423
+ onExecute: () => Ae(e, a.showSeriesTitle, "Change Symbol Description Visibility")
2424
+ })), t.showOpenMarketStatus && l.push(new xe.Action({
2425
+ checkable: !0,
2426
+ checked: Te.b.value(),
2427
+ label: Be,
2428
+ statName: "Show Open market status",
2429
+ onExecute: () => Ae(e, Te.b, "Change open market status visibility")
2430
+ }));
2431
+
2432
+ if (l.push(new xe.Action({
2433
+ checkable: !0,
2434
+ checked: a.showSeriesOHLC.value(),
2435
+ label: Pe,
2436
+ statName: "Show OHLC Values",
2437
+ onExecute: () => Ae(e, a.showSeriesOHLC, "Change OHLC Values Visibility")
2438
+ })), l.push(new xe.Action({
2439
+ checkable: !0,
2440
+ checked: a.showBarChange.value(),
2441
+ label: ze,
2442
+ statName: "Show Bar Change Values",
2443
+ onExecute: () => Ae(e, a.showBarChange, "Change Bar Change Visibility")
2444
+ })), l.push(new xe.Separator()), void 0 !== n) {
2445
+ const e = n.get(0);
2446
+ void 0 !== e && e.length > 0 && (l.push(...e), l.push(new xe.Separator()));
2447
+ }
2448
+
2449
+ const r = i.get(1);
2450
+
2451
+ if (void 0 !== r) {
2452
+ const e = r.get(1);
2453
+ void 0 !== e && e.length > 0 && (l.push(...e), l.push(new xe.Separator()));
2454
+ }
2455
+
2456
+ if (l.push(new xe.Action({
2457
+ checkable: !0,
2458
+ checked: a.showStudyTitles.value(),
2459
+ label: je,
2460
+ statName: "Show Indicator Titles",
2461
+ onExecute: () => Ae(e, a.showStudyTitles, "Change Indicator Titles Visibility")
2462
+ })), l.push(new xe.Action({
2463
+ checkable: !0,
2464
+ checked: a.showStudyArguments.value(),
2465
+ label: Ne,
2466
+ statName: "Show Indicator Arguments",
2467
+ onExecute: () => Ae(e, a.showStudyArguments, "Change Indicator Arguments Visibility")
2468
+ })), l.push(new xe.Action({
2469
+ checkable: !0,
2470
+ checked: a.showStudyValues.value(),
2471
+ label: Ie,
2472
+ statName: "Show Indicator Values",
2473
+ onExecute: () => Ae(e, a.showStudyValues, "Change Indicator Values Visibility")
2474
+ })), void 0 !== r) {
2475
+ const e = r.get(0);
2476
+ void 0 !== e && e.length > 0 && (l.push(...e), l.push(new xe.Separator()));
2477
+ }
2478
+
2479
+ 0;
2480
+ t.settings && (l.push(new xe.Separator()), l.push(new xe.Action({
2481
+ label: Object(Le.appendEllipsis)(window.t("Settings")),
2482
+ icon: Oe,
2483
+ statName: "Settings...",
2484
+ onExecute: () => s(G.TabNames.legend)
2485
+ })));
2486
+ return We.ContextMenuManager.createMenu(l, {}, o);
2487
+ }(e, t, s, i, l).then(e => (e.show(o), e));
2488
+ }
2489
+
2490
+ const He = window.t("Show Symbol"),
2491
+ Be = window.t("Show Open market status"),
2492
+ Pe = window.t("Show OHLC Values"),
2493
+ ze = window.t("Show Bar Change Values"),
2494
+ je = window.t("Show Indicator Titles"),
2495
+ Ne = window.t("Show Indicator Arguments"),
2496
+ Ie = window.t("Show Indicator Values");
2497
+ window.t("Wrap text"), w.CheckMobile.any();
2498
+ var Re = s("+DwS"),
2499
+ Fe = s("Y7w9"),
2500
+ Ke = s("+6ja"),
2501
+ Ue = s("kcTO"),
2502
+ Ye = s("4nwx"),
2503
+ Ge = s("99ZO"),
2504
+ Ze = s("jCNj"),
2505
+ Xe = s("GOhO"),
2506
+ $e = s("5mo2");
2507
+
2508
+ function qe(e) {
2509
+ return e === Ge.WeekDays.SUNDAY ? Ge.WeekDays.SATURDAY : e - 1;
2510
+ }
2511
+
2512
+ function Je(e) {
2513
+ return e === Ge.WeekDays.SATURDAY ? Ge.WeekDays.SUNDAY : e + 1;
2514
+ }
2515
+
2516
+ function Qe(e, t) {
2517
+ const s = qe(t);
2518
+ return 0 === e[s].entries.length ? Qe(e, s) : {
2519
+ dayIndex: s,
2520
+ entries: e[s].entries
2521
+ };
2522
+ }
2523
+
2524
+ function et(e, t) {
2525
+ const s = Je(t);
2526
+ return 0 === e[s].entries.length ? et(e, s) : {
2527
+ dayIndex: s,
2528
+ entries: e[s].entries
2529
+ };
2530
+ }
2531
+
2532
+ function tt(e) {
2533
+ for (; e > Ze.minutesPerDay;) e -= Ze.minutesPerDay;
2534
+
2535
+ const t = e % 60,
2536
+ s = (e - t) / 60;
2537
+ return Object(Ue.numberToStringWithLeadingZero)(s, 2) + ":" + Object(Ue.numberToStringWithLeadingZero)(t, 2);
2538
+ }
2539
+
2540
+ const st = {
2541
+ [Ge.WeekDays.MONDAY]: {
2542
+ title: Ye.weekDaysShortNames[Ge.WeekDays.MONDAY],
2543
+ isActive: !1,
2544
+ entries: []
2545
+ },
2546
+ [Ge.WeekDays.TUESDAY]: {
2547
+ title: Ye.weekDaysShortNames[Ge.WeekDays.TUESDAY],
2548
+ isActive: !1,
2549
+ entries: []
2550
+ },
2551
+ [Ge.WeekDays.WEDNESDAY]: {
2552
+ title: Ye.weekDaysShortNames[Ge.WeekDays.WEDNESDAY],
2553
+ isActive: !1,
2554
+ entries: []
2555
+ },
2556
+ [Ge.WeekDays.THURSDAY]: {
2557
+ title: Ye.weekDaysShortNames[Ge.WeekDays.THURSDAY],
2558
+ isActive: !1,
2559
+ entries: []
2560
+ },
2561
+ [Ge.WeekDays.FRIDAY]: {
2562
+ title: Ye.weekDaysShortNames[Ge.WeekDays.FRIDAY],
2563
+ isActive: !1,
2564
+ entries: []
2565
+ },
2566
+ [Ge.WeekDays.SATURDAY]: {
2567
+ title: Ye.weekDaysShortNames[Ge.WeekDays.SATURDAY],
2568
+ isActive: !1,
2569
+ entries: []
2570
+ },
2571
+ [Ge.WeekDays.SUNDAY]: {
2572
+ title: Ye.weekDaysShortNames[Ge.WeekDays.SUNDAY],
2573
+ isActive: !1,
2574
+ entries: []
2575
+ }
2576
+ };
2577
+
2578
+ function it(e, t) {
2579
+ return e.start.value === t.start.value && e.end.value === t.end.value;
2580
+ }
2581
+
2582
+ function ot(e, t) {
2583
+ return it(e[0], t[0]);
2584
+ }
2585
+
2586
+ function lt(e) {
2587
+ const t = e.start(),
2588
+ s = e.length(),
2589
+ i = e.sessionStartDayOfWeek(),
2590
+ o = e.sessionEndDayOfWeek(),
2591
+ l = tt(t),
2592
+ n = tt(t + s);
2593
+ return s > Ze.minutesPerDay ? "".concat(Ye.weekDaysShortNames[i], " ").concat(l, " \u2014 ").concat(Ye.weekDaysShortNames[o], " ").concat(n) : "".concat(l, " \u2014 ").concat(n);
2594
+ }
2595
+
2596
+ function nt(e, t, s, i) {
2597
+ return Math.abs(i - s) > 1 ? "".concat(Ye.weekDaysShortNames[s], " ").concat(e.title, " \u2014 ").concat(Ye.weekDaysShortNames[i], " ").concat(t.title) : "".concat(e.title, " \u2014 ").concat(t.title);
2598
+ }
2599
+
2600
+ function at(e, t, s) {
2601
+ for (const i of t) {
2602
+ let t = i.sessionStartDayOfWeek();
2603
+ const o = i.start(),
2604
+ l = i.length(),
2605
+ n = o + l,
2606
+ a = [];
2607
+ if (n <= Ze.minutesPerDay) a.push([o, n]);else {
2608
+ const e = Math.min(Ze.minutesPerDay - o, l);
2609
+ a.push([o, o + e]), a.push([0, l - e]);
2610
+ }
2611
+
2612
+ for (let o = 0; o < a.length; o++) {
2613
+ const l = a[o],
2614
+ [n, r] = l,
2615
+ d = n / Ze.minutesPerDay,
2616
+ h = Object(Fe.lowerbound)(e[t].entries, d, (e, t) => e.start.value < t),
2617
+ u = {
2618
+ start: {
2619
+ value: d,
2620
+ title: tt(n),
2621
+ isFirstOrLastPoint: n === i.start()
2622
+ },
2623
+ end: {
2624
+ value: r / Ze.minutesPerDay,
2625
+ title: tt(r),
2626
+ isFirstOrLastPoint: a.length - 1 === o
2627
+ },
2628
+ type: s,
2629
+ tooltip: lt(i),
2630
+ showStartForLastEntry: !1,
2631
+ showEndForFirstEntry: !1
2632
+ };
2633
+ e[t].entries.splice(h, 0, u), t = Je(t);
2634
+ }
2635
+ }
2636
+ }
2637
+
2638
+ class rt {
2639
+ constructor(e) {
2640
+ this.sessionsDays = new l.a(Object(n.clone)(st)), this.todaySession = new l.a(Object(n.clone)({
2641
+ entries: []
2642
+ })), this._todayInExchangeTime = null;
2643
+ const t = e;
2644
+ this._symbolInfo = Object(Xe.b)(t.symbolInfo.bind(t), t.dataEvents().symbolResolved()), this._symbolInfo.subscribe(this._updateEntriesBySubSessions.bind(this), {
2645
+ callWithLast: !0
2646
+ });
2647
+ }
2648
+
2649
+ destroy() {
2650
+ this._symbolInfo.destroy();
2651
+ }
2652
+
2653
+ currentTimeValue() {
2654
+ return null === this._todayInExchangeTime ? -1 : Ze.get_minutes_from_midnight(this._todayInExchangeTime) / Ze.minutesPerDay;
2655
+ }
2656
+
2657
+ timezone() {
2658
+ const e = this._symbolInfo.value();
2659
+
2660
+ return null === e ? "" : Object(Ke.timezoneTitle)(e.timezone);
2661
+ }
2662
+
2663
+ _updateEntriesBySubSessions(e) {
2664
+ var t;
2665
+
2666
+ this._updateTodayWithOffsets(e);
2667
+
2668
+ const s = this._createSubSessionSpecs(e),
2669
+ o = (l = (null === (t = this._todayInExchangeTime) || void 0 === t ? void 0 : t.getUTCDay()) || new Date().getDay()) < Ge.WeekDays.SATURDAY ? l + 1 : Ge.WeekDays.SUNDAY;
2670
+
2671
+ var l;
2672
+ const a = Object(n.clone)(st);
2673
+ a[o].isActive = !0;
2674
+
2675
+ for (const e of Array.from(s.keys())) {
2676
+ at(a, Object(i.ensureDefined)(s.get(e)).getEntriesForWeekByCalendar(Object(i.ensureNotNull)(this._todayInExchangeTime)), e);
2677
+ }
2678
+
2679
+ Object.values(a).some(e => 0 !== e.entries.length) && (function (e) {
2680
+ const t = tt(0),
2681
+ s = tt(Ze.minutesPerDay),
2682
+ o = Object(n.clone)(e);
2683
+
2684
+ for (const l of Object.keys(e)) {
2685
+ const n = parseInt(l),
2686
+ a = e[n].entries;
2687
+
2688
+ if (0 === a.length) {
2689
+ a.push({
2690
+ start: {
2691
+ value: 0,
2692
+ title: t,
2693
+ isFirstOrLastPoint: !0
2694
+ },
2695
+ end: {
2696
+ value: 1,
2697
+ title: s,
2698
+ isFirstOrLastPoint: !0
2699
+ },
2700
+ type: 3,
2701
+ tooltip: "".concat(t, " \u2014 ").concat(s),
2702
+ showStartForLastEntry: !1,
2703
+ showEndForFirstEntry: !1
2704
+ });
2705
+ continue;
2706
+ }
2707
+
2708
+ const r = qe(n),
2709
+ d = Je(n),
2710
+ h = o[r].entries,
2711
+ u = o[d].entries,
2712
+ c = Qe(o, n),
2713
+ _ = et(o, n),
2714
+ p = a.length;
2715
+
2716
+ let m = 0;
2717
+
2718
+ for (let e = 0; e < p; e++) {
2719
+ const s = a[e],
2720
+ o = e > 0 ? a[e - 1] : null,
2721
+ l = 0 === e;
2722
+
2723
+ if (0 === s.start.value || 0 === s.start.value && 1 === s.end.value || null !== o && s.start.value === o.end.value) {
2724
+ m++;
2725
+ continue;
2726
+ }
2727
+
2728
+ const r = l ? c.entries[c.entries.length - 1] : Object(i.ensureNotNull)(o),
2729
+ d = {
2730
+ start: {
2731
+ value: l ? 0 : a[e - 1].end.value,
2732
+ title: l ? t : a[e - 1].end.title,
2733
+ isFirstOrLastPoint: !(l && h.length > 0) || 1 === h[h.length - 1].end.value
2734
+ },
2735
+ end: {
2736
+ value: s.start.value,
2737
+ title: s.start.title,
2738
+ isFirstOrLastPoint: !0
2739
+ },
2740
+ type: 3,
2741
+ tooltip: nt(r.end, s.start, c.dayIndex, n),
2742
+ showStartForLastEntry: !1,
2743
+ showEndForFirstEntry: !1
2744
+ };
2745
+ a.splice(m, 0, d), m = e + 2;
2746
+ }
2747
+
2748
+ const b = a[a.length - 1];
2749
+ 1 !== b.end.value && a.push({
2750
+ start: {
2751
+ value: b.end.value,
2752
+ title: b.end.title,
2753
+ isFirstOrLastPoint: !0
2754
+ },
2755
+ end: {
2756
+ value: 1,
2757
+ title: tt(Ze.minutesPerDay),
2758
+ isFirstOrLastPoint: !(u.length > 0) || 0 === u[0].start.value
2759
+ },
2760
+ type: 3,
2761
+ tooltip: nt(b.end, _.entries[0].start, n, _.dayIndex),
2762
+ showStartForLastEntry: !1,
2763
+ showEndForFirstEntry: !1
2764
+ });
2765
+ }
2766
+ }(a), function (e) {
2767
+ for (const i of Object.keys(e)) {
2768
+ const o = parseInt(i),
2769
+ l = e[o].entries;
2770
+ if (1 === l.length) continue;
2771
+ const n = qe(o),
2772
+ a = Je(o),
2773
+ r = l[0],
2774
+ d = l[l.length - 1];
2775
+ r.start.isFirstOrLastPoint || (r.showStartForLastEntry = (t = l, s = e[n].entries, it(t[t.length - 1], s[s.length - 1]))), d.end.isFirstOrLastPoint || (d.showEndForFirstEntry = ot(l, e[a].entries));
2776
+ }
2777
+
2778
+ var t, s;
2779
+ }(a)), this.sessionsDays.setValue(a), this.todaySession.setValue(a[o]);
2780
+ }
2781
+
2782
+ _createSubSessionSpecs(e) {
2783
+ if (null === e) return new Map();
2784
+ if (void 0 === e.subsessions) return new Map([[0, new $e.SessionSpec(e.timezone, e.session, e.session_holidays, e.corrections)]]);
2785
+ const t = ["regular", "premarket", "postmarket"],
2786
+ s = new Map();
2787
+
2788
+ for (const i of t) {
2789
+ let t = null;
2790
+
2791
+ switch (i) {
2792
+ case "regular":
2793
+ t = 0;
2794
+ break;
2795
+
2796
+ case "premarket":
2797
+ t = 1;
2798
+ break;
2799
+
2800
+ case "postmarket":
2801
+ t = 2;
2802
+ }
2803
+
2804
+ if (null !== t) {
2805
+ const o = e.subsessions.find(e => e.id === i);
2806
+ void 0 !== o && s.set(t, new $e.SessionSpec(e.timezone, o["session-display"] || o.session, "", o["session-correction"]));
2807
+ }
2808
+ }
2809
+
2810
+ return s;
2811
+ }
2812
+
2813
+ _updateTodayWithOffsets(e) {
2814
+ if (null === e) return void (this._todayInExchangeTime = null);
2815
+ const t = 1e3 * window.ChartApiInstance.serverTimeOffset();
2816
+ this._todayInExchangeTime = Ze.get_cal_from_unix_timestamp_ms(Ze.get_timezone(e.timezone), Date.now() + t);
2817
+ }
2818
+
2819
+ }
2820
+
2821
+ var dt = s("q1tI"),
2822
+ ht = s.n(dt),
2823
+ ut = s("TSYQ"),
2824
+ ct = s("YFKU"),
2825
+ _t = s("vqb8"),
2826
+ pt = s("e3/o"),
2827
+ mt = s("tfDh");
2828
+
2829
+ const bt = new WeakMap();
2830
+
2831
+ function gt(e) {
2832
+ return bt.has(e) || bt.set(e, Object(pt.randomHash)()), Object(i.ensureDefined)(bt.get(e));
2833
+ }
2834
+
2835
+ const wt = new Map([[0, mt.green], [1, mt.orange], [2, mt.blue], [3, mt.gray]]),
2836
+ vt = new Map([[0, Object(ct.t)("Market open")], [1, Object(ct.t)("Pre-market")], [2, Object(ct.t)("Post-market")], [3, Object(ct.t)("Market closed")]]);
2837
+
2838
+ function yt(e) {
2839
+ const {
2840
+ segment: t,
2841
+ forceStart: s,
2842
+ forceEnd: i
2843
+ } = e,
2844
+ o = t.end.value - t.start.value,
2845
+ l = o < .03,
2846
+ n = {
2847
+ left: 100 * t.start.value + "%",
2848
+ width: "calc(".concat(100 * o, "% + ").concat(l ? 2 : 0, "px)")
2849
+ },
2850
+ a = ut(mt.segment, wt.get(t.type), (s || t.start.isFirstOrLastPoint) && mt.start, (i || t.end.isFirstOrLastPoint) && mt.end, l && mt.small, "common-tooltip-html", "apply-common-tooltip"),
2851
+ r = function (e, t) {
2852
+ return "<div class=\"".concat(mt.tooltip, "\">\n\t\t<span class=\"").concat(wt.get(t), "\">").concat(vt.get(t), "</span>\n\t\t<span class=\"").concat(mt.time, "\">").concat(e, "</span>\n\t</div>");
2853
+ }(t.tooltip, t.type);
2854
+
2855
+ return ht.a.createElement("div", {
2856
+ className: a,
2857
+ style: n,
2858
+ "data-tooltip": r
2859
+ });
2860
+ }
2861
+
2862
+ function St(e) {
2863
+ const {
2864
+ sessionDay: t
2865
+ } = e,
2866
+ s = t.entries.map((e, s) => ht.a.createElement(yt, {
2867
+ key: gt(e) + "Segment",
2868
+ segment: e,
2869
+ forceStart: 0 === s && 3 === e.type,
2870
+ forceEnd: s === t.entries.length - 1 && 3 === e.type
2871
+ })),
2872
+ i = ut(mt.sessionDay, t.isActive && mt.active);
2873
+ return ht.a.createElement("div", {
2874
+ className: i
2875
+ }, ht.a.createElement("div", {
2876
+ className: mt.weekDay
2877
+ }, t.title), ht.a.createElement("div", {
2878
+ className: mt.sessionDaySegments
2879
+ }, s));
2880
+ }
2881
+
2882
+ function Mt(e) {
2883
+ const {
2884
+ sessionDays: t,
2885
+ currentTimeMark: s
2886
+ } = e,
2887
+ i = [],
2888
+ o = parseInt(Object.keys(t).filter(e => t[parseInt(e)].isActive)[0]),
2889
+ l = t[o],
2890
+ n = l.entries.filter(e => e.start.value <= s && e.end.value >= s)[0];
2891
+ !n.start.isFirstOrLastPoint && n.showStartForLastEntry ? i.push(l.entries[l.entries.length - 1].start) : i.push(n.start);
2892
+ const a = !n.end.isFirstOrLastPoint && n.showEndForFirstEntry ? l.entries[0].end : n.end;
2893
+ if (i[0].value !== a.value && i.push(a), 0 === i.length) return null;
2894
+ i.sort((e, t) => e.value - t.value);
2895
+ const r = i.map(e => ht.a.createElement("div", {
2896
+ key: gt(e),
2897
+ className: mt.timeMark
2898
+ }, e.title)),
2899
+ d = 100 * (2 === i.length ? i[1].value - i[0].value : 0),
2900
+ h = ut(d > 12 && mt.timeMarkSegmentAlignByEnds, mt.timeMarkSegment);
2901
+ return ht.a.createElement("div", {
2902
+ className: mt.sessionDay
2903
+ }, ht.a.createElement("div", {
2904
+ className: mt.weekDay
2905
+ }), ht.a.createElement("div", {
2906
+ className: mt.timeMarkWrapper
2907
+ }, ht.a.createElement("div", {
2908
+ className: h,
2909
+ style: {
2910
+ left: 100 * i[0].value + "%",
2911
+ width: d + "%"
2912
+ }
2913
+ }, r)));
2914
+ }
2915
+
2916
+ class ft {
2917
+ constructor(e) {
2918
+ this._fullSessionScheduleViewModel = new rt(e);
2919
+ }
2920
+
2921
+ destroy() {
2922
+ this._fullSessionScheduleViewModel.destroy();
2923
+ }
2924
+
2925
+ renderer(e, t) {
2926
+ return function (e) {
2927
+ const {
2928
+ key: t,
2929
+ className: s,
2930
+ now: i,
2931
+ timezone: o
2932
+ } = e,
2933
+ l = Object(_t.a)({
2934
+ watchedValue: e.sessionDays
2935
+ }),
2936
+ n = Object.values(l).filter(e => e.isActive)[0],
2937
+ a = ut(s, mt.wrapper);
2938
+ return ht.a.createElement("div", {
2939
+ key: t,
2940
+ className: a
2941
+ }, ht.a.createElement("div", {
2942
+ className: mt.timezone
2943
+ }, o), ht.a.createElement("div", {
2944
+ className: mt.sessionDayWrapper
2945
+ }, ht.a.createElement(St, {
2946
+ sessionDay: n
2947
+ }), ht.a.createElement("div", {
2948
+ className: mt.nowWrapper
2949
+ }, ht.a.createElement("div", {
2950
+ className: mt.now,
2951
+ style: {
2952
+ left: 100 * i + "%"
2953
+ }
2954
+ }))), ht.a.createElement(Mt, {
2955
+ sessionDays: l,
2956
+ currentTimeMark: i
2957
+ }));
2958
+ }({
2959
+ key: e,
2960
+ className: t,
2961
+ sessionDays: this._fullSessionScheduleViewModel.sessionsDays,
2962
+ now: this._fullSessionScheduleViewModel.currentTimeValue(),
2963
+ timezone: this._fullSessionScheduleViewModel.timezone()
2964
+ });
2965
+ }
2966
+
2967
+ updateSource(e) {}
2968
+
2969
+ }
2970
+
2971
+ var Et = s("HGP3"),
2972
+ Ct = s("25b6");
2973
+
2974
+ function kt(e, t) {
2975
+ const s = new l.a(e()),
2976
+ i = {};
2977
+ t.forEach(t => t.subscribe(i, () => {
2978
+ s.setValue(e());
2979
+ }));
2980
+ return s.readonly().spawn(() => t.forEach(e => e.unsubscribeAll(i)));
2981
+ }
2982
+
2983
+ var Vt = s("rh3U");
2984
+
2985
+ class xt {
2986
+ constructor(e) {
2987
+ this.isBlinkingMode = new l.a(!1), this._status = new l.a(null), this._fullTooltip = new l.a(null), this._iconClassNames = new l.a(null), this._visible = new l.a(!1), this._tooltip = new l.a(null), this._icon = new l.a(null), this._className = new l.a(null), this._infoMaps = e, this._size = e.size || "small", this._status.subscribe(this._updateByStatus.bind(this), {
2988
+ callWithLast: !0
2989
+ }), this._className.subscribe(this._updateIconClassName.bind(this));
2990
+ }
2991
+
2992
+ turnOffBlinkingMode() {}
2993
+
2994
+ status() {
2995
+ return this._status;
2996
+ }
2997
+
2998
+ tooltip() {
2999
+ return this._tooltip;
3000
+ }
3001
+
3002
+ icon() {
3003
+ return this._icon;
3004
+ }
3005
+
3006
+ className() {
3007
+ return this._className;
3008
+ }
3009
+
3010
+ visible() {
3011
+ return this._visible;
3012
+ }
3013
+
3014
+ size() {
3015
+ return this._size;
3016
+ }
3017
+
3018
+ fullInfo() {
3019
+ return this._fullTooltip;
3020
+ }
3021
+
3022
+ _getTooltip(e) {
3023
+ var t, s;
3024
+ return null !== (s = null === (t = this._infoMaps.tooltipMap) || void 0 === t ? void 0 : t.get(e)) && void 0 !== s ? s : null;
3025
+ }
3026
+
3027
+ _getIcon(e) {
3028
+ let t;
3029
+
3030
+ const s = this._infoMaps.iconMap.get(e);
3031
+
3032
+ return void 0 !== s && (t = s.get(this._size)), t || null;
3033
+ }
3034
+
3035
+ _getClassName(e) {
3036
+ return this._infoMaps.classNameMap.get(e) || null;
3037
+ }
3038
+
3039
+ _getTitle(e) {
3040
+ var t, s;
3041
+ return null !== (s = null === (t = this._infoMaps.titleMap) || void 0 === t ? void 0 : t.get(e)) && void 0 !== s ? s : null;
3042
+ }
3043
+
3044
+ _getTitleColor(e) {
3045
+ var t, s;
3046
+ return null !== (s = null === (t = this._infoMaps.titleColorMap) || void 0 === t ? void 0 : t.get(e)) && void 0 !== s ? s : null;
3047
+ }
3048
+
3049
+ async _getHtml(e) {
3050
+ var t, s, i;
3051
+ return null !== (i = null === (s = null === (t = this._infoMaps.htmlMap) || void 0 === t ? void 0 : t.get(e)) || void 0 === s ? void 0 : s.map(Ct.b)) && void 0 !== i ? i : null;
3052
+ }
3053
+
3054
+ _getAction(e) {
3055
+ var t, s;
3056
+ return null !== (s = null === (t = this._infoMaps.actionMap) || void 0 === t ? void 0 : t.get(e)) && void 0 !== s ? s : null;
3057
+ }
3058
+
3059
+ async _updateFullTooltipByStatus(e) {
3060
+ const t = await this._getHtml(e);
3061
+ this._status.value() === e && this._fullTooltip.setValue([{
3062
+ icon: this._icon.value(),
3063
+ iconClassName: this._iconClassNames.value(),
3064
+ title: this._getTitle(e),
3065
+ titleColor: this._getTitleColor(e),
3066
+ html: t,
3067
+ size: this._size,
3068
+ action: this._getAction(e)
3069
+ }]);
3070
+ }
3071
+
3072
+ _updateByStatus(e) {
3073
+ if (null === e) return this._icon.setValue(null), this._tooltip.setValue(null), void this._visible.setValue(!1);
3074
+ this._icon.setValue(this._getIcon(e)), this._className.setValue(this._getClassName(e)), this._tooltip.setValue(this._getTooltip(e)), this._visible.setValue(!0), this._updateFullTooltipByStatus(e);
3075
+ }
3076
+
3077
+ _updateIconClassName(e) {
3078
+ null !== e ? this._iconClassNames.setValue([Vt.statusItem, e]) : this._iconClassNames.setValue(null);
3079
+ }
3080
+
3081
+ }
3082
+
3083
+ var Wt = s("Vdly");
3084
+ const Tt = [];
3085
+
3086
+ function Lt() {
3087
+ return Wt.getJSON("tv.alreadyBlinkedStatuses", Tt);
3088
+ }
3089
+
3090
+ const Ot = new l.a(Lt());
3091
+
3092
+ function At(e) {
3093
+ const t = Wt.getJSON("tv.alreadyBlinkedStatuses", Tt);
3094
+ t.includes(e) || (t.push(e), Wt.setJSON("tv.alreadyBlinkedStatuses", t), Ot.setValue(Lt()));
3095
+ }
3096
+
3097
+ Wt.onSync.subscribe(null, () => Ot.setValue(Lt()));
3098
+ const Dt = Ot;
3099
+ var Ht = s("Cf1E"),
3100
+ Bt = s("VrrN"),
3101
+ Pt = s("VrXG"),
3102
+ zt = s("LIcf"),
3103
+ jt = s("Uua9"),
3104
+ Nt = s("9Crk"),
3105
+ It = s("Tq3g");
3106
+ const Rt = Object(ce.getLogger)("Chart.LegendWidget"),
3107
+ Ft = ["TFEXDelayForGuest", "MOEXDelayForGuest", "CHIXAuDelayForGuest", "NGMDelayForGuest", "DEForGuest", "ICESGDelayForGuest"],
3108
+ Kt = new Map([["DelayToRealtime", new Map([["small", Bt], ["large", Pt]])], ["DelayNoRealtime", new Map([["small", Bt], ["large", Pt]])], ["TFEXDelayForGuest", new Map([["small", Bt], ["large", Pt]])], ["MOEXDelayForGuest", new Map([["small", Bt], ["large", Pt]])], ["CHIXAuDelayForGuest", new Map([["small", Bt], ["large", Pt]])], ["NGMDelayForGuest", new Map([["small", Bt], ["large", Pt]])], ["ICESGDelayForGuest", new Map([["small", Bt], ["large", Pt]])], ["DEForGuest", new Map([["small", Bt], ["large", Pt]])], ["EOD", new Map([["small", zt], ["large", jt]])], ["TickByTick", new Map([["small", Nt], ["large", It]])], ["BATSToRealtime", new Map([["small", Nt], ["large", It]])], ["DelayWithoutMarketAgreement", new Map([["small", Bt], ["large", Pt]])]]),
3109
+ Ut = new Map([["DelayToRealtime", Vt.delay], ["DelayNoRealtime", Vt.delay], ["TFEXDelayForGuest", Vt.delay], ["MOEXDelayForGuest", Vt.delay], ["CHIXAuDelayForGuest", Vt.delay], ["NGMDelayForGuest", Vt.delay], ["ICESGDelayForGuest", Vt.delay], ["DEForGuest", Vt.delay], ["EOD", Vt.eod], ["TickByTick", Vt.notAccurate], ["BATSToRealtime", Vt.notAccurate], ["DelayWithoutMarketAgreement", Vt.delay]]),
3110
+ Yt = new Map([["DelayToRealtime", Et.colorsPalette["color-delay-mode"]], ["DelayNoRealtime", Et.colorsPalette["color-delay-mode"]], ["TFEXDelayForGuest", Et.colorsPalette["color-delay-mode"]], ["MOEXDelayForGuest", Et.colorsPalette["color-delay-mode"]], ["CHIXAuDelayForGuest", Et.colorsPalette["color-delay-mode"]], ["NGMDelayForGuest", Et.colorsPalette["color-delay-mode"]], ["ICESGDelayForGuest", Et.colorsPalette["color-delay-mode"]], ["DEForGuest", Et.colorsPalette["color-delay-mode"]], ["EOD", Et.colorsPalette["color-eod-mode"]], ["TickByTick", Et.colorsPalette["color-notaccurate-mode"]], ["BATSToRealtime", Et.colorsPalette["color-notaccurate-mode"]], ["DelayWithoutMarketAgreement", Et.colorsPalette["color-delay-mode"]]]),
3111
+ Gt = window.t("Data is delayed"),
3112
+ Zt = window.t("End of day data"),
3113
+ Xt = window.t("One update per second"),
3114
+ $t = window.t("Cboe BZX"),
3115
+ qt = window.t("{exchange} by {originalExchange}"),
3116
+ Jt = Object(Ct.b)(window.t("{symbolName} data is delayed by {time} minutes.")),
3117
+ Qt = Object(Ct.b)(window.t("{listedExchange} real-time data is available for free to registered users.")),
3118
+ es = Object(Ct.b)(window.t("To get real-time data for {description}, please buy the real-time data package.")),
3119
+ ts = Object(Ct.b)(window.t("Real-time data for {description} is not supported right now. We may support it in the future.")),
3120
+ ss = Object(Ct.b)(window.t("Data is updated once a day.")),
3121
+ is = Object(Ct.b)(window.t("Data on our Basic plan is updated once per second, even if there are more updates on the market.")),
3122
+ os = Object(Ct.b)(window.t("Data is updated once per second, even if there are more updates on the market.")),
3123
+ ls = Object(Ct.b)(window.t("Paid plans feature faster data updates.")),
3124
+ ns = Object(Ct.b)(window.t("Real-time data for {symbolName} is provided by {exchange} exchange.")),
3125
+ as = Object(Ct.b)(window.t("This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges.")),
3126
+ rs = Object(Ct.b)(window.t("This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}.")),
3127
+ ds = Object(Ct.b)(window.t("If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"));
3128
+ window.t("Create a free account"), window.t("Learn more"), Object(Ct.b)(window.t("Fill out Exchange Agreements"));
3129
+
3130
+ class hs extends xt {
3131
+ constructor(e, t, s) {
3132
+ super({
3133
+ iconMap: Kt,
3134
+ classNameMap: Ut,
3135
+ titleColorMap: Yt,
3136
+ size: t
3137
+ }), this._dataUpdatedMode = new l.a(null).spawn(), this._options = s, this._model = e, this._dataModeBlinkingStatuses = Dt.spawn(), this._dataModeBlinkingStatuses.subscribe(this._updateBlinkingMode.bind(this)), this.turnOffBlinkingMode = this._turnOffBlinking.bind(this), this.setModel(e);
3138
+ }
3139
+
3140
+ destroy() {
3141
+ this._dataUpdatedMode.destroy(), this._dataModeBlinkingStatuses.destroy();
3142
+ }
3143
+
3144
+ setModel(e) {
3145
+ if (this._dataUpdatedMode.destroy(), null === e) return this._model = e, void (this._dataUpdatedMode = new l.a(null).spawn());
3146
+ this._dataUpdatedMode = e.status().spawn(), this._dataUpdatedMode.subscribe(this._updateStatus.bind(this), {
3147
+ callWithLast: !0
3148
+ });
3149
+ }
3150
+
3151
+ _getTooltip() {
3152
+ const e = this._getShortTexts();
3153
+
3154
+ return null === e ? null : Object.values(e).join(" · ");
3155
+ }
3156
+
3157
+ async _updateFullTooltipByStatus() {
3158
+ const e = this._dataUpdatedMode.value();
3159
+
3160
+ if (null === e) return void this._fullTooltip.setValue(null);
3161
+
3162
+ const t = this._getShortTexts(),
3163
+ s = await this._getHtmls(),
3164
+ i = await this._getActions();
3165
+
3166
+ if (e !== this._dataUpdatedMode.value()) return;
3167
+ const o = [];
3168
+
3169
+ for (const l of e) o.push({
3170
+ icon: this._getIcon(l),
3171
+ iconClassName: this._iconClassNames.value(),
3172
+ title: t && t[l],
3173
+ titleColor: this._getTitleColor(l),
3174
+ html: s && s[l],
3175
+ size: this._size,
3176
+ action: i && i[l]
3177
+ });
3178
+
3179
+ this._fullTooltip.setValue(o);
3180
+ }
3181
+
3182
+ _updateStatus(e) {
3183
+ const t = null !== e ? e[0] : null;
3184
+ super._updateByStatus(t), this._updateBlinkingMode();
3185
+ }
3186
+
3187
+ async _getHtmls() {
3188
+ const e = this._dataUpdatedMode.value();
3189
+
3190
+ if (null === e || null === this._model) return Promise.resolve(null);
3191
+
3192
+ const t = {},
3193
+ s = this._model.symbolName();
3194
+
3195
+ let i = null,
3196
+ o = null;
3197
+
3198
+ try {
3199
+ i = await this._model.description(), o = this._model.exchange();
3200
+ } catch (e) {
3201
+ Rt.logError("Can't get exchange description, reason: " + Object(Ht.a)(e));
3202
+ }
3203
+
3204
+ for (const l of e) if (t[l] = [], ["DelayToRealtime", "DelayNoRealtime", "DelayWithoutMarketAgreement", ...Ft].includes(l) && (t[l].push(Jt.format({
3205
+ symbolName: s,
3206
+ time: this._model.time().toString()
3207
+ })), this._options.subscriptionFullInfo && null !== i && "DelayToRealtime" === l && t[l].push(es.format({
3208
+ description: "<b>".concat(i, "</b>")
3209
+ })), null !== i && "DelayNoRealtime" === l && t[l].push(ts.format({
3210
+ description: "<b>".concat(i, "</b>")
3211
+ })), "DelayWithoutMarketAgreement" === l && t[l].push(ds.format({
3212
+ listedExchange: this._model.listedExchange()
3213
+ })), this._options.subscriptionFullInfo && Ft.includes(l) && t[l].push(Qt.format({
3214
+ listedExchange: this._model.listedExchange()
3215
+ }))), "EOD" === l && (t[l] = [ss]), "TickByTick" === l && (t[l].push(this._options.subscriptionFullInfo ? is : os), this._options.subscriptionFullInfo && t[l].push(ls)), null !== o && "BATSToRealtime" === l) {
3216
+ let e = this._model.listedExchange();
3217
+
3218
+ 0, t[l].push(ns.format({
3219
+ symbolName: s,
3220
+ exchange: o
3221
+ }), "" !== e ? rs.format({
3222
+ exchange: e
3223
+ }) : as);
3224
+ }
3225
+
3226
+ return Object.keys(t).length > 0 ? t : null;
3227
+ }
3228
+
3229
+ async _getActions() {
3230
+ if (null === this._dataUpdatedMode.value() || null === this._model) return null;
3231
+ const e = {};
3232
+ return Object.keys(e).length > 0 ? e : null;
3233
+ }
3234
+
3235
+ _getShortTexts() {
3236
+ var e;
3237
+
3238
+ const t = this._dataUpdatedMode.value();
3239
+
3240
+ if (null === t || null === this._model) return null;
3241
+ const s = {};
3242
+
3243
+ for (const i of t) if (["DelayToRealtime", "DelayNoRealtime", ...Ft, "DelayWithoutMarketAgreement"].includes(i) && (s[i] = Gt), "EOD" === i && (s[i] = Zt), "TickByTick" === i && (s[i] = Xt), "BATSToRealtime" === i) {
3244
+ let t = null !== (e = this._model.firstReplacedByBatsExchange()) && void 0 !== e ? e : "";
3245
+ 0, s[i] = "" !== t ? qt.format({
3246
+ exchange: t,
3247
+ originalExchange: $t
3248
+ }) : $t;
3249
+ }
3250
+
3251
+ return Object.keys(s).length > 0 ? s : null;
3252
+ }
3253
+
3254
+ _updateBlinkingMode() {
3255
+ const e = this._dataUpdatedMode.value();
3256
+
3257
+ if (null === e) return;
3258
+
3259
+ const t = this._dataModeBlinkingStatuses.value();
3260
+
3261
+ for (const s of e) if (!t.includes(s)) return void this.isBlinkingMode.setValue(!0);
3262
+
3263
+ this.isBlinkingMode.setValue(!1);
3264
+ }
3265
+
3266
+ _turnOffBlinking() {
3267
+ const e = this._dataUpdatedMode.value();
3268
+
3269
+ if (null !== e) for (const t of e) At(t);
3270
+ }
3271
+
3272
+ }
3273
+
3274
+ var us = s("JmzL"),
3275
+ cs = s("M3mX");
3276
+
3277
+ const _s = window.t("Study Error"),
3278
+ ps = new Map([[!0, new Map([["small", us], ["large", cs]])], [!1, new Map([["small", ""], ["large", ""]])]]),
3279
+ ms = new Map([[!0, Vt.dataProblemLow], [!1, null]]),
3280
+ bs = new Map([[!0, _s], [!1, null]]),
3281
+ gs = new Map([[!0, _s], [!1, null]]),
3282
+ ws = new Map([[!0, Et.colorsPalette["color-data-problem"]], [!1, null]]);
3283
+
3284
+ class vs extends xt {
3285
+ constructor(e, t, s, i) {
3286
+ super({
3287
+ iconMap: ps,
3288
+ classNameMap: ms,
3289
+ tooltipMap: bs,
3290
+ titleMap: gs,
3291
+ titleColorMap: ws,
3292
+ size: s
3293
+ }), this._dataSourceErrorStatus = new l.a(null).spawn(), this._lastError = null, this._options = i, this.setSource(e, t);
3294
+ }
3295
+
3296
+ destroy() {
3297
+ this._dataSourceErrorStatus.destroy();
3298
+ }
3299
+
3300
+ setSource(e, t) {
3301
+ this._dataSourceErrorStatus.destroy(), this._dataSourceErrorStatus = kt(() => e.statusProvider({}).errorStatus(), t), this._dataSourceErrorStatus.subscribe(this._updateStatus.bind(this), {
3302
+ callWithLast: !0
3303
+ });
3304
+ }
3305
+
3306
+ _getTooltip(e) {
3307
+ const t = this._dataSourceErrorStatus.value();
3308
+
3309
+ if (e && null !== t) {
3310
+ const e = t.title;
3311
+ if (void 0 !== e) return e;
3312
+ }
3313
+
3314
+ return super._getTooltip(e);
3315
+ }
3316
+
3317
+ _getTitle(e) {
3318
+ const t = this._dataSourceErrorStatus.value();
3319
+
3320
+ if (e && null !== t) {
3321
+ const e = t.title;
3322
+ if (void 0 !== e) return e;
3323
+ }
3324
+
3325
+ return super._getTitle(e);
3326
+ }
3327
+
3328
+ async _getHtml(e) {
3329
+ const t = this._dataSourceErrorStatus.value();
3330
+
3331
+ return null !== t ? [Object(Ct.b)(t.error)] : null;
3332
+ }
3333
+
3334
+ _getAction(e) {
3335
+ this._dataSourceErrorStatus.value();
3336
+
3337
+ return null;
3338
+ }
3339
+
3340
+ _updateStatus(e) {
3341
+ const t = this._status.value();
3342
+
3343
+ null !== e ? (this._status.setValue(!0), t && this._lastError !== e.error && this._updateByStatus(!0), this._lastError = e.error) : (this._status.setValue(null), this._lastError = null);
3344
+ }
3345
+
3346
+ }
3347
+
3348
+ const ys = window.t("Data error"),
3349
+ Ss = new Map([["high", new Map([["small", us], ["large", cs]])], ["low", new Map([["small", us], ["large", cs]])]]),
3350
+ Ms = new Map([["high", Vt.dataProblemHigh], ["low", Vt.dataProblemLow]]),
3351
+ fs = new Map([["high", ys], ["low", ys]]),
3352
+ Es = new Map([["high", Et.colorsPalette["color-data-problem"]], ["low", Et.colorsPalette["color-data-problem"]]]);
3353
+
3354
+ class Cs extends xt {
3355
+ constructor(e, t) {
3356
+ super({
3357
+ tooltipMap: fs,
3358
+ iconMap: Ss,
3359
+ classNameMap: Ms,
3360
+ titleMap: fs,
3361
+ titleColorMap: Es,
3362
+ size: t
3363
+ }), this._dataProblem = new l.a(null).spawn(), this._isDataProblemCritical = new l.a(!1), this.setModel(e);
3364
+ }
3365
+
3366
+ destroy() {
3367
+ this._dataProblem.destroy();
3368
+ }
3369
+
3370
+ isDataProblemCritical() {
3371
+ return this._isDataProblemCritical;
3372
+ }
3373
+
3374
+ setModel(e) {
3375
+ this._dataProblem.destroy(), null !== e ? (this._dataProblem = e.status().spawn(), this._dataProblem.subscribe(this._updateStatus.bind(this), {
3376
+ callWithLast: !0
3377
+ })) : this._dataProblem = new l.a(null).spawn();
3378
+ }
3379
+
3380
+ async _getHtml(e) {
3381
+ const t = this._dataProblem.value();
3382
+
3383
+ return null === t ? null : [Object(Ct.b)(t.text)];
3384
+ }
3385
+
3386
+ _updateStatus(e) {
3387
+ var t;
3388
+ const s = null !== (t = null == e ? void 0 : e.severity) && void 0 !== t ? t : null;
3389
+ this._status.setValue(s), this._isDataProblemCritical.setValue(function (e) {
3390
+ return "high" === e;
3391
+ }(s));
3392
+ }
3393
+
3394
+ }
3395
+
3396
+ class ks extends xt {
3397
+ constructor(e, t) {
3398
+ super(t), this._booleanStatus = new l.a(!1).spawn(), this.updateStatus(e);
3399
+ }
3400
+
3401
+ destroy() {
3402
+ this._booleanStatus.destroy();
3403
+ }
3404
+
3405
+ updateStatus(e) {
3406
+ this._booleanStatus.destroy(), this._booleanStatus = e.spawn(), this._booleanStatus.subscribe(this._updateStatus.bind(this), {
3407
+ callWithLast: !0
3408
+ });
3409
+ }
3410
+
3411
+ _updateStatus(e) {
3412
+ e ? this._status.setValue(!0) : this._status.setValue(null);
3413
+ }
3414
+
3415
+ }
3416
+
3417
+ var Vs = s("YGQl"),
3418
+ xs = s("Jjb7");
3419
+ const Ws = window.t("Invalid Symbol"),
3420
+ Ts = window.t("This symbol doesn't exist, please pick another one."),
3421
+ Ls = new Map([[!0, new Map([["small", Vs], ["large", xs]])], [!1, new Map([["small", ""], ["large", ""]])]]),
3422
+ Os = new Map([[!0, Vt.invalidSymbol], [!1, null]]),
3423
+ As = new Map([[!0, Ws], [!1, null]]),
3424
+ Ds = new Map([[!0, Ws], [!1, null]]),
3425
+ Hs = new Map([[!0, Et.colorsPalette["color-invalid-symbol"]], [!1, null]]),
3426
+ Bs = new Map([[!0, [Ts]], [!1, null]]),
3427
+ Ps = new Map([[!0, null], [!1, null]]);
3428
+
3429
+ class zs {
3430
+ constructor(e) {
3431
+ this._el = document.createElement("div"), this._prevCustomClass = null, this._icon = e.icon.spawn(), this._icon.subscribe(this._updateIcon.bind(this), {
3432
+ callWithLast: !0
3433
+ }), this._className = e.className.spawn(), this._className.subscribe(this._updateClassName.bind(this), {
3434
+ callWithLast: !0
3435
+ }), this._visible = e.visible.spawn(), this._visible.subscribe(this._updateVisibility.bind(this), {
3436
+ callWithLast: !0
3437
+ }), this._size = e.size || "small", this._render(e.parentEl), e.isBlinking && (this._isBlinking = e.isBlinking.spawn(), this._isBlinking.subscribe(this._updateBlinkingMode.bind(this), {
3438
+ callWithLast: !0
3439
+ }), this._turnOffBlinking = e.turnOffBlinking);
3440
+ }
3441
+
3442
+ destroy() {
3443
+ this._visible.destroy(), this._icon.destroy(), this._isBlinking && this._isBlinking.destroy(), this._el.remove();
3444
+ }
3445
+
3446
+ onClick() {
3447
+ this._turnOffBlinking && this._turnOffBlinking();
3448
+ }
3449
+
3450
+ visible() {
3451
+ return this._visible;
3452
+ }
3453
+
3454
+ _render(e) {
3455
+ this._el.classList.add(Vt.statusItem, Vt[this._size]), e.appendChild(this._el);
3456
+ }
3457
+
3458
+ _updateVisibility(e) {
3459
+ this._el.classList.toggle("js-hidden", !e);
3460
+ }
3461
+
3462
+ _updateIcon(e) {
3463
+ this._el.innerHTML = e || "";
3464
+ }
3465
+
3466
+ _updateClassName(e) {
3467
+ this._prevCustomClass !== e && (null !== this._prevCustomClass && this._el.classList.remove(this._prevCustomClass), null !== e && this._el.classList.add(e), this._prevCustomClass = e);
3468
+ }
3469
+
3470
+ _updateBlinkingMode(e) {
3471
+ this._el.classList.toggle(Vt.blinking, e);
3472
+ }
3473
+
3474
+ }
3475
+
3476
+ class js {
3477
+ constructor(e, t, s, i) {
3478
+ this.element = document.createElement("div"), this._blinkingSpawns = [], this._iconsRenderers = [];
3479
+ const o = [Vt.statuses, "apply-common-tooltip", "common-tooltip-wide"];
3480
+ h.a && o.push(Vt.touchMode), this.element.classList.add(...o, Vt[e]), this._visibleWidgetsCount = t.spawn(), this._visibleWidgetsCount.subscribe(this._updateSpecialClassAndTooltip.bind(this)), this._tooltips = s.spawn(), this._tooltips.subscribe(this._updateTooltip.bind(this)), this._onClickCallback = i.onClick, this._onClickHandler = this._onClick.bind(this), this.element.addEventListener("click", this._onClickHandler);
3481
+ }
3482
+
3483
+ destroy() {
3484
+ for (const e of this._iconsRenderers) e.destroy();
3485
+
3486
+ for (const e of this._blinkingSpawns) e.destroy();
3487
+
3488
+ this._visibleWidgetsCount.destroy(), this._tooltips.destroy(), this.element.removeEventListener("click", this._onClickHandler), this.element.remove();
3489
+ }
3490
+
3491
+ addStatusModel(e) {
3492
+ this._iconsRenderers.push(new zs({
3493
+ visible: e.visible,
3494
+ icon: e.model.icon(),
3495
+ className: e.model.className(),
3496
+ size: e.model.size(),
3497
+ parentEl: this.element,
3498
+ isBlinking: e.model.isBlinkingMode,
3499
+ turnOffBlinking: e.model.turnOffBlinkingMode
3500
+ }));
3501
+
3502
+ const t = e.model.isBlinkingMode.spawn();
3503
+ t.subscribe(this._updateBlinkingMode.bind(this)), this._blinkingSpawns.push(t), this._updateBlinkingMode();
3504
+ }
3505
+
3506
+ _onClick(e) {
3507
+ e.preventDefault();
3508
+
3509
+ const t = this._iconsRenderers.filter(e => e.visible().value());
3510
+
3511
+ for (const e of t) e.onClick();
3512
+
3513
+ let s = 14;
3514
+ t.length > 1 && (s -= 2);
3515
+ const i = this.element.getBoundingClientRect(),
3516
+ o = {
3517
+ x: i.left - s,
3518
+ y: i.bottom + 4
3519
+ };
3520
+
3521
+ this._onClickCallback(o);
3522
+ }
3523
+
3524
+ _updateTooltip() {
3525
+ this.element.setAttribute("title", this._tooltips.value().join(" · "));
3526
+ }
3527
+
3528
+ _updateSpecialClassAndTooltip() {
3529
+ const e = this._visibleWidgetsCount.value();
3530
+
3531
+ this.element.classList.toggle(Vt.oneWidgetsVisible, 1 === e), this.element.classList.toggle(Vt.twoWidgetsVisible, 2 === e), this.element.classList.toggle(Vt.threeWidgetsVisible, 3 === e), this._updateTooltip();
3532
+ }
3533
+
3534
+ _updateBlinkingMode() {
3535
+ const e = this._blinkingSpawns.some(e => e.value());
3536
+
3537
+ this.element.classList.toggle(Vt.blinking, e);
3538
+ }
3539
+
3540
+ }
3541
+
3542
+ var Ns = s("9lPX"),
3543
+ Is = s("MyT/"),
3544
+ Rs = s("jXu8"),
3545
+ Fs = s("cbig"),
3546
+ Ks = s("G2LI"),
3547
+ Us = s("QkND"),
3548
+ Ys = s("Gp/h"),
3549
+ Gs = s("S48P");
3550
+ const Zs = window.t("Market open"),
3551
+ Xs = window.t("Pre-market"),
3552
+ $s = window.t("Post-market"),
3553
+ qs = window.t("Market closed"),
3554
+ Js = window.t("Holiday"),
3555
+ Qs = window.t("All's well — Market is open."),
3556
+ ei = window.t("Morning. Market is open for pre-market trading."),
3557
+ ti = window.t("Evening. Market is open for post-market trading."),
3558
+ si = window.t("Time for a walk — this market is closed."),
3559
+ ii = window.t("Market is currently on holiday. Lucky them."),
3560
+ oi = new Map([["market", new Map([["small", Is], ["large", Rs]])], ["pre_market", new Map([["small", Ys], ["large", Gs]])], ["post_market", new Map([["small", Ks], ["large", Us]])], ["out_of_session", new Map([["small", Ns], ["large", Ns]])], ["holiday", new Map([["small", Fs], ["large", Fs]])]]),
3561
+ li = new Map([["market", Vt.marketStatusOpen], ["pre_market", Vt.marketStatusPre], ["post_market", Vt.marketStatusPost], ["out_of_session", Vt.marketStatusClose], ["holiday", Vt.marketStatusHoliday]]),
3562
+ ni = new Map([["market", Zs], ["pre_market", Xs], ["post_market", $s], ["out_of_session", qs], ["holiday", Js]]),
3563
+ ai = new Map([["market", Zs], ["pre_market", Xs], ["post_market", $s], ["out_of_session", qs], ["holiday", Js]]),
3564
+ ri = new Map([["market", Et.colorsPalette["color-market-open"]], ["pre_market", Et.colorsPalette["color-pre-market"]], ["post_market", Et.colorsPalette["color-post-market"]], ["out_of_session", Et.colorsPalette["color-market-closed"]], ["holiday", Et.colorsPalette["color-market-holiday"]]]),
3565
+ di = new Map([["market", [Qs]], ["pre_market", [ei]], ["post_market", [ti]], ["out_of_session", [si]], ["holiday", [ii]]]),
3566
+ hi = new Map([["market", null], ["pre_market", null], ["post_market", null], ["out_of_session", null], ["holiday", null]]),
3567
+ ui = window.t("You can turn this data on or off.");
3568
+
3569
+ class ci extends xt {
3570
+ constructor(e, t, s) {
3571
+ super({
3572
+ tooltipMap: ni,
3573
+ iconMap: oi,
3574
+ classNameMap: li,
3575
+ titleMap: ai,
3576
+ titleColorMap: ri,
3577
+ htmlMap: di,
3578
+ actionMap: hi,
3579
+ size: t
3580
+ }), this._marketStatus = new l.a(null).spawn(), this._options = s, this.setModel(e);
3581
+ }
3582
+
3583
+ destroy() {
3584
+ this._marketStatus.destroy();
3585
+ }
3586
+
3587
+ setModel(e) {
3588
+ this._marketStatus.destroy(), null !== e ? (this._marketStatus = e.status().spawn(), this._marketStatus.subscribe(this._updateStatus.bind(this), {
3589
+ callWithLast: !0
3590
+ })) : this._marketStatus = new l.a(null).spawn();
3591
+ }
3592
+
3593
+ async _getHtml(e) {
3594
+ const t = await super._getHtml(e);
3595
+ return null !== t && (this._options.preMarketSolution || this._options.postMarketSolution) && ("pre_market" === e && this._options.preMarketSolution && t.push(ui), "post_market" === e && this._options.postMarketSolution && t.push(ui)), t;
3596
+ }
3597
+
3598
+ _getAction(e) {
3599
+ return super._getAction(e);
3600
+ }
3601
+
3602
+ _updateStatus(e) {
3603
+ this._status.setValue(e);
3604
+ }
3605
+
3606
+ }
3607
+
3608
+ class _i {
3609
+ constructor(e, t, s) {
3610
+ this.visibleWidgetsCount = new l.a(0), this.errorWidgetIsShown = new l.a(!1), this._size = h.a ? "large" : "small", this._tooltips = new l.a([]), this._visibilitySpawns = [], this._tooltipSpawns = [], this._statusWidgetInfos = [], this._renderer = new js(this._size, this.visibleWidgetsCount, this._tooltips, {
3611
+ onClick: this._handleToggleDropdown.bind(this)
3612
+ }), this._symbolInvalidViewModel = null, this._dataSourceErrorStatusViewModel = null, this._marketStatusViewModel = null, this._dataUpdatedModeViewModel = null, this._dataProblemViewModel = null, this._sessionWidget = null, this._isSymbolInvalid = null, this._dataSourceHasErrorVisible = null, this._dataSourceErrorCanBeShown = new l.a(!1), this._marketStatusCanBeShown = new l.a(!1), this._dataUpdatedModeCanBeShown = new l.a(!1), this._dataProblemCanBeShown = new l.a(!1), this._isDataProblemCritical = null, this._container = document.createElement("div"), this._menuOpened = !1, this._menuPosition = null, this._source = e, this._model = t, this._options = s, this._recreateWidgets(), this._addSubscriptionForSymbolInvalid(), null !== this._dataSourceHasErrorVisible && (this._dataSourceHasErrorVisible.subscribe(this._updateStatusWidgetsVisibilities.bind(this)), this._dataSourceHasErrorVisible.subscribe(this._updateErrorWidgetIsShown.bind(this))), this._options.dataProblemEnabled && null !== this._isDataProblemCritical && this._isDataProblemCritical.subscribe(this._updateStatusWidgetsVisibilities.bind(this));
3613
+
3614
+ for (const e of this._tooltipSpawns) e.subscribe(this._updateTooltips.bind(this));
3615
+
3616
+ for (const e of this._visibilitySpawns) e.subscribe(this._updateVisibleWidgetsCount.bind(this)), e.subscribe(this._updateTooltips.bind(this));
3617
+
3618
+ this._updateErrorWidgetIsShown(), this._updateStatusWidgetsVisibilities(), this._updateVisibleWidgetsCount(), this._updateTooltips();
3619
+ }
3620
+
3621
+ destroy() {
3622
+ var e;
3623
+ this._source.properties().hasChild("symbol") && this._source.properties().symbol.listeners().unsubscribeAll(this), this._options.sourceStatusesEnabled && null !== this._isSymbolInvalid && this._isSymbolInvalid.destroy(), null === (e = this._isDataProblemCritical) || void 0 === e || e.destroy();
3624
+
3625
+ for (const e of this._tooltipSpawns) e.destroy();
3626
+
3627
+ for (const e of this._visibilitySpawns) e.destroy();
3628
+
3629
+ this.visibleWidgetsCount.unsubscribe();
3630
+
3631
+ for (const e of this._statusWidgetInfos) e.model.destroy();
3632
+
3633
+ this._renderer.destroy();
3634
+ }
3635
+
3636
+ getElement() {
3637
+ return this._renderer.element;
3638
+ }
3639
+
3640
+ updateSource(e) {
3641
+ this._source !== e && (this._source.properties().hasChild("symbol") && this._source.properties().symbol.listeners().unsubscribeAll(this), this._source = e, this._recreateWidgets(), this._updateStatusWidgetsVisibilities(), this._updateErrorWidgetIsShown(), this._updateVisibleWidgetsCount(), this._updateTooltips());
3642
+ }
3643
+
3644
+ _updateStatusWidgetsVisibilities() {
3645
+ const e = this._isForceStatusActive();
3646
+
3647
+ this._dataSourceErrorCanBeShown.setValue(!e), this._marketStatusCanBeShown.setValue(!e), this._dataUpdatedModeCanBeShown.setValue(!e), this._dataProblemCanBeShown.setValue(!this._isPrimaryWidgetShown());
3648
+ }
3649
+
3650
+ _isPrimaryWidgetShown() {
3651
+ var e, t;
3652
+ return null !== (t = null === (e = this._isSymbolInvalid) || void 0 === e ? void 0 : e.value()) && void 0 !== t && t;
3653
+ }
3654
+
3655
+ _isForceStatusActive() {
3656
+ var e, t;
3657
+ return this._isPrimaryWidgetShown() || null !== (t = null === (e = this._isDataProblemCritical) || void 0 === e ? void 0 : e.value()) && void 0 !== t && t;
3658
+ }
3659
+
3660
+ _updateVisibleWidgetsCount() {
3661
+ const e = this._statusWidgetInfos.filter(e => e.visible.value());
3662
+
3663
+ this.visibleWidgetsCount.setValue(e.length);
3664
+ }
3665
+
3666
+ _updateTooltips() {
3667
+ const e = [];
3668
+
3669
+ for (let t = 0; t < this._tooltipSpawns.length; t++) {
3670
+ if (!this._visibilitySpawns[t].value()) continue;
3671
+
3672
+ const s = this._tooltipSpawns[t].value();
3673
+
3674
+ null !== s && s.length > 0 && e.push(s);
3675
+ }
3676
+
3677
+ this._tooltips.setValue(e);
3678
+ }
3679
+
3680
+ _recreateWidgets() {
3681
+ var e, t;
3682
+
3683
+ if (this._options.sourceStatusesEnabled) {
3684
+ if (Object(de.isStudy)(this._source) || Object(de.isStudyStub)(this._source) || this._source === this._model.mainSeries()) {
3685
+ null === (e = this._isSymbolInvalid) || void 0 === e || e.destroy();
3686
+ const t = this._source;
3687
+
3688
+ if (Object(de.isStudy)(t) || Object(de.isStudyStub)(t) ? this._isSymbolInvalid = kt(() => t.isSymbolInvalid() && t.isActualInterval(), [t.onStatusChanged(), t.onIsActualIntervalChange()]) : this._isSymbolInvalid = Object(Re.a)(() => t.isSymbolInvalid(), t.onStatusChanged()), null === this._symbolInvalidViewModel) {
3689
+ this._symbolInvalidViewModel = new ks(this._isSymbolInvalid, {
3690
+ tooltipMap: As,
3691
+ iconMap: Ls,
3692
+ classNameMap: Os,
3693
+ titleMap: Ds,
3694
+ titleColorMap: Hs,
3695
+ htmlMap: Bs,
3696
+ actionMap: Ps,
3697
+ size: this._size
3698
+ });
3699
+
3700
+ const e = this._symbolInvalidViewModel.visible().spawn();
3701
+
3702
+ this._visibilitySpawns.push(e), this._tooltipSpawns.push(this._symbolInvalidViewModel.tooltip().spawn());
3703
+ const t = {
3704
+ visible: e,
3705
+ model: this._symbolInvalidViewModel
3706
+ };
3707
+ this._statusWidgetInfos.push(t), this._renderer.addStatusModel(t);
3708
+ } else this._symbolInvalidViewModel.updateStatus(this._isSymbolInvalid), this._addSubscriptionForSymbolInvalid();
3709
+ }
3710
+
3711
+ if (Object(de.isStudy)(this._source) || Object(de.isStudyStub)(this._source) || this._source === this._model.mainSeries()) {
3712
+ const e = this._source;
3713
+ let t = [];
3714
+
3715
+ if (t = Object(de.isStudy)(e) || Object(de.isStudyStub)(e) ? [e.onStatusChanged(), e.onIsActualIntervalChange()] : [e.onStatusChanged()], null === this._dataSourceErrorStatusViewModel) {
3716
+ this._dataSourceErrorStatusViewModel = new vs(e, t, this._size, this._options.sourceStatuses), this._dataSourceHasErrorVisible = Object(Z.a)(() => this._dataSourceErrorCanBeShown.value() && Object(i.ensureNotNull)(this._dataSourceErrorStatusViewModel).visible().value(), this._dataSourceErrorCanBeShown, this._dataSourceErrorStatusViewModel.visible()), this._visibilitySpawns.push(this._dataSourceHasErrorVisible), this._tooltipSpawns.push(this._dataSourceErrorStatusViewModel.tooltip().spawn());
3717
+ const s = {
3718
+ visible: this._dataSourceHasErrorVisible,
3719
+ model: this._dataSourceErrorStatusViewModel
3720
+ };
3721
+ this._statusWidgetInfos.push(s), this._renderer.addStatusModel(s);
3722
+ } else this._dataSourceErrorStatusViewModel.setSource(e, t);
3723
+ }
3724
+ }
3725
+
3726
+ if (this._options.marketStatusEnabled) {
3727
+ const e = this._source.marketStatusModel();
3728
+
3729
+ if (null === this._marketStatusViewModel) {
3730
+ this._marketStatusViewModel = new ci(e, this._size, this._options.marketStatus);
3731
+ const t = Object(Z.a)(() => this._marketStatusCanBeShown.value() && Object(i.ensureNotNull)(this._marketStatusViewModel).visible().value(), this._marketStatusCanBeShown, this._marketStatusViewModel.visible());
3732
+ this._visibilitySpawns.push(t), this._tooltipSpawns.push(this._marketStatusViewModel.tooltip().spawn());
3733
+ const s = {
3734
+ visible: t,
3735
+ model: this._marketStatusViewModel
3736
+ };
3737
+ null !== e && (this._sessionWidget = new ft(this._source), s.additionalWidgets = [this._sessionWidget]), this._statusWidgetInfos.push(s), this._renderer.addStatusModel(s);
3738
+ } else this._marketStatusViewModel.setModel(e), null === (t = this._sessionWidget) || void 0 === t || t.updateSource(this._source);
3739
+ }
3740
+
3741
+ if (this._options.dataUpdateModeEnabled) {
3742
+ const e = this._source.dataUpdatedModeModel();
3743
+
3744
+ if (null === this._dataUpdatedModeViewModel) {
3745
+ this._dataUpdatedModeViewModel = new hs(e, this._size, this._options.dataUpdateMode);
3746
+ const t = Object(Z.a)(() => this._dataUpdatedModeCanBeShown.value() && Object(i.ensureNotNull)(this._dataUpdatedModeViewModel).visible().value(), this._dataUpdatedModeCanBeShown, this._dataUpdatedModeViewModel.visible());
3747
+ this._visibilitySpawns.push(t), this._tooltipSpawns.push(this._dataUpdatedModeViewModel.tooltip().spawn());
3748
+ const s = {
3749
+ visible: t,
3750
+ model: this._dataUpdatedModeViewModel
3751
+ };
3752
+ this._statusWidgetInfos.push(s), this._renderer.addStatusModel(s);
3753
+ } else this._dataUpdatedModeViewModel.setModel(e);
3754
+ }
3755
+
3756
+ if (this._options.dataProblemEnabled) {
3757
+ const e = this._source.dataProblemModel();
3758
+
3759
+ if (null === this._dataProblemViewModel) {
3760
+ this._dataProblemViewModel = new Cs(e, this._size), this._isDataProblemCritical = this._dataProblemViewModel.isDataProblemCritical().spawn();
3761
+ const t = Object(Z.a)(() => this._dataProblemCanBeShown.value() && Object(i.ensureNotNull)(this._dataProblemViewModel).visible().value(), this._dataProblemCanBeShown, this._dataProblemViewModel.visible());
3762
+ this._visibilitySpawns.push(t), this._tooltipSpawns.push(this._dataProblemViewModel.tooltip().spawn());
3763
+ const s = {
3764
+ visible: t,
3765
+ model: this._dataProblemViewModel
3766
+ };
3767
+ this._statusWidgetInfos.push(s), this._renderer.addStatusModel(s);
3768
+ } else this._dataProblemViewModel.setModel(e);
3769
+ }
3770
+ }
3771
+
3772
+ _addSubscriptionForSymbolInvalid() {
3773
+ this._options.sourceStatusesEnabled && null !== this._isSymbolInvalid && (this._isSymbolInvalid.subscribe(this._updateStatusWidgetsVisibilities.bind(this)), this._isSymbolInvalid.subscribe(this._updateErrorWidgetIsShown.bind(this), {
3774
+ callWithLast: !0
3775
+ }));
3776
+ }
3777
+
3778
+ _updateErrorWidgetIsShown() {
3779
+ var e, t, s, i;
3780
+ const o = null !== (t = null === (e = this._isSymbolInvalid) || void 0 === e ? void 0 : e.value()) && void 0 !== t && t,
3781
+ l = null !== (i = null === (s = this._dataSourceHasErrorVisible) || void 0 === s ? void 0 : s.value()) && void 0 !== i && i;
3782
+ this.errorWidgetIsShown.setValue(o || l);
3783
+ }
3784
+
3785
+ _handleToggleDropdown(e) {
3786
+ var t;
3787
+ this._menuPosition = e, this._menuOpened = !this._menuOpened, this._menuOpened && (this._source.properties().hasChild("symbol") && this._source.properties().symbol.listeners().subscribe(this, this._handleDropdownMenuClose), t = "Open full tooltip for statuses: " + this._tooltips.value().join(", "), Object(V.trackEvent)("GUI", "Statuses widget's action", t)), this._updateDropdownMenu();
3788
+ }
3789
+
3790
+ _handleDropdownMenuClose() {
3791
+ this._menuOpened = !1, this._source.properties().hasChild("symbol") && this._source.properties().symbol.listeners().unsubscribeAll(this), this._updateDropdownMenu();
3792
+ }
3793
+
3794
+ _updateDropdownMenu() {
3795
+ Promise.all([s.e("react"), s.e(6), s.e(11), s.e(92), s.e(0), s.e(5), s.e("full-tooltips-popup")]).then(s.bind(null, "vR7+")).then(e => {
3796
+ e.render(this._menuOpened, this._container, this._renderer.element, this._statusWidgetInfos, this._handleDropdownMenuClose.bind(this), Object(i.ensureNotNull)(this._menuPosition));
3797
+ });
3798
+ }
3799
+
3800
+ }
3801
+
3802
+ var pi = s("AH3n");
3803
+ const mi = window.t("Replay mode"),
3804
+ bi = window.t("You're in Replay mode. You're in Replay mode. You're in Replay mode.");
3805
+ new Map([[!0, new Map([["small", pi], ["large", pi]])], [!1, new Map([["small", ""], ["large", ""]])]]), new Map([[!0, Vt.replayMode], [!1, null]]), new Map([[!0, mi], [!1, null]]), new Map([[!0, mi], [!1, null]]), new Map([[!0, Et.colorsPalette["color-replay-mode"]], [!1, null]]), new Map([[!0, [bi]], [!1, null]]), new Map([[!0, null], [!1, null]]);
3806
+
3807
+ class gi extends _i {
3808
+ constructor(e, t, s) {
3809
+ super(e, t, s), this._isInReplay = new l.a(!1).readonly().spawn(), this._isInReplayCanBeShown = null, this._inited = !1;
3810
+ }
3811
+
3812
+ destroy() {
3813
+ super.destroy();
3814
+ }
3815
+
3816
+ _updateStatusWidgetsVisibilities() {
3817
+ super._updateStatusWidgetsVisibilities();
3818
+ }
3819
+
3820
+ _isPrimaryWidgetShown() {
3821
+ var e, t;
3822
+ return super._isPrimaryWidgetShown() || null !== (t = null === (e = this._isInReplay) || void 0 === e ? void 0 : e.value()) && void 0 !== t && t;
3823
+ }
3824
+
3825
+ }
3826
+
3827
+ var wi = s("EsvI"),
3828
+ vi = s("UXvI");
3829
+ s.d(t, "LegendWidget", function () {
3830
+ return Ei;
3831
+ });
3832
+ const yi = {
3833
+ readOnlyMode: !1,
3834
+ contextMenu: {
3835
+ settings: !0,
3836
+ mainSeries: !0,
3837
+ studies: !0,
3838
+ showOpenMarketStatus: !1
3839
+ },
3840
+ symbolMarkerEnabled: !1,
3841
+ showToggleButton: !0,
3842
+ canShowSourceCode: !1,
3843
+ statusesWidgets: {
3844
+ sourceStatusesEnabled: !1,
3845
+ sourceStatuses: {
3846
+ errorSolution: !0
3847
+ },
3848
+ marketStatusEnabled: !1,
3849
+ marketStatus: {
3850
+ preMarketSolution: !0,
3851
+ postMarketSolution: !0
3852
+ },
3853
+ dataUpdateModeEnabled: !1,
3854
+ dataUpdateMode: {
3855
+ subscriptionFullInfo: !0
3856
+ },
3857
+ dataProblemEnabled: !1
3858
+ }
3859
+ },
3860
+ Si = (d.enabled("hide_legend_by_default"), d.enabled("fundamental_widget")),
3861
+ Mi = d.enabled("legend_context_menu"),
3862
+ fi = 2 * parseInt(y.marginlegendhoriz);
3863
+
3864
+ class Ei {
3865
+ constructor(e, t, s, i, o, a, r) {
3866
+ this._mainSeriesViewModel = null, this._dataSourceViewModels = [], this._visibleDataSourceCount = new l.a(0), this._themedColor = new l.a(""), this._mainSeriesRowHidden = null, this._dataSourceRowsHidden = [], this._customWidgetsVisibilities = [], this._allLegendHidden = new l.a(!1), this._studiesLegendHidden = new l.a(!1), this._customWidgetsHeights = [], this._onLegendVisibilityToggled = null, this._availableHeight = 0, this._collapsedDataSourcesCount = new l.a(0), this._collapsedDataSourcesTitle = new l.a(""), this._mainSeriesStatusWidget = null, this._dataSourcesStatusesWidgets = [], this._size = null, this._customLegendWidgetsFactoriesMap = new Map(), this._customLegendWidgetsMap = new Map(), this._margin = 0, this._model = e, this._paneWidget = t, this._options = Object(n.merge)(Object(n.clone)(yi), a), this._callbacks = r, this._mainSeriesViewModelsOptions = {
3867
+ readOnlyMode: this._options.readOnlyMode,
3868
+ symbolMarkerEnabled: this._options.symbolMarkerEnabled
3869
+ }, this._dataSourceViewModelsOptions = _objectSpread(_objectSpread({}, this._mainSeriesViewModelsOptions), {}, {
3870
+ canShowSourceCode: this._options.canShowSourceCode
3871
+ }), this._backgroundThemeName = s;
3872
+
3873
+ const d = this._showLegendCalculatedProperty();
3874
+
3875
+ this._isDataSourcesCollapsed = new l.a(d.value()), d.subscribe(this, () => {
3876
+ this._isDataSourcesCollapsed.setValue(d.value());
3877
+ });
3878
+ const h = new l.a(this._getCustomTextColorValue());
3879
+
3880
+ this._model.model().properties().scalesProperties.textColor.subscribe(this, () => {
3881
+ h.setValue(this._getCustomTextColorValue());
3882
+ });
3883
+
3884
+ const u = this._model.model().properties().paneProperties.legendProperties.showBackground,
3885
+ c = new l.a(u.value());
3886
+
3887
+ u.subscribe(this, () => {
3888
+ c.setValue(u.value());
3889
+ });
3890
+
3891
+ const _ = this._model.model().properties().paneProperties.legendProperties.backgroundTransparency,
3892
+ p = new l.a(_.value());
3893
+
3894
+ _.subscribe(this, () => {
3895
+ p.setValue(_.value());
3896
+ }), this._wrapText = new l.a(!1), this._hideNotMainSources = i.spawn(), this._hideNotMainSources.subscribe(this._updateLegendVisibilities.bind(this)), this._hideWholeLegend = o.spawn(), this._hideWholeLegend.subscribe(this._updateLegendVisibilities.bind(this)), this._isPaneMain = new l.a(this._getIsPaneMainValue()), this._updateCollapsedSourcesModeThrottle = Object(vi.default)(this._updateCollapsedSourcesMode.bind(this), 100), this._renderer = new R({
3897
+ withActions: !this._options.readOnlyMode,
3898
+ showToggleButton: this._options.showToggleButton,
3899
+ isStudiesLegendHidden: this._studiesLegendHidden.readonly(),
3900
+ isAllLegendHidden: this._allLegendHidden.readonly(),
3901
+ customTextColor: h.readonly(),
3902
+ themedColor: this._themedColor.readonly(),
3903
+ showBackground: c.readonly(),
3904
+ backgroundTransparency: p.readonly(),
3905
+ wrapText: this._wrapText.readonly(),
3906
+ collapsedDataSourcesCount: this._collapsedDataSourcesCount.readonly(),
3907
+ collapsedDataSourcesTitle: this._collapsedDataSourcesTitle.readonly(),
3908
+ showLegendWidgetContextMenu: this.onShowLegendWidgetContextMenu.bind(this)
3909
+ }, {
3910
+ visibleDataSourceCount: this._visibleDataSourceCount.readonly(),
3911
+ isDataSourcesCollapsed: this._isDataSourcesCollapsed.readonly(),
3912
+ showObjectsTree: this._isPaneMain.readonly(),
3913
+ onCollapseDataSources: this.onCollapseDataSources.bind(this),
3914
+ onShowObjectsTreeDialog: this._callbacks.showObjectsTreeDialog
3915
+ });
3916
+ }
3917
+
3918
+ destroy() {
3919
+ this._hideNotMainSources.destroy(), this._hideWholeLegend.destroy(), null !== this._mainSeriesViewModel && this._destroyMainDataSource();
3920
+
3921
+ for (const e of this._dataSourceViewModels) e.destroy();
3922
+
3923
+ for (const e of this._dataSourcesStatusesWidgets) e.destroy();
3924
+
3925
+ this._clearSubscriptions();
3926
+
3927
+ for (const e of Array.from(this._customLegendWidgetsMap.keys())) this._destroyCustomWidgetFromLayerBlock(e);
3928
+
3929
+ this._customLegendWidgetsMap.clear(), this._renderer.destroy(), delete this._renderer, this._showLegendCalculatedProperty().unsubscribeAll(this), this._showLegendOriginalProperty().unsubscribeAll(this), this._model.model().properties().scalesProperties.textColor.unsubscribeAll(this), this._model.model().properties().paneProperties.legendProperties.showBackground.unsubscribeAll(this), this._model.model().properties().paneProperties.legendProperties.backgroundTransparency.unsubscribeAll(this);
3930
+ }
3931
+
3932
+ addCustomWidgetToLegend(e, t) {
3933
+ const s = this._customLegendWidgetsFactoriesMap.get(t.block) || new Map(),
3934
+ i = s.get(t.position) || [];
3935
+ i.push(e), s.set(t.position, i), this._customLegendWidgetsFactoriesMap.set(t.block, s), this.updateLayout(), this._updateCustomWidgetModeBySize();
3936
+ }
3937
+
3938
+ onShowLegendWidgetContextMenu(e, t) {
3939
+ if (this._options.readOnlyMode || !Mi) return Promise.resolve(null);
3940
+ x("Show legend context menu");
3941
+ const s = new Map();
3942
+
3943
+ for (const e of Array.from(this._customLegendWidgetsMap.keys())) {
3944
+ const t = Object(i.ensureDefined)(this._customLegendWidgetsMap.get(e)),
3945
+ o = new Map();
3946
+
3947
+ for (const e of Array.from(t.keys())) {
3948
+ const s = Object(i.ensureDefined)(t.get(e)),
3949
+ l = o.get(e) || [];
3950
+
3951
+ for (const e of s) l.push(...e.contextMenuActions());
3952
+
3953
+ o.set(e, l);
3954
+ }
3955
+
3956
+ s.set(e, o);
3957
+ }
3958
+
3959
+ return De(this._model, this._options.contextMenu, this._callbacks.showGeneralChartProperties, s, e, t);
3960
+ }
3961
+
3962
+ onCollapseDataSources() {
3963
+ const e = this._showLegendOriginalProperty();
3964
+
3965
+ e.setValue(!e.value());
3966
+ }
3967
+
3968
+ updateLayout() {
3969
+ const e = this._paneWidget.state().sourcesByGroup().all().filter(e => null !== e.statusView());
3970
+
3971
+ if (0 === e.length) return;
3972
+
3973
+ const t = this._model.mainSeries(),
3974
+ s = e.indexOf(t);
3975
+
3976
+ s > -1 ? (e.splice(s, 1), Si || null !== this._mainSeriesViewModel || (this._mainSeriesViewModel = new re(this._model, t, this._mainSeriesViewModelsOptions, this._callbacks, this._options.contextMenu), this._mainSeriesStatusWidget = new gi(t, this._model.model(), this._options.statusesWidgets), this._renderer.addMainDataSource(this._mainSeriesViewModel, this._mainSeriesStatusWidget)), this._addCustomWidgetForLayerBlock(0)) : null !== this._mainSeriesViewModel && (this._destroyMainDataSource(), this._destroyCustomWidgetFromLayerBlock(0));
3977
+ const o = [],
3978
+ l = [],
3979
+ n = this._dataSourceViewModels.length;
3980
+ if (0 === n) for (let t = e.length - 1; t >= 0; t--) o.push(new Ve(this._model, e[t], this._dataSourceViewModelsOptions, this._callbacks, this._options.contextMenu)), l.push(new _i(e[t], this._model.model(), this._options.statusesWidgets));else {
3981
+ let t = 0;
3982
+
3983
+ for (let s = e.length - 1; s >= 0; s--) this._dataSourceViewModels[t] ? (this._dataSourceViewModels[t].updateSource(e[s]), this._dataSourcesStatusesWidgets[t].updateSource(e[s])) : (o.push(new Ve(this._model, e[s], this._dataSourceViewModelsOptions, this._callbacks, this._options.contextMenu)), l.push(new _i(e[s], this._model.model(), this._options.statusesWidgets))), t++;
3984
+
3985
+ for (; this._dataSourceViewModels.length > t;) Object(i.ensureDefined)(this._dataSourceViewModels.pop()).destroy();
3986
+
3987
+ for (; this._dataSourcesStatusesWidgets.length > t;) Object(i.ensureDefined)(this._dataSourcesStatusesWidgets.pop()).destroy();
3988
+ }
3989
+ 0 !== o.length && (this._renderer.addDataSources(o, l), this._dataSourceViewModels.push(...o), this._dataSourcesStatusesWidgets.push(...l)), n !== this._dataSourceViewModels.length && this._updateCollapsedSourcesMode(), this._dataSourceViewModels.length > 0 ? this._addCustomWidgetForLayerBlock(1) : this._destroyCustomWidgetFromLayerBlock(1), this._recreateSubscriptions(), this._isPaneMain.setValue(this._getIsPaneMainValue()), this.update(), this._updateWidgetModeByWidth();
3990
+ }
3991
+
3992
+ update() {
3993
+ null !== this._mainSeriesViewModel && this._mainSeriesViewModel.update();
3994
+
3995
+ for (const e of this._dataSourceViewModels) e.update();
3996
+ }
3997
+
3998
+ updateThemedColors(e) {
3999
+ null === e && (e = Object(wi.getStdThemedValue)("chartProperties.paneProperties.background", this._backgroundThemeName.value())), this._themedColor.setValue(e || "");
4000
+ }
4001
+
4002
+ firstTitle() {
4003
+ return this._renderer.firstTitle();
4004
+ }
4005
+
4006
+ getElement() {
4007
+ return this._renderer.getElement();
4008
+ }
4009
+
4010
+ addMargin(e) {
4011
+ if (this._margin === e) return;
4012
+ this._margin = e;
4013
+ this._renderer.getElement().style.maxWidth = 0 === this._margin ? "" : "calc(100% - ".concat(this._margin + fi, "px)"), this._updateWidgetModeBySize();
4014
+ }
4015
+
4016
+ updateWidgetModeBySize(e) {
4017
+ this._size = e, this._updateWidgetModeBySize();
4018
+ }
4019
+
4020
+ _updateWidgetModeBySize() {
4021
+ this._updateWidgetModeByWidth(), this._updateWidgetModeByHeight(), this._updateCustomWidgetModeBySize();
4022
+ }
4023
+
4024
+ _updateWidgetModeByWidth() {
4025
+ null !== this._size && this._renderer.updateMode(this._availableWidth());
4026
+ }
4027
+
4028
+ _updateWidgetModeByHeight() {
4029
+ null !== this._size && (this._availableHeight = .8 * this._size.h, this._updateCollapsedSourcesModeThrottle());
4030
+ }
4031
+
4032
+ _updateCustomWidgetModeBySize() {
4033
+ if (null === this._size) return;
4034
+ const e = new a.Size(this._availableWidth(), this._size.h);
4035
+
4036
+ for (const t of Array.from(this._customLegendWidgetsMap.values())) for (const s of Array.from(t.values())) for (const t of s) t.updateWidgetModeBySize(e);
4037
+ }
4038
+
4039
+ _destroyMainDataSource() {
4040
+ Object(i.ensureNotNull)(this._mainSeriesStatusWidget).destroy(), this._mainSeriesStatusWidget = null, Object(i.ensureNotNull)(this._mainSeriesViewModel).destroy(), this._mainSeriesViewModel = null;
4041
+ }
4042
+
4043
+ _updateCollapsedSourcesMode() {
4044
+ const e = this._dataSourceViewModels.length;
4045
+
4046
+ if (!this._wrapText.value() && this._availableHeight > 0 && e > 2) {
4047
+ const t = this._renderer.getMainSourceHeight(),
4048
+ s = this._renderer.getDataSourceHeight(),
4049
+ i = this._getCustomWidgetsHeight();
4050
+
4051
+ if (null !== t && null !== s) {
4052
+ const o = Math.floor((this._availableHeight - t - i) / s),
4053
+ l = Math.max(o, 2) - 1;
4054
+
4055
+ if (e > l + 1) {
4056
+ let t = "";
4057
+
4058
+ for (let s = 0; s < e; s++) {
4059
+ const e = s < l;
4060
+ this._dataSourceViewModels[s].setGlobalVisibility(e), e || (t += "".concat(0 === t.length ? "" : ", ").concat(this._dataSourceViewModels[s].getFullTitle()));
4061
+ }
4062
+
4063
+ return this._collapsedDataSourcesTitle.setValue(t), void this._collapsedDataSourcesCount.setValue(e - l);
4064
+ }
4065
+ }
4066
+ }
4067
+
4068
+ for (const e of this._dataSourceViewModels) e.setGlobalVisibility(!0);
4069
+
4070
+ this._collapsedDataSourcesCount.setValue(0), this._collapsedDataSourcesTitle.setValue("");
4071
+ }
4072
+
4073
+ _getCustomWidgetsHeight() {
4074
+ let e = 0;
4075
+
4076
+ for (const t of Array.from(this._customLegendWidgetsMap.values())) for (const s of Array.from(t.values())) for (const t of s) e += t.height().value();
4077
+
4078
+ return e;
4079
+ }
4080
+
4081
+ _getCustomTextColorValue() {
4082
+ const e = this._model.model().properties().scalesProperties.textColor.value();
4083
+
4084
+ return Object(wi.isStdThemedDefaultValue)("chartProperties.scalesProperties.textColor", e, Object(wi.getCurrentTheme)().name) ? null : e;
4085
+ }
4086
+
4087
+ _clearSubscriptions() {
4088
+ null !== this._mainSeriesRowHidden && (this._mainSeriesRowHidden.destroy(), this._mainSeriesRowHidden = null);
4089
+
4090
+ for (const e of this._dataSourceRowsHidden) e.destroy();
4091
+
4092
+ this._dataSourceRowsHidden = [];
4093
+
4094
+ for (const e of this._customWidgetsVisibilities) e.destroy();
4095
+
4096
+ this._customWidgetsVisibilities = [];
4097
+
4098
+ for (const e of this._customWidgetsHeights) e.destroy();
4099
+
4100
+ this._customWidgetsHeights = [];
4101
+ }
4102
+
4103
+ _recreateSubscriptions() {
4104
+ this._clearSubscriptions(), null !== this._mainSeriesViewModel && (this._mainSeriesRowHidden = this._mainSeriesViewModel.isRowHidden().spawn(), this._mainSeriesRowHidden.subscribe(this._updateLegendVisibilities.bind(this)));
4105
+
4106
+ for (const e of this._dataSourceViewModels) {
4107
+ const t = e.isRowHidden().spawn();
4108
+ this._dataSourceRowsHidden.push(t), t.subscribe(this._updateVisibleDataSourceCount.bind(this)), t.subscribe(this._updateLegendVisibilities.bind(this));
4109
+ }
4110
+
4111
+ for (const e of Array.from(this._customLegendWidgetsMap.values())) for (const t of Array.from(e.values())) for (const e of t) {
4112
+ const t = e.visibility().spawn();
4113
+ this._customWidgetsVisibilities.push(t), t.subscribe(this._updateLegendVisibilities.bind(this));
4114
+ const s = e.height().spawn();
4115
+ this._customWidgetsHeights.push(s), s.subscribe(this._updateCollapsedSourcesMode.bind(this));
4116
+ }
4117
+
4118
+ this._updateVisibleDataSourceCount(), this._updateLegendVisibilities();
4119
+ }
4120
+
4121
+ _updateLegendVisibilities() {
4122
+ if (this._hideWholeLegend.value()) return void this._allLegendHidden.setValue(!0);
4123
+
4124
+ const e = this._dataSourceRowsHidden.every(e => e.value()),
4125
+ t = this._hideNotMainSources.value() || e;
4126
+
4127
+ this._studiesLegendHidden.setValue(t);
4128
+
4129
+ const s = null === this._mainSeriesRowHidden || this._mainSeriesRowHidden.value(),
4130
+ i = this._customWidgetsVisibilities.some(e => e.value());
4131
+
4132
+ this._allLegendHidden.setValue(e && s && !i);
4133
+ }
4134
+
4135
+ _updateVisibleDataSourceCount() {
4136
+ const e = this._dataSourceRowsHidden.filter(e => !e.value()).length;
4137
+
4138
+ this._visibleDataSourceCount.setValue(e);
4139
+ }
4140
+
4141
+ _setLegendVisibilityToggled() {
4142
+ 0;
4143
+ }
4144
+
4145
+ _getIsPaneMainValue() {
4146
+ return this._paneWidget.containsMainSeries();
4147
+ }
4148
+
4149
+ _showLegendCalculatedProperty() {
4150
+ return this._model.model().showLegend();
4151
+ }
4152
+
4153
+ _showLegendOriginalProperty() {
4154
+ return this._model.model().properties().paneProperties.legendProperties.showLegend;
4155
+ }
4156
+
4157
+ _addCustomWidgetForLayerBlock(e) {
4158
+ const t = this._customLegendWidgetsFactoriesMap.get(e);
4159
+
4160
+ if (void 0 === t) return;
4161
+ const s = this._customLegendWidgetsMap.get(e) || new Map();
4162
+ let i = !1;
4163
+
4164
+ for (const o of Array.from(t.keys())) {
4165
+ const l = s.get(o) || [],
4166
+ n = t.get(o) || [];
4167
+
4168
+ for (let t = l.length; t < n.length; t++) {
4169
+ const s = n[t](this._model.model(), this._backgroundThemeName);
4170
+ 0 === e && 0 === o && s.setGlobalVisibility(this._hideNotMainSources.opposite()), l.push(s), this._renderer.addCustomWidget(s, {
4171
+ block: e,
4172
+ position: o
4173
+ }), i = !0;
4174
+ }
4175
+
4176
+ i && s.set(o, l);
4177
+ }
4178
+
4179
+ i && this._customLegendWidgetsMap.set(e, s);
4180
+ }
4181
+
4182
+ _destroyCustomWidgetFromLayerBlock(e) {
4183
+ const t = this._customLegendWidgetsMap.get(e);
4184
+
4185
+ if (void 0 !== t) {
4186
+ for (const e of Array.from(t.values())) for (const t of e) t.destroy();
4187
+
4188
+ t.clear(), this._customLegendWidgetsMap.delete(e);
4189
+ }
4190
+ }
4191
+
4192
+ _availableWidth() {
4193
+ return null === this._size ? 0 : this._size.w - this._margin - fi;
4194
+ }
4195
+
4196
+ }
4197
+ },
4198
+ tfDh: function tfDh(e, t, s) {
4199
+ e.exports = {
4200
+ wrapper: "wrapper-2-RXze0M",
4201
+ timezone: "timezone-2-RXze0M",
4202
+ sessionDayWrapper: "sessionDayWrapper-2-RXze0M",
4203
+ nowWrapper: "nowWrapper-2-RXze0M",
4204
+ now: "now-2-RXze0M",
4205
+ sessionDay: "sessionDay-2-RXze0M",
4206
+ weekDay: "weekDay-2-RXze0M",
4207
+ sessionDaySegments: "sessionDaySegments-2-RXze0M",
4208
+ timeMarkWrapper: "timeMarkWrapper-2-RXze0M",
4209
+ timeMarkSegment: "timeMarkSegment-2-RXze0M",
4210
+ timeMark: "timeMark-2-RXze0M",
4211
+ timeMarkSegmentAlignByEnds: "timeMarkSegmentAlignByEnds-2-RXze0M",
4212
+ segment: "segment-2-RXze0M",
4213
+ small: "small-2-RXze0M",
4214
+ start: "start-2-RXze0M",
4215
+ end: "end-2-RXze0M",
4216
+ active: "active-2-RXze0M",
4217
+ green: "green-2-RXze0M",
4218
+ orange: "orange-2-RXze0M",
4219
+ blue: "blue-2-RXze0M",
4220
+ gray: "gray-2-RXze0M",
4221
+ tooltip: "tooltip-2-RXze0M",
4222
+ time: "time-2-RXze0M"
4223
+ };
4224
+ },
4225
+ vWJB: function vWJB(e, t) {
4226
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 4" width="16" height="4" fill="none"><circle stroke="currentColor" cx="2" cy="2" r="1.5"/><circle stroke="currentColor" cx="8" cy="2" r="1.5"/><circle stroke="currentColor" cx="14" cy="2" r="1.5"/></svg>';
4227
+ },
4228
+ vYP1: function vYP1(e, t) {
4229
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M8.54.84a.8.8 0 0 1 .92 0l7.5 5.25a.8.8 0 0 1 0 1.32l-7.5 5.25a.8.8 0 0 1-.92 0L1.04 7.4a.8.8 0 0 1 0-1.32L8.54.84zM2.9 6.75L9 11.02l6.1-4.27L9 2.48 2.9 6.75z"/><path fill="currentColor" d="M.84 10.8a.8.8 0 0 1 1.12-.2L9 15.51l7.04-4.93a.8.8 0 0 1 .92 1.32l-7.5 5.25a.8.8 0 0 1-.92 0l-7.5-5.25a.8.8 0 0 1-.2-1.12z"/></svg>';
4230
+ },
4231
+ vg09: function vg09(e, t) {
4232
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 2v10M2 7h10"/></svg>';
4233
+ },
4234
+ vqb8: function vqb8(e, t, s) {
4235
+ "use strict";
4236
+
4237
+ s.d(t, "a", function () {
4238
+ return o;
4239
+ });
4240
+ var i = s("q1tI");
4241
+
4242
+ const o = e => {
4243
+ const t = "watchedValue" in e ? e.watchedValue : void 0,
4244
+ s = "defaultValue" in e ? e.defaultValue : e.watchedValue.value(),
4245
+ [o, l] = Object(i.useState)(t ? t.value() : s);
4246
+ return Object(i.useEffect)(() => {
4247
+ if (t) {
4248
+ l(t.value());
4249
+
4250
+ const e = e => l(e);
4251
+
4252
+ return t.subscribe(e), () => t.unsubscribe(e);
4253
+ }
4254
+
4255
+ return () => {};
4256
+ }, [t]), o;
4257
+ };
4258
+ },
4259
+ wZiV: function wZiV(e, t) {
4260
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 2 30 24" width="30" height="24" fill="none"><circle stroke="currentColor" stroke-width="1.15" cx="8.08" cy="14" r="1.73"/><circle stroke="currentColor" stroke-width="1.15" cx="15" cy="14" r="1.73"/><circle stroke="currentColor" stroke-width="1.15" cx="21.92" cy="14" r="1.73"/></svg>';
4261
+ },
4262
+ z4c1: function z4c1(e, t) {
4263
+ e.exports = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 22" width="24" height="22" fill="none"><g class="normal-eye"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M17.9948 7.91366C16.6965 6.48549 14.6975 5 11.9999 5C9.30225 5 7.30322 6.48549 6.00488 7.91366C6.00488 7.91366 4 10 4 11C4 12 6.00488 14.0863 6.00488 14.0863C7.30322 15.5145 9.30225 17 11.9999 17C14.6975 17 16.6965 15.5145 17.9948 14.0863C17.9948 14.0863 20 12 20 11C20 10 17.9948 7.91366 17.9948 7.91366ZM6.74482 13.4137C7.94648 14.7355 9.69746 16 11.9999 16C14.3022 16 16.0532 14.7355 17.2549 13.4137C17.2549 13.4137 19 11.5 19 11C19 10.5 17.2549 8.58634 17.2549 8.58634C16.0532 7.26451 14.3022 6 11.9999 6C9.69746 6 7.94648 7.26451 6.74482 8.58634C6.74482 8.58634 5 10.5 5 11C5 11.5 6.74482 13.4137 6.74482 13.4137Z"/><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M12 13C13.1046 13 14 12.1046 14 11C14 9.89543 13.1046 9 12 9C10.8954 9 10 9.89543 10 11C10 12.1046 10.8954 13 12 13ZM12 14C13.6569 14 15 12.6569 15 11C15 9.34315 13.6569 8 12 8C10.3431 8 9 9.34315 9 11C9 12.6569 10.3431 14 12 14Z"/></g><g class="crossed-eye"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M8.8503 16.2712C9.76531 16.7135 10.8152 17 11.9999 17C14.6975 17 16.6965 15.5145 17.9948 14.0863C17.9948 14.0863 20 12 20 11C20 10 17.9948 7.91366 17.9948 7.91366C17.8729 7.77954 17.7448 7.64491 17.6105 7.51105L16.9035 8.2181C17.0254 8.33968 17.1425 8.46276 17.2549 8.58634C17.2549 8.58634 19 10.5 19 11C19 11.5 17.2549 13.4137 17.2549 13.4137C16.0532 14.7355 14.3022 16 11.9999 16C11.1218 16 10.324 15.8161 9.60627 15.5153L8.8503 16.2712ZM7.09663 13.7823C6.97455 13.6606 6.85728 13.5374 6.74482 13.4137C6.74482 13.4137 5 11.5 5 11C5 10.5 6.74482 8.58634 6.74482 8.58634C7.94648 7.26451 9.69746 6 11.9999 6C12.8781 6 13.6761 6.18398 14.394 6.48495L15.1499 5.729C14.2348 5.28657 13.1847 5 11.9999 5C9.30225 5 7.30322 6.48549 6.00488 7.91366C6.00488 7.91366 4 10 4 11C4 12 6.00488 14.0863 6.00488 14.0863C6.12693 14.2206 6.25516 14.3553 6.38959 14.4893L7.09663 13.7823Z"/><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M11.2231 13.8984C11.4709 13.9647 11.7313 14 12 14C13.6569 14 15 12.6569 15 11C15 10.7313 14.9647 10.4709 14.8984 10.2231L13.9961 11.1254C13.934 12.1301 13.1301 12.934 12.1254 12.9961L11.2231 13.8984ZM11.8751 9.00384C10.87 9.06578 10.0658 9.87001 10.0038 10.8751L9.10166 11.7772C9.03535 11.5294 9 11.2688 9 11C9 9.34315 10.3431 8 12 8C12.2688 8 12.5294 8.03535 12.7772 8.10166L11.8751 9.00384Z"/><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M5.64648 16.6465L17.6465 4.64648L18.3536 5.35359L6.35359 17.3536L5.64648 16.6465Z"/></g><g class="loading-eye"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M17.9948 7.91366C16.6965 6.48549 14.6975 5 11.9999 5C9.30225 5 7.30322 6.48549 6.00488 7.91366C6.00488 7.91366 4 10 4 11C4 12 6.00488 14.0863 6.00488 14.0863C7.30322 15.5145 9.30225 17 11.9999 17C14.6975 17 16.6965 15.5145 17.9948 14.0863C17.9948 14.0863 20 12 20 11C20 10 17.9948 7.91366 17.9948 7.91366ZM6.74482 13.4137C7.94648 14.7355 9.69746 16 11.9999 16C14.3022 16 16.0532 14.7355 17.2549 13.4137C17.2549 13.4137 19 11.5 19 11C19 10.5 17.2549 8.58634 17.2549 8.58634C16.0532 7.26451 14.3022 6 11.9999 6C9.69746 6 7.94648 7.26451 6.74482 8.58634C6.74482 8.58634 5 10.5 5 11C5 11.5 6.74482 13.4137 6.74482 13.4137Z"/></g><g class="animated-loading-eye"><path stroke="currentColor" stroke-linecap="round" d="M14.5 11C14.5 9.61929 13.3807 8.5 12 8.5C10.6193 8.5 9.5 9.61929 9.5 11C9.5 12.3807 10.6193 13.5 12 13.5"/></g></svg>';
4264
+ }
4265
+ }]);