@perses-dev/clickhouse-plugin 0.6.0 → 0.7.0-beta.1

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 (206) hide show
  1. package/__mf/js/{ClickHouse.4e6199f7.js → ClickHouse.76a0fbf4.js} +4 -4
  2. package/__mf/js/async/1.1e91dea7.js +102 -0
  3. package/__mf/js/async/121.1f2608b3.js +2 -0
  4. package/__mf/js/async/181.e0b3926b.js +2 -0
  5. package/__mf/js/async/192.406c1c63.js +1 -0
  6. package/__mf/js/async/2.05cb4775.js +1 -0
  7. package/__mf/js/async/235.83f7cd2f.js +1 -0
  8. package/__mf/js/async/274.b8ce8e1b.js +2 -0
  9. package/__mf/js/async/356.f08f6910.js +1 -0
  10. package/__mf/js/async/392.d89cad59.js +2 -0
  11. package/__mf/js/async/440.62bb6f89.js +2 -0
  12. package/__mf/js/async/45.37b51769.js +1 -0
  13. package/__mf/js/async/470.3fc1ceb1.js +2 -0
  14. package/__mf/js/async/482.e59722dd.js +7 -0
  15. package/__mf/js/async/482.e59722dd.js.LICENSE.txt +102 -0
  16. package/__mf/js/async/522.69c8ed0a.js +22 -0
  17. package/__mf/js/async/560.0b052d6c.js +37 -0
  18. package/__mf/js/async/562.bc9f9e5a.js +2 -0
  19. package/__mf/js/async/587.8361f462.js +1 -0
  20. package/__mf/js/async/616.2f7b03f4.js +1 -0
  21. package/__mf/js/async/663.40f2ec68.js +1 -0
  22. package/__mf/js/async/700.5b2b12f4.js +3 -0
  23. package/__mf/js/async/862.e7bf5c84.js +2 -0
  24. package/__mf/js/async/865.39675206.js +1 -0
  25. package/__mf/js/async/901.d4978bec.js +1 -0
  26. package/__mf/js/async/941.4bc59208.js +2 -0
  27. package/__mf/js/async/943.62d64363.js +2 -0
  28. package/__mf/js/async/944.f146f769.js +10 -0
  29. package/__mf/js/async/968.4ac56699.js +1 -0
  30. package/__mf/js/async/__federation_expose_ClickHouseDatasource.442c0903.js +2 -0
  31. package/__mf/js/async/__federation_expose_ClickHouseLogQuery.13604af9.js +20 -0
  32. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.c9cd60a0.js +20 -0
  33. package/__mf/js/{main.39993ad6.js → main.1efc6679.js} +3 -3
  34. package/lib/bootstrap.js +2 -2
  35. package/lib/components/ClickQLEditor.d.ts +2 -2
  36. package/lib/components/ClickQLEditor.d.ts.map +1 -1
  37. package/lib/components/ClickQLEditor.js +3 -3
  38. package/lib/components/ClickQLEditor.js.map +1 -1
  39. package/lib/components/index.js +1 -1
  40. package/lib/components/index.js.map +1 -1
  41. package/lib/datasources/click-house-datasource/ClickHouseDatasource.d.ts +2 -2
  42. package/lib/datasources/click-house-datasource/ClickHouseDatasource.d.ts.map +1 -1
  43. package/lib/datasources/click-house-datasource/ClickHouseDatasource.js +2 -2
  44. package/lib/datasources/click-house-datasource/ClickHouseDatasource.js.map +1 -1
  45. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts +2 -2
  46. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts.map +1 -1
  47. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +1 -1
  48. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js.map +1 -1
  49. package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts +3 -3
  50. package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts.map +1 -1
  51. package/lib/datasources/click-house-datasource/click-house-datasource-types.js.map +1 -1
  52. package/lib/datasources/click-house-datasource/index.js +3 -3
  53. package/lib/datasources/click-house-datasource/index.js.map +1 -1
  54. package/lib/datasources/index.js +1 -1
  55. package/lib/datasources/index.js.map +1 -1
  56. package/lib/getPluginModule.d.ts +1 -1
  57. package/lib/getPluginModule.d.ts.map +1 -1
  58. package/lib/getPluginModule.js +3 -1
  59. package/lib/getPluginModule.js.map +1 -1
  60. package/lib/index-federation.js +1 -1
  61. package/lib/index.js +3 -3
  62. package/lib/index.js.map +1 -1
  63. package/lib/model/click-house-client.d.ts +1 -1
  64. package/lib/model/click-house-client.d.ts.map +1 -1
  65. package/lib/model/click-house-client.js +3 -1
  66. package/lib/model/click-house-client.js.map +1 -1
  67. package/lib/model/click-house-data-types.d.ts +1 -1
  68. package/lib/model/click-house-data-types.d.ts.map +1 -1
  69. package/lib/model/click-house-data-types.js.map +1 -1
  70. package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts +2 -2
  71. package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts.map +1 -1
  72. package/lib/queries/click-house-log-query/ClickHouseLogQuery.js +4 -6
  73. package/lib/queries/click-house-log-query/ClickHouseLogQuery.js.map +1 -1
  74. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts +3 -3
  75. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts.map +1 -1
  76. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js +9 -9
  77. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js.map +1 -1
  78. package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts +1 -1
  79. package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts.map +1 -1
  80. package/lib/queries/click-house-log-query/click-house-log-query-types.js.map +1 -1
  81. package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts +2 -2
  82. package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts.map +1 -1
  83. package/lib/queries/click-house-log-query/get-click-house-log-data.js +4 -4
  84. package/lib/queries/click-house-log-query/get-click-house-log-data.js.map +1 -1
  85. package/lib/queries/click-house-log-query/index.js +4 -4
  86. package/lib/queries/click-house-log-query/index.js.map +1 -1
  87. package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts +2 -2
  88. package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts.map +1 -1
  89. package/lib/queries/click-house-time-series-query/ClickHouseQuery.js +4 -6
  90. package/lib/queries/click-house-time-series-query/ClickHouseQuery.js.map +1 -1
  91. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts +3 -3
  92. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts.map +1 -1
  93. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js +9 -9
  94. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js.map +1 -1
  95. package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts +1 -1
  96. package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts.map +1 -1
  97. package/lib/queries/click-house-time-series-query/click-house-query-types.js.map +1 -1
  98. package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts +2 -2
  99. package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts.map +1 -1
  100. package/lib/queries/click-house-time-series-query/get-click-house-data.js +5 -5
  101. package/lib/queries/click-house-time-series-query/get-click-house-data.js.map +1 -1
  102. package/lib/queries/click-house-time-series-query/index.js +4 -4
  103. package/lib/queries/click-house-time-series-query/index.js.map +1 -1
  104. package/lib/queries/index.js +2 -2
  105. package/lib/queries/index.js.map +1 -1
  106. package/lib/queries/query-editor-model.d.ts +1 -1
  107. package/lib/queries/query-editor-model.d.ts.map +1 -1
  108. package/lib/queries/query-editor-model.js +2 -2
  109. package/lib/queries/query-editor-model.js.map +1 -1
  110. package/lib/setup-tests.d.ts +1 -1
  111. package/lib/setup-tests.d.ts.map +1 -1
  112. package/lib/setup-tests.js +2 -2
  113. package/lib/setup-tests.js.map +1 -1
  114. package/mf-manifest.json +55 -136
  115. package/mf-stats.json +55 -148
  116. package/package.json +21 -13
  117. package/__mf/js/async/1616.c86fdd40.js +0 -1
  118. package/__mf/js/async/1728.a4ac7d54.js +0 -1
  119. package/__mf/js/async/1811.29b51780.js +0 -101
  120. package/__mf/js/async/1825.299edaf9.js +0 -1
  121. package/__mf/js/async/1969.ea0bd5b9.js +0 -1
  122. package/__mf/js/async/2043.13379b9d.js +0 -2
  123. package/__mf/js/async/2043.13379b9d.js.LICENSE.txt +0 -24
  124. package/__mf/js/async/2386.56de292b.js +0 -2
  125. package/__mf/js/async/3059.3d9dad23.js +0 -1
  126. package/__mf/js/async/3181.f3124eab.js +0 -2
  127. package/__mf/js/async/392.c8af2244.js +0 -2
  128. package/__mf/js/async/3981.9bd5679b.js +0 -3
  129. package/__mf/js/async/4121.b6afa425.js +0 -2
  130. package/__mf/js/async/4233.abbba3f6.js +0 -7
  131. package/__mf/js/async/4233.abbba3f6.js.LICENSE.txt +0 -39
  132. package/__mf/js/async/5002.9167d87e.js +0 -1
  133. package/__mf/js/async/5071.a039a221.js +0 -1
  134. package/__mf/js/async/5440.898ddc2f.js +0 -2
  135. package/__mf/js/async/5481.223427f5.js +0 -2
  136. package/__mf/js/async/5562.d4359565.js +0 -2
  137. package/__mf/js/async/5587.72383e00.js +0 -1
  138. package/__mf/js/async/599.e213c21c.js +0 -1
  139. package/__mf/js/async/6045.9b807b97.js +0 -1
  140. package/__mf/js/async/6155.1398a410.js +0 -2
  141. package/__mf/js/async/6155.1398a410.js.LICENSE.txt +0 -37
  142. package/__mf/js/async/6274.22bd6f34.js +0 -2
  143. package/__mf/js/async/6688.abdc25f6.js +0 -2
  144. package/__mf/js/async/7177.96ff5c4d.js +0 -1
  145. package/__mf/js/async/7192.c1f998d2.js +0 -1
  146. package/__mf/js/async/7968.ae66f60b.js +0 -1
  147. package/__mf/js/async/7978.a58ed5ff.js +0 -1
  148. package/__mf/js/async/7984.549ad1a9.js +0 -22
  149. package/__mf/js/async/8356.eda63865.js +0 -1
  150. package/__mf/js/async/8470.3ae4fba1.js +0 -2
  151. package/__mf/js/async/873.e4ddcabf.js +0 -1
  152. package/__mf/js/async/9235.aeb9d818.js +0 -1
  153. package/__mf/js/async/941.11ea3ddf.js +0 -2
  154. package/__mf/js/async/9588.d09a1141.js +0 -1
  155. package/__mf/js/async/9754.9ea7778b.js +0 -10
  156. package/__mf/js/async/9836.75f99110.js +0 -1
  157. package/__mf/js/async/9877.8f08e12a.js +0 -38
  158. package/__mf/js/async/__federation_expose_ClickHouseDatasource.0e124aef.js +0 -2
  159. package/__mf/js/async/__federation_expose_ClickHouseLogQuery.605ad0d2.js +0 -20
  160. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js +0 -20
  161. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js.LICENSE.txt +0 -9
  162. package/lib/cjs/bootstrap.js +0 -26
  163. package/lib/cjs/components/ClickQLEditor.js +0 -72
  164. package/lib/cjs/components/constants.js +0 -41
  165. package/lib/cjs/components/index.js +0 -30
  166. package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasource.js +0 -49
  167. package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +0 -51
  168. package/lib/cjs/datasources/click-house-datasource/click-house-datasource-types.js +0 -16
  169. package/lib/cjs/datasources/click-house-datasource/index.js +0 -32
  170. package/lib/cjs/datasources/index.js +0 -30
  171. package/lib/cjs/env.d.js +0 -14
  172. package/lib/cjs/getPluginModule.js +0 -39
  173. package/lib/cjs/index-federation.js +0 -55
  174. package/lib/cjs/index.js +0 -38
  175. package/lib/cjs/model/click-house-client.js +0 -83
  176. package/lib/cjs/model/click-house-data-types.js +0 -16
  177. package/lib/cjs/queries/click-house-log-query/ClickHouseLogQuery.js +0 -45
  178. package/lib/cjs/queries/click-house-log-query/ClickHouseLogQueryEditor.js +0 -104
  179. package/lib/cjs/queries/click-house-log-query/click-house-log-query-types.js +0 -16
  180. package/lib/cjs/queries/click-house-log-query/get-click-house-log-data.js +0 -93
  181. package/lib/cjs/queries/click-house-log-query/index.js +0 -33
  182. package/lib/cjs/queries/click-house-time-series-query/ClickHouseQuery.js +0 -43
  183. package/lib/cjs/queries/click-house-time-series-query/ClickHouseQueryEditor.js +0 -104
  184. package/lib/cjs/queries/click-house-time-series-query/click-house-query-types.js +0 -16
  185. package/lib/cjs/queries/click-house-time-series-query/get-click-house-data.js +0 -116
  186. package/lib/cjs/queries/click-house-time-series-query/index.js +0 -33
  187. package/lib/cjs/queries/constants.js +0 -34
  188. package/lib/cjs/queries/index.js +0 -31
  189. package/lib/cjs/queries/query-editor-model.js +0 -53
  190. package/lib/cjs/setup-tests.js +0 -19
  191. /package/__mf/css/async/{4233.85c2cbf6.css → 482.85c2cbf6.css} +0 -0
  192. /package/__mf/js/async/{4121.b6afa425.js.LICENSE.txt → 121.1f2608b3.js.LICENSE.txt} +0 -0
  193. /package/__mf/js/async/{2386.56de292b.js.LICENSE.txt → 181.e0b3926b.js.LICENSE.txt} +0 -0
  194. /package/__mf/js/async/{6274.22bd6f34.js.LICENSE.txt → 274.b8ce8e1b.js.LICENSE.txt} +0 -0
  195. /package/__mf/js/async/{392.c8af2244.js.LICENSE.txt → 392.d89cad59.js.LICENSE.txt} +0 -0
  196. /package/__mf/js/async/{5440.898ddc2f.js.LICENSE.txt → 440.62bb6f89.js.LICENSE.txt} +0 -0
  197. /package/__mf/js/async/{8470.3ae4fba1.js.LICENSE.txt → 470.3fc1ceb1.js.LICENSE.txt} +0 -0
  198. /package/__mf/js/async/{7984.549ad1a9.js.LICENSE.txt → 522.69c8ed0a.js.LICENSE.txt} +0 -0
  199. /package/__mf/js/async/{3181.f3124eab.js.LICENSE.txt → 562.bc9f9e5a.js.LICENSE.txt} +0 -0
  200. /package/__mf/js/async/{5481.223427f5.js.LICENSE.txt → 862.e7bf5c84.js.LICENSE.txt} +0 -0
  201. /package/__mf/js/async/{5562.d4359565.js.LICENSE.txt → 941.4bc59208.js.LICENSE.txt} +0 -0
  202. /package/__mf/js/async/{6688.abdc25f6.js.LICENSE.txt → 943.62d64363.js.LICENSE.txt} +0 -0
  203. /package/__mf/js/async/{9754.9ea7778b.js.LICENSE.txt → 944.f146f769.js.LICENSE.txt} +0 -0
  204. /package/__mf/js/async/{941.11ea3ddf.js.LICENSE.txt → __federation_expose_ClickHouseDatasource.442c0903.js.LICENSE.txt} +0 -0
  205. /package/__mf/js/async/{__federation_expose_ClickHouseDatasource.0e124aef.js.LICENSE.txt → __federation_expose_ClickHouseLogQuery.13604af9.js.LICENSE.txt} +0 -0
  206. /package/__mf/js/async/{__federation_expose_ClickHouseLogQuery.605ad0d2.js.LICENSE.txt → __federation_expose_ClickHouseTimeSeriesQuery.c9cd60a0.js.LICENSE.txt} +0 -0
@@ -0,0 +1,7 @@
1
+ /*! For license information please see 482.e59722dd.js.LICENSE.txt */
2
+ (self.chunk_ClickHouse_0_7_0_beta_1=self.chunk_ClickHouse_0_7_0_beta_1||[]).push([["482"],{70158(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var i=n(96844);function o(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,n){var a=t.map(function(t){var a=null==n?t:r(r({},t),{options:r(r({},o(n)),o(t.options))});return(0,i.bind)(e,a)});return function(){a.forEach(function(e){return e()})}}},96844(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var n=t.type,r=t.listener,i=t.options;return e.addEventListener(n,r,i),function(){e.removeEventListener(n,r,i)}}},96907(e,t,n){"use strict";t.bindAll=t.bind=void 0;var r=n(96844);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return r.bind}});var i=n(70158);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return i.bindAll}})},1416(e,t,n){e.exports=n(99138)(n(41433),"DataView")},9073(e,t,n){var r=n(82316),i=n(76458),o=n(2149),a=n(44297),s=n(33121);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},72707(e,t,n){var r=n(39714),i=n(33812),o=n(14727),a=n(8379),s=n(8291);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},91955(e,t,n){e.exports=n(99138)(n(41433),"Map")},90369(e,t,n){var r=n(72092),i=n(49626),o=n(79925),a=n(26809),s=n(94385);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},42616(e,t,n){e.exports=n(99138)(n(41433),"Promise")},60157(e,t,n){e.exports=n(99138)(n(41433),"Set")},61527(e,t,n){var r=n(90369),i=n(79912),o=n(23767);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},86469(e,t,n){var r=n(72707),i=n(71848),o=n(17406),a=n(58569),s=n(43109),l=n(73389);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},32781(e,t,n){e.exports=n(41433).Symbol},28944(e,t,n){e.exports=n(41433).Uint8Array},78499(e,t,n){e.exports=n(99138)(n(41433),"WeakMap")},96701(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},61414(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},31163(e,t,n){var r=n(36204),i=n(21256),o=n(6397),a=n(30492),s=n(42845),l=n(47995),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),d=!n&&!c&&a(e),h=!n&&!c&&!d&&l(e),p=n||c||d||h,f=p?r(e.length,String):[],g=f.length;for(var m in e)(t||u.call(e,m))&&!(p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g)))&&f.push(m);return f}},78740(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},57260(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},61617(e,t,n){var r=n(14772),i=n(39316);e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},82863(e,t,n){var r=n(14772),i=n(39316),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},58301(e,t,n){var r=n(39316);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},14772(e,t,n){var r=n(18559);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},23508(e,t,n){var r=n(58953),i=Object.create;e.exports=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()},61469(e,t,n){e.exports=n(15409)()},74403(e,t,n){var r=n(78740),i=n(6397);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},87148(e,t,n){var r=n(32781),i=n(17903),o=n(71738),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},79250(e,t,n){var r=n(87148),i=n(22934);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},22122(e,t,n){var r=n(42032),i=n(22934);e.exports=function e(t,n,o,a,s){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,a,e,s):t!=t&&n!=n)}},42032(e,t,n){var r=n(86469),i=n(44075),o=n(64622),a=n(62677),s=n(31201),l=n(6397),u=n(30492),c=n(47995),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=l(e),x=l(t),b=y?h:s(e),w=x?h:s(t);b=b==d?p:b,w=w==d?p:w;var _=b==p,S=w==p,C=b==w;if(C&&u(e)){if(!u(t))return!1;y=!0,_=!1}if(C&&!_)return v||(v=new r),y||c(e)?i(e,t,n,g,m,v):o(e,t,b,n,g,m,v);if(!(1&n)){var M=_&&f.call(e,"__wrapped__"),A=S&&f.call(t,"__wrapped__");if(M||A){var T=M?e.value():e,I=A?t.value():t;return v||(v=new r),m(T,I,n,g,v)}}return!!C&&(v||(v=new r),a(e,t,n,g,m,v))}},16567(e,t,n){var r=n(18446),i=n(18092),o=n(58953),a=n(81485),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:s).test(a(e))}},97129(e,t,n){var r=n(87148),i=n(3330),o=n(22934),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},81452(e,t,n){var r=n(67499),i=n(9566),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},41491(e,t,n){var r=n(58953),i=n(67499),o=n(68201),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)"constructor"==s&&(t||!a.call(e,s))||n.push(s);return n}},99702(e,t,n){var r=n(86469),i=n(61617),o=n(61469),a=n(80708),s=n(58953),l=n(15405),u=n(29874);e.exports=function e(t,n,c,d,h){t!==n&&o(n,function(o,l){if(h||(h=new r),s(o))a(t,n,l,c,e,d,h);else{var p=d?d(u(t,l),o,l+"",t,n,h):void 0;void 0===p&&(p=o),i(t,l,p)}},l)}},80708(e,t,n){var r=n(61617),i=n(87030),o=n(76733),a=n(68835),s=n(19181),l=n(21256),u=n(6397),c=n(75569),d=n(30492),h=n(18446),p=n(58953),f=n(54679),g=n(47995),m=n(29874),v=n(47264);e.exports=function(e,t,n,y,x,b,w){var _=m(e,n),S=m(t,n),C=w.get(S);if(C)return void r(e,n,C);var M=b?b(_,S,n+"",e,t,w):void 0,A=void 0===M;if(A){var T=u(S),I=!T&&d(S),k=!T&&!I&&g(S);M=S,T||I||k?u(_)?M=_:c(_)?M=a(_):I?(A=!1,M=i(S,!0)):k?(A=!1,M=o(S,!0)):M=[]:f(S)||l(S)?(M=_,l(_)?M=v(_):(!p(_)||h(_))&&(M=s(S))):A=!1}A&&(w.set(S,M),x(M,S,y,b,w),w.delete(S)),r(e,n,M)}},71506(e,t,n){var r=n(74796),i=n(25265),o=n(26805);e.exports=function(e,t){return o(i(e,t,r),e+"")}},7310(e,t,n){var r=n(53122),i=n(18559),o=n(74796);e.exports=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o},36204(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},68812(e,t,n){var r=n(62140),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},30041(e){e.exports=function(e){return function(t){return e(t)}}},79151(e){e.exports=function(e,t){return e.has(t)}},57177(e,t,n){var r=n(28944);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},87030(e,t,n){e=n.nmd(e);var r=n(41433),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},76733(e,t,n){var r=n(57177);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},68835(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},42083(e,t,n){var r=n(82863),i=n(14772);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=o?o(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),a?i(n,u,c):r(n,u,c)}return n}},38109(e,t,n){e.exports=n(41433)["__core-js_shared__"]},54171(e,t,n){var r=n(71506),i=n(66220);e.exports=function(e){return r(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t})}},15409(e){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}},18559(e,t,n){var r=n(99138);e.exports=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},44075(e,t,n){var r=n(61527),i=n(57260),o=n(79151);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var v=e[f],y=t[f];if(a)var x=u?a(y,v,f,t,e,l):a(v,y,f,e,t,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!i(t,function(e,t){if(!o(m,t)&&(v===e||s(v,e,n,a,l)))return m.push(t)})){g=!1;break}}else if(!(v===y||s(v,y,n,a,l))){g=!1;break}}return l.delete(e),l.delete(t),g}},64622(e,t,n){var r=n(32781),i=n(28944),o=n(39316),a=n(44075),s=n(90953),l=n(15851),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)break;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=a(p(e),p(t),r,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},62677(e,t,n){var r=n(90966),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:i.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<c;){var v=e[h=u[d]],y=t[h];if(o)var x=l?o(y,v,h,t,e,s):o(v,y,h,e,t,s);if(!(void 0===x?v===y||a(v,y,n,o,s):x)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(e),s.delete(t),g}},75380(e,t,n){e.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},90966(e,t,n){var r=n(74403),i=n(88876),o=n(31178);e.exports=function(e){return r(e,o,i)}},15535(e,t,n){var r=n(95662);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},99138(e,t,n){var r=n(16567),i=n(6772);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},13347(e,t,n){e.exports=n(51019)(Object.getPrototypeOf,Object)},17903(e,t,n){var r=n(32781),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},88876(e,t,n){var r=n(61414),i=n(53629),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;e.exports=a?function(e){return null==e?[]:r(a(e=Object(e)),function(t){return o.call(e,t)})}:i},31201(e,t,n){var r=n(1416),i=n(91955),o=n(42616),a=n(60157),s=n(78499),l=n(87148),u=n(81485),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(r),m=u(i),v=u(o),y=u(a),x=u(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=f||i&&b(new i)!=c||o&&b(o.resolve())!=d||a&&b(new a)!=h||s&&b(new s)!=p)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return f;case m:return c;case v:return d;case y:return h;case x:return p}return t}),e.exports=b},6772(e){e.exports=function(e,t){return null==e?void 0:e[t]}},82316(e,t,n){var r=n(4558);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},76458(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},2149(e,t,n){var r=n(4558),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},44297(e,t,n){var r=n(4558),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},33121(e,t,n){var r=n(4558);e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},19181(e,t,n){var r=n(23508),i=n(13347),o=n(67499);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},42845(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},66220(e,t,n){var r=n(39316),i=n(18330),o=n(42845),a=n(58953);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return("number"==s?!!(i(n)&&o(t,n.length)):"string"==s&&t in n)&&r(n[t],e)}},95662(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},18092(e,t,n){var r,i=n(38109),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},67499(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},39714(e){e.exports=function(){this.__data__=[],this.size=0}},33812(e,t,n){var r=n(58301),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},14727(e,t,n){var r=n(58301);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8379(e,t,n){var r=n(58301);e.exports=function(e){return r(this.__data__,e)>-1}},8291(e,t,n){var r=n(58301);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},72092(e,t,n){var r=n(9073),i=n(72707),o=n(91955);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},49626(e,t,n){var r=n(15535);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=!!t,t}},79925(e,t,n){var r=n(15535);e.exports=function(e){return r(this,e).get(e)}},26809(e,t,n){var r=n(15535);e.exports=function(e){return r(this,e).has(e)}},94385(e,t,n){var r=n(15535);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},90953(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},4558(e,t,n){e.exports=n(99138)(Object,"create")},9566(e,t,n){e.exports=n(51019)(Object.keys,Object)},68201(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},23685(e,t,n){e=n.nmd(e);var r=n(75380),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},71738(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},51019(e){e.exports=function(e,t){return function(n){return e(t(n))}}},25265(e,t,n){var r=n(96701),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=n(l),r(e,this,u)}}},41433(e,t,n){var r=n(75380),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=r||i||Function("return this")()},29874(e){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},79912(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},23767(e){e.exports=function(e){return this.__data__.has(e)}},15851(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},26805(e,t,n){var r=n(7310);e.exports=n(23983)(r)},23983(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},71848(e,t,n){var r=n(72707);e.exports=function(){this.__data__=new r,this.size=0}},17406(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},58569(e){e.exports=function(e){return this.__data__.get(e)}},43109(e){e.exports=function(e){return this.__data__.has(e)}},73389(e,t,n){var r=n(72707),i=n(91955),o=n(90369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},81485(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},62140(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},53122(e){e.exports=function(e){return function(){return e}}},46177(e,t,n){var r=n(58953),i=n(43664),o=n(95378),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,f=t,d=e.apply(r,n)}function x(e){var n=e-p,r=e-f;return void 0===p||n>=t||n<0||m&&r>=c}function b(){var e,n,r,o=i();if(x(o))return w(o);h=setTimeout(b,(e=o-p,n=o-f,r=t-e,m?s(r,c-n):r))}function w(e){return(h=void 0,v&&l)?y(e):(l=u=void 0,d)}function _(){var e,n=i(),r=x(n);if(l=arguments,u=this,p=n,r){if(void 0===h)return f=e=p,h=setTimeout(b,t),g?y(e):d;if(m)return clearTimeout(h),h=setTimeout(b,t),y(p)}return void 0===h&&(h=setTimeout(b,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),_.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},_.flush=function(){return void 0===h?d:w(i())},_}},39316(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},74796(e){e.exports=function(e){return e}},21256(e,t,n){var r=n(79250),i=n(22934),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable;e.exports=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")}},6397(e){e.exports=Array.isArray},18330(e,t,n){var r=n(18446),i=n(3330);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},75569(e,t,n){var r=n(18330),i=n(22934);e.exports=function(e){return i(e)&&r(e)}},30492(e,t,n){e=n.nmd(e);var r=n(41433),i=n(80659),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},18264(e,t,n){var r=n(22122);e.exports=function(e,t){return r(e,t)}},18446(e,t,n){var r=n(87148),i=n(58953);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3330(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},58953(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},22934(e){e.exports=function(e){return null!=e&&"object"==typeof e}},54679(e,t,n){var r=n(87148),i=n(13347),o=n(22934),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},75414(e,t,n){var r=n(87148),i=n(22934);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},47995(e,t,n){var r=n(97129),i=n(30041),o=n(23685),a=o&&o.isTypedArray;e.exports=a?i(a):r},31178(e,t,n){var r=n(31163),i=n(81452),o=n(18330);e.exports=function(e){return o(e)?r(e):i(e)}},15405(e,t,n){var r=n(31163),i=n(41491),o=n(18330);e.exports=function(e){return o(e)?r(e,!0):i(e)}},25632(e,t,n){var r=n(99702);e.exports=n(54171)(function(e,t,n){r(e,t,n)})},43664(e,t,n){var r=n(41433);e.exports=function(){return r.Date.now()}},53629(e){e.exports=function(){return[]}},80659(e){e.exports=function(){return!1}},95378(e,t,n){var r=n(68812),i=n(58953),o=n(75414),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},47264(e,t,n){var r=n(42083),i=n(15405);e.exports=function(e){return r(e,i(e))}},24300(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z","Calendar")},29618(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Circle")},98029(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},53064(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},26684(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Earth")},78536(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z","EyeOffOutline")},1355(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z","EyeOutline")},98599(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z","Magnify")},4491(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},16979(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z","UnfoldLessHorizontal")},9323(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z","UnfoldMoreHorizontal")},12933(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,5V18H21V5M4,18H9V5H4M10,18H15V5H10V18Z","ViewColumn")},77440(e,t,n){!function(e,t){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}(t);function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i={error:null},o=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=i,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var o=t.prototype;return o.reset=function(){this.setState(i)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,i,o,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(n=e.resetKeys)&&(n=[]),void 0===(r=s)&&(r=[]),n.length!==r.length||n.some(function(e,t){return!Object.is(e,r[t])}))&&(null==(i=(o=this.props).onResetKeysChange)||i.call(o,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,r=t.fallbackRender,i=t.FallbackComponent,o=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(o))return o;if("function"==typeof r)return r(a);if(i)return n.createElement(i,a);else throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(n.Component);e.ErrorBoundary=o,e.useErrorHandler=function(e){var t=n.useState(null),r=t[0],i=t[1];if(null!=e)throw e;if(null!=r)throw r;return i},e.withErrorBoundary=function(e,t){var r=function(r){return n.createElement(o,t,n.createElement(e,r))};return r.displayName="withErrorBoundary("+(e.displayName||e.name||"Unknown")+")",r},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(70451))},23420(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},42915(e){"use strict";var t;t=function(){function e(){return!0}function t(){return!1}function n(){}return function r(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},a=[],s=[],l={types:i,conversions:s,ignore:a};function u(e){var t=N(l.types,function(t){return t.name===e});if(t)return t;if("any"===e)return o;var n=N(l.types,function(t){return t.name.toLowerCase()===e.toLowerCase()});throw TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function c(e){return e===o?999:l.types.indexOf(e)}function d(e){var t=N(l.types,function(t){return t.test(e)});if(t)return t.name;throw TypeError("Value has unknown type. Value: "+e)}function h(e){return e.map(function(e){var t=e.types.map(y);return(e.restParam?"...":"")+t.join("|")}).join(",")}function p(e){var t=E(e);return!!t&&t.restParam}function f(e){return e.types.some(function(e){return null!=e.conversion})}function g(t){if(!t||0===t.types.length)return e;if(1===t.types.length)return u(t.types[0].name).test;if(2===t.types.length){var n=u(t.types[0].name).test,r=u(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map(function(e){return u(e.name).test});return function(e){for(var t=0;t<i.length;t++)if(i[t](e))return!0;return!1}}function m(e,t){return t<e.params.length?e.params[t]:p(e.params)?E(e.params):null}function v(e,t,n){var r=m(e,t);return(r?n?r.types.filter(x):r.types:[]).map(y)}function y(e){return e.name}function x(e){return null===e.conversion||void 0===e.conversion}function b(e,t){var n=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}(z(e,function(e){return v(e,t,!1)}));return -1!==n.indexOf("any")?["any"]:n}function w(e,t,n){var r,i,o,a=e||"unnamed",s=n;for(o=0;o<t.length;o++){var l=s.filter(function(e){var n=g(m(e,o));return(o<e.params.length||p(e.params))&&n(t[o])});if(0===l.length){if((i=b(s,o)).length>0){var u=d(t[o]);return(r=TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+u+", index: "+o+")")).data={category:"wrongType",fn:a,index:o,actual:u,expected:i},r}}else s=l}var c=s.map(function(e){return p(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,c))return(r=TypeError("Too few arguments in function "+a+" (expected: "+(i=b(s,o)).join(" or ")+", index: "+t.length+")")).data={category:"tooFewArgs",fn:a,index:t.length,expected:i},r;var h=Math.max.apply(null,c);return t.length>h?(r=TypeError("Too many arguments in function "+a+" (expected: "+h+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:h}:(r=TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+".")).data={category:"mismatch",actual:t.map(d)},r}function _(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function S(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function C(e,t){var n,r,i=Math.min(e.params.length,t.params.length);if(0!=(r=e.params.some(f)-t.params.some(f)))return r;for(n=0;n<i;n++)if(0!=(r=f(e.params[n])-f(t.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=function(e,t){var n;return 0!=(n=e.restParam-t.restParam)||0!=(n=f(e)-f(t))||0!=(n=_(e)-_(t))?n:S(e)-S(t)}(e.params[n],t.params[n])))return r;return e.params.length-t.params.length}function M(e){var t,n,r,i,o=[],a=[];switch(e.types.forEach(function(e){e.conversion&&(o.push(u(e.conversion.from).test),a.push(e.conversion.convert))}),a.length){case 0:return function(e){return e};case 1:return t=o[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=o[0],n=o[1],r=a[0],i=a[1],function(e){return t(e)?r(e):n(e)?i(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(o[t](e))return a[t](e);return e}}}function A(e,t){return function e(n,r,i){if(!(r<n.length))return[i.map(function(e,t){return{types:e,restParam:t===n.length-1&&p(n)}})];var o,a=n[r],s=t?a.types.filter(x):a.types;if(a.restParam){var l=s.filter(x);o=l.length<s.length?[l,s]:[s]}else o=s.map(function(e){return[e]});return z(o,function(t){return e(n,r+1,i.concat([t]))})}(e,0,[])}function T(e,r){if(0===Object.keys(r).length)throw SyntaxError("No signatures provided");var i,o=[];Object.keys(r).map(function(e){var t,n,i;return t=r[e],n=l.conversions,i=[],(""!==e.trim()&&(i=e.split(",").map(D).map(function(e,t,r){var i,o,a,s,l,d,h,p,f=(i=n,o=l=((s=0===e.indexOf("..."))?e.length>3?e.slice(3):"any":e).split("|").map(D).filter(O).filter(k),a={},i.forEach(function(e){-1!==o.indexOf(e.from)||-1===o.indexOf(e.to)||a[e.from]||(a[e.from]=e)}),d=Object.keys(a).map(function(e){return a[e]}),h=l.map(function(e){var t=u(e);return{name:e,typeIndex:c(t),test:t.test,conversion:null,conversionIndex:-1}}),p=d.map(function(e){var t=u(e.from);return{name:e.from,typeIndex:c(t),test:t.test,conversion:e,conversionIndex:n.indexOf(e)}}),{types:h.concat(p),restParam:s});if(f.restParam&&t!==r.length-1)throw SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return f})),i.some(R))?null:{params:i,fn:t}}).filter(P).forEach(function(e){var t=N(o,function(t){return function(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++)if(!function(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],-1!==t.indexOf(n))return!0;return!1}(v(e,r,!0),v(t,r,!0)))return!1;var i=e.params.length,o=t.params.length,a=p(e.params),s=p(t.params);return a?s?i===o:o>=i:s?i>=o:i===o}(t,e)});if(t)throw TypeError('Conflicting signatures "'+h(t.params)+'" and "'+h(e.params)+'".');o.push(e)});var a=z(o,function(e){return(e?A(e.params,!1):[]).map(function(t){return{params:t,fn:e.fn}})}).filter(P);a.sort(C);var s=a[0]&&a[0].params.length<=2&&!p(a[0].params),d=a[1]&&a[1].params.length<=2&&!p(a[1].params),m=a[2]&&a[2].params.length<=2&&!p(a[2].params),y=a[3]&&a[3].params.length<=2&&!p(a[3].params),x=a[4]&&a[4].params.length<=2&&!p(a[4].params),b=a[5]&&a[5].params.length<=2&&!p(a[5].params),w=a.map(function(e){return function(e){var t,n,r;if(p(e)){var i,o=(t=(i=e).slice(0,i.length-1).map(g)).length,a=g(E(e)),s=function(e){for(var t=o;t<e.length;t++)if(!a(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return s(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=g(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=g(e[0]),r=g(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(g),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}(e.params)}),_=s?g(a[0].params[0]):t,S=d?g(a[1].params[0]):t,T=m?g(a[2].params[0]):t,I=y?g(a[3].params[0]):t,F=x?g(a[4].params[0]):t,B=b?g(a[5].params[0]):t,j=s?g(a[0].params[1]):t,V=d?g(a[1].params[1]):t,H=m?g(a[2].params[1]):t,W=y?g(a[3].params[1]):t,G=x?g(a[4].params[1]):t,$=b?g(a[5].params[1]):t,U=a.map(function(e){return function(e,t){var n=t;if(e.some(f)){var r=p(e),i=e.map(M);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(this,e)}}var o=n;if(p(e)){var a=e.length-1;o=function(){return n.apply(this,L(arguments,0,a).concat([L(arguments,a)]))}}return o}(e.params,e.fn)}),Z=s?U[0]:n,Y=d?U[1]:n,X=m?U[2]:n,q=y?U[3]:n,K=x?U[4]:n,Q=b?U[5]:n,J=s?a[0].params.length:-1,ee=d?a[1].params.length:-1,et=m?a[2].params.length:-1,en=y?a[3].params.length:-1,er=x?a[4].params.length:-1,ei=b?a[5].params.length:-1,eo=6*!!(s&&d&&m&&y&&x&&b),ea=a.length,es=function(){for(var t=eo;t<ea;t++)if(w[t](arguments))return U[t].apply(this,arguments);return l.onMismatch(e,arguments,a)},el=function e(t,n){return arguments.length===J&&_(t)&&j(n)?Z.apply(e,arguments):arguments.length===ee&&S(t)&&V(n)?Y.apply(e,arguments):arguments.length===et&&T(t)&&H(n)?X.apply(e,arguments):arguments.length===en&&I(t)&&W(n)?q.apply(e,arguments):arguments.length===er&&F(t)&&G(n)?K.apply(e,arguments):arguments.length===ei&&B(t)&&$(n)?Q.apply(e,arguments):es.apply(e,arguments)};try{Object.defineProperty(el,"name",{value:e})}catch(e){}return i={},a.forEach(function(e){e.params.some(f)||A(e.params,!0).forEach(function(t){i[h(t)]=e.fn})}),el.signatures=i,el}function I(e,t,n){throw w(e,t,n)}function k(e){return -1===l.ignore.indexOf(e)}function D(e){return e.trim()}function O(e){return!!e}function P(e){return null!==e}function R(e){return 0===e.types.length}function E(e){return e[e.length-1]}function L(e,t,n){return Array.prototype.slice.call(e,t,n)}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function z(e,t){return Array.prototype.concat.apply([],e.map(t))}function F(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name){if(""===t)t=r.name;else if(t!==r.name){var i=Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw i.data={actual:r.name,expected:t},i}}}return t}function B(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw(t=Error('Signature "'+e+'" is defined twice')).data={signature:e},t}for(var i=0;i<e.length;i++){var o=e[i];if("object"==typeof o.signatures)for(var a in o.signatures)o.signatures.hasOwnProperty(a)&&(r(a,o.signatures[a]),n[a]=o.signatures[a]);else if("string"==typeof o.signature)r(o.signature,o),n[o.signature]=o;else throw(t=TypeError("Function is no typed-function (index: "+i+")")).data={index:i},t}return n}return(l=T("typed",{"string, Object":T,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return T(F(t),e)},"...Function":function(e){return T(F(e),B(e))},"string, ...Function":function(e,t){return T(e,B(t))}})).create=r,l.types=i,l.conversions=s,l.ignore=a,l.onMismatch=I,l.throwMismatchError=I,l.createError=w,l.convert=function(e,t){var n=d(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var i=l.conversions[r];if(i.from===n&&i.to===t)return i.convert(e)}throw Error("Cannot convert from "+n+" to "+t)},l.find=function(e,t){if(!e.signatures)throw TypeError("Function is no typed-function");if("string"==typeof t){n=t.split(",");for(var n,r=0;r<n.length;r++)n[r]=n[r].trim()}else if(Array.isArray(t))n=t;else throw TypeError("String array or a comma separated string expected");var i=n.join(","),o=e.signatures[i];if(o)return o;throw TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")},l.addType=function(e,t){if(!e||"string"!=typeof e.name||"function"!=typeof e.test)throw TypeError("Object with properties {name: string, test: function} expected");if(!1!==t){for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name)return void l.types.splice(n,0,e)}l.types.push(e)},l.addConversion=function(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}()},"function"==typeof define&&define.amd?define([],t):e.exports=t()},21345(e,t,n){"use strict";n.r(t),n.d(t,{generateChartsTheme:()=>ol,DensitySelector:()=>go,applyMergeIndexedColumnsTransform:()=>oh,interpolateSelectionIndividual:()=>oa,DragButton:()=>mt,TimeRangeSelector:()=>$d,getFormatterStats:()=>nK,OptionsEditorGrid:()=>f7,TOOLTIP_MAX_HEIGHT:()=>$v,useMousePosition:()=>$I,TextOverlay:()=>Bp,isValidLegendSize:()=>nG,isValidLegendMode:()=>nW,isDateUnit:()=>il,parseVariables:()=>iD,UnitSelector:()=>$4,PERCENT_UNIT_CONFIG:()=>rH,RepeatGrid:()=>UI,PERCENT_GROUP_CONFIG:()=>rj,YAxisLabel:()=>$8,replaceVariablesForDisplay:()=>iR,TOOLTIP_MIN_WIDTH:()=>$g,useId:()=>iC,getTitleAction:()=>nz,getYBuffer:()=>$X,PINNED_CROSSHAIR_SERIES_NAME:()=>nO,getPixelXFromGrid:()=>$z,getFormattedAxisLabel:()=>i9,clearHighlightedSeries:()=>iv,FALLBACK_CHART_WIDTH:()=>$w,restoreChart:()=>im,FormatControls:()=>$9,transformData:()=>of,getTimeSeriesValues:()=>ue,DEFAULT_LEGEND:()=>n$,OptionsEditorControl:()=>f8,formatDecimal:()=>rq,DiscardChangesConfirmationDialog:()=>fQ,formatTime:()=>n9,SelectionProvider:()=>tm,TimeChartTooltip:()=>$1,legendModes:()=>nj,EMPTY_TOOLTIP_DATA:()=>$T,isThroughputUnit:()=>ia,applyJoinTransform:()=>oc,TextField:()=>fk,SeriesInfo:()=>$P,getClosestTimestamp:()=>iw,DropIndicator:()=>ga,applyMergeColumnsTransform:()=>od,isTemperatureUnit:()=>iu,limitDecimalPlaces:()=>n0,useSnackbar:()=>nI,dateFormatOptionsWithTimeZone:()=>i3,calculateBarYBounds:()=>$V,DEFAULT_COLUMN_HEIGHT:()=>40,parseVariablesAndFormat:()=>iO,getCommonTimeScale:()=>ut,isBytesUnit:()=>it,ModeSelector:()=>Bd,OptionsEditorColumn:()=>f0,DECIMAL_UNIT_CONFIG:()=>rX,DEFAULT_PINNED_CROSSHAIR:()=>nP,TEMPERATURE_GROUP_CONFIG:()=>r$,NoDataOverlay:()=>Bf,getResourceExtendedDisplayName:()=>ui,InterpolationFormat:()=>iM,ErrorBoundary:()=>Fz.ErrorBoundary,hasDataFieldPatterns:()=>i$,CURRENCY_UNIT_CONFIG:()=>rF,ToolbarIconButton:()=>$5,DEFAULT_TOOLTIP_CONFIG:()=>$k,TRANSFORM_TEXT:()=>ic,calculateBarBandwidth:()=>$B,ItemActionsProvider:()=>tc,isWithinPercentageRange:()=>$Y,OPTIMIZED_MODE_SERIES_LIMIT:()=>1e3,legendPositions:()=>nB,TIME_GROUP_CONFIG:()=>n2,defaultCursorData:()=>$A,createTimezoneAwareAxisFormatter:()=>FE,RefreshIntervalPicker:()=>UT,legendSizes:()=>nV,BITS_GROUP_CONFIG:()=>rk,TOOLTIP_LABELS_MAX_WIDTH:()=>$y,applyValueMapping:()=>ou,UNIT_GROUP_CONFIG:()=>r2,batchDispatchNearbySeriesActions:()=>ix,DEFAULT_COLUMN_WIDTH:()=>150,getGMTOffset:()=>i6,getPointInGrid:()=>iy,InfoTooltip:()=>f4,AlignSelector:()=>eO,JSONEditor:()=>Bs,CURRENCY_GROUP_CONFIG:()=>rz,TooltipHeader:()=>$0,SeriesMarker:()=>$p,FontSizeSelector:()=>FB,THROUGHPUT_UNIT_CONFIG:()=>rJ,DEFAULT_COLUMN_MAX_WIDTH:()=>1e3,TOOLTIP_PADDING:()=>$b,TimeZoneContext:()=>uo,TimeZoneProvider:()=>ua,useDeepMemo:()=>ot,TransformsEditor:()=>UA,combineSx:()=>iS,getFormatterFromCache:()=>nq,applyMergeSeriesTransform:()=>op,Legend:()=>fH,Dialog:()=>fK,getFormattedMultipleYAxes:()=>ih,replaceVariables:()=>iP,DECIMAL_GROUP_CONFIG:()=>rY,getResourceDisplayName:()=>ur,SnackbarProvider:()=>nT,formatBytes:()=>rE,getUnitConfig:()=>r4,LoadingOverlay:()=>Bg,formatWithTimeZone:()=>i4,legacyCheckforNearbySeries:()=>$U,replaceVariable:()=>iI,UNIT_CONFIG:()=>r5,testChartsTheme:()=>Ue,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>$x,interpolate:()=>iT,THROUGHPUT_GROUP_CONFIG:()=>rK,BYTES_UNIT_CONFIG:()=>rR,useChartsTheme:()=>tl,calculateBarSegmentBounds:()=>$j,checkCrosshairPinnedStatus:()=>ib,mockChartsContext:()=>Ut,checkforNearbyTimeSeries:()=>$$,TOOLTIP_DATE_FORMAT:()=>$M,hasDecimalPlaces:()=>nJ,isCurrencyUnit:()=>is,DEFAULT_COLUMN_MIN_WIDTH:()=>60,handleMoveUp:()=>g7,ContentWithLegend:()=>fG,OptionsEditorGroup:()=>ge,isUnitWithDecimalPlaces:()=>ii,SeriesLabelsStack:()=>$f,getDateAndTime:()=>i8,getTableCellLayout:()=>pw,ChartsThemeContext:()=>ta,TooltipContent:()=>$q,isValidTraceId:()=>un,formatCurrency:()=>rB,ValueMappingsEditor:()=>UP,BYTES_GROUP_CONFIG:()=>rP,interpolateSelectionBatch:()=>os,isLegendItemVisuallySelected:()=>up,getFormattedAxis:()=>id,getClosestTimestampInFullDataset:()=>i_,ChartsProvider:()=>to,TimeZoneSelector:()=>$h,LinkEditorForm:()=>Bu,SortSelector:()=>Bv,formatValue:()=>r3,persesColumnsToTanstackColumns:()=>p_,NEARBY_SERIES_DESCRIPTION:()=>$_,calculateVisualYForSeries:()=>$F,hasIndexedPatterns:()=>iG,ColorPicker:()=>tn,useItemActions:()=>tp,getUnitGroup:()=>r6,formatThroughput:()=>r0,getTheme:()=>Ug,shouldShortenValues:()=>nQ,MIN_STEP_INTERVAL_MS:()=>l7,buildRelativeTimeOption:()=>nL,useSelection:()=>tx,TEMPERATURE_UNIT_CONFIG:()=>rU,SortSelectorButtons:()=>By,formatBits:()=>rO,getTimeZoneOptions:()=>nN,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>$W,isUnitWithShortValues:()=>io,getTooltipStyles:()=>$N,interpolateHeaders:()=>oi,ErrorAlert:()=>FN,OptionsColorPicker:()=>ul,getUnitGroupConfig:()=>r9,TOOLTIP_BG_COLOR_FALLBACK:()=>$C,TOOLTIP_MAX_WIDTH:()=>$m,DragAndDropElement:()=>g9,extractFieldNames:()=>iU,isBitsUnit:()=>ir,SHOW_FEWER_SERIES_LIMIT:()=>$G,TIME_UNIT_CONFIG:()=>n5,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>$H,isPercentUnit:()=>r7,getLegendSize:()=>nY,getSubmitText:()=>nF,handleMoveDown:()=>me,PIN_TOOLTIP_HELP_TEXT:()=>$D,Table:()=>fz,typography:()=>Up,formatPercent:()=>rW,assembleTransform:()=>$L,formatTemperature:()=>rZ,useTimeZone:()=>us,createRegexFromString:()=>or,hasBatchPatterns:()=>iW,PersesTimeToIntlTime:()=>n3,parseFormat:()=>ij,FormActions:()=>Fj,getNearbySeriesData:()=>$Z,useMemoized:()=>oe,isValidLegendPosition:()=>nH,getLegendMode:()=>nZ,EMPHASIZED_SERIES_DESCRIPTION:()=>$S,replaceDataFields:()=>iV,Drawer:()=>mb,getLegendPosition:()=>nU,BITS_UNIT_CONFIG:()=>rD,EChart:()=>FP,isTimeUnit:()=>r8,useChartsContext:()=>ts,interpolateQueryParams:()=>oo,UNPIN_TOOLTIP_HELP_TEXT:()=>$O,DateTimeRangePicker:()=>$c,SettingsAutocomplete:()=>gr,ThresholdsEditor:()=>BM,isDecimalUnit:()=>ie,enableDataZoom:()=>ig,replaceDataFieldsBatch:()=>iH,useDragAndDropMonitor:()=>g6,useLocalStorage:()=>ip,isRegexPattern:()=>on});var r,i,o,a,s,l,u,c,d,h,p,f,g,m,v,y,x,b,w,_,S,C,M,A,T,I,k,D,O,P,R,E,L,N,z,F,B,j,V,H,W,G,$,U,Z,Y,X,q,K,Q,J,ee,et,en,er,ei,eo,ea,es,el,eu={};n.r(eu),n.d(eu,{Arc:()=>AD,BezierCurve:()=>AT,BoundingRect:()=>xu,Circle:()=>M1,CompoundPath:()=>AO,Ellipse:()=>M3,Group:()=>ML,Image:()=>wW,IncrementalDisplayable:()=>AV,Line:()=>A_,LinearGradient:()=>AR,OrientedBoundingRect:()=>AB,Path:()=>wz,Point:()=>xe,Polygon:()=>Ag,Polyline:()=>Ay,RadialGradient:()=>AE,Rect:()=>wK,Ring:()=>Ad,Sector:()=>Al,Text:()=>_t,applyTransform:()=>A4,clipPointsByRect:()=>A8,clipRectByRect:()=>A7,createIcon:()=>Te,extendPath:()=>AZ,extendShape:()=>A$,getShapeClass:()=>AX,getTransform:()=>A3,groupTransition:()=>A9,initProps:()=>_q,isElementRemoved:()=>_K,lineLineIntersect:()=>Tn,linePolygonIntersect:()=>Tt,makeImage:()=>AK,makePath:()=>Aq,mergePath:()=>AJ,registerShape:()=>AY,removeElement:()=>_Q,removeElementWithFadeOut:()=>_0,resizePath:()=>A0,setTooltipConfig:()=>Tr,subPixelOptimize:()=>A5,subPixelOptimizeLine:()=>A1,subPixelOptimizeRect:()=>A2,transformDirection:()=>A6,traverseElements:()=>To,updateProps:()=>_X});var ec=n(62540),ed=n(70451),eh=n.n(ed),ep=n(11750),ef=n(81023),eg=n(59238),em=n(41953),ev=n(24726),ey=n(77308),ex=n(23434),eb=n(26952),ew=n(72052),e_=n(29009),eS=n(46733);function eC(e){return(0,eS.Ay)("MuiButtonGroup",e)}let eM=(0,e_.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var eA=n(94580),eT=n(30016);let eI=(0,ey.A)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${eM.grouped}`]:t.grouped},{[`& .${eM.grouped}`]:t[`grouped${(0,ev.A)(n.orientation)}`]},{[`& .${eM.grouped}`]:t[`grouped${(0,ev.A)(n.variant)}`]},{[`& .${eM.grouped}`]:t[`grouped${(0,ev.A)(n.variant)}${(0,ev.A)(n.orientation)}`]},{[`& .${eM.grouped}`]:t[`grouped${(0,ev.A)(n.variant)}${(0,ev.A)(n.color)}`]},{[`& .${eM.firstButton}`]:t.firstButton},{[`& .${eM.lastButton}`]:t.lastButton},{[`& .${eM.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,ex.A)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${eM.lastButton},& .${eM.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${eM.lastButton},& .${eM.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${eM.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${eM.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,eb.A)()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,eg.X4)(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${eM.lastButton},& .${eM.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${eM.lastButton},& .${eM.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${eM.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${eM.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,eb.A)(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${eM.firstButton},& .${eM.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${eM.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),ek=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiButtonGroup"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,disableElevation:l=!1,disableFocusRipple:u=!1,disableRipple:c=!1,fullWidth:d=!1,orientation:h="horizontal",size:p="medium",variant:f="outlined",...g}=n,m={...n,color:o,component:a,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,orientation:h,size:p,variant:f},v=(e=>{let{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:a,variant:s}=e,l={root:["root",s,a,o&&"fullWidth",i&&"disableElevation",`color${(0,ev.A)(n)}`],grouped:["grouped",`grouped${(0,ev.A)(a)}`,`grouped${(0,ev.A)(s)}`,`grouped${(0,ev.A)(s)}${(0,ev.A)(a)}`,`grouped${(0,ev.A)(s)}${(0,ev.A)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,ef.A)(l,eC,t)})(m),y=ed.useMemo(()=>({className:v.grouped,color:o,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,size:p,variant:f}),[o,s,l,u,c,d,p,f,v.grouped]),x=(0,em.A)(r),b=x.length;return(0,ec.jsx)(eI,{as:a,role:"group",className:(0,ep.A)(v.root,i),ref:t,ownerState:m,...g,children:(0,ec.jsx)(eA.A.Provider,{value:y,children:x.map((e,t)=>{let n,r;return(0,ec.jsx)(eT.A.Provider,{value:(n=0===t,r=t===b-1,n&&r?"":n?v.firstButton:r?v.lastButton:v.middleButton),children:e},t)})})})});var eD=n(7013);function eO({onChange:e,value:t="left",...n}){let r=t=>{e(t)};return(0,ec.jsxs)(ek,{"aria-label":"Alignement",...n,children:[(0,ec.jsx)(eD.A,{onClick:()=>r("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,ec.jsx)(eD.A,{onClick:()=>r("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,ec.jsx)(eD.A,{onClick:()=>r("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var eP=n(315),eR=n(47095),eE=n(93648),eL=n(29618),eN=n(98029);function ez(){return(ez=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eF(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function eB(e){var t=(0,ed.useRef)(e),n=(0,ed.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var ej,eV=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},eH=function(e){return"touches"in e},eW=function(e){return e&&e.ownerDocument.defaultView||self},eG=function(e,t,n){var r=e.getBoundingClientRect(),i=eH(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:eV((i.pageX-(r.left+eW(e).pageXOffset))/r.width),top:eV((i.pageY-(r.top+eW(e).pageYOffset))/r.height)}},e$=function(e){eH(e)||e.preventDefault()},eU=eh().memo(function(e){var t=e.onMove,n=e.onKey,r=e.onEnd,i=eF(e,["onMove","onKey","onEnd"]),o=(0,ed.useRef)(null),a=eB(t),s=eB(n),l=eB(r),u=(0,ed.useRef)(null),c=(0,ed.useRef)(!1),d=(0,ed.useMemo)(function(){var e=function(e){e$(e),(eH(e)?e.touches.length>0:e.buttons>0)&&o.current?a(eG(o.current,e,u.current)):(n(!1),l())},t=function(){n(!1),l()};function n(n){var r=c.current,i=eW(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(e$(t),(!c.current||eH(t))&&r)){if(eH(t)){c.current=!0;var i=t.changedTouches||[];i.length&&(u.current=i[0].identifier)}r.focus(),a(eG(r,t,u.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},function(e){var t=e.which||e.keyCode;t>=37&&t<=40&&l()},n]},[s,a,l]),h=d[0],p=d[1],f=d[2],g=d[3];return(0,ed.useEffect)(function(){return g},[g]),eh().createElement("div",ez({},i,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:o,onKeyDown:p,onKeyUp:f,tabIndex:0,role:"slider"}))}),eZ=function(e){return e.filter(Boolean).join(" ")},eY=function(e){var t=e.color,n=e.left,r=e.top,i=eZ(["react-colorful__pointer",e.className]);return eh().createElement("div",{className:i,style:{top:100*(void 0===r?.5:r)+"%",left:100*n+"%"}},eh().createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},eX=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},eq=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?eX(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?eX(parseInt(e.substring(6,8),16)/255,2):1}},eK=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:eX(e.h),s:eX(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:eX(i/2),a:eX(r,2)}},eQ=function(e){var t=eK(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},eJ=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:eX(255*[r,s,a,a,l,r][u]),g:eX(255*[l,r,r,s,a,a][u]),b:eX(255*[a,a,l,r,r,s][u]),a:eX(i,2)}},e0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},e1=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?e0(eX(255*i)):"";return"#"+e0(t)+e0(n)+e0(r)+o},e2=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:eX(60*(s<0?s+6:s)),s:eX(o?a/o*100:0),v:eX(o/255*100),a:i}},e5=eh().memo(function(e){var t=e.hue,n=e.onChange,r=e.onChangeEnd,i=eZ(["react-colorful__hue",e.className]);return eh().createElement("div",{className:i},eh().createElement(eU,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:eV(t+360*e.left,0,360)})},onEnd:r,"aria-label":"Hue","aria-valuenow":eX(t),"aria-valuemax":"360","aria-valuemin":"0"},eh().createElement(eY,{className:"react-colorful__hue-pointer",left:t/360,color:eQ({h:t,s:100,v:100,a:1})})))}),e3=eh().memo(function(e){var t=e.hsva,n=e.onChange,r=e.onChangeEnd,i={backgroundColor:eQ({h:t.h,s:100,v:100,a:1})};return eh().createElement("div",{className:"react-colorful__saturation",style:i},eh().createElement(eU,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:eV(t.s+100*e.left,0,100),v:eV(t.v-100*e.top,0,100)})},onEnd:r,"aria-label":"Color","aria-valuetext":"Saturation "+eX(t.s)+"%, Brightness "+eX(t.v)+"%"},eh().createElement(eY,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:eQ(t)})))}),e4=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},e6="u">typeof window?ed.useLayoutEffect:ed.useEffect,e9=new Map,e8=function(e){e6(function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!e9.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',e9.set(t,r);var i=ej||n.nc;i&&r.setAttribute("nonce",i),t.head.appendChild(r)}},[])},e7=function(e){var t,n,r,i,o,a,s,l=e.className,u=e.colorModel,c=e.color,d=void 0===c?u.defaultColor:c,h=e.onChange,p=e.onChangeEnd,f=eF(e,["className","colorModel","color","onChange","onChangeEnd"]),g=(0,ed.useRef)(null);e8(g);var m=(t=eB(h),n=eB(p),i=(r=(0,ed.useState)(function(){return u.toHsva(d)}))[0],o=r[1],a=(0,ed.useRef)({color:d,hsva:i}),s=(0,ed.useRef)(!1),(0,ed.useEffect)(function(){if(!u.equal(d,a.current.color)){var e=u.toHsva(d);a.current={hsva:e,color:d},o(e),s.current=!1}},[d,u]),(0,ed.useEffect)(function(){var e;e4(i,a.current.hsva)||u.equal(e=u.fromHsva(i),a.current.color)||(a.current={hsva:i,color:e},t(e),s.current=!0)},[i,u,t]),[i,(0,ed.useCallback)(function(e){o(function(t){return Object.assign({},t,e)})},[]),(0,ed.useCallback)(function(){s.current&&(s.current=!1,n(a.current.color))},[n])]),v=m[0],y=m[1],x=m[2],b=eZ(["react-colorful",l]);return eh().createElement("div",ez({},f,{ref:g,className:b}),eh().createElement(e3,{hsva:v,onChange:y,onChangeEnd:x}),eh().createElement(e5,{hue:v.h,onChange:y,onChangeEnd:x,className:"react-colorful__last-control"}))},te={defaultColor:"000",toHsva:function(e){return e2(eq(e))},fromHsva:function(e){return e1(eJ({h:e.h,s:e.s,v:e.v,a:1}))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||e4(eq(e),eq(t))}},tt=function(e){return eh().createElement(e7,ez({},e,{colorModel:te}))};let tn=({color:e,onChange:t,onClear:n,palette:r})=>{let[i,o]=(0,ed.useState)(e),a=e=>{o(e),t?.(e)};return(0,ec.jsxs)(eP.A,{spacing:1,children:[(0,ec.jsx)(tt,{color:e,onChange:a,style:{width:"100%"}}),(0,ec.jsx)(eP.A,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:r&&r.map((e,t)=>(0,ec.jsx)(eR.A,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>a(e),children:(0,ec.jsx)(eL,{})},t))}),(0,ec.jsxs)(eP.A,{direction:"row",gap:1,alignItems:"center",children:[(0,ec.jsx)(eE.A,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:i,onChange:e=>{let n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);o(`#${n}`),tr(e.target.value)&&t?.(e.target.value)}}),n&&(0,ec.jsx)(eR.A,{onClick:n,children:(0,ec.jsx)(eN,{})})]})]})},tr=(e,t)=>{let n=/^#?([0-9A-F]{3,8})$/i.exec(e),r=n&&n[1]?n[1].length:0;return 3===r||6===r||!!t&&4===r||!!t&&8===r};var ti=n(91823);function to(e){let{children:t,chartsTheme:n,enablePinning:r=!1,enableSyncGrouping:i=!0}=e,[o,a]=(0,ed.useState)(null),s=(0,ed.useMemo)(()=>({chartsTheme:n,enablePinning:r,lastTooltipPinnedCoords:o,enableSyncGrouping:i,setLastTooltipPinnedCoords:a}),[n,r,i,o,a]);return(0,ec.jsx)(ta.Provider,{value:s,children:t})}let ta=(0,ed.createContext)(void 0);function ts(){let e=(0,ed.useContext)(ta);if(void 0===e)throw Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function tl(){return ts().chartsTheme}let tu=(0,ed.createContext)(void 0);function tc({children:e}){let[t,n]=(0,ed.useState)(new Map),r=(0,ed.useCallback)((e,t,r)=>{n(n=>{let i=new Map(n),o=i.get(e)||{loading:!1};if(void 0!==r){let n=new Map(o.itemStatuses||new Map),a=n.get(r)||{loading:!1};n.set(r,{...a,...t}),i.set(e,{...o,itemStatuses:n})}else i.set(e,{...o,...t});return i})},[]),i=(0,ed.useCallback)(e=>{n(t=>{if(void 0===e)return new Map;if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),o=(0,ed.useMemo)(()=>({actionStatuses:t,setActionStatus:r,clearActionStatus:i}),[t,r,i]);return(0,ec.jsx)(tu.Provider,{value:o,children:e})}let td=()=>{},th={actionStatuses:new Map,setActionStatus:td,clearActionStatus:td,hasContext:!1};function tp(){let e=(0,ed.useContext)(tu);return(0,ed.useMemo)(()=>e?{...e,hasContext:!0}:th,[e])}let tf=(0,ed.createContext)(void 0),tg=(e,t)=>t;function tm({children:e}){let[t,n]=(0,ed.useState)(new Map),r=(0,ed.useRef)(tg),i=(0,ed.useCallback)(e=>{r.current=e},[]),o=(0,ed.useCallback)(e=>{let t=new Map;e.forEach(({item:e,id:n})=>t.set(n,e)),n(t)},[]),a=(0,ed.useCallback)((e,t)=>{n(n=>{let r=new Map(n);return r.has(t)?r.delete(t):r.set(t,e),r})},[]),s=(0,ed.useCallback)(e=>{n(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),l=(0,ed.useCallback)(()=>n(new Map),[]),u=(0,ed.useCallback)((e,n)=>t.has(r.current(e,n)),[t]),c=(0,ed.useMemo)(()=>({selectionMap:t,setSelection:o,toggleSelection:a,removeFromSelection:s,clearSelection:l,isSelected:u,registerGetId:i}),[t,o,a,s,l,u,i]);return(0,ec.jsx)(tf.Provider,{value:c,children:e})}let tv=()=>{},ty={selectionMap:new Map,setSelection:tv,toggleSelection:tv,removeFromSelection:tv,clearSelection:tv,isSelected:()=>!1,hasContext:!1};function tx(e){let t=(0,ed.useContext)(tf);return(0,ed.useEffect)(()=>{t&&e?.getId&&t.registerGetId(e.getId)},[t,e?.getId]),(0,ed.useMemo)(()=>{if(!t)return ty;let{registerGetId:e,...n}=t;return{...n,hasContext:!0}},[t])}var tb=n(20231),tw=n.n(tb);let t_=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(r&&(r+=" "),r+=t);return r},tS={data:""},tC=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,tM=/\/\*[^]*?\*\/| +/g,tA=/\n+/g,tT=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?tT(a,o):o+"{"+tT(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=tT(a,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o="-"==o[1]?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=tT.p?tT.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},tI={},tk=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+tk(e[n]);return t}return e};function tD(e){let t,n,r=this||{},i=e.call?e(r.p):e;return((e,t,n,r,i)=>{var o;let a=tk(e),s=tI[a]||(tI[a]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(a));if(!tI[s]){let t=a!==e?e:(e=>{let t,n,r=[{}];for(;t=tC.exec(e.replace(tM,""));)t[4]?r.shift():t[3]?(n=t[3].replace(tA," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(tA," ").trim();return r[0]})(e);tI[s]=tT(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}let l=n&&tI.g;return n&&(tI.g=tI[s]),o=tI[s],l?t.data=t.data.replace(l,o):-1===t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s})(i.unshift?i.raw?(t=[].slice.call(arguments,1),n=r.p,i.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":tT(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"")):i.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):i,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||tS})(r.target),r.g,r.o,r.k)}function tO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tP(e,t,n){return t&&tO(e.prototype,t),n&&tO(e,n),e}function tR(){return(tR=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function tL(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function tN(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}tD.bind({g:1}),tD.bind({k:1});var tz=function(){return""},tF=eh().createContext({enqueueSnackbar:tz,closeSnackbar:tz}),tB="@media (max-width:599.95px)",tj="@media (min-width:600px)",tV=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},tH=function(e){return""+tV(e.vertical)+tV(e.horizontal)},tW=function(e){return!!e||0===e},tG="unmounted",t$="exited",tU="entering",tZ="entered",tY="exiting",tX=function(e){function t(t){var n,r=e.call(this,t)||this,i=t.appear;return r.appearStatus=null,t.in?i?(n=t$,r.appearStatus=tU):n=tZ:n=t.unmountOnExit||t.mountOnEnter?tG:t$,r.state={status:n},r.nextCallback=null,r}tE(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===tG?{status:t$}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==tU&&n!==tZ&&(t=tU):(n===tU||n===tZ)&&(t=tY)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===tU?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===t$&&this.setState({status:tG})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,e),this.safeSetState({status:tU},function(){t.props.onEntering&&t.props.onEntering(t.node,e),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:tZ},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})})})):this.safeSetState({status:tZ},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:tY},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:t$},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:t$},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;!this.node||n?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e))},n.render=function(){var e=this.state.status;if(e===tG)return null;var t=this.props;return(0,t.children)(e,tL(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},tP(t,[{key:"node",get:function(){var e,t=null==(e=this.props.nodeRef)?void 0:e.current;if(!t)throw Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(eh().Component);function tq(){}function tK(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function tQ(e,t){return(0,ed.useMemo)(function(){return null==e&&null==t?null:function(n){tK(e,n),tK(t,n)}},[e,t])}function tJ(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}tX.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:tq,onEntering:tq,onEntered:tq,onExit:tq,onExiting:tq,onExited:tq};var t0=function(e){e.scrollTop=e.scrollTop},t1=function(e){return Math.round(e)+"ms"};function t2(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,o=n.easing,a=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map(function(e){return e+" "+("string"==typeof i?i:t1(i))+" "+a+" "+("string"==typeof l?l:t1(l))}).join(",")}function t5(e){return(e&&e.ownerDocument||document).defaultView||window}function t3(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=t5(t);if(t.fakeTransform)n=t.fakeTransform;else{var o=i.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(i.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var t4=(0,ed.forwardRef)(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,o=e.in,a=e.style,s=e.timeout,l=void 0===s?0:s,u=e.onEnter,c=e.onEntered,d=e.onExit,h=e.onExited,p=tL(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),f=(0,ed.useRef)(null),g=tQ(n.ref,f),m=tQ(g,t),v=(0,ed.useCallback)(function(){f.current&&t3(i,f.current)},[i]);return(0,ed.useEffect)(function(){if(!o&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){f.current&&t3(i,f.current)}),t=t5(f.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,o]),(0,ed.useEffect)(function(){o||v()},[o,v]),(0,ed.createElement)(tX,Object.assign({appear:!0,nodeRef:f,onEnter:function(e,t){t3(i,e),t0(e),u&&u(e,t)},onEntered:c,onEntering:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||"cubic-bezier(0.0, 0, 0.2, 1)",n=tJ({timeout:l,mode:"enter",style:tR({},a,{transitionTimingFunction:t})});e.style.webkitTransition=t2("-webkit-transform",n),e.style.transition=t2("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||"cubic-bezier(0.4, 0, 0.6, 1)",n=tJ({timeout:l,mode:"exit",style:tR({},a,{transitionTimingFunction:t})});e.style.webkitTransition=t2("-webkit-transform",n),e.style.transition=t2("transform",n),t3(i,e),d&&d(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",h&&h(e)},in:o,timeout:l},p),function(e,t){return(0,ed.cloneElement)(n,tR({ref:m,style:tR({visibility:"exited"!==e||o?void 0:"hidden"},a,{},n.props.style)},t))})});t4.displayName="Slide";var t6=function(e){return eh().createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},t9={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:eh().createElement(function(){return eh().createElement(t6,null,eh().createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},null),warning:eh().createElement(function(){return eh().createElement(t6,null,eh().createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:eh().createElement(function(){return eh().createElement(t6,null,eh().createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},null),info:eh().createElement(function(){return eh().createElement(t6,null,eh().createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:t4,transitionDuration:{enter:225,exit:195}},t8=function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:t9.autoHideDuration},t7=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?tR({},t9.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?tR({},t9.transitionDuration,{},t):t9.transitionDuration};function ne(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return tR({},e,((n={})[r]=tD(i),n))},{})}var nt="notistack-CollapseWrapper",nn=ne({root:{height:0},entered:{height:"auto"}}),nr=(0,ed.forwardRef)(function(e,t){var n=e.children,r=e.in,i=e.onExited,o=(0,ed.useRef)(null),a=(0,ed.useRef)(null),s=tQ(t,a),l=function(){return o.current?o.current.clientHeight:0};return(0,ed.createElement)(tX,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height="0px"},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=l(),n=tJ({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=l()+"px"},onExited:i,onExiting:function(e){t0(e);var t=tJ({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height="0px",e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return(0,ed.createElement)("div",Object.assign({ref:s,className:t_(nn.root,"entered"===e&&nn.entered),style:tR({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:t2("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),(0,ed.createElement)("div",{ref:o,className:nt,style:{display:"flex",width:"100%"}},n))})});nr.displayName="Collapse";var ni={right:"left",left:"right",bottom:"up",top:"down"},no=function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return tR({},t,((r={})[n]=e[n],r))},{})},na=function(){};function ns(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=[].concat(i);t&&-1===a.indexOf(t)&&a.push(t),e.apply(this,a),n.apply(this,a)}},na)}var nl="u">typeof window?ed.useLayoutEffect:ed.useEffect;function nu(e){var t=(0,ed.useRef)(e);return nl(function(){t.current=e}),(0,ed.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var nc=(0,ed.forwardRef)(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,o=e.disableWindowBlurListener,a=void 0!==o&&o,s=e.onClose,l=e.id,u=e.open,c=e.SnackbarProps,d=void 0===c?{}:c,h=(0,ed.useRef)(),p=nu(function(){s&&s.apply(void 0,arguments)}),f=nu(function(e){s&&null!=e&&(h.current&&clearTimeout(h.current),h.current=setTimeout(function(){p(null,"timeout",l)},e))});(0,ed.useEffect)(function(){return u&&f(i),function(){h.current&&clearTimeout(h.current)}},[u,i,f]);var g=function(){h.current&&clearTimeout(h.current)},m=(0,ed.useCallback)(function(){null!=i&&f(.5*i)},[i,f]);return(0,ed.useEffect)(function(){if(!a&&u)return window.addEventListener("focus",m),window.addEventListener("blur",g),function(){window.removeEventListener("focus",m),window.removeEventListener("blur",g)}},[a,m,u]),(0,ed.createElement)("div",Object.assign({ref:t},d,{className:t_("notistack-Snackbar",r),onMouseEnter:function(e){d.onMouseEnter&&d.onMouseEnter(e),g()},onMouseLeave:function(e){d.onMouseLeave&&d.onMouseLeave(e),m()}}),n)});nc.displayName="Snackbar";var nd=ne({root:((aR={display:"flex",flexWrap:"wrap",flexGrow:1})[tj]={flexGrow:"initial",minWidth:"288px"},aR)}),nh=(0,ed.forwardRef)(function(e,t){var n=e.className,r=tL(e,["className"]);return eh().createElement("div",Object.assign({ref:t,className:t_(nd.root,n)},r))});nh.displayName="SnackbarContent";var np=ne({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),nf="notistack-snackbar",ng=(0,ed.forwardRef)(function(e,t){var n=e.id,r=e.message,i=e.action,o=e.iconVariant,a=e.variant,s=e.hideIconVariant,l=e.style,u=e.className,c=o[a],d=i;return"function"==typeof d&&(d=d(n)),eh().createElement(nh,{ref:t,role:"alert","aria-describedby":nf,style:l,className:t_("notistack-MuiContent","notistack-MuiContent-"+a,np.root,np[a],u,!s&&c&&np.lessPadding)},eh().createElement("div",{id:nf,className:np.message},s?null:c,r),d&&eh().createElement("div",{className:np.action},d))});ng.displayName="MaterialDesignContent";var nm=(0,ed.memo)(ng),nv=ne({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),ny=function(e){var t,n=(0,ed.useRef)(),r=(0,ed.useState)(!0),i=r[0],o=r[1],a=ns([e.snack.onClose,e.onClose]),s=(0,ed.useCallback)(function(){n.current=setTimeout(function(){o(function(e){return!e})},125)},[]);(0,ed.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var l=e.snack,u=e.classes,c=e.Component,d=(0,ed.useMemo)(function(){return no(u)},[u]),h=l.open,p=l.SnackbarProps,f=l.TransitionComponent,g=l.TransitionProps,m=l.transitionDuration,v=l.disableWindowBlurListener,y=l.content,x=tL(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),b=tR({direction:"center"!==(t=x.anchorOrigin).horizontal?ni[t.horizontal]:ni[t.vertical],timeout:m},g),w=y;"function"==typeof w&&(w=w(x.id,x.message));var _=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return tR({},t,((r={})[n]=ns([e.snack[n],e[n]],x.id),r))},{});return eh().createElement(nr,{in:i,onExited:_.onExited},eh().createElement(nc,{open:h,id:x.id,disableWindowBlurListener:v,autoHideDuration:x.autoHideDuration,className:t_(nv.wrappedRoot,d.root,d["anchorOrigin"+tH(x.anchorOrigin)]),SnackbarProps:p,onClose:a},eh().createElement(f,Object.assign({},b,{appear:!0,in:h,onExit:_.onExit,onExited:s,onEnter:_.onEnter,onEntered:ns([_.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],x.id)}),w||eh().createElement(void 0===c?nm:c,Object.assign({},x)))))},nx=20,nb=6,nw=2,n_="."+nt,nS=ne({root:((aE={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:t2(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"})[n_]={padding:nb+"px 0px",transition:"padding 300ms ease 0ms"},aE.maxWidth="calc(100% - "+2*nx+"px)",aE[tB]={width:"100%",maxWidth:"calc(100% - 32px)"},aE),rootDense:((aL={})[n_]={padding:nw+"px 0px"},aL),top:{top:nx-nb+"px",flexDirection:"column"},bottom:{bottom:nx-nb+"px",flexDirection:"column-reverse"},left:((aN={left:nx+"px"})[tj]={alignItems:"flex-start"},aN[tB]={left:"16px"},aN),right:((az={right:nx+"px"})[tj]={alignItems:"flex-end"},az[tB]={right:"16px"},az),center:((aF={left:"50%",transform:"translateX(-50%)"})[tj]={alignItems:"center"},aF)}),nC=(0,ed.memo)(function(e){var t=e.classes,n=void 0===t?{}:t,r=e.anchorOrigin,i=e.dense,o=e.children,a=t_("notistack-SnackbarContainer",nS[r.vertical],nS[r.horizontal],nS.root,n.containerRoot,n["containerAnchorOrigin"+tH(r)],i&&nS.rootDense);return eh().createElement("div",{className:a},o)}),nM=function(e){return!("string"==typeof e||(0,ed.isValidElement)(e))},nA=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw Error("enqueueSnackbar called with invalid argument");var r,i=nM(e)?e:t,o=nM(e)?e.message:e,a=i.key,s=i.preventDuplicate,l=tL(i,["key","preventDuplicate"]),u=tW(a),c=u?a:new Date().getTime()+Math.random(),d=(r=n.props,function(e,t){return(void 0===t&&(t=!1),t)?tR({},t9[e],{},r[e],{},l[e]):"autoHideDuration"===e?t8(l.autoHideDuration,r.autoHideDuration):"transitionDuration"===e?t7(l.transitionDuration,r.transitionDuration):l[e]||r[e]||t9[e]}),h=tR({id:c},l,{message:o,open:!0,entered:!1,requestClose:!1,persist:d("persist"),action:d("action"),content:d("content"),variant:d("variant"),anchorOrigin:d("anchorOrigin"),disableWindowBlurListener:d("disableWindowBlurListener"),autoHideDuration:d("autoHideDuration"),hideIconVariant:d("hideIconVariant"),TransitionComponent:d("TransitionComponent"),transitionDuration:d("transitionDuration"),TransitionProps:d("TransitionProps",!0),iconVariant:d("iconVariant",!0),style:d("style",!0),SnackbarProps:d("SnackbarProps",!0),className:t_(n.props.className,l.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===s&&n.props.preventDuplicate||s){var t=function(e){return u?e.id===c:e.message===o},r=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(tR({},e,{queue:[].concat(e.queue,[h])}))}),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?tR({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?tR({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),tR({},e,{open:!1})):tR({},e,{requestClose:!0})});return tR({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!tW(r))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?tR({},e,{entered:!0}):tR({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?tR({},e,{open:!1}):tR({},e,{requestClose:!0}):tR({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});tW(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!tW(t))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(tR({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(tN(n)),closeSnackbar:n.closeSnackbar.bind(tN(n))}},n}return tE(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,i=n.children,o=n.dense,a=void 0!==o&&o,s=n.Components,l=void 0===s?{}:s,u=n.classes,c=this.state.snacks.reduce(function(e,t){var n,r=tH(t.anchorOrigin),i=e[r]||[];return tR({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(c).map(function(t){var n=c[t],r=n[0];return eh().createElement(nC,{key:t,dense:a,anchorOrigin:r.anchorOrigin,classes:u},n.map(function(t){return eh().createElement(ny,{key:t.id,snack:t,classes:u,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:ns([e.handleExitedSnack,e.props.onExited],t.id),onEntered:ns([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return eh().createElement(tF.Provider,{value:t},i,r?(0,tb.createPortal)(d,r):d)},tP(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||t9.maxSnack}}]),t}(ed.Component);function nT({children:e,...t}){return(0,ec.jsx)(nA,{...t,Components:{error:(0,ey.A)(nm)(()=>({"&.notistack-MuiContent-error":{whiteSpace:"pre-wrap"}}))},children:e})}function nI(){let{enqueueSnackbar:e,closeSnackbar:t}=(0,ed.useContext)(tF),n=nk(e,"error"),r=nk(e,"info"),i=nk(e,"warning"),o=nk(e,"success"),a=(0,ed.useCallback)((e,t)=>n(e instanceof Error?e.message:`An unexpected error occurred: ${e}`,t),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:r,warningSnackbar:i,successSnackbar:o,exceptionSnackbar:a}}function nk(e,t){return(0,ed.useCallback)((n,r)=>e(n,{...r,variant:t}),[e,t])}var nD=n(25632);let nO="Pinned Crosshair",nP={name:nO,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};var nR=n(85722),nE=n(94461);function nL(e){return{value:{pastDuration:e},display:`Last ${(0,nE.formatDuration)((0,nR.pW)(e),{delimiter:", "})}`}}function nN(){return["local","UTC",...Intl.supportedValuesOf?.("timeZone")??[]].filter((e,t,n)=>n.indexOf(e)===t).map(e=>({value:e,display:"local"===e?"Local":e.replace(/_/g," ")}))}function nz(e,t){return"read"===e?"View":t&&"create"===e?"Add":t||"create"!==e?"update"===e?"Edit":"":"Create"}function nF(e,t){return t&&"create"===e?"Add":t&&"update"===e?"Apply":t?"":"Save"}let nB=["bottom","right"],nj=["list","table"],nV=["small","medium"];function nH(e){return nB.includes(e)}function nW(e){return nj.includes(e)}function nG(e){return nV.includes(e)}let n$={position:"bottom",mode:"list",size:"medium"};function nU(e){return void 0===e?n$.position:nH(e)?e:n$.position}function nZ(e){return e&&nW(e)?e:n$.mode}function nY(e){return e&&nG(e)?e:n$.size}let nX=new Map([["time",new Map],["decimal",new Map],["bits",new Map],["bytes",new Map],["currency",new Map],["percent",new Map],["temperature",new Map],["throughput",new Map]]);function nq(e,t,n,r="en-US"){let i=`${e.filter(e=>![void 0,null,"",NaN].includes(e)).join("|")}|${r}`,o=nX.get(t);if(!o)throw Error("No formatter found for the input type");let a=o.get(i);if(a)return a.format;let s=Intl.NumberFormat(r,n);return o?.set(`${i}`,s),s.format}let nK=()=>({countCacheItems:e=>"all"!==e?nX.get(e)?.size??0:Array.from(nX.values()).reduce((e,t)=>e+(t?.size??0),0),getKeys:e=>[...nX.get(e)?.keys()||[]]});function nQ(e){return!1!==e}function nJ(e){return"number"==typeof e}function n0(e){return e&&(e<0?e=0:e>20&&(e=20)),e}let n1="Time",n2={label:"Time",decimalPlaces:!0},n5={nanoseconds:{group:n1,label:"Nanoseconds"},microseconds:{group:n1,label:"Microseconds"},milliseconds:{group:n1,label:"Milliseconds"},seconds:{group:n1,label:"Seconds"},minutes:{group:n1,label:"Minutes"},hours:{group:n1,label:"Hours"},days:{group:n1,label:"Days"},weeks:{group:n1,label:"Weeks"},months:{group:n1,label:"Months"},years:{group:n1,label:"Years"}};var n3=((aO={}).nanoseconds="nanosecond",aO.microseconds="microsecond",aO.milliseconds="millisecond",aO.seconds="second",aO.minutes="minute",aO.hours="hour",aO.days="day",aO.weeks="week",aO.months="month",aO.years="year",aO);let n4={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001,microseconds:1e-6,nanoseconds:1e-9},n6=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"];function n9(e,{unit:t,decimalPlaces:n}){var r;if(0===e)return"0s";let i=function(e,t){let n=e*n4[t],r=n6[0]||"years",i=r,o=n/n4[r];for(i of n6)if((o=n/n4[i])>=1)break;return{value:o,unit:i}}(e,t??"seconds"),o={style:"unit",unit:n3[i.unit],unitDisplay:"months"===(r=i.unit)||"years"===r?"long":"narrow"};return nJ(n)?(o.minimumFractionDigits=n0(n),o.maximumFractionDigits=n0(n)):o.maximumSignificantDigits=3,nq([o.style,o.unit,o.unitDisplay,o.maximumSignificantDigits,n,t??"seconds"],"time",o,"en-US")(i.value)}var n8="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==n.g?n.g:"u">typeof self?self:{};function n7(){if(aH)return aV;aH=1;let e=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return aV={unformat:function(n,r){let i,o=rn(),a=o.currentDelimiters(),s=o.currentCurrency().symbol,l=o.currentOrdinal(),u=o.getZeroFormat(),c=o.currentAbbreviations();if("string"==typeof n)if(function(e,t){if(!(e.indexOf(":")&&":"!==t.thousands))return!1;let n=e.split(":");if(3!==n.length)return!1;let r=+n[0],i=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(o)}(n,a)){let e,t,r;t=+(e=n.split(":"))[0],r=+e[1],i=+e[2]+60*r+3600*t}else i=function(n,r,i="",o,a,s){if(""!==n)return n===a?0:function n(r,i,o,a,s,l,u){if(!isNaN(+r))return+r;let c="",d=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==r)return -1*n(d,i,o,a,s,l);for(let t=0;t<e.length;t++){let u=e[t];if((c=r.replace(RegExp(`([0-9 ])(${u.key})$`),"$1"))!==r)return n(c,i,o,a,s,l)*u.factor}if((c=r.replace("%",""))!==r)return n(c,i,o,a,s,l)/100;let h=parseFloat(r);if(isNaN(h))return;let p=a(h);if(p&&"."!==p&&(c=r.replace(RegExp(`${t(p)}$`),""))!==r)return n(c,i,o,a,s,l);let f={};Object.keys(l).forEach(e=>{f[l[e]]=e});let g=Object.keys(f).sort().reverse(),m=g.length;for(let e=0;e<m;e++){let t=g[e],u=f[t];if((c=r.replace(t,""))!==r){let e;switch(u){case"thousand":e=1e3;break;case"million":e=1e6;break;case"billion":e=1e9;break;case"trillion":e=1e12}return n(c,i,o,a,s,l)*e}}}(n.replace(i,"").replace(RegExp(`([0-9])${t(r.thousands)}([0-9])`,"g"),"$1$2").replace(r.decimal,"."),r,i,o,a,s)}(n,a,s,l,u,c);else{if("number"!=typeof n)return;i=n}if(void 0!==i)return i}}}function re(){if(aG)return aW;aG=1;let e=n7(),t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},r={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(t){return void 0!==e.unformat(t)}function o(e,t,r,i=!1){let a=Object.keys(e).map(i=>{if(!t[i])return console.error(`${r} Invalid key: ${i}`),!1;let a=e[i],s=t[i];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!o(a,n,`[Validate ${i}]`,!0))return!1}else if(typeof a!==s.type)return console.error(`${r} ${i} type mismatched: "${s.type}" expected, "${typeof a}" provided`),!1;if(s.restrictions&&s.restrictions.length){let t=s.restrictions.length;for(let n=0;n<t;n++){let{restriction:t,message:o}=s.restrictions[n];if(!t(a,e))return console.error(`${r} ${i} invalid value: ${o}`),!1}}return s.restriction&&!s.restriction(a,e)?(console.error(`${r} ${i} invalid value: ${s.message}`),!1):s.validValues&&-1===s.validValues.indexOf(a)?(console.error(`${r} ${i} invalid value: must be among ${JSON.stringify(s.validValues)}, "${a}" provided`),!1):(!s.children||!!o(a,s.children,`[Validate ${i}]`))&&!0});return i||a.push(...Object.keys(t).map(n=>{let i=t[n];if("string"==typeof i&&(i={type:i}),i.mandatory){let t=i.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0})),a.reduce((e,t)=>e&&t,!0)}function a(e){return o(e,n,"[Validate format]")}return aW={validate:function(e,t){let n=i(e),r=a(t);return n&&r},validateFormat:a,validateInput:i,validateLanguage:function(e){return o(e,r,"[Validate language]")}}}var rt=function(e,t={}){var n,r,i,o,a,s;let l,u,c,d,h;if("string"!=typeof e)return e;r=e=(l=(n=e).match(/^{([^}]*)}/))?(t.prefix=l[1],n.slice(l[0].length)):n,function(e,t){if(-1!==e.indexOf("$")){t.output="currency";return}if(-1!==e.indexOf("%")){t.output="percent";return}if(-1!==e.indexOf("bd")){t.output="byte",t.base="general";return}if(-1!==e.indexOf("b")){t.output="byte",t.base="binary";return}if(-1!==e.indexOf("d")){t.output="byte",t.base="decimal";return}if(-1!==e.indexOf(":")){t.output="time";return}-1!==e.indexOf("o")&&(t.output="ordinal")}(e=(u=r.match(/{([^}]*)}$/))?(t.postfix=u[1],r.slice(0,-u[0].length)):r,t),(c=e.match(/[1-9]+[0-9]*/))&&(t.totalLength=+c[0]),(d=e.split(".")[0].match(/0+/))&&(t.characteristic=d[0].length),-1!==(i=e).indexOf(".")&&(t.optionalCharacteristic=-1===i.split(".")[0].indexOf("0")),-1!==e.indexOf("a")&&(t.average=!0),-1!==(o=e).indexOf("K")?t.forceAverage="thousand":-1!==o.indexOf("M")?t.forceAverage="million":-1!==o.indexOf("B")?t.forceAverage="billion":-1!==o.indexOf("T")&&(t.forceAverage="trillion");let p=e.split(".")[1];if(p){let e=p.match(/0+/);e&&(t.mantissa=e[0].length)}return(a=e).match(/\[\.]/)?t.optionalMantissa=!0:a.match(/\./)&&(t.optionalMantissa=!1),(h=e.split(".")[1])&&(t.trimMantissa=-1!==h.indexOf("[")),-1!==e.indexOf(",")&&(t.thousandSeparated=!0),-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0)),(s=e).match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),s.match(/^\+?-/)&&(t.negative="sign"),e.match(/^\+/)&&(t.forceSign=!0),t};function rn(){let e;if(aU)return a$;aU=1;let t=aj?aB:(aj=1,aB={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),n=re(),r={},i={},o=null,a={};function s(){return i[e]}return r.languages=()=>Object.assign({},i),r.currentLanguage=()=>e,r.currentBytes=()=>s().bytes||{},r.currentCurrency=()=>s().currency,r.currentAbbreviations=()=>s().abbreviations,r.currentDelimiters=()=>s().delimiters,r.currentOrdinal=()=>s().ordinal,r.currentDefaults=()=>Object.assign({},s().defaults,a),r.currentOrdinalDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().ordinalFormat),r.currentByteDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().byteFormat),r.currentPercentageDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().percentageFormat),r.currentCurrencyDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().currencyFormat),r.currentTimeDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().timeFormat),r.setDefaults=e=>{e=rt(e),n.validateFormat(e)&&(a=e)},r.getZeroFormat=()=>o,r.setZeroFormat=e=>o="string"==typeof e?e:null,r.hasZeroFormat=()=>null!==o,r.languageData=e=>{if(e){if(i[e])return i[e];throw Error(`Unknown tag "${e}"`)}return s()},r.registerLanguage=(t,r=!1)=>{if(!n.validateLanguage(t))throw Error("Invalid language data");i[t.languageTag]=t,r&&(e=t.languageTag)},r.setLanguage=(n,r=t.languageTag)=>{if(!i[n]){let t=n.split("-")[0],o=Object.keys(i).find(e=>e.split("-")[0]===t);return i[o]?void(e=o):void(e=r)}e=n},r.registerLanguage(t),e=t.languageTag,a$=r}var rr={exports:{}};(function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,i=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",s=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function l(e){var t=0|e;return e>0||e===t?t:t-1}function u(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(n=14-(t=e[r++]+"").length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var n,r,i=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=l==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(a=0,s=(l=i.length)<(u=o.length)?l:u;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function d(e,t,n,r){if(e<t||e>n||e!==i(e))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function h(e){var t=e.c.length-1;return l(e.e/14)==t&&e.c[t]%2!=0}function p(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function f(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(t=function e(t){var g,m,v,y,x,b,w,_,S,C=F.prototype={constructor:F,toString:null,valueOf:null},M=new F(1),A=20,T=4,I=-7,k=21,D=-1e7,O=1e7,P=!1,R=1,E=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",z=!0;function F(e,t){var r,o,s,l,u,c,h,p,f=this;if(!(f instanceof F))return new F(e,t);if(null==t){if(e&&!0===e._isBigNumber){f.s=e.s,!e.c||e.e>O?f.c=f.e=null:e.e<D?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice());return}if((c="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,u=e;u>=10;u/=10,l++);l>O?f.c=f.e=null:(f.e=l,f.c=[e]);return}p=String(e)}else{if(!n.test(p=String(e)))return S(f,p,c);f.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(u=p.search(/e/i))>0?(l<0&&(l=u),l+=+p.slice(u+1),p=p.substring(0,u)):l<0&&(l=p.length)}else{if(d(t,2,N.length,"Base"),10==t&&z)return H(f=new F(e),A+f.e+1,T);if(p=String(e),c="number"==typeof e){if(0*e!=0)return S(f,p,c,t);if(f.s=1/e<0?(p=p.slice(1),-1):1,F.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else f.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=N.slice(0,t),l=u=0,h=p.length;u<h;u++)if(0>r.indexOf(o=p.charAt(u))){if("."==o){if(u>l){l=h;continue}}else if(!s&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){s=!0,u=-1,l=0;continue}return S(f,String(e),c,t)}c=!1,(l=(p=_(p,t,10,f.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(u=0;48===p.charCodeAt(u);u++);for(h=p.length;48===p.charCodeAt(--h););if(p=p.slice(u,++h)){if(h-=u,c&&F.DEBUG&&h>15&&(e>0x1fffffffffffff||e!==i(e)))throw Error(a+f.s*e);if((l=l-u-1)>O)f.c=f.e=null;else if(l<D)f.c=[f.e=0];else{if(f.e=l,f.c=[],u=(l+1)%14,l<0&&(u+=14),u<h){for(u&&f.c.push(+p.slice(0,u)),h-=14;u<h;)f.c.push(+p.slice(u,u+=14));u=14-(p=p.slice(u)).length}else u-=h;for(;u--;p+="0");f.c.push(+p)}}else f.c=[f.e=0]}function B(e,t,n,r){var i,o,a,s,l;if(null==n?n=T:d(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)l=u(e.c),l=1==r||2==r&&(a<=I||a>=k)?p(l,a):f(l,a,"0");else if(o=(e=H(new F(e),t,n)).e,s=(l=u(e.c)).length,1==r||2==r&&(t<=o||o<=I)){for(;s<t;l+="0",s++);l=p(l,o)}else if(t-=a,l=f(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function j(e,t){for(var n,r,i=1,o=new F(e[0]);i<e.length;i++)(r=new F(e[i])).s&&(n=c(o,r))!==t&&(0!==n||o.s!==t)||(o=r);return o}function V(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+14*n-1)>O?e.c=e.e=null:n<D?e.c=[e.e=0]:(e.e=n,e.c=t),e}function H(e,t,n,o){var a,l,u,c,d,h,p,f=e.c;if(f){e:{for(a=1,c=f[0];c>=10;c/=10,a++);if((l=t-a)<0)l+=14,u=t,p=i((d=f[h=0])/s[a-u-1]%10);else if((h=r((l+1)/14))>=f.length)if(o){for(;f.length<=h;f.push(0));d=p=0,a=1,l%=14,u=l-14+1}else break e;else{for(a=1,d=c=f[h];c>=10;c/=10,a++);l%=14,p=(u=l-14+a)<0?0:i(d/s[a-u-1]%10)}if(o=o||t<0||null!=f[h+1]||(u<0?d:d%s[a-u-1]),o=n<4?(p||o)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||o||6==n&&(l>0?u>0?d/s[a-u]:0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,o?(t-=e.e+1,f[0]=s[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==l?(f.length=h,c=1,h--):(f.length=h+1,c=s[14-l],f[h]=u>0?i(d/s[a-u]%s[u])*c:0),o)for(;;)if(0==h){for(l=1,u=f[0];u>=10;u/=10,l++);for(u=f[0]+=c,c=1;u>=10;u/=10,c++);l!=c&&(e.e++,1e14==f[0]&&(f[0]=1));break}else{if(f[h]+=c,1e14!=f[h])break;f[h--]=0,c=1}for(l=f.length;0===f[--l];f.pop());}e.e>O?e.c=e.e=null:e.e<D&&(e.c=[e.e=0])}return e}function W(e){var t,n=e.e;return null===n?e.toString():(t=u(e.c),t=n<=I||n>=k?p(t,n):f(t,n,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,n;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(d(n=e[t],0,1e9,t),A=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(d(n=e[t],0,8,t),T=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(d(n[0],-1e9,0,t),d(n[1],0,1e9,t),I=n[0],k=n[1]):(d(n,-1e9,1e9,t),I=-(k=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)d(n[0],-1e9,-1,t),d(n[1],1,1e9,t),D=n[0],O=n[1];else if(d(n,-1e9,1e9,t),n)D=-(O=n<0?-n:n);else throw Error(o+t+" cannot be zero: "+n);if(e.hasOwnProperty(t="CRYPTO"))if(!!(n=e[t])===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))P=n;else throw P=!n,Error(o+"crypto unavailable");else P=n;else throw Error(o+t+" not true or false: "+n);if(e.hasOwnProperty(t="MODULO_MODE")&&(d(n=e[t],0,9,t),R=n),e.hasOwnProperty(t="POW_PRECISION")&&(d(n=e[t],0,1e9,t),E=n),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(n=e[t]))L=n;else throw Error(o+t+" not an object: "+n);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);z="0123456789"==n.slice(0,10),N=n}}else throw Error(o+"Object expected: "+e);return{DECIMAL_PLACES:A,ROUNDING_MODE:T,EXPONENTIAL_AT:[I,k],RANGE:[D,O],CRYPTO:P,MODULO_MODE:R,POW_PRECISION:E,FORMAT:L,ALPHABET:N}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,n,r=e.c,a=e.e,s=e.s;e:if("[object Array]"==({}).toString.call(r)){if((1===s||-1===s)&&a>=-1e9&&a<=1e9&&a===i(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=1e14||n!==i(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===s||1===s||-1===s))return!0;throw Error(o+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return j(arguments,-1)},F.minimum=F.min=function(){return j(arguments,1)},g=0x20000000000000*Math.random()&2097151?function(){return i(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},F.random=function(e){var t,n,a,l,u,c=0,h=[],p=new F(M);if(null==e?e=A:d(e,0,1e9),l=r(e/14),P)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(l*=2));c<l;)(u=131072*t[c]+(t[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(h.push(u%1e14),c+=2);c=l/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(l*=7);c<l;)(u=(31&t[c])*0x1000000000000+0x10000000000*t[c+1]+0x100000000*t[c+2]+0x1000000*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(h.push(u%1e14),c+=7);c=l/7}else throw P=!1,Error(o+"crypto unavailable");if(!P)for(;c<l;)(u=g())<9e15&&(h[c++]=u%1e14);for(l=h[--c],e%=14,l&&e&&(u=s[14-e],h[c]=i(l/u)*u);0===h[c];h.pop(),c--);if(c<0)h=[a=0];else{for(a=-1;0===h[0];h.splice(0,1),a-=14);for(c=1,u=h[0];u>=10;u/=10,c++);c<14&&(a-=14-c)}return p.e=a,p.c=h,p},F.sum=function(){for(var e=1,t=arguments,n=new F(t[0]);e<t.length;)n=n.plus(t[e++]);return n},_=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(n,r,i,o,a){var s,l,c,d,h,p,g,m,v=n.indexOf("."),y=A,x=T;for(v>=0&&(d=E,E=0,n=n.replace(".",""),p=(m=new F(r)).pow(n.length-v),E=d,m.c=t(f(u(p.c),p.e,"0"),10,i,e),m.e=m.c.length),c=d=(g=t(n,r,i,a?(s=N,e):(s=e,N))).length;0==g[--d];g.pop());if(!g[0])return s.charAt(0);if(v<0?--c:(p.c=g,p.e=c,p.s=o,g=(p=w(p,m,y,x,i)).c,h=p.r,c=p.e),v=g[l=c+y+1],d=i/2,h=h||l<0||null!=g[l+1],h=x<4?(null!=v||h)&&(0==x||x==(p.s<0?3:2)):v>d||v==d&&(4==x||h||6==x&&1&g[l-1]||x==(p.s<0?8:7)),l<1||!g[0])n=h?f(s.charAt(1),-y,s.charAt(0)):s.charAt(0);else{if(g.length=l,h)for(--i;++g[--l]>i;)g[l]=0,l||(++c,g=[1].concat(g));for(d=g.length;!g[--d];);for(v=0,n="";v<=d;n+=s.charAt(g[v++]));n=f(n,c,s.charAt(0))}return n}}(),w=function(){function e(e,t,n){var r,i,o,a,s=0,l=e.length,u=t%1e7,c=t/1e7|0;for(e=e.slice();l--;)r=c*(o=e[l]%1e7)+(a=e[l]/1e7|0)*u,s=((i=u*o+r%1e7*1e7+s)/n|0)+(r/1e7|0)+c*a,e[l]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,a,s,u){var c,d,h,p,f,g,m,v,y,x,b,w,_,S,C,M,A,T=r.s==o.s?1:-1,I=r.c,k=o.c;if(!I||!I[0]||!k||!k[0])return new F(!r.s||!o.s||(I?k&&I[0]==k[0]:!k)?NaN:I&&0==I[0]||!k?0*T:T/0);for(y=(v=new F(T)).c=[],T=a+(d=r.e-o.e)+1,u||(u=1e14,d=l(r.e/14)-l(o.e/14),T=T/14|0),h=0;k[h]==(I[h]||0);h++);if(k[h]>(I[h]||0)&&d--,T<0)y.push(1),p=!0;else{for(S=I.length,M=k.length,h=0,T+=2,(f=i(u/(k[0]+1)))>1&&(k=e(k,f,u),I=e(I,f,u),M=k.length,S=I.length),_=M,b=(x=I.slice(0,M)).length;b<M;x[b++]=0);A=[0].concat(A=k.slice()),C=k[0],k[1]>=u/2&&C++;do{if(f=0,(c=t(k,x,M,b))<0){if(w=x[0],M!=b&&(w=w*u+(x[1]||0)),(f=i(w/C))>1)for(f>=u&&(f=u-1),m=(g=e(k,f,u)).length,b=x.length;1==t(g,x,m,b);)f--,n(g,M<m?A:k,m,u),m=g.length,c=1;else 0==f&&(c=f=1),m=(g=k.slice()).length;if(m<b&&(g=[0].concat(g)),n(x,g,b,u),b=x.length,-1==c)for(;1>t(k,x,M,b);)f++,n(x,M<b?A:k,b,u),b=x.length}else 0===c&&(f++,x=[0]);y[h++]=f,x[0]?x[b++]=I[_]||0:(x=[I[_]],b=1)}while((_++<S||null!=x[0])&&T--);p=null!=x[0],y[0]||y.splice(0,1)}if(1e14==u){for(h=1,T=y[0];T>=10;T/=10,h++);H(v,a+(v.e=h+14*d-1)+1,s,p)}else v.e=d,v.r=+p;return v}}(),m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,y=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,b=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,n,r){var i,a=n?t:t.replace(b,"");if(x.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(m,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,a=a.replace(v,"$1").replace(y,"0.$1")),t!=a))return new F(a,i);if(F.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},C.absoluteValue=C.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return c(this,new F(e,t))},C.decimalPlaces=C.dp=function(e,t){var n,r,i;if(null!=e)return d(e,0,1e9),null==t?t=T:d(t,0,8),H(new F(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-l(this.e/14))*14,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},C.dividedBy=C.div=function(e,t){return w(this,new F(e,t),A,T)},C.dividedToIntegerBy=C.idiv=function(e,t){return w(this,new F(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var n,a,s,l,u,c,d,p,f,g=this;if((e=new F(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+W(e));if(null!=t&&(t=new F(t)),c=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return f=new F(Math.pow(+W(g),c?e.s*(2-h(e)):+W(e))),t?f.mod(t):f;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(a=!d&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||c&&g.c[1]>=24e7:g.c[0]<8e13||c&&g.c[0]<=9999975e7)))return l=g.s<0&&h(e)?-0:0,g.e>-1&&(l=1/l),new F(d?1/l:l);E&&(l=r(E/14+2))}for(c?(n=new F(.5),d&&(e.s=1),p=h(e)):p=(s=Math.abs(+W(e)))%2,f=new F(M);;){if(p){if(!(f=f.times(g)).c)break;l?f.c.length>l&&(f.c.length=l):a&&(f=f.mod(t))}if(s){if(0===(s=i(s/2)))break;p=s%2}else if(H(e=e.times(n),e.e+1,1),e.e>14)p=h(e);else{if(0==(s=+W(e)))break;p=s%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):a&&(g=g.mod(t))}return a?f:(d&&(f=M.div(f)),t?f.mod(t):l?H(f,E,T,u):f)},C.integerValue=function(e){var t=new F(this);return null==e?e=T:d(e,0,8),H(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===c(this,new F(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return c(this,new F(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=c(this,new F(e,t)))||0===t},C.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return 0>c(this,new F(e,t))},C.isLessThanOrEqualTo=C.lte=function(e,t){return -1===(t=c(this,new F(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var n,r,i,o,a=this.s;if(t=(e=new F(e,t)).s,!a||!t)return new F(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,u=e.e/14,c=this.c,d=e.c;if(!s||!u){if(!c||!d)return c?(e.s=-t,e):new F(d?this:NaN);if(!c[0]||!d[0])return d[0]?(e.s=-t,e):new F(c[0]?this:3==T?-0:0)}if(s=l(s),u=l(u),c=c.slice(),a=s-u){for((o=a<0)?(a=-a,i=c):(u=s,i=d),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=d.length))?a:t,a=t=0;t<r;t++)if(c[t]!=d[t]){o=c[t]<d[t];break}if(o&&(i=c,c=d,d=i,e.s=-e.s),(t=(r=d.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=1e14-1;r>a;){if(c[--r]<d[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=1e14}c[r]-=d[r]}for(;0==c[0];c.splice(0,1),--u);return c[0]?V(e,c,u):(e.s=3==T?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var n,r;return(e=new F(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==R?(r=e.s,e.s=1,n=w(this,e,0,3),e.s=r,n.s*=r):n=w(this,e,0,R),(e=this.minus(n.times(e))).c[0]||1!=R||(e.s=this.s),e):new F(this):new F(NaN)},C.multipliedBy=C.times=function(e,t){var n,r,i,o,a,s,u,c,d,h,p,f,g,m=this.c,v=(e=new F(e,t)).c;if(!m||!v||!m[0]||!v[0])return this.s&&e.s&&(!m||m[0]||v)&&(!v||v[0]||m)?(e.s*=this.s,m&&v?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(r=l(this.e/14)+l(e.e/14),e.s*=this.s,(u=m.length)<(h=v.length)&&(g=m,m=v,v=g,i=u,u=h,h=i),i=u+h,g=[];i--;g.push(0));for(i=h;--i>=0;){for(n=0,p=v[i]%1e7,f=v[i]/1e7|0,o=i+(a=u);o>i;)s=f*(c=m[--a]%1e7)+(d=m[a]/1e7|0)*p,n=((c=p*c+s%1e7*1e7+g[o]+n)/1e14|0)+(s/1e7|0)+f*d,g[o--]=c%1e14;g[o]=n}return n?++r:g.splice(0,1),V(e,g,r)},C.negated=function(){var e=new F(this);return e.s=-e.s||null,e},C.plus=function(e,t){var n,r=this.s;if(t=(e=new F(e,t)).s,!r||!t)return new F(NaN);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/14,o=e.e/14,a=this.c,s=e.c;if(!i||!o){if(!a||!s)return new F(r/0);if(!a[0]||!s[0])return s[0]?e:new F(a[0]?this:0*r)}if(i=l(i),o=l(o),a=a.slice(),r=i-o){for(r>0?(o=i,n=s):(r=-r,n=a),n.reverse();r--;n.push(0));n.reverse()}for((r=a.length)-(t=s.length)<0&&(n=s,s=a,a=n,t=r),r=0;t;)r=(a[--t]=a[t]+s[t]+r)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return r&&(a=[r].concat(a),++o),V(e,a,o)},C.precision=C.sd=function(e,t){var n,r,i;if(null!=e&&!!e!==e)return d(e,1,1e9),null==t?t=T:d(t,0,8),H(new F(this),e,t);if(!(n=this.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},C.shiftedBy=function(e){return d(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,n,r,i,o=this.c,a=this.s,s=this.e,c=A+4,d=new F("0.5");if(1!==a||!o||!o[0])return new F(!a||a<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(a=Math.sqrt(+W(this)))||a==1/0?(((t=u(o)).length+s)%2==0&&(t+="0"),a=Math.sqrt(+t),s=l((s+1)/2)-(s<0||s%2),n=new F(t=a==1/0?"5e"+s:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+s)):n=new F(a+""),n.c[0]){for((a=(s=n.e)+c)<3&&(a=0);;)if(i=n,n=d.times(i.plus(w(this,i,c,1))),u(i.c).slice(0,a)===(t=u(n.c)).slice(0,a)){if(n.e<s&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(n,n.e+A+2,1),e=!n.times(n).eq(this));break}if(!r&&(H(i,i.e+A+2,0),i.times(i).eq(this))){n=i;break}c+=4,a+=4,r=1}}return H(n,n.e+A+1,T,e)},C.toExponential=function(e,t){return null!=e&&(d(e,0,1e9),e++),B(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(d(e,0,1e9),e=e+this.e+1),B(this,e,t)},C.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=L;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,a=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=a[0],d=a[1],h=this.s<0,p=h?c.slice(1):c,f=p.length;if(l&&(i=s,s=l,l=i,f-=i),s>0&&f>0){for(i=f%s||s,c=p.substr(0,i);i<f;i+=s)c+=u+p.substr(i,s);l>0&&(c+=u+p.slice(i)),h&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},C.toFraction=function(e){var t,n,r,i,a,l,c,d,h,p,f,g,m=this.c;if(null!=e&&(!(c=new F(e)).isInteger()&&(c.c||1!==c.s)||c.lt(M)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+W(c));if(!m)return new F(this);for(t=new F(M),h=n=new F(M),r=d=new F(M),g=u(m),a=t.e=g.length-this.e-1,t.c[0]=s[(l=a%14)<0?14+l:l],e=!e||c.comparedTo(t)>0?a>0?t:h:c,l=O,O=1/0,c=new F(g),d.c[0]=0;p=w(c,t,0,1),1!=(i=n.plus(p.times(r))).comparedTo(e);)n=r,r=i,h=d.plus(p.times(i=h)),d=i,t=c.minus(p.times(i=t)),c=i;return i=w(e.minus(n),r,0,1),d=d.plus(i.times(h)),n=n.plus(i.times(r)),d.s=h.s=this.s,a*=2,f=1>w(h,r,a,T).minus(this).abs().comparedTo(w(d,n,a,T).minus(this).abs())?[h,r]:[d,n],O=l,f},C.toNumber=function(){return+W(this)},C.toPrecision=function(e,t){return null!=e&&d(e,1,1e9),B(this,e,t,2)},C.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=I||i>=k?p(u(n.c),i):f(u(n.c),i,"0"):10===e&&z?t=f(u((n=H(new F(n),A+i+1,T)).c),n.e,"0"):(d(e,2,N.length,"Base"),t=_(f(u(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return W(this)},C._isBigNumber=!0,null!=t&&F.set(t),F}()).default=t.BigNumber=t,rr.exports?rr.exports=t:(e||(e="u">typeof self&&self?self:window),e.BigNumber=t)})(n8);var ri=rr.exports;let ro=rn(),ra=re(),rs={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},rl={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:ru,decimalSuffixes:rc}=ro.currentBytes(),rd={scale:1024,suffixes:rc,marker:"bd"},rh={scale:1024,suffixes:ru,marker:"b"},rp={scale:1e3,suffixes:rc,marker:"d"};function rf(e,t,n){let r=t[0],i=Math.abs(e);if(i>=n){for(let o=1;o<t.length;++o){let a=Math.pow(n,o),s=Math.pow(n,o+1);if(i>=a&&i<s){r=t[o],e/=a;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function rg(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function rm({instance:e,providedFormat:t,state:n=ro,decimalSeparator:r,defaults:i=n.currentDefaults()}){var o,a,s,l,u;let c,d,h,p,f,g,m,v=e._value;if(0===v&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(v))return v.toString();let y=Object.assign({},rl,i,t),x=y.totalLength,b=x?0:y.characteristic,w=y.optionalCharacteristic,_=y.forceAverage,S=y.lowPrecision,C=!!x||!!_||y.average,M=x?-1:C&&void 0===t.mantissa?0:y.mantissa,A=!x&&(void 0===t.optionalMantissa?-1===M:y.optionalMantissa),T=y.trimMantissa,I=y.thousandSeparated,k=y.spaceSeparated,D=y.negative,O=y.forceSign,P=y.exponential,R=y.roundingFunction,E="";if(C){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:r,spaceSeparated:i=!1,totalLength:o=0,roundingFunction:a=Math.round}){let s="",l=Math.abs(e),u=-1;if(t&&r[t]&&rs[t]?(s=r[t],e/=rs[t]):l>=rs.trillion||n&&1===a(l/rs.trillion)?(s=r.trillion,e/=rs.trillion):l<rs.trillion&&l>=rs.billion||n&&1===a(l/rs.billion)?(s=r.billion,e/=rs.billion):l<rs.billion&&l>=rs.million||n&&1===a(l/rs.million)?(s=r.million,e/=rs.million):(l<rs.million&&l>=rs.thousand||n&&1===a(l/rs.thousand))&&(s=r.thousand,e/=rs.thousand),s&&(s=(i?" ":"")+s),o){let t=e<0,n=e.toString().split(".")[0];u=Math.max(o-(t?n.length-1:n.length),0)}return{value:e,abbreviation:s,mantissaPrecision:u}}({value:v,forceAverage:_,lowPrecision:S,abbreviations:n.currentAbbreviations(),spaceSeparated:k,roundingFunction:R,totalLength:x});v=e.value,E+=e.abbreviation,x&&(M=e.mantissaPrecision)}if(P){let e=function({value:e,characteristicPrecision:t}){let[n,r]=e.toExponential().split("e"),i=+n;return t&&1<t&&(i*=Math.pow(10,t-1),r-=t-1,r=r>=0?`+${r}`:r),{value:i,abbreviation:`e${r}`}}({value:v,characteristicPrecision:b});v=e.value,E=e.abbreviation+E}let L=function(e,t,n,r,i,o){if(-1===r)return e;let a=function(e,t,n=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[r,i]=n.split("e"),[o,a=""]=r.split(".");if(+i>0)n=o+a+rg(i-a.length);else{let e=".";e=0>+o?`-0${e}`:`0${e}`;let r=(rg(-i-1)+Math.abs(o)+a).substr(0,t);r.length<t&&(r+=rg(t-r.length)),n=e+r}return+i>0&&t>0&&(n+=`.${rg(t)}`),n}(e,t):new ri(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,r,o),[s,l=""]=a.toString().split(".");if(l.match(/^0+$/)&&(n||i))return s;let u=l.match(/0+$/);return i&&u?`${s}.${l.toString().slice(0,u.index)}`:a.toString()}(v.toString(),v,A,M,T,R);return o=L=function(e,t,n,r){let i=e,[o,a]=i.toString().split(".");if(o.match(/^-?0$/)&&n)return a?`${o.replace("0","")}.${a}`:o.replace("0","");let s=t<0&&0===o.indexOf("-");if(s&&(o=o.slice(1),i=i.slice(1)),o.length<r){let e=r-o.length;for(let t=0;t<e;t++)i=`0${i}`}return s&&(i=`-${i}`),i.toString()}(L,v,w,b),a=v,s=r,d=(c=n.currentDelimiters()).thousands,s=s||c.decimal,h=c.thousandsSize||3,f=(p=o.toString()).split(".")[0],g=p.split(".")[1],m=a<0&&0===f.indexOf("-"),I&&(m&&(f=f.slice(1)),(function(e,t){let n=[],r=0;for(let i=e;i>0;i--)r===t&&(n.unshift(i),r=0),r++;return n})(f.length,h).forEach((e,t)=>{f=f.slice(0,e+t)+d+f.slice(e+t)}),m&&(f=`-${f}`)),L=p=g?f+s+g:f,(C||P)&&(L+=E),(O||v<0)&&(l=L,L=0===(u=v)?l:0==+l?l.replace("-",""):u>0?`+${l}`:"sign"===D?l:`(${l.replace("-","")})`),L}function rv(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}function ry(e,t,n){let r=new ri(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new ri(i),e._value=r.minus(i).toNumber(),e}let rx=rn(),rb=re(),rw={loadLanguagesInNode:e=>{e.forEach(e=>{let t;try{t=function(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}t&&rT.registerLanguage(t)})}},r_=n7(),rS={format:(...e)=>(function(e,t={},n){if("string"==typeof t&&(t=rt(t)),!ra.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",i=t.postfix||"",o=function(e,t,n){var r,i,o;switch(t.output){case"currency":let a,s,l,u,c,d,h,p,f,g;return r=t=rv(t,ro.currentCurrencyDefaultFormat()),a=ro.currentCurrency(),l=Object.assign({},rl,s=Object.assign({},r)),c="",d=!!l.totalLength||!!l.forceAverage||l.average,h=s.currencyPosition||a.position,p=s.currencySymbol||a.symbol,f=void 0!==l.spaceSeparatedCurrency?l.spaceSeparatedCurrency:l.spaceSeparated,void 0===s.lowPrecision&&(s.lowPrecision=!1),f&&(c=" "),"infix"===h&&(u=c+p+c),g=rm({instance:e,providedFormat:s,state:ro,decimalSeparator:u}),"prefix"===h&&(g=e._value<0&&"sign"===l.negative?`-${c}${p}${g.slice(1)}`:e._value>0&&l.forceSign?`+${c}${p}${g.slice(1)}`:p+c+g),h&&"postfix"!==h||(g=g+(c=!l.spaceSeparatedAbbreviation&&d?"":c)+p),g;case"percent":let m,v,y;return i=t=rv(t,ro.currentPercentageDefaultFormat()),m=i.prefixSymbol,v=rm({instance:n(100*e._value),providedFormat:i,state:ro}),y=Object.assign({},rl,i),m?`%${y.spaceSeparated?" ":""}${v}`:`${v}${y.spaceSeparated?" ":""}%`;case"byte":return function(e,t,n,r){let i=t.base||"binary",o=Object.assign({},rl,t),{binarySuffixes:a,decimalSuffixes:s}=n.currentBytes(),l={general:{scale:1024,suffixes:s||rc,marker:"bd"},binary:{scale:1024,suffixes:a||ru,marker:"b"},decimal:{scale:1e3,suffixes:s||rc,marker:"d"}}[i],{value:u,suffix:c}=rf(e._value,l.suffixes,l.scale),d=rm({instance:r(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${d}${o.spaceSeparated?" ":""}${c}`}(e,t=rv(t,ro.currentByteDefaultFormat()),ro,n);case"time":let x,b,w;return t=rv(t,ro.currentTimeDefaultFormat()),x=Math.floor(e._value/60/60),b=Math.floor((e._value-60*x*60)/60),w=Math.round(e._value-60*x*60-60*b),`${x}:${b<10?"0":""}${b}:${w<10?"0":""}${w}`;case"ordinal":let _,S,C,M;return o=t=rv(t,ro.currentOrdinalDefaultFormat()),_=ro.currentOrdinal(),S=Object.assign({},rl,o),C=rm({instance:e,providedFormat:o,state:ro}),M=_(e._value),`${C}${S.spaceSeparated?" ":""}${M}`;default:return rm({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(o=r+o)+i})(...e,rT),getByteUnit:(...e)=>(function(e){return rf(e._value,rd.suffixes,rd.scale).suffix})(...e),getBinaryByteUnit:(...e)=>(function(e){return rf(e._value,rh.suffixes,rh.scale).suffix})(...e),getDecimalByteUnit:(...e)=>(function(e){return rf(e._value,rp.suffixes,rp.scale).suffix})(...e),formatOrDefault:rv},rC={add:(e,t)=>{let n,r;return n=new ri(e._value),r=t,rT.isNumbro(t)&&(r=t._value),r=new ri(r),e._value=n.plus(r).toNumber(),e},subtract:(e,t)=>ry(e,t,rT),multiply:(e,t)=>{let n,r;return n=new ri(e._value),r=t,rT.isNumbro(t)&&(r=t._value),r=new ri(r),e._value=n.times(r).toNumber(),e},divide:(e,t)=>{let n,r;return n=new ri(e._value),r=t,rT.isNumbro(t)&&(r=t._value),r=new ri(r),e._value=n.dividedBy(r).toNumber(),e},set:(e,t)=>{let n;return n=t,rT.isNumbro(t)&&(n=t._value),e._value=n,e},difference:(e,t)=>{let n;return ry(n=rT(e._value),t,rT),Math.abs(n._value)},BigNumber:ri};class rM{constructor(e){this._value=e}clone(){return rT(this._value)}format(e={}){return rS.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=rt(e)),(e=rS.formatOrDefault(e,rx.currentCurrencyDefaultFormat())).output="currency",rS.format(this,e)}formatTime(e={}){return e.output="time",rS.format(this,e)}binaryByteUnits(){return rS.getBinaryByteUnit(this)}decimalByteUnits(){return rS.getDecimalByteUnit(this)}byteUnits(){return rS.getByteUnit(this)}difference(e){return rC.difference(this,e)}add(e){return rC.add(this,e)}subtract(e){return rC.subtract(this,e)}multiply(e){return rC.multiply(this,e)}divide(e){return rC.divide(this,e)}set(e){return rC.set(this,rA(e))}value(){return this._value}valueOf(){return this._value}}function rA(e){let t=e;return rT.isNumbro(e)?t=e._value:"string"==typeof e?t=rT.unformat(e):isNaN(e)&&(t=NaN),t}function rT(e){return new rM(rA(e))}rT.version="2.5.0",rT.isNumbro=function(e){return e instanceof rM},rT.language=rx.currentLanguage,rT.registerLanguage=rx.registerLanguage,rT.setLanguage=rx.setLanguage,rT.languages=rx.languages,rT.languageData=rx.languageData,rT.zeroFormat=rx.setZeroFormat,rT.defaultFormat=rx.currentDefaults,rT.setDefaults=rx.setDefaults,rT.defaultCurrencyFormat=rx.currentCurrencyDefaultFormat,rT.validate=rb.validate,rT.loadLanguagesInNode=rw.loadLanguagesInNode,rT.unformat=r_.unformat,rT.BigNumber=rC.BigNumber;var rI=rT&&rT.__esModule&&Object.prototype.hasOwnProperty.call(rT,"default")?rT.default:rT;let rk={label:"Bits",decimalPlaces:!0,shortValues:!0},rD={bits:{group:"Bits",label:"Bits (IEC)"},decbits:{group:"Bits",label:"Bits (SI)"}};function rO(e,{unit:t="bits",shortValues:n,decimalPlaces:r}){let i="decbits"===t;if(!nQ(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"decimal",useGrouping:!0};nJ(r)?(i.minimumFractionDigits=n0(r),i.maximumFractionDigits=n0(r)):nQ(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.maximumSignificantDigits,r,n,t];return`${nq(o,"bits",i,"en-US")(e)} bits`}return rI(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:nJ(r)?r:2,trimMantissa:!nJ(r),optionalMantissa:!nJ(r)}).replace(/KB/g,"Kb").replace(/MB/g,"Mb").replace(/GB/g,"Gb").replace(/TB/g,"Tb").replace(/PB/g,"Pb").replace(/EB/g,"Eb").replace(/KiB/g,"Kib").replace(/MiB/g,"Mib").replace(/GiB/g,"Gib").replace(/TiB/g,"Tib").replace(/PiB/g,"Pib").replace(/EiB/g,"Eib")}let rP={label:"Bytes",decimalPlaces:!0,shortValues:!0},rR={bytes:{group:"Bytes",label:"Bytes (IEC)"},decbytes:{group:"Bytes",label:"Bytes (SI)"}};function rE(e,{unit:t="bytes",shortValues:n,decimalPlaces:r}){let i="decbytes"===t;if(!nQ(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return nJ(r)?(i.minimumFractionDigits=n0(r),i.maximumFractionDigits=n0(r)):nQ(n)&&(i.maximumSignificantDigits=3),nq([i.style,i.unit,i.unitDisplay,i.useGrouping,i.maximumSignificantDigits,r,n,t],"bytes",i,"en-US")(e)}return rI(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:nJ(r)?r:2,trimMantissa:!nJ(r),optionalMantissa:!nJ(r)})}var rL=n(40224);let rN="Currency",rz={label:"Currency",decimalPlaces:!0},rF={aud:{group:rN,label:"Australian Dollar (A$)"},cad:{group:rN,label:"Canadian Dollar (CA$)"},chf:{group:rN,label:"Swiss Franc (CHF)"},cny:{group:rN,label:"Renminbi (CN\xa5)"},eur:{group:rN,label:"Euro (€)"},gbp:{group:rN,label:"Pound (\xa3)"},hkd:{group:rN,label:"Hong Kong Dollar (HK$)"},inr:{group:rN,label:"Indian Rupee (₹)"},jpy:{group:rN,label:"Yen (\xa5)"},krw:{group:rN,label:"South Korean Won (₩)"},nok:{group:rN,label:"Norwegian Krone (NOK)"},nzd:{group:rN,label:"New Zealand Dollar (NZ$)"},sek:{group:rN,label:"Swedish Krona (SEK)"},sgd:{group:rN,label:"Singapore Dollar (S$)"},usd:{group:rN,label:"US Dollar ($)"}};function rB(e,{unit:t,decimalPlaces:n}){let r={style:"currency",currency:(0,rL.toUpper)(t),currencyDisplay:"symbol"};return nJ(n)?(r.minimumFractionDigits=n0(n),r.maximumFractionDigits=n0(n)):r.maximumSignificantDigits=3,nq([r.style,r.currency,r.currencyDisplay,r.maximumSignificantDigits,n,t],"currency",r,"en-US")(e)}let rj={label:"percent",decimalPlaces:!0},rV="Percent",rH={percent:{group:rV,label:"Percent (0-100)"},"percent-decimal":{group:rV,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:rV,label:"%"}};function rW(e,{unit:t,decimalPlaces:n}){let r={style:"percent",useGrouping:!0};return nJ(n)?(r.minimumFractionDigits=n0(n),r.maximumFractionDigits=n0(n)):r.maximumSignificantDigits=3,"percent"===t&&(e/=100),nq([r.style,r.useGrouping,r.maximumSignificantDigits,n,t],"percent",r,"en-US")(e)}let rG="Temperature",r$={label:rG,decimalPlaces:!0},rU={celsius:{group:rG,label:"Celsius (\xb0C)"},fahrenheit:{group:rG,label:"Fahrenheit (\xb0F)"}},rZ=(e,{unit:t,decimalPlaces:n})=>{let r={unit:t,style:"unit"};nJ(n)?(r.minimumFractionDigits=n0(n),r.maximumFractionDigits=n0(n)):r.maximumSignificantDigits=3;let i="celsius"===t?"en-GB":"en-US";return nq([r.style,r.unit,r.maximumSignificantDigits,n,i],"temperature",r,i)(e)},rY={label:"Decimal",decimalPlaces:!0,shortValues:!0},rX={decimal:{group:"Decimal",label:"Decimal"}};function rq(e,{shortValues:t,decimalPlaces:n}){let r={style:"decimal",useGrouping:!0};return nQ(t)&&(r.notation="compact"),nJ(n)?(r.minimumFractionDigits=n0(n),r.maximumFractionDigits=n0(n)):nQ(t)&&(r.maximumSignificantDigits=3),nq([r.style,r.useGrouping,r.notation,r.maximumSignificantDigits,n],"decimal",r,"en-US")(e)}let rK={label:"Throughput",decimalPlaces:!0},rQ="Throughput",rJ={"bits/sec":{group:rQ,label:"Bits/sec (IEC)"},"decbits/sec":{group:rQ,label:"Bits/sec (SI)"},"bytes/sec":{group:rQ,label:"Bytes/sec (IEC)"},"decbytes/sec":{group:rQ,label:"Bytes/sec (SI)"},"counts/sec":{group:rQ,label:"Counts/sec"},"events/sec":{group:rQ,label:"Events/sec"},"messages/sec":{group:rQ,label:"Messages/sec"},"ops/sec":{group:rQ,label:"Ops/sec"},"packets/sec":{group:rQ,label:"Packets/sec"},"reads/sec":{group:rQ,label:"Reads/sec"},"requests/sec":{group:rQ,label:"Requests/sec"},"records/sec":{group:rQ,label:"Records/sec"},"rows/sec":{group:rQ,label:"Rows/sec"},"writes/sec":{group:rQ,label:"Writes/sec"}};function r0(e,{unit:t,shortValues:n,decimalPlaces:r}){if("bits/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return rO(e,{unit:"bits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbits/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return rO(e,{unit:"decbits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return rE(e,{unit:"decbytes",shortValues:n,decimalPlaces:r})+"/"+t}if("bytes/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return rE(e,{unit:"bytes",shortValues:n,decimalPlaces:r})+"/"+t}let i={style:"decimal",useGrouping:!0};nQ(n)&&(i.notation="compact"),nJ(r)?(i.minimumFractionDigits=n0(r),i.maximumFractionDigits=n0(r)):nQ(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.notation,i.maximumSignificantDigits,r,n,t];return`${nq(o,"throughput",i,"en-US")(e)} ${t}`}let r1="Date",r2={Time:n2,Percent:rj,Decimal:rY,Bytes:rP,Bits:rk,Throughput:rK,Currency:rz,Temperature:r$,Date:{label:"Date & Time"}},r5={...n5,...rH,...rX,...rR,...rD,...rJ,...rF,...rU,"datetime-iso":{group:r1,label:"DateTime (GMT)"},"datetime-us":{group:r1,label:"DateTime (US-East)"},"datetime-local":{group:r1,label:"DateTime (Browser Local)"},"date-iso":{group:r1,label:"Date (GMT)"},"date-us":{group:r1,label:"Date (US-East)"},"date-local":{group:r1,label:"Date (Browser Local)"},"time-local":{group:r1,label:"Time (Browser Local)"},"time-iso":{group:r1,label:"Time (GMT)"},"time-us":{group:r1,label:"Time (US-East)"},"relative-time":{group:r1,label:"Relative Time"},"unix-timestamp":{group:r1,label:"Unix Timestamp (s)"},"unix-timestamp-ms":{group:r1,label:"Unix Timestamp (ms)"}};function r3(e,t){if(!t)return e.toString();if(it(t))return rE(e,t);if(ir(t))return rO(e,t);if(ie(t))return rq(e,t);if(r7(t))return rW(e,t);if(r8(t))return n9(e,t);if(ia(t))return r0(e,t);if(is(t))return rB(e,t);if(il(t))return function(e,t={}){let n=Intl.DateTimeFormat().resolvedOptions().timeZone,{unit:r="datetime-local",locale:i=(()=>{if("u">typeof navigator){if(navigator.language)return navigator.language;if(navigator.languages&&navigator.languages.length>0){let e=navigator.languages[0];if(e)return e}let e=navigator;if(e.userLanguage)return e.userLanguage;if(e.browserLanguage)return e.browserLanguage;if(e.systemLanguage)return e.systemLanguage}return Intl.DateTimeFormat().resolvedOptions().locale||"en-US"})(),timeZone:o=n,referenceTime:a=Date.now()}=t;if("unix-timestamp"===r)return(e>1e12?Math.floor(e/1e3):e).toString();if("unix-timestamp-ms"===r)return Math.floor(e<1e11?1e3*e:e).toString();let s=function(e){if(e<0)if(Math.abs(e)>1e10)return new Date(e);else return new Date(1e3*e);if(e>=25e10&&e<=26e10){let t=new Date(1e3*e);if(t.getUTCFullYear()>=9999)return t}return new Date(e<1e10?1e3*e:e)}(e);if("relative-time"===r){let e=new Date(a),t=s.getTime()-e.getTime();for(let{unit:e,ms:n}of[{unit:"year",ms:31536e6},{unit:"month",ms:2592e6},{unit:"week",ms:6048e5},{unit:"day",ms:864e5},{unit:"hour",ms:36e5},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}]){let r=Math.round(t/n);if(Math.abs(r)>=1)return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(r,e)}return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(0,"second")}let l={timeZone:o};switch(r){case"datetime-iso":return s.toISOString();case"datetime-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);case"datetime-local":l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"date-iso":return s.toISOString().split("T")[0];case"date-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",new Intl.DateTimeFormat("en-US",l).format(s);case"date-local":l.year="numeric",l.month="2-digit",l.day="2-digit";break;case"time-local":l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"time-iso":return s.toISOString().split("T")[1].replace("Z","");case"time-us":return l.timeZone="America/New_York",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);default:throw Error(`Unknown date unit: ${r}`)}return new Intl.DateTimeFormat(i,l).format(s)}(e,t);if(iu(t))return rZ(e,t);throw Error(`Unknown unit options ${t}`)}function r4(e){return r5[e.unit??"decimal"]}function r6(e){return r4(e).group??"Decimal"}function r9(e){return r2[r4(e).group??"Decimal"]}function r8(e){return"Time"===r6(e)}function r7(e){return"Percent"===r6(e)}function ie(e){return"Decimal"===r6(e)}function it(e){return"Bytes"===r6(e)}function ir(e){return"Bits"===r6(e)}function ii(e){return!!r9(e).decimalPlaces}function io(e){return!!r9(e).shortValues}function ia(e){return"Throughput"===r6(e)}function is(e){return"Currency"===r6(e)}function il(e){return"Date"===r6(e)}function iu(e){return"Temperature"===r6(e)}let ic={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series",ExtractColumnFields:"Extract column fields"};function id(e,t){return[nD({type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>r3(e,t)}},e)]}function ih(e,t,n,r){let i=[],o=nD({type:"value",position:"left",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>r3(e,t),overflow:"truncate"}},e);i.push(o);let a=0;return n.forEach((t,n)=>{let o,s,l={type:"value",position:"right",offset:a,boundaryGap:[0,"10%"],axisLabel:{formatter:e=>r3(e,t)},splitLine:{show:!1},show:e?.show};i.push(l),r&&(a+=(o=r3(r[n]??1e3,t),((s=document.createElement("canvas").getContext("2d"))?(s.font="12px sans-serif",s.measureText(o).width):6*o.length)+10))}),i}function ip(e,t){let{value:n,setValueAndStore:r}=function(e,t,n){let[r,i]=(0,ed.useState)(()=>{try{let n=e.getItem(t);if(null!==n)return JSON.parse(n)}catch{}return e.setItem(t,JSON.stringify(n)),n}),o=(0,ed.useCallback)(n=>{i(n),e.setItem(t,JSON.stringify(n))},[i,e,t]);return{value:r,setValue:i,setValueAndStore:o}}(window.localStorage,e,t);return[n,r]}function ig(e){let t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function im(e){e.dispatchAction({type:"restore"})}function iv(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function iy(e,t,n){if(void 0===n)return null;let r=[e,t];return n.containPixel("grid",r)?n.convertFromPixel("grid",r):null}function ix(e,t,n,r,i,o){let a=o.length>0?o[o.length-1]:i[i.length-1];void 0!==a&&e.dispatchAction({type:"select",seriesIndex:a.seriesIndex,dataIndex:a.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay"}),r.length>0&&e.dispatchAction({type:"downplay",seriesIndex:r}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function ib(e){return e[e.length-1]?.name===nO}function iw(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(let[i]of e){let e=Math.abs(i-t);e<r&&(n=i,r=e)}return n}function i_(e,t){if(void 0===t)return null;let n=e.length,r=null;for(let i=0;i<n;i++){let o=n>0?e[i]:null;if(!o)break;r=iw(o.values,t)}return r}function iS(...e){return e.flatMap(e=>void 0===e?[]:Array.isArray(e)?e:[e])}function iC(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);let t=(0,ed.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var iM=((aP={}).CSV="csv",aP.DISTRIBUTED="distributed",aP.DOUBLEQUOTE="doublequote",aP.GLOB="glob",aP.JSON="json",aP.LUCENE="lucene",aP.PERCENTENCODE="percentencode",aP.PIPE="pipe",aP.PROMETHEUS="prometheus",aP.RAW="raw",aP.REGEX="regex",aP.SINGLEQUOTE="singlequote",aP.SQLSTRING="sqlstring",aP.TEXT="text",aP.QUERYPARAM="queryparam",aP.REGEX_LITERAL="regexliteral",aP);function iA(e){if(!e)return;let t=e.toLowerCase();return Object.values(iM).find(e=>e===t)||void 0}function iT(e,t,n){switch(n){case"csv":case"raw":return e.join(",");case"distributed":{let[n,...r]=e;return`${[n,...r.map(e=>`${t}=${e}`)].join(",")}`}case"doublequote":return e.map(e=>`"${e}"`).join(",");case"glob":return`{${e.join(",")}}`;case"json":return JSON.stringify(e.map(e=>{try{return JSON.parse(e)}catch{return e}}));case"lucene":return`(${e.map(e=>`"${e}"`).join(" OR ")})`;case"percentencode":return encodeURIComponent(e.join(","));case"pipe":return e.join("|");case"regex":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));return`(${t.join("|")})`}case"regexliteral":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\\\$&"));return`(${t.join("|")})`}case"singlequote":return e.map(e=>`'${e}'`).join(",");case"sqlstring":return e.map(e=>`'${e.replace(/'/g,"''")}'`).join(",");case"text":return e.join(" + ");case"queryparam":return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&");default:return`(${e.join("|")})`}}function iI(e,t,n,r){let i="$"+t,o="${"+t+(r?":"+r:"")+"}",a="";return Array.isArray(n)&&(a=iT(n,t,r||"prometheus")),"string"==typeof n&&(a=iT([n],t,r||"raw")),(e=e.replaceAll(i,a)).replaceAll(o,a)}let ik=/\$(\w+)|\${(\w+)(?:\.([^:^}]+))?(?::([^}]+))?}/gm;function iD(e){let t,n=new Set;for(;null!==(t=ik.exec(e));)t&&(t[1]?n.add(t[1]):t[2]&&n.add(t[2]));return Array.from(n.values())}function iO(e){let t,n=new Map;for(;null!==(t=ik.exec(e));)if(t){let e;t[4]&&(e=t[4]),t[1]?n.set(t[1],iA(e)):t[2]&&n.set(t[2],iA(e))}return n}function iP(e,t){let n=iO(e),r=Array.from(n.keys()),i=e;return r.sort((e,t)=>t.length-e.length).forEach(e=>{let r=t[e];r&&void 0!==r.value&&(i=iI(i,e,r?.value,n.get(e)))}),i}function iR(e,t){let n={};for(let[e,r]of Object.entries(t))n[e]=void 0===r.displayValue?r:{...r,value:r.displayValue};return iP(e,n)}let iE=/\$\{__data\.fields(?:\[(?:"|')([^"']+)(?:"|')\]|\.([a-zA-Z_][a-zA-Z0-9_]*))(?::([a-z]+))?\}/g,iL=/\$\{__data\[(\d+)\]\.fields\[(?:"|')([^"']+)(?:"|')\]\}/g,iN=/\$\{__data\.index\}/g,iz=/\$\{__data\.count\}/g,iF=/("|')?\$\{__data(?::([a-z]+))?\}("|')?/g;function iB(e,t){if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];return null==n?"":"object"==typeof n?JSON.stringify(n):String(n)}if(t.includes(".")){let n=t.split("."),r=e;for(let e of n){if(null==r||"object"!=typeof r)return"";r=r[e]}return null==r?"":"object"==typeof r?JSON.stringify(r):String(r)}return""}function ij(e){if(!e)return;let t=e.toLowerCase();return Object.values(iM).find(e=>e===t)}function iV(e,t,n={}){let{urlEncode:r=!0,index:i,count:o}=n,a=e,s=[];return void 0!==i&&(a=a.replaceAll(iN,String(i))),void 0!==o&&(a=a.replaceAll(iz,String(o))),a=a.replaceAll(iF,(e,n,r,i)=>{let o=ij(r)??iM.RAW;return o===iM.JSON?JSON.stringify(t):iT(Object.values(t).map(e=>JSON.stringify(e)),"",o)}),iE.lastIndex=0,{text:a=a.replaceAll(iE,(e,n,i,o)=>{let a=n??i??"",l=iB(t,a);""===l&&void 0===t[a]&&s.push(`Field "${a}" not found in data`);let u=ij(o);if(u)return iT([l],a,u);if(r){if(u===iM.RAW)return l;if(u!==iM.QUERYPARAM&&u!==iM.PERCENTENCODE)return encodeURIComponent(l)}return l}),errors:s.length>0?s:void 0}}function iH(e,t,n={}){let{urlEncode:r=!0}=n,i=e,o=[];return i=i.replaceAll(iz,String(t.length)),iL.lastIndex=0,iE.lastIndex=0,{text:i=(i=(i=i.replaceAll(iF,(e,n,r,i)=>{let o=ij(r)??iM.RAW,a=iT(Object.values(t).map(e=>JSON.stringify(e)),"",o);return n&&i?a:`${n??""}${a}${i??""}`})).replaceAll(iL,(e,n,i)=>{let a=parseInt(n,10);if(a<0||a>=t.length)return o.push(`Index ${a} out of bounds (0-${t.length-1})`),e;let s=iB(t[a],i);return""===s&&void 0===t[a][i]&&o.push(`Field "${i}" not found in data at index ${a}`),r?encodeURIComponent(s):s})).replaceAll(iE,(e,n,r,i)=>{let o=n??r??"";return iT(t.map(e=>iB(e,o)),o,ij(i)||iM.CSV)}),errors:o.length>0?o:void 0}}function iW(e){return iL.lastIndex=0,iL.test(e)||/\$\{__data\.fields(?:\[["'][^"']+["']\]|\.[a-zA-Z_][a-zA-Z0-9_]*):[a-z]+\}/.test(e)}function iG(e){return iL.lastIndex=0,iL.test(e)}function i$(e){return iE.lastIndex=0,iL.lastIndex=0,iE.test(e)||iL.test(e)}function iU(e){let t,n=new Set;for(iE.lastIndex=0,iL.lastIndex=0;null!==(t=iE.exec(e));)n.add(t[1]??t[2]);for(;null!==(t=iL.exec(e));)n.add(t[2]);return Array.from(n)}Symbol.for("constructDateFrom");let iZ={},iY={};function iX(e,t){try{let n=(iZ[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];if(n in iY)return iY[n];return iK(n,n.split(":"))}catch{if(e in iY)return iY[e];let t=e?.match(iq);if(t)return iK(e,t.slice(1));return NaN}}let iq=/([+-]\d\d):?(\d\d)?/;function iK(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return iY[e]=60*n+r>0?60*n+r+i:60*n-r-i}class iQ extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(iX(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),i1(this,e)):this.setTime(Date.now())}static tz(e,...t){return t.length?new iQ(...t,e):new iQ(Date.now(),e)}withTimeZone(e){return new iQ(+this,e)}getTimezoneOffset(){let e=-iX(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),i0(this),+this}[Symbol.for("constructDateFrom")](e){return new iQ(+new Date(e),this.timeZone)}}let iJ=/^(get|set)(?!UTC)/;function i0(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-(60*iX(e.timeZone,e))))}function i1(e,t){var n;let r=Array.isArray(t)?Date.UTC((n=t)[0],n.length>1?n[1]:0,n.length>2?n[2]:1,...n.slice(3)):+e.internal,i=iX(e.timeZone,e),o=i>0?Math.floor(i):Math.ceil(i),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let s=-new Date(+e).getTimezoneOffset(),l=-new Date(+a).getTimezoneOffset(),u=s;if(s-l&&s!==o&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=s-o;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=iX(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===o&&(u=l)}let c=u-o;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);let d=new Date(+e);d.setUTCSeconds(0);let h=s>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-(60*iX(e.timeZone,e)))%60;(p||h)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+h);let f=iX(e.timeZone,e),g=f>0?Math.floor(f):Math.ceil(f),m=-new Date(+e).getTimezoneOffset()-g-c,v=g-o,y=v>0&&i2(e)-r==60*v*1e3&&i2(e,r-60*g*1e3)!==r;if(g!==o&&m&&!y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+m);let t=iX(e.timeZone,e),n=g-(t>0?Math.floor(t):Math.ceil(t));n&&m<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}i0(e);let x=(t?r:r+1e3*p)-e.internal;x&&18e5>Math.abs(x)&&(Date.prototype.setTime.call(e,+e+x),i0(e))}function i2(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-(60*iX(e.timeZone,n)))),+n}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!iJ.test(e))return;let t=e.replace(iJ,"$1UTC");iQ.prototype[t]&&(e.startsWith("get")?iQ.prototype[e]=function(){return this.internal[t]()}:(iQ.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),i1(e),+this},iQ.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),i0(this),+this}))});class i5 extends iQ{static tz(e,...t){return t.length?new i5(...t,e):new i5(Date.now(),e)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),n=String(Math.abs(e)%60).padStart(2,"0");return[e>0?"-":"+",t,n]}withTimeZone(e){return new i5(+this,e)}[Symbol.for("constructDateFrom")](e){return new i5(+new Date(e),this.timeZone)}}function i3(e,t){if(t){let n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function i4(e,t,n){let r,i=n?.toLowerCase();if(!n||"local"===i||"browser"===i)return(0,nE.format)(e,t);return(0,nE.format)(e,t,{in:(r="utc"===i?"UTC":n,e=>i5.tz(r,+new Date(e)))})}function i6(e){let t=e?.toLowerCase(),n=e;e&&"local"!==t&&"browser"!==t?"utc"===t&&(n="UTC"):n=Intl.DateTimeFormat().resolvedOptions().timeZone;try{let e=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"shortOffset"}).formatToParts(new Date).find(e=>"timeZoneName"===e.type),t=e?.value??"";if("GMT"===t)return"GMT+0";return t}catch{return"GMT+0"}}function i9(e){return e>15768e7?"{yyyy}":e>63072e6?"{MMM} {yyyy}":e>432e6&&e<1577664e4?"{MM}/{dd}":e>1728e5&&e<=432e6?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}let i8=(e,t)=>{if(!e)return{formattedDate:"",formattedTime:""};let n=new Date(e);return{formattedDate:t?t(n,"MMM dd, yyyy"):(0,nE.format)(n,"MMM dd, yyyy"),formattedTime:t?t(n,"HH:mm:ss"):(0,nE.format)(n,"HH:mm:ss")}};var i7=n(18264);function oe(e,t){let n=(0,ed.useRef)(),r=!0;for(let e=0;e<t.length;e++)if(n.current?.deps[e]!==t[e]){r=!1;break}return(void 0===n.current||!1===r)&&(n.current={value:e(),deps:t}),n.current.value}function ot(e,t){let n=(0,ed.useRef)();return(void 0===n.current||!1===i7(t,n.current.deps))&&(n.current={value:e(),deps:t}),n.current.value}function on(e){return!!e?.startsWith("/")}function or(e){if(!e)throw Error("Input string cannot be empty");if(!on(e))return RegExp(`^${e}$`);let t=e.match(/^\/(.+)\/([gimy]*)$/);if(!t)throw Error(`Invalid regular expression format: ${e}`);let[,n="",r=""]=t;try{return new RegExp(n,r)}catch(e){throw Error(`Failed to create RegExp ${e}`)}}function oi(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=iP(i,t);return n}function oo(e,t){let n={};for(let[r,i]of Object.entries(e))Array.isArray(i)?n[r]=i.map(e=>iP(e,t)):n[r]=function e(t,n){if(Array.isArray(t))return t.map(t=>e(t,n));for(let[e,r]of iO(t)){let i,o=n[e];if(!o)continue;let a=o.options??[],s=a.map(e=>e.value),l=Array.isArray(o.value),u=void 0!==o.customAllValue;if(l)i=o.value;else if(u)try{let e=or(o.customAllValue),t=a.filter(t=>e.test(t.value)).map(e=>e.value);i=t.length>0?t:s}catch{i=s}if(i&&(!r||r===iM.QUERYPARAM)){let o="$"+e,a=r?"${"+e+":"+r+"}":"${"+e+"}";return i.map(e=>{let r=t;return iP(r=(r=r.replaceAll(a,e)).replaceAll(o,e),n)})}}return iP(t,n)}(i,t);return n}function oa(e,t,n,r,i){let o=iV(e,t,{index:n,count:r}),a=o.text,s=[];return o.errors&&s.push(...o.errors.map(e=>e.replace("in data","in selection data"))),i&&(a=iP(a,i)),{text:a,errors:s.length>0?s:void 0}}function os(e,t,n){let r=iH(e,t),i=r.text,o=[];return r.errors&&o.push(...r.errors.map(e=>e.replace("in data","in selection data"))),n&&(i=iP(i,n)),{text:i,errors:o.length>0?o:void 0}}function ol(e,t){let n=e.palette.text?.primary??"#222";return nD({echartsTheme:{title:{show:!1},textStyle:{color:n,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:n,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:n},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:e?.palette?.action?.active,pageIconInactiveColor:e?.palette?.action?.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:n}},tooltip:{backgroundColor:e.palette.designSystem?.grey[800],borderColor:e.palette.designSystem?.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:n}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}},noDataOption:{title:{show:!0,textStyle:{color:n,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}function ou(e,t=[]){if(!t.length)return{value:e};let n={value:e};return t.forEach(t=>{switch(t.kind){case"Value":{let r=t.spec;String(r.value)===String(e)&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Range":{let r=t.spec;if(void 0===r.from&&void 0===r.to)break;let i=void 0!==r.from?r.from:-1/0,o=void 0!==r.to?r.to:1/0;e>=i&&e<=o&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Regex":{let r=t.spec,i=e.toString();if(!r.pattern)break;let o=or(r.pattern);i.match(o)&&null!==r.result.value&&(n.value=i.replace(o,r.result.value.toString()||"")||n.value,n.color=r.result.color);break}case"Misc":{let r=t.spec;(function(e,t){switch(e){case"empty":return""===t;case"null":return null==t;case"NaN":return Number.isNaN(t);case"true":return!0===t;case"false":return!1===t;default:return!1}})(r.value,e)&&(n.value=r.result.value||n.value,n.color=r.result.color)}}}),n}function oc(e,t){if(0===t.length)return e;let n={};for(let r of e){let e=Object.keys(r).filter(e=>t.includes(e)).map(e=>r[e]).join("|"),i=n[e];i?n[e]={...i,...r}:n[e]={...r}}return Object.values(n)}function od(e,t,n){let r=[];for(let i of e){let e=Object.keys(i).filter(e=>t.includes(e)),o={};for(let t of e)o[t]=i[t],delete i[t];for(let t of e)r.push({...i,[n]:o[t]});0===e.length&&r.push(i)}return r}function oh(e,t){let n=[];for(let r of e){let e=Object.keys(r).filter(e=>RegExp("^(("+t+" #\\d+)|("+t+"))$").test(e)),i={};for(let t of e)i[t]=r[t],delete r[t];for(let o of e)n.push({...r,[t]:i[o]});0===e.length&&n.push(r)}return n}function op(e){let t=[...e],n=Array.from(new Set(e.flatMap(Object.keys).map(e=>e.replace(/ #\d+/,"")).filter(e=>"value"!==e)));for(let e of n)t=oh(t,e);return oc(t,n)}function of(e,t){let n=e;for(let e of t??[])if(!e.spec.disabled)switch(e.kind){case"JoinByColumnValue":e.spec.columns&&e.spec.columns.length>0&&(n=oc(n,e.spec.columns));break;case"MergeIndexedColumns":e.spec.column&&(n=oh(n,e.spec.column));break;case"MergeColumns":e.spec.columns&&e.spec.columns.length>0&&e.spec.name&&(n=od(n,e.spec.columns,e.spec.name));break;case"MergeSeries":n=op(n)}return n.map(e=>Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}))}var og=n(68102);function om(e){return"number"==typeof e}function ov(e){return!!e&&"object"==typeof e&&"function"==typeof e.constructor&&(!0===e.isBigNumber&&"object"==typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function oy(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function ox(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function ob(e){return e&&!0===e.constructor.prototype.isUnit||!1}function ow(e){return"string"==typeof e}var o_=Array.isArray;function oS(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function oC(e){return Array.isArray(e)||oS(e)}function oM(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function oA(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function oT(e){return e&&!0===e.constructor.prototype.isRange||!1}function oI(e){return e&&!0===e.constructor.prototype.isIndex||!1}function ok(e){return"boolean"==typeof e}function oD(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function oO(e){return e&&!0===e.constructor.prototype.isHelp||!1}function oP(e){return"function"==typeof e}function oR(e){return e instanceof Date}function oE(e){return e instanceof RegExp}function oL(e){return!!(e&&"object"==typeof e&&e.constructor===Object&&!oy(e)&&!ox(e))}function oN(e){return null===e}function oz(e){return void 0===e}function oF(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function oB(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function oj(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function oV(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function oH(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function oW(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function oG(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function o$(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function oU(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function oZ(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function oY(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function oX(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function oq(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function oK(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function oQ(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function oJ(e){return e&&!0===e.constructor.prototype.isChain||!1}function o0(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":ov(e)?"BigNumber":oy(e)?"Complex":ox(e)?"Fraction":oS(e)?"Matrix":ob(e)?"Unit":oI(e)?"Index":oT(e)?"Range":oD(e)?"ResultSet":oZ(e)?e.type:oJ(e)?"Chain":oO(e)?"Help":"Object":"function"===t?"Function":t}function o1(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return o1(e)});if(e instanceof Date)return new Date(e.valueOf());if(ov(e))return e;if(e instanceof RegExp)throw TypeError("Cannot clone "+e);return o2(e,o1)}function o2(e,t){var n={};for(var r in e)o4(e,r)&&(n[r]=t(e[r]));return n}function o5(e,t){var n,r,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,i=e.length;r<i;r++)if(!o5(e[r],t[r]))return!1;return!0}if("function"==typeof e)return e===t;if(!(e instanceof Object))return e===t;if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!o5(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}function o3(e,t,n){var r,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(r=n(),i=!1),r},set:function(e){r=e,i=!1},configurable:!0,enumerable:!0})}function o4(e,t){return e&&Object.hasOwnProperty.call(e,t)}function o6(e){return Object.keys(e).map(t=>e[t])}var o9=n(23420);function o8(e,t,n,r){function i(r){var i=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e[i];void 0!==o&&(n[i]=o)}return n}(r,t.map(ae));return function(e,t,n){if(!t.filter(e=>{var t;return!((t=e)&&"?"===t[0])}).every(e=>void 0!==n[e])){var r=t.filter(e=>void 0===n[e]);throw Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(r.map(e=>'"'.concat(e,'"')).join(", "),"."))}}(e,t,r),n(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function o7(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function ae(e){return e&&"?"===e[0]?e.slice(1):e}function at(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}function an(e,t,n){var r="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!at(n))throw Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!at(e))throw Error("Value must be an integer");e<0&&(e+=2**n),r="i".concat(n)}var i="";return e<0&&(e=-e,i="-"),"".concat(i).concat({2:"0b",8:"0o",16:"0x"}[t]).concat(e.toString(t)).concat(r)}function ar(e,t){if("function"==typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,i="auto";if(t&&(t.notation&&(i=t.notation),om(t)?n=t:om(t.precision)&&(n=t.precision),t.wordSize)&&"number"!=typeof(r=t.wordSize))throw Error('Option "wordSize" must be a number');switch(i){case"fixed":return ao(e,n);case"exponential":return aa(e,n);case"engineering":return function(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=as(ai(e),t),r=n.exponent,i=n.coefficients,o=r%3==0?r:r<0?r-3-r%3:r-r%3;if(om(t))for(;t>i.length||r-o+1>i.length;)i.push(0);else for(var a=Math.abs(r-o)-(i.length-1),s=0;s<a;s++)i.push(0);for(var l=Math.abs(r-o),u=1;l>0;)u++,l--;var c=i.slice(u).join(""),d=om(t)&&c.length||c.match(/[1-9]/)?"."+c:"",h=i.slice(0,u).join("")+d+"e"+(r>=0?"+":"")+o.toString();return n.sign+h}(e,n);case"bin":return an(e,2,r);case"oct":return an(e,8,r);case"hex":return an(e,16,r);case"auto":return(function(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=n&&void 0!==n.upperExp?n.upperExp:5,o=ai(e),a=t?as(o,t):o;if(a.exponent<r||a.exponent>=i)return aa(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(al(t-s.length))),s=s.concat(al(l-s.length+1+(s.length<t?t-s.length:0))),s=al(-l).concat(s);var u=l>0?l:0;return u<s.length-1&&s.splice(u+1,0,"."),a.sign+s.join("")})(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function ai(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function ao(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=ai(e),r="number"==typeof t?as(n,n.exponent+1+t):n,i=r.coefficients,o=r.exponent+1,a=o+(t||0);return i.length<a&&(i=i.concat(al(a-i.length))),o<0&&(i=al(-o+1).concat(i),o=1),o<i.length&&i.splice(o,0,0===o?"0.":"."),r.sign+i.join("")}function aa(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=ai(e),r=t?as(n,t):n,i=r.coefficients,o=r.exponent;i.length<t&&(i=i.concat(al(t-i.length)));var a=i.shift();return r.sign+a+(i.length>0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function as(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}return n}function al(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}var au=Number.EPSILON||2220446049250313e-31;function ac(e,t,n){if(null==n)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<au||r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function ad(e,t,n){var r=new e.constructor(2),i="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!at(n))throw Error("size must be an integer");if(e.greaterThan(r.pow(n-1).sub(1))||e.lessThan(r.pow(n-1).mul(-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw Error("Value must be an integer");e.lessThan(0)&&(e=e.add(r.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw Error("Base ".concat(t," not supported "))}}function ah(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function ap(e,t){var n=function(e,t){var n;if("number"==typeof e)return ar(e,t);if(ov(e))return function(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto";if(void 0!==t&&(t.notation&&(n=t.notation),"number"==typeof t?d=t:t.precision&&(d=t.precision),t.wordSize)&&"number"!=typeof(h=t.wordSize))throw Error('Option "wordSize" must be a number');switch(n){case"fixed":return r=e,i=d,r.toFixed(i);case"exponential":return ah(e,d);case"engineering":return o=e,a=d,l=(s=o.e)%3==0?s:s<0?s-3-s%3:s-s%3,-1!==(c=(u=o.mul(Math.pow(10,-l))).toPrecision(a)).indexOf("e")&&(c=u.toString()),c+"e"+(s>=0?"+":"")+l.toString();case"bin":return ad(e,2,h);case"oct":return ad(e,8,h);case"hex":return ad(e,16,h);case"auto":var r,i,o,a,s,l,u,c,d,h,p=t&&void 0!==t.lowerExp?t.lowerExp:-3,f=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var g=e.toSignificantDigits(d),m=g.e;return(m>=p&&m<f?g.toFixed():ah(e,d)).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}(e,t);if((n=e)&&"object"==typeof n&&"number"==typeof n.s&&"number"==typeof n.n&&"number"==typeof n.d)if(!t||"decimal"!==t.fraction)return e.s*e.n+"/"+e.d;else return e.toString();if(Array.isArray(e))return function e(t,n){if(!Array.isArray(t))return ap(t,n);for(var r="[",i=t.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=e(t[o],n);return r+"]"}(e,t);if(ow(e))return'"'+e+'"';if("function"==typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"==typeof e)if("function"==typeof e.format)return e.format(t);else return e&&e.toString(t)!==({}).toString()?e.toString(t):"{"+Object.keys(e).map(n=>'"'+n+'": '+ap(e[n],t)).join(", ")+"}";return String(e)}(e,t);return t&&"object"==typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function af(e,t,n){if(!(this instanceof af))throw SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=Error().stack}function ag(e,t,n){if(!(this instanceof ag))throw SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=Error().stack}function am(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function av(e,t){if(0===t.length){if(Array.isArray(e))throw new af(e.length,0)}else!function e(t,n,r){var i,o=t.length;if(o!==n[r])throw new af(o,n[r]);if(r<n.length-1){var a=r+1;for(i=0;i<o;i++){if(!Array.isArray(t[i]))throw new af(n.length-1,n.length,"<");e(t[i],n,a)}}else for(i=0;i<o;i++)if(Array.isArray(t[i]))throw new af(n.length+1,n.length,">")}(e,t,0)}function ay(e,t){if(!om(e)||!at(e))throw TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&e>=t)throw new ag(e,t)}function ax(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!om(e)||!at(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+ap(t)+")")}),function e(t,n,r,i){var o,a,s=t.length,l=n[r],u=Math.min(s,l);if(t.length=l,r<n.length-1){var c=r+1;for(o=0;o<u;o++)Array.isArray(a=t[o])||(a=[a],t[o]=a),e(a,n,c,i);for(o=u;o<l;o++)a=[],t[o]=a,e(a,n,c,i)}else{for(o=0;o<u;o++)for(;Array.isArray(t[o]);)t[o]=t[o][0];for(o=u;o<l;o++)t[o]=i}}(e,t,0,void 0!==n?n:0),e}function ab(e,t){var n=aw(e),r=e.slice(),i=e.indexOf(-1);if(e.indexOf(-1,i+1)>=0)throw Error("More than one wildcard in sizes");if(i>=0)if(t%n==0)r[i]=-t/n;else throw Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function aw(e){return e.reduce((e,t)=>e*t,1)}function a_(e,t,n,r){var i=r||am(e);if(n)for(var o=0;o<n;o++)e=[e],i.unshift(1);for(e=function e(t,n,r){var i,o;if(Array.isArray(t)){var a=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,a)}else for(var s=r;s<n;s++)t=[t];return t}(e,t,0);i.length<t;)i.push(1);return e}function aS(e,t){for(var n,r=0,i=0;i<e.length;i++){var o=e[i],a=Array.isArray(o);if(0===i&&a&&(r=o.length),a&&o.length!==r)return;var s=a?aS(o,t):t(o);if(void 0===n)n=s;else if(n!==s)return"mixed"}return n}function aC(e,t){return -1!==e.indexOf(t)}function aM(e,t,n,r){if(!(this instanceof aM))throw SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(null!=r?"-"+r:"")+" expected)",this.stack=Error().stack}af.prototype=RangeError(),af.prototype.constructor=RangeError,af.prototype.name="DimensionError",af.prototype.isDimensionError=!0,ag.prototype=RangeError(),ag.prototype.constructor=RangeError,ag.prototype.name="IndexError",ag.prototype.isIndexError=!0,aM.prototype=Error(),aM.prototype.constructor=Error,aM.prototype.name="ArgumentsError",aM.prototype.isArgumentsError=!0;var aA={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},aT=["Matrix","Array"],aI=["number","BigNumber","Fraction"];function ak(e,t,n){var r;void 0!==e[t]&&(r=e[t],-1===n.indexOf(r))&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}function aD(e,t){var n,r,i,o=(0,og.A)({},aA,t);if("function"!=typeof Object.create)throw Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var a=((n={isNumber:om,isComplex:oy,isBigNumber:ov,isFraction:ox,isUnit:ob,isString:ow,isArray:o_,isMatrix:oS,isCollection:oC,isDenseMatrix:oM,isSparseMatrix:oA,isRange:oT,isIndex:oI,isBoolean:ok,isResultSet:oD,isHelp:oO,isFunction:oP,isDate:oR,isRegExp:oE,isObject:oL,isNull:oN,isUndefined:oz,isAccessorNode:oF,isArrayNode:oB,isAssignmentNode:oj,isBlockNode:oV,isConditionalNode:oH,isConstantNode:oW,isFunctionAssignmentNode:oG,isFunctionNode:o$,isIndexNode:oU,isNode:oZ,isObjectNode:oY,isOperatorNode:oX,isParenthesisNode:oq,isRangeNode:oK,isSymbolNode:oQ,isChain:oJ}).on=(r=new o9).on.bind(r),n.off=r.off.bind(r),n.once=r.once.bind(r),n.emit=r.emit.bind(r),n);a.config=function(e,t){function n(n){if(!n)return o2(e,o1);var r=o2(e,o1);ak(n,"matrix",aT),ak(n,"number",aI),function e(t,n){if(Array.isArray(n))throw TypeError("Arrays are not supported by deepExtend");for(var r in n)if(o4(n,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(n[r]&&n[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r]&&t[r].constructor===Object?e(t[r],n[r]):t[r]=n[r];else if(Array.isArray(n[r]))throw TypeError("Arrays are not supported by deepExtend");else t[r]=n[r];return t}(e,n);var i=o2(e,o1);return t("config",i,r,o2(n,o1)),i}return n.MATRIX_OPTIONS=aT,n.NUMBER_OPTIONS=aI,Object.keys(aA).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}(o,a.emit),a.expression={transform:{},mathWithTransform:{config:a.config}};var s={},l=function(e,t,n){function r(e,n){n&&"function"==typeof n.transform?(t.expression.transform[e]=n.transform,o4(a,e)||(t.expression.mathWithTransform[e]=n.transform)):(delete t.expression.transform[e],o4(a,e)||(t.expression.mathWithTransform[e]=n))}function i(e){return"function"==typeof e&&"object"==typeof e.signatures}function o(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction}var a={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(s,l){var u=arguments.length;if(1!==u&&2!==u)throw new aM("import",u,1,2);l||(l={});var c={};for(var d in!function e(t,n,r){if(Array.isArray(n))n.forEach(n=>e(t,n));else if("object"==typeof n)for(var i in n)o4(n,i)&&e(t,n[i],i);else if(o7(n)||void 0!==r){var a=o7(n)?o(n)?n.fn+".transform":n.fn:r;if(o4(t,a)&&t[a]!==n&&!l.silent)throw Error('Cannot import "'+a+'" twice');t[a]=n}else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}(c,s),c)if(o4(c,d)){var h,p=c[d];if(o7(p))!function(r,s){var l,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.fn;if(aC(u,"."))throw Error("Factory name should not contain a nested path. Name: "+JSON.stringify(u));var c=o(r)?t.expression.transform:t,d=u in t.expression.transform,h=o4(c,u)?c[u]:void 0,p=function(){var n={};r.dependencies.map(ae).forEach(e=>{if(aC(e,"."))throw Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?n.math=t:"mathWithTransform"===e?n.mathWithTransform=t.expression.mathWithTransform:"classes"===e?n.classes=t:n[e]=t[e]});var o=r(n);if(o&&"function"==typeof o.transform)throw Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===h||s.override)return o;if(i(h)&&i(o))return e(h,o);if(s.silent)return h;throw Error('Cannot import "'+u+'": already exists')};r.meta&&!1===r.meta.lazy?c[u]=p():o3(c,u,p),h&&d?function(e){delete t.expression.transform[e],o4(a,e)?delete t.expression.mathWithTransform[e]:t.expression.mathWithTransform[e]=t[e]}(u):!o(r)&&(-1!==(l=r).fn.indexOf(".")||o4(a,l.fn)||l.meta&&l.meta.isClass)||o3(t.expression.mathWithTransform,u,()=>c[u]),n[u]=r,t.emit("import",u,p)}(p,l);else{if("function"==typeof(h=p)||"number"==typeof h||"string"==typeof h||"boolean"==typeof h||null===h||ob(h)||oy(h)||ov(h)||ox(h)||oS(h)||Array.isArray(h))!function(o,a,s){var l;if(s.wrap&&"function"==typeof a&&(a=function(e){var n=function(){for(var n=[],r=0,i=arguments.length;r<i;r++){var o=arguments[r];n[r]=o&&o.valueOf()}return e.apply(t,n)};return e.transform&&(n.transform=e.transform),n}(a)),"function"==typeof(l=a)&&"string"==typeof l.signature&&(a=e(o,{[a.signature]:a})),i(t[o])&&i(a)){a=s.override?e(o,a.signatures):e(t[o],a),t[o]=a,delete n[o],r(o,a),t.emit("import",o,function(){return a});return}if(void 0===t[o]||s.override){t[o]=a,delete n[o],r(o,a),t.emit("import",o,function(){return a});return}if(!s.silent)throw Error('Cannot import "'+o+'": already exists')}(d,p,l);else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}}}}(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.typed.apply(a.typed,t)},a,s);return a.import=l,a.on("config",()=>{o6(s).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&l(e,{override:!0})})}),a.create=aD.bind(null,e),a.factory=o8,a.import(o6((function e(t,n){for(var r in t)if(o4(t,r)){var i=t[r];"object"==typeof i&&null!==i?e(i,n):n[r]=i}}(e,i={}),i))),a.ArgumentsError=aM,a.DimensionError=af,a.IndexError=ag,a}var aO,aP,aR,aE,aL,aN,az,aF,aB,aj,aV,aH,aW,aG,a$,aU,aZ,aY,aX="0123456789abcdef",aq="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",aK="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",aQ={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},aJ=!0,a0="[DecimalError] ",a1=a0+"Invalid argument: ",a2=a0+"Precision limit exceeded",a5=a0+"crypto unavailable",a3="[object Decimal]",a4=Math.floor,a6=Math.pow,a9=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,a8=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,a7=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,se=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,st=aq.length-1,sn=aK.length-1,sr={toStringTag:a3};function si(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=sg(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=sg(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function so(e,t,n){if(e!==~~e||e<t||e>n)throw Error(a1+e)}function sa(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=a6(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==a6(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==a6(10,t-3)-1,a}function ss(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=aX.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}sr.absoluteValue=sr.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),su(e)},sr.ceil=function(){return su(new this.constructor(this),this.e+1,2)},sr.clampedTo=sr.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(a1+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},sr.comparedTo=sr.cmp=function(e){var t,n,r,i,o=this.d,a=(e=new this.constructor(e)).d,s=this.s,l=e.s;if(!o||!a)return s&&l?s!==l?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-l:0;if(s!==l)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(t=0,n=(r=o.length)<(i=a.length)?r:i;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},sr.cosine=sr.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/sC(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=sS(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,sM(r,n)),r.precision=e,r.rounding=t,su(2==aY||3==aY?n.neg():n,e,t,!0)):new r(1):new r(NaN)},sr.cubeRoot=sr.cbrt=function(){var e,t,n,r,i,o,a,s,l,u,c=this.constructor;if(!this.isFinite()||this.isZero())return new c(this);for(aJ=!1,(o=this.s*a6(this.s*this,1/3))&&Math.abs(o)!=1/0?r=new c(o.toString()):(n=si(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=a6(n,1/3),e=a4((e+1)/3)-(e%3==(e<0?-1:2)),(r=new c(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=this.s),a=(e=c.precision)+3;;)if(r=sl((u=(l=(s=r).times(s).times(s)).plus(this)).plus(this).times(s),u.plus(l),a+2,1),si(s.d).slice(0,a)===(n=si(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(su(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(su(s,e+1,0),s.times(s).times(s).eq(this))){r=s;break}a+=4,i=1}return aJ=!0,su(r,e,c.rounding,t)},sr.decimalPlaces=sr.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-a4(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},sr.dividedBy=sr.div=function(e){return sl(this,new this.constructor(e))},sr.dividedToIntegerBy=sr.divToInt=function(e){var t=this.constructor;return su(sl(this,new t(e),0,1,1),t.precision,t.rounding)},sr.equals=sr.eq=function(e){return 0===this.cmp(e)},sr.floor=function(){return su(new this.constructor(this),this.e+1,3)},sr.greaterThan=sr.gt=function(e){return this.cmp(e)>0},sr.greaterThanOrEqualTo=sr.gte=function(e){var t=this.cmp(e);return 1==t||0===t},sr.hyperbolicCosine=sr.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/sC(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=sS(a,1,o.times(t),new a(1),!0);for(var l,u=e,c=new a(8);u--;)l=o.times(o),o=s.minus(l.times(c.minus(l.times(c))));return su(o,a.precision=n,a.rounding=r,!0)},sr.hyperbolicSine=sr.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=sS(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=sS(o,2,i=i.times(1/sC(5,e)),i,!0);for(var a,s=new o(5),l=new o(16),u=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(u))))}return o.precision=t,o.rounding=n,su(i,t,n,!0)},sr.hyperbolicTangent=sr.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,sl(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},sr.inverseCosine=sr.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return -1!==n?0===n?e.isNeg()?sp(t,r,i):new t(0):new t(NaN):e.isZero()?sp(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},sr.inverseHyperbolicCosine=sr.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,aJ=!1,n=n.times(n).minus(1).sqrt().plus(n),aJ=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},sr.inverseHyperbolicSine=sr.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,aJ=!1,n=n.times(n).plus(1).sqrt().plus(n),aJ=!0,r.precision=e,r.rounding=t,n.ln())},sr.inverseHyperbolicTangent=sr.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1)?su(new o(i),e,t,!0):(o.precision=n=r-i.e,i=sl(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5)):new o(NaN)},sr.inverseSine=sr.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t)?0===t?((e=sp(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2))},sr.inverseTangent=sr.atan=function(){var e,t,n,r,i,o,a,s,l,u=this,c=u.constructor,d=c.precision,h=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);else if(u.abs().eq(1)&&d+4<=sn)return(a=sp(c,d+4,h).times(.25)).s=u.s,a}else{if(!u.s)return new c(NaN);if(d+4<=sn)return(a=sp(c,d+4,h).times(.5)).s=u.s,a}for(c.precision=s=d+10,c.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(aJ=!1,t=Math.ceil(s/7),r=1,l=u.times(u),a=new c(u),i=u;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),aJ=!0,su(a,c.precision=d,c.rounding=h,!0)},sr.isFinite=function(){return!!this.d},sr.isInteger=sr.isInt=function(){return!!this.d&&a4(this.e/7)>this.d.length-2},sr.isNaN=function(){return!this.s},sr.isNegative=sr.isNeg=function(){return this.s<0},sr.isPositive=sr.isPos=function(){return this.s>0},sr.isZero=function(){return!!this.d&&0===this.d[0]},sr.lessThan=sr.lt=function(e){return 0>this.cmp(e)},sr.lessThanOrEqualTo=sr.lte=function(e){return 1>this.cmp(e)},sr.logarithm=sr.log=function(e){var t,n,r,i,o,a,s,l=this.constructor,u=l.precision,c=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new l(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(r=n[0];r%10==0;)r/=10;i=1!==r}if(aJ=!1,sa((s=sl(o=sb(this,a=u+5),t?sh(l,a+10):sb(e,a),a,1)).d,r=u,c))do if(a+=10,s=sl(o=sb(this,a),t?sh(l,a+10):sb(e,a),a,1),!i){+si(s.d).slice(r+1,r+15)+1==1e14&&(s=su(s,u+1,0));break}while(sa(s.d,r+=10,c));return aJ=!0,su(s,u,c)},sr.minus=sr.sub=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p=this.constructor;if(e=new p(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new p(e.d||this.s!==e.s?this:NaN):e=new p(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(u=this.d,h=e.d,s=p.precision,l=p.rounding,!u[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!u[0])return new p(3===l?-0:0);e=new p(this)}return aJ?su(e,s,l):e}if(n=a4(e.e/7),c=a4(this.e/7),u=u.slice(),o=c-n){for((d=o<0)?(t=u,o=-o,a=h.length):(t=h,n=c,a=u.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=u.length)<(a=h.length))&&(a=r),r=0;r<a;r++)if(u[r]!=h[r]){d=u[r]<h[r];break}o=0}for(d&&(t=u,u=h,h=t,e.s=-e.s),a=u.length,r=h.length-a;r>0;--r)u[a++]=0;for(r=h.length;r>o;){if(u[--r]<h[r]){for(i=r;i&&0===u[--i];)u[i]=1e7-1;--u[i],u[r]+=1e7}u[r]-=h[r]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(e.d=u,e.e=sd(u,n),aJ?su(e,s,l):e):new p(3===l?-0:0)},sr.modulo=sr.mod=function(e){var t,n=this.constructor;return(e=new n(e),this.d&&e.s&&(!e.d||e.d[0]))?e.d&&(!this.d||this.d[0])?(aJ=!1,9==n.modulo?(t=sl(this,e.abs(),0,3,1),t.s*=e.s):t=sl(this,e,0,n.modulo,1),t=t.times(e),aJ=!0,this.minus(t)):su(new n(this),n.precision,n.rounding):new n(NaN)},sr.naturalExponential=sr.exp=function(){return sx(this)},sr.naturalLogarithm=sr.ln=function(){return sb(this)},sr.negated=sr.neg=function(){var e=new this.constructor(this);return e.s=-e.s,su(e)},sr.plus=sr.add=function(e){var t,n,r,i,o,a,s,l,u,c,d=this.constructor;if(e=new d(e),!this.d||!e.d)return this.s&&e.s?this.d||(e=new d(e.d||this.s===e.s?this:NaN)):e=new d(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.minus(e);if(u=this.d,c=e.d,s=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(e=new d(this)),aJ?su(e,s,l):e;if(o=a4(this.e/7),r=a4(e.e/7),u=u.slice(),i=o-r){for(i<0?(n=u,i=-i,a=c.length):(n=c,r=o,a=u.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=u.length)-(i=c.length)<0&&(i=a,n=c,c=u,u=n),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/1e7|0,u[i]%=1e7;for(t&&(u.unshift(t),++r),a=u.length;0==u[--a];)u.pop();return e.d=u,e.e=sd(u,r),aJ?su(e,s,l):e},sr.precision=sr.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(a1+e);return this.d?(t=sf(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},sr.round=function(){var e=this.constructor;return su(new e(this),this.e+1,e.rounding)},sr.sine=sr.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:sS(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=sS(e,2,t=t.times(1/sC(5,n)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,sM(r,n)),r.precision=e,r.rounding=t,su(aY>2?n.neg():n,e,t,!0)):new r(NaN)},sr.squareRoot=sr.sqrt=function(){var e,t,n,r,i,o,a=this.d,s=this.e,l=this.s,u=this.constructor;if(1!==l||!a||!a[0])return new u(!l||l<0&&(!a||a[0])?NaN:a?this:1/0);for(aJ=!1,0==(l=Math.sqrt(+this))||l==1/0?(((t=si(a)).length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=a4((s+1)/2)-(s<0||s%2),r=new u(t=l==1/0?"5e"+s:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+s)):r=new u(l.toString()),n=(s=u.precision)+3;;)if(r=(o=r).plus(sl(this,o,n+2,1)).times(.5),si(o.d).slice(0,n)===(t=si(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(su(r,s+1,1),e=!r.times(r).eq(this));break}if(!i&&(su(o,s+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return aJ=!0,su(r,s,u.rounding,e)},sr.tangent=sr.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=sl(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,su(2==aY||4==aY?n.neg():n,e,t,!0)):new r(NaN)},sr.times=sr.mul=function(e){var t,n,r,i,o,a,s,l,u,c=this.constructor,d=this.d,h=(e=new c(e)).d;if(e.s*=this.s,!d||!d[0]||!h||!h[0])return new c(!e.s||d&&!d[0]&&!h||h&&!h[0]&&!d?NaN:!d||!h?e.s/0:0*e.s);for(n=a4(this.e/7)+a4(e.e/7),(l=d.length)<(u=h.length)&&(o=d,d=h,h=o,a=l,l=u,u=a),o=[],r=a=l+u;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+h[r]*d[i-r-1]+t,o[i--]=s%1e7|0,t=s/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=sd(o,n),aJ?su(e,c.precision,c.rounding):e},sr.toBinary=function(e,t){return sA(this,2,e,t)},sr.toDecimalPlaces=sr.toDP=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(so(e,0,1e9),void 0===t?t=r.rounding:so(t,0,8),su(n,e+n.e+1,t))},sr.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=sc(r,!0):(so(e,0,1e9),void 0===t?t=i.rounding:so(t,0,8),n=sc(r=su(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},sr.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=sc(this):(so(e,0,1e9),void 0===t?t=i.rounding:so(t,0,8),n=sc(r=su(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},sr.toFraction=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p=this.d,f=this.constructor;if(!p)return new f(this);if(u=n=new f(1),r=l=new f(0),a=(o=(t=new f(r)).e=sf(p)-this.e-1)%7,t.d[0]=a6(10,a<0?7+a:a),null==e)e=o>0?t:u;else{if(!(s=new f(e)).isInt()||s.lt(u))throw Error(a1+s);e=s.gt(t)?o>0?t:u:s}for(aJ=!1,s=new f(si(p)),c=f.precision,f.precision=o=7*p.length*2;d=sl(s,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=u,u=l.plus(d.times(i)),l=i,i=t,t=s.minus(d.times(i)),s=i;return i=sl(e.minus(n),r,0,1,1),l=l.plus(i.times(u)),n=n.plus(i.times(r)),l.s=u.s=this.s,h=1>sl(u,r,o,1).minus(this).abs().cmp(sl(l,n,o,1).minus(this).abs())?[u,r]:[l,n],f.precision=c,aJ=!0,h},sr.toHexadecimal=sr.toHex=function(e,t){return sA(this,16,e,t)},sr.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:so(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(aJ=!1,n=sl(n,e,0,t,1).times(e),aJ=!0,su(n)):(e.s=n.s,n=e),n},sr.toNumber=function(){return+this},sr.toOctal=function(e,t){return sA(this,8,e,t)},sr.toPower=sr.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=+(e=new l(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new l(a6(+s,u));if((s=new l(s)).eq(1))return s;if(r=l.precision,o=l.rounding,e.eq(1))return su(s,r,o);if((t=a4(e.e/7))>=e.d.length-1&&(n=u<0?-u:u)<=0x1fffffffffffff)return i=sm(l,s,n,r),e.s<0?new l(1).div(i):su(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new l(NaN);if((1&e.d[t])==0&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=a6(+s,u))&&isFinite(n)?new l(n+"").e:a4(u*(Math.log("0."+si(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(aJ=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=sx(e.times(sb(s,r+n)),r)).d&&sa((i=su(i,r+5,1)).d,r,o)&&(t=r+10,+si((i=su(sx(e.times(sb(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=su(i,r+1,0))),i.s=a,aJ=!0,l.rounding=o,su(i,r,o))},sr.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=sc(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(so(e,1,1e9),void 0===t?t=i.rounding:so(t,0,8),n=sc(r=su(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},sr.toSignificantDigits=sr.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(so(e,1,1e9),void 0===t?t=n.rounding:so(t,0,8)),su(new n(this),e,t)},sr.toString=function(){var e=this.constructor,t=sc(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},sr.truncated=sr.trunc=function(){return su(new this.constructor(this),this.e+1,1)},sr.valueOf=sr.toJSON=function(){var e=this.constructor,t=sc(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var sl=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,s,l){var u,c,d,h,p,f,g,m,v,y,x,b,w,_,S,C,M,A,T,I,k=r.constructor,D=r.s==i.s?1:-1,O=r.d,P=i.d;if(!O||!O[0]||!P||!P[0])return new k(!r.s||!i.s||(O?P&&O[0]==P[0]:!P)?NaN:O&&0==O[0]||!P?0*D:D/0);for(l?(p=1,c=r.e-i.e):(l=1e7,p=7,c=a4(r.e/p)-a4(i.e/p)),T=P.length,M=O.length,y=(v=new k(D)).d=[],d=0;P[d]==(O[d]||0);d++);if(P[d]>(O[d]||0)&&c--,null==o?(_=o=k.precision,a=k.rounding):_=s?o+(r.e-i.e)+1:o,_<0)y.push(1),f=!0;else{if(_=_/p+2|0,d=0,1==T){for(h=0,P=P[0],_++;(d<M||h)&&_--;d++)S=h*l+(O[d]||0),y[d]=S/P|0,h=S%P|0;f=h||d<M}else{for((h=l/(P[0]+1)|0)>1&&(P=e(P,h,l),O=e(O,h,l),T=P.length,M=O.length),C=T,b=(x=O.slice(0,T)).length;b<T;)x[b++]=0;(I=P.slice()).unshift(0),A=P[0],P[1]>=l/2&&++A;do h=0,(u=t(P,x,T,b))<0?(w=x[0],T!=b&&(w=w*l+(x[1]||0)),(h=w/A|0)>1?(h>=l&&(h=l-1),m=(g=e(P,h,l)).length,b=x.length,1==(u=t(g,x,m,b))&&(h--,n(g,T<m?I:P,m,l))):(0==h&&(u=h=1),g=P.slice()),(m=g.length)<b&&g.unshift(0),n(x,g,b,l),-1==u&&(b=x.length,(u=t(P,x,T,b))<1&&(h++,n(x,T<b?I:P,b,l))),b=x.length):0===u&&(h++,x=[0]),y[d++]=h,u&&x[0]?x[b++]=O[C]||0:(x=[O[C]],b=1);while((C++<M||void 0!==x[0])&&_--);f=void 0!==x[0]}y[0]||y.shift()}if(1==p)v.e=c,aZ=f;else{for(d=1,h=y[0];h>=10;h/=10)d++;v.e=d+c*p-1,su(v,s?o+v.e+1:o,a,f)}return v}}();function su(e,t,n,r){var i,o,a,s,l,u,c,d,h,p=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,l=(c=d[h=0])/a6(10,i-a-1)%10|0;else if((h=Math.ceil((o+1)/7))>=(s=d.length))if(r){for(;s++<=h;)d.push(0);c=l=0,i=1,o%=7,a=o-7+1}else break e;else{for(i=1,c=s=d[h];s>=10;s/=10)i++;o%=7,l=(a=o-7+i)<0?0:c/a6(10,i-a-1)%10|0}if(r=r||t<0||void 0!==d[h+1]||(a<0?c:c%a6(10,i-a-1)),u=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?c/a6(10,i-a):0:d[h-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,u?(t-=e.e+1,d[0]=a6(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=h,s=1,h--):(d.length=h+1,s=a6(10,7-o),d[h]=a>0?(c/a6(10,i-a)%a6(10,a)|0)*s:0),u)for(;;)if(0==h){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,1e7==d[0]&&(d[0]=1));break}else{if(d[h]+=s,1e7!=d[h])break;d[h--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return aJ&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function sc(e,t,n){if(!e.isFinite())return sw(e);var r,i=e.e,o=si(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+sg(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+sg(-i-1)+o,n&&(r=n-a)>0&&(o+=sg(r))):i>=a?(o+=sg(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+sg(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=sg(r))),o}function sd(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function sh(e,t,n){if(t>st)throw aJ=!0,n&&(e.precision=n),Error(a2);return su(new e(aq),t,1,!0)}function sp(e,t,n){if(t>sn)throw Error(a2);return su(new e(aK),t,n,!0)}function sf(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function sg(e){for(var t="";e--;)t+="0";return t}function sm(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(aJ=!1;;){if(n%2&&sT((o=o.times(t)).d,a)&&(i=!0),0===(n=a4(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}sT((t=t.times(t)).d,a)}return aJ=!0,o}function sv(e){return 1&e.d[e.d.length-1]}function sy(e,t,n){for(var r,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function sx(e,t){var n,r,i,o,a,s,l,u=0,c=0,d=0,h=e.constructor,p=h.rounding,f=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?!e.d[0]?1:e.s<0?0:1/0:e.s?e.s<0?0:e:0/0);for(null==t?(aJ=!1,l=f):l=t,s=new h(.03125);e.e>-2;)e=e.times(s),d+=5;for(l+=r=Math.log(a6(2,d))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=l;;){if(o=su(o.times(e),l,1),n=n.times(++c),si((s=a.plus(sl(o,n,l,1))).d).slice(0,l)===si(a.d).slice(0,l)){for(i=d;i--;)a=su(a.times(a),l,1);if(null!=t)return h.precision=f,a;if(!(u<3&&sa(a.d,l-r,p,u)))return su(a,h.precision=f,p,aJ=!0);h.precision=l+=10,n=o=s=new h(1),c=0,u++}a=s}}function sb(e,t){var n,r,i,o,a,s,l,u,c,d,h,p=1,f=e,g=f.d,m=f.constructor,v=m.rounding,y=m.precision;if(f.s<0||!g||!g[0]||!f.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=f.s?NaN:g?0:f);if(null==t?(aJ=!1,c=y):c=t,m.precision=c+=10,r=(n=si(g)).charAt(0),!(15e14>Math.abs(o=f.e)))return u=sh(m,c+2,y).times(o+""),f=sb(new m(r+"."+n.slice(1)),c-10).plus(u),m.precision=y,null==t?su(f,y,v,aJ=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=si((f=f.times(e)).d)).charAt(0),p++;for(o=f.e,r>1?(f=new m("0."+n),o++):f=new m(r+"."+n.slice(1)),d=f,l=a=f=sl(f.minus(1),f.plus(1),c,1),h=su(f.times(f),c,1),i=3;;){if(a=su(a.times(h),c,1),si((u=l.plus(sl(a,new m(i),c,1))).d).slice(0,c)===si(l.d).slice(0,c)){if(l=l.times(2),0!==o&&(l=l.plus(sh(m,c+2,y).times(o+""))),l=sl(l,new m(p),c,1),null!=t)return m.precision=y,l;if(!sa(l.d,c-10,v,s))return su(l,m.precision=y,v,aJ=!0);m.precision=c+=10,u=a=f=sl(d.minus(1),d.plus(1),c,1),h=su(f.times(f),c,1),i=s=1}l=u,i+=2}}function sw(e){return String(e.s*e.s/0)}function s_(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),aJ&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function sS(e,t,n,r,i){var o,a,s,l,u=e.precision,c=Math.ceil(u/7);for(aJ=!1,l=n.times(n),s=new e(r);;){if(a=sl(s.times(l),new e(t++*t++),u,1),s=i?r.plus(a):r.minus(a),r=sl(a.times(l),new e(t++*t++),u,1),void 0!==(a=s.plus(r)).d[c]){for(o=c;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return aJ=!0,a.d.length=c+1,a}function sC(e,t){for(var n=e;--t;)n*=e;return n}function sM(e,t){var n,r=t.s<0,i=sp(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return aY=r?4:1,t;if((n=t.divToInt(i)).isZero())aY=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return aY=sv(n)?r?2:3:r?4:1,t;aY=sv(n)?r?1:4:r?3:2}return t.minus(i).abs()}function sA(e,t,n,r){var i,o,a,s,l,u,c,d,h,p=e.constructor,f=void 0!==n;if(f?(so(n,1,1e9),void 0===r?r=p.rounding:so(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(a=(c=sc(e)).indexOf("."),f?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,a>=0&&(c=c.replace(".",""),(h=new p(1)).e=c.length-a,h.d=ss(sc(h),10,i),h.e=h.d.length),o=l=(d=ss(c,10,i)).length;0==d[--l];)d.pop();if(d[0]){if(a<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=sl(e,h,n,r,0,i)).d,o=e.e,u=aZ),a=d[n],s=i/2,u=u||void 0!==d[n+1],u=r<4?(void 0!==a||u)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||u||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,u)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(a=0,c="";a<l;a++)c+=aX.charAt(d[a]);if(f){if(l>1)if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)c+="0";for(l=(d=ss(c,i,t)).length;!d[l-1];--l);for(a=1,c="1.";a<l;a++)c+=aX.charAt(d[a])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>l)for(o-=l;o--;)c+="0";else o<l&&(c=c.slice(0,o)+"."+c.slice(o))}else c=f?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=sw(e);return e.s<0?"-"+c:c}function sT(e,t){if(e.length>t)return e.length=t,!0}function sI(e){return new this(e).abs()}function sk(e){return new this(e).acos()}function sD(e){return new this(e).acosh()}function sO(e,t){return new this(e).plus(t)}function sP(e){return new this(e).asin()}function sR(e){return new this(e).asinh()}function sE(e){return new this(e).atan()}function sL(e){return new this(e).atanh()}function sN(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?sp(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=sp(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(sl(e,t,o,1)),t=sp(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(sl(e,t,o,1)):(n=sp(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function sz(e){return new this(e).cbrt()}function sF(e){return su(e=new this(e),e.e+1,2)}function sB(e,t,n){return new this(e).clamp(t,n)}function sj(e){if(!e||"object"!=typeof e)throw Error(a0+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=aQ[n]),void 0!==(r=e[n]))if(a4(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(a1+n+": "+r);if(n="crypto",i&&(this[n]=aQ[n]),void 0!==(r=e[n]))if(!0===r||!1===r||0===r||1===r)if(r)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(a5);else this[n]=!1;else throw Error(a1+n+": "+r);return this}function sV(e){return new this(e).cos()}function sH(e){return new this(e).cosh()}function sW(e,t){return new this(e).div(t)}function sG(e){return new this(e).exp()}function s$(e){return su(e=new this(e),e.e+1,3)}function sU(){var e,t,n=new this(0);for(e=0,aJ=!1;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return aJ=!0,new this(1/0);n=t}return aJ=!0,n.sqrt()}function sZ(e){return e instanceof li||e&&e.toStringTag===a3||!1}function sY(e){return new this(e).ln()}function sX(e,t){return new this(e).log(t)}function sq(e){return new this(e).log(2)}function sK(e){return new this(e).log(10)}function sQ(){return sy(this,arguments,-1)}function sJ(){return sy(this,arguments,1)}function s0(e,t){return new this(e).mod(t)}function s1(e,t){return new this(e).mul(t)}function s2(e,t){return new this(e).pow(t)}function s5(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:so(e,1,1e9),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(a5);else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],e%=7,r&&e&&(i=a6(10,7-e),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function s3(e){return su(e=new this(e),e.e+1,this.rounding)}function s4(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function s6(e){return new this(e).sin()}function s9(e){return new this(e).sinh()}function s8(e){return new this(e).sqrt()}function s7(e,t){return new this(e).sub(t)}function le(){var e=0,t=arguments,n=new this(t[0]);for(aJ=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return aJ=!0,su(n,this.precision,this.rounding)}function lt(e){return new this(e).tan()}function ln(e){return new this(e).tanh()}function lr(e){return su(e=new this(e),e.e+1,1)}sr[Symbol.for("nodejs.util.inspect.custom")]=sr.toString,sr[Symbol.toStringTag]="Decimal";var li=sr.constructor=function e(t){var n,r,i;function o(e){var t,n,r;if(!(this instanceof o))return new o(e);if(this.constructor=o,sZ(e)){this.s=e.s,aJ?!e.d||e.e>o.maxE?(this.e=NaN,this.d=null):e.e<o.minE?(this.e=0,this.d=[0]):(this.e=e.e,this.d=e.d.slice()):(this.e=e.e,this.d=e.d?e.d.slice():e.d);return}if("number"==(r=typeof e)){if(0===e){this.s=1/e<0?-1:1,this.e=0,this.d=[0];return}if(e<0?(e=-e,this.s=-1):this.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;aJ?t>o.maxE?(this.e=NaN,this.d=null):t<o.minE?(this.e=0,this.d=[0]):(this.e=t,this.d=[e]):(this.e=t,this.d=[e]);return}if(0*e!=0){e||(this.s=NaN),this.e=NaN,this.d=null;return}return s_(this,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),this.s=-1):(43===n&&(e=e.slice(1)),this.s=1),se.test(e)?s_(this,e):function(e,t){var n,r,i,o,a,s,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),se.test(t))return s_(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(a8.test(t))n=16,t=t.toLowerCase();else if(a9.test(t))n=2;else if(a7.test(t))n=8;else throw Error(a1+t);for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=sm(r,new r(n),o,2*o)),o=c=(u=ss(t,n,1e7)).length-1;0===u[o];--o)u.pop();return o<0?new r(0*e.s):(e.e=sd(u,c),e.d=u,aJ=!1,a&&(e=sl(e,i,4*s)),l&&(e=e.times(54>Math.abs(l)?a6(2,l):li.pow(2,l))),aJ=!0,e)}(this,e);if("bigint"===r)return e<0?(e=-e,this.s=-1):this.s=1,s_(this,e.toString());throw Error(a1+e)}if(o.prototype=sr,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=sj,o.clone=e,o.isDecimal=sZ,o.abs=sI,o.acos=sk,o.acosh=sD,o.add=sO,o.asin=sP,o.asinh=sR,o.atan=sE,o.atanh=sL,o.atan2=sN,o.cbrt=sz,o.ceil=sF,o.clamp=sB,o.cos=sV,o.cosh=sH,o.div=sW,o.exp=sG,o.floor=s$,o.hypot=sU,o.ln=sY,o.log=sX,o.log10=sK,o.log2=sq,o.max=sQ,o.min=sJ,o.mod=s0,o.mul=s1,o.pow=s2,o.random=s5,o.round=s3,o.sign=s4,o.sin=s6,o.sinh=s9,o.sqrt=s8,o.sub=s7,o.sum=le,o.tan=lt,o.tanh=ln,o.trunc=lr,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=0,i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(aQ);aq=new li(aq),aK=new li(aK);var lo={createBigNumberClass:o8("BigNumber",["?on","config"],e=>{var{on:t,config:n}=e,r=li.clone({precision:n.precision,modulo:li.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(e){return new r(e.value)},t&&t("config",function(e,t){e.precision!==t.precision&&r.config({precision:e.precision})}),r},{isClass:!0})},la={createMatrixClass:o8("Matrix",[],()=>{function e(){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0})},ls={MatrixDependencies:la,createDenseMatrixClass:o8("DenseMatrix",["Matrix"],e=>{var{Matrix:t}=e;function n(e,t){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ow(t))throw Error("Invalid datatype: "+t);if(oS(e))"DenseMatrix"===e.type?(this._data=o1(e._data),this._size=o1(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=t||e._datatype;else if(e&&o_(e.data)&&o_(e.size))this._data=e.data,this._size=e.size,av(this._data,this._size),this._datatype=t||e.datatype;else if(o_(e))this._data=function e(t){for(var n=0,r=t.length;n<r;n++){var i=t[n];o_(i)?t[n]=e(i):i&&!0===i.isMatrix&&(t[n]=e(i.valueOf()))}return t}(e),this._size=am(this._data),av(this._data,this._size),this._datatype=t;else if(e)throw TypeError("Unsupported type of data ("+o0(e)+")");else this._data=[],this._size=[0],this._datatype=t}function r(e,t,n){if(0===t.length){for(var r=e._data;o_(r);)r=r[0];return r}return e._size=t.slice(0),e._data=ax(e._data,e._size,n),e}function i(e,t,n){for(var i=e._size.slice(0),o=!1;i.length<t.length;)i.push(0),o=!0;for(var a=0,s=t.length;a<s;a++)t[a]>i[a]&&(i[a]=t[a],o=!0);o&&r(e,i,n)}return n.prototype=new t,n.prototype.createDenseMatrix=function(e,t){return new n(e,t)},n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return aS(this._data,o0)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(e,t){return new n(e,t)},n.prototype.subset=function(e,t,r){switch(arguments.length){case 1:return function(e,t){if(!oI(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var r=t.size();if(r.length!==e._size.length)throw new af(r.length,e._size.length);for(var i=t.min(),o=t.max(),a=0,s=e._size.length;a<s;a++)ay(i[a],e._size[a]),ay(o[a],e._size[a]);return new n(function e(t,n,r,i){var o=i===r-1,a=n.dimension(i);return o?a.map(function(e){return ay(e,t.length),t[e]}).valueOf():a.map(function(o){return ay(o,t.length),e(t[o],n,r,i+1)}).valueOf()}(e._data,t,r.length,0),e._datatype)}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var o,a=t.size(),s=t.isScalar();if(oS(n)?(o=n.size(),n=n.valueOf()):o=am(n),s){if(0!==o.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(a.length<e._size.length)throw new af(a.length,e._size.length,"<");if(o.length<a.length){for(var l=0,u=0;1===a[l]&&1===o[l];)l++;for(;1===a[l];)u++,l++;n=a_(n,a.length,u,o)}if(!o5(a,o))throw new af(a,o,">");i(e,t.max().map(function(e){return e+1}),r);var c=a.length;!function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach(function(e,n){ay(e),t[e]=r[n[0]]}):s.forEach(function(a,s){ay(a),e(t[a],n,r[s[0]],i,o+1)})}(e._data,t,n,c,0)}return e}(this,e,t,r);default:throw SyntaxError("Wrong number of arguments")}},n.prototype.get=function(e){if(!o_(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new af(e.length,this._size.length);for(var t=0;t<e.length;t++)ay(e[t],this._size[t]);for(var n=this._data,r=0,i=e.length;r<i;r++){var o=e[r];ay(o,n.length),n=n[o]}return n},n.prototype.set=function(e,t,n){if(!o_(e))throw TypeError("Array expected");if(e.length<this._size.length)throw new af(e.length,this._size.length,"<");i(this,e.map(function(e){return e+1}),n);var r,o,a,s=this._data;for(r=0,o=e.length-1;r<o;r++)ay(a=e[r],s.length),s=s[a];return ay(a=e[e.length-1],s.length),s[a]=t,this},n.prototype.resize=function(e,t,n){if(!oC(e))throw TypeError("Array or Matrix expected");var i=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);return r(n?this.clone():this,i,t)},n.prototype.reshape=function(e,t){var n=t?this.clone():this;n._data=function(e,t){var n=function(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function e(n){Array.isArray(n)?n.forEach(e):t.push(n)}),t}(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw new af(0,r,"!=");var i=aw(t=ab(t,r));if(r!==i)throw new af(i,r,"!=");try{return function(e,t){for(var n,r=e,i=t.length-1;i>0;i--){var o=t[i];n=[];for(var a=r.length/o,s=0;s<a;s++)n.push(r.slice(s*o,(s+1)*o));r=n}return r}(n,t)}catch(e){if(e instanceof af)throw new af(i,r,"!=");throw e}}(n._data,e);var r=n._size.reduce((e,t)=>e*t);return n._size=ab(e,r),n},n.prototype.clone=function(){return new n({data:o1(this._data),size:o1(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(e){var t=this,r=function n(r,i){return o_(r)?r.map(function(e,t){return n(e,i.concat(t))}):e(r,i,t)}(this._data,[]),i=void 0!==this._datatype?aS(r,o0):void 0;return new n(r,i)},n.prototype.forEach=function(e){var t=this;!function n(r,i){o_(r)?r.forEach(function(e,t){n(e,i.concat(t))}):e(r,i,t)}(this._data,[])},n.prototype[Symbol.iterator]=function*(){var e=function* e(t,n){if(o_(t))for(var r=0;r<t.length;r++)yield*e(t[r],n.concat(r));else yield{value:t,index:n}};yield*e(this._data,[])},n.prototype.rows=function(){var e=[];if(2!==this.size().length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var t of this._data)e.push(new n([t],this._datatype));return e},n.prototype.columns=function(){var e=this,t=[],r=this.size();if(2!==r.length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,o=function(r){var o=i.map(e=>[e[r]]);t.push(new n(o,e._datatype))},a=0;a<r[1];a++)o(a);return t},n.prototype.toArray=function(){return o1(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(e){return ap(this._data,e)},n.prototype.toString=function(){return ap(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(e){if(e){if(ov(e)&&(e=e.toNumber()),!om(e)||!at(e))throw TypeError("The parameter k must be an integer number")}else e=0;for(var t=e>0?e:0,r=e<0?-e:0,i=Math.min(this._size[0]-r,this._size[1]-t),o=[],a=0;a<i;a++)o[a]=this._data[a+r][a+t];return new n({data:o,size:[i],datatype:this._datatype})},n.diagonal=function(e,t,r,i){if(!o_(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(ov(e)&&(e=e.toNumber()),!om(e)||!at(e)||e<1)throw Error("Size values must be positive integers");return e}),r){if(ov(r)&&(r=r.toNumber()),!om(r)||!at(r))throw TypeError("The parameter k must be an integer number")}else r=0;var o,a=r>0?r:0,s=r<0?-r:0,l=e[0],u=e[1],c=Math.min(l-s,u-a);if(o_(t)){if(t.length!==c)throw Error("Invalid value array length");o=function(e){return t[e]}}else if(oS(t)){var d=t.size();if(1!==d.length||d[0]!==c)throw Error("Invalid matrix length");o=function(e){return t.get([e])}}else o=function(){return t};i||(i=ov(o(0))?o(0).mul(0):0);var h=[];if(e.length>0){h=ax(h,e,i);for(var p=0;p<c;p++)h[p+s][p+a]=o(p)}return new n({data:h,size:[l,u]})},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(e,t){if(!om(e)||!at(e)||!om(t)||!at(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return ay(e,this._size[0]),ay(t,this._size[0]),n._swapRows(e,t,this._data),this},n._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},n},{isClass:!0})};let ll=Math.cosh||function(e){return 1e-9>Math.abs(e)?1-e:(Math.exp(e)+Math.exp(-e))*.5},lu=Math.sinh||function(e){return 1e-9>Math.abs(e)?e:(Math.exp(e)-Math.exp(-e))*.5},lc=function(e,t){return((e=Math.abs(e))<(t=Math.abs(t))&&([e,t]=[t,e]),e<1e8)?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},ld=function(){throw SyntaxError("Invalid Param")};function lh(e,t){let n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):.5*Math.log((e*=.5)*e+(t*=.5)*t)+Math.LN2}let lp={re:0,im:0},lf=function(e,t){if(null==e)lp.re=lp.im=0;else if(void 0!==t)lp.re=e,lp.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)lp.re=e.re,lp.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return lg.INFINITY;lp.re=e.abs*Math.cos(e.arg),lp.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return lg.INFINITY;lp.re=e.r*Math.cos(e.phi),lp.im=e.r*Math.sin(e.phi)}else 2===e.length?(lp.re=e[0],lp.im=e[1]):ld();break;case"string":lp.im=lp.re=0;let n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),r=1,i=0;null===n&&ld();for(let e=0;e<n.length;e++){let t=n[e];" "===t||" "===t||"\n"===t||("+"===t?r++:"-"===t?i++:("i"===t||"I"===t?(r+i===0&&ld()," "===n[e+1]||isNaN(n[e+1])?lp.im+=parseFloat((i%2?"-":"")+"1"):(lp.im+=parseFloat((i%2?"-":"")+n[e+1]),e++)):((r+i===0||isNaN(t))&&ld(),"i"===n[e+1]||"I"===n[e+1]?(lp.im+=parseFloat((i%2?"-":"")+t),e++):lp.re+=parseFloat((i%2?"-":"")+t)),r=i=0))}r+i>0&&ld();break;case"number":lp.im=0,lp.re=e;break;default:ld()}return isNaN(lp.re)||isNaN(lp.im),lp};function lg(e,t){if(!(this instanceof lg))return new lg(e,t);let n=lf(e,t);this.re=n.re,this.im=n.im}lg.prototype={re:0,im:0,sign:function(){let e=lc(this.re,this.im);return new lg(this.re/e,this.im/e)},add:function(e,t){let n=lf(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?lg.NAN:lg.INFINITY:new lg(this.re+n.re,this.im+n.im)},sub:function(e,t){let n=lf(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?lg.NAN:lg.INFINITY:new lg(this.re-n.re,this.im-n.im)},mul:function(e,t){let n=lf(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;return r&&a||i&&o?lg.NAN:r||i?lg.INFINITY:0===n.im&&0===this.im?new lg(this.re*n.re,0):new lg(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){let n=lf(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;if(o&&a||r&&i)return lg.NAN;if(a||r)return lg.INFINITY;if(o||i)return lg.ZERO;if(0===n.im)return new lg(this.re/n.re,this.im/n.re);if(Math.abs(n.re)<Math.abs(n.im)){let e=n.re/n.im,t=n.re*e+n.im;return new lg((this.re*e+this.im)/t,(this.im*e-this.re)/t)}{let e=n.im/n.re,t=n.im*e+n.re;return new lg((this.re+this.im*e)/t,(this.im-this.re*e)/t)}},pow:function(e,t){let n=lf(e,t),r=0===this.re&&0===this.im;if(0===n.re&&0===n.im)return lg.ONE;if(0===n.im){if(0===this.im&&this.re>0)return new lg(Math.pow(this.re,n.re),0);else if(0===this.re)switch((n.re%4+4)%4){case 0:return new lg(Math.pow(this.im,n.re),0);case 1:return new lg(0,Math.pow(this.im,n.re));case 2:return new lg(-Math.pow(this.im,n.re),0);case 3:return new lg(0,-Math.pow(this.im,n.re))}}if(r&&n.re>0)return lg.ZERO;let i=Math.atan2(this.im,this.re),o=lh(this.re,this.im),a=Math.exp(n.re*o-n.im*i),s=n.im*o+n.re*i;return new lg(a*Math.cos(s),a*Math.sin(s))},sqrt:function(){let e=this.re,t=this.im;if(0===t)if(e>=0)return new lg(Math.sqrt(e),0);else return new lg(0,Math.sqrt(-e));let n=Math.sqrt(.5*(lc(e,t)+Math.abs(e))),r=Math.abs(t)/(2*n);return e>=0?new lg(n,t<0?-r:r):new lg(r,t<0?-n:n)},exp:function(){let e=Math.exp(this.re);return 0===this.im?new lg(e,0):new lg(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e,t=this.re,n=this.im;return new lg(Math.expm1(t)*Math.cos(n)+-2*(e=Math.sin(.5*n))*e,Math.exp(t)*Math.sin(n))},log:function(){let e=this.re,t=this.im;return 0===t&&e>0?new lg(Math.log(e),0):new lg(lh(e,t),Math.atan2(t,e))},abs:function(){return lc(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new lg(Math.sin(e)*ll(t),Math.cos(e)*lu(t))},cos:function(){let e=this.re,t=this.im;return new lg(Math.cos(e)*ll(t),-Math.sin(e)*lu(t))},tan:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)+ll(t);return new lg(Math.sin(e)/n,lu(t)/n)},cot:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)-ll(t);return new lg(-Math.sin(e)/n,lu(t)/n)},sec:function(){let e=this.re,t=this.im,n=.5*ll(2*t)+.5*Math.cos(2*e);return new lg(Math.cos(e)*ll(t)/n,Math.sin(e)*lu(t)/n)},csc:function(){let e=this.re,t=this.im,n=.5*ll(2*t)-.5*Math.cos(2*e);return new lg(Math.sin(e)*ll(t)/n,-Math.cos(e)*lu(t)/n)},asin:function(){let e=this.re,t=this.im,n=new lg(t*t-e*e+1,-2*e*t).sqrt(),r=new lg(n.re-t,n.im+e).log();return new lg(r.im,-r.re)},acos:function(){let e=this.re,t=this.im,n=new lg(t*t-e*e+1,-2*e*t).sqrt(),r=new lg(n.re-t,n.im+e).log();return new lg(Math.PI/2-r.im,r.re)},atan:function(){let e=this.re,t=this.im;if(0===e){if(1===t)return new lg(0,1/0);if(-1===t)return new lg(0,-1/0)}let n=e*e+(1-t)*(1-t),r=new lg((1-t*t-e*e)/n,-2*e/n).log();return new lg(-.5*r.im,.5*r.re)},acot:function(){let e=this.re,t=this.im;if(0===t)return new lg(Math.atan2(1,e),0);let n=e*e+t*t;return 0!==n?new lg(e/n,-t/n).atan():new lg(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new lg(0,1/0);let n=e*e+t*t;return 0!==n?new lg(e/n,-t/n).acos():new lg(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new lg(Math.PI/2,1/0);let n=e*e+t*t;return 0!==n?new lg(e/n,-t/n).asin():new lg(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new lg(lu(e)*Math.cos(t),ll(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new lg(ll(e)*Math.cos(t),lu(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,n=ll(e)+Math.cos(t);return new lg(lu(e)/n,Math.sin(t)/n)},coth:function(){let e=2*this.re,t=2*this.im,n=ll(e)-Math.cos(t);return new lg(lu(e)/n,-Math.sin(t)/n)},csch:function(){let e=this.re,t=this.im,n=Math.cos(2*t)-ll(2*e);return new lg(-2*lu(e)*Math.cos(t)/n,2*ll(e)*Math.sin(t)/n)},sech:function(){let e=this.re,t=this.im,n=Math.cos(2*t)+ll(2*e);return new lg(2*ll(e)*Math.cos(t)/n,-2*lu(e)*Math.sin(t)/n)},asinh:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new lg(0,0);let t=Math.abs(e),n=Math.log(t+Math.sqrt(t*t+1));return new lg(e<0?-n:n,0)}let n=new lg(e*e-t*t+1,2*e*t).sqrt();return new lg(e+n.re,t+n.im).log()},acosh:function(){let e=this.re,t=this.im;if(0===t){if(e>1)return new lg(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){let t=Math.sqrt(e*e-1);return new lg(Math.log(-e+t),Math.PI)}return new lg(0,Math.acos(e))}let n=new lg(e-1,t).sqrt(),r=new lg(e+1,t).sqrt();return new lg(e+n.re*r.re-n.im*r.im,t+n.re*r.im+n.im*r.re).log()},atanh:function(){let e=this.re,t=this.im;if(0===t)return 0===e?new lg(0,0):1===e?new lg(1/0,0):-1===e?new lg(-1/0,0):-1<e&&e<1?new lg(.5*Math.log((1+e)/(1-e)),0):e>1?new lg(.5*Math.log((e+1)/(e-1)),-Math.PI/2):new lg(.5*Math.log(-((1+e)/(1-e))),Math.PI/2);let n=1-e,r=1+e,i=n*n+t*t;if(0===i)return new lg(-1!==e?e/0:0,0!==t?t/0:0);let o=(r*n-t*t)/i,a=(t*n+r*t)/i;return new lg(lh(o,a)/2,Math.atan2(a,o)/2)},acoth:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new lg(0,Math.PI/2);let n=e*e+t*t;return 0!==n?new lg(e/n,-t/n).atanh():new lg(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new lg(1/0,0);let t=1/e;return new lg(Math.log(t+Math.sqrt(t*t+1)),0)}let n=e*e+t*t;return 0!==n?new lg(e/n,-t/n).asinh():new lg(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){let e=this.re,t=this.im;if(this.isZero())return lg.INFINITY;let n=e*e+t*t;return 0!==n?new lg(e/n,-t/n).acosh():new lg(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return lg.INFINITY;if(this.isInfinite())return lg.ZERO;let e=this.re,t=this.im,n=e*e+t*t;return new lg(e/n,-t/n)},conjugate:function(){return new lg(this.re,-this.im)},neg:function(){return new lg(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new lg(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new lg(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new lg(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){let n=lf(e,t);return Math.abs(n.re-this.re)<=lg.EPSILON&&Math.abs(n.im-this.im)<=lg.EPSILON},clone:function(){return new lg(this.re,this.im)},toString:function(){let e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<lg.EPSILON&&(e=0),Math.abs(t)<lg.EPSILON&&(t=0),0===t)?n+e:(0!==e?(n+=e,n+=" ",t<0?(t=-t,n+="-"):n+="+",n+=" "):t<0&&(t=-t,n+="-"),1!==t&&(n+=t),n+"i")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},lg.ZERO=new lg(0,0),lg.ONE=new lg(1,0),lg.I=new lg(0,1),lg.PI=new lg(Math.PI,0),lg.E=new lg(Math.E,0),lg.INFINITY=new lg(1/0,1/0),lg.NAN=new lg(NaN,NaN),lg.EPSILON=1e-15;var lm=o8("Complex",[],()=>(lg.prototype.type="Complex",lg.prototype.isComplex=!0,lg.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},lg.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},lg.prototype.format=function(e){var t=this.im,n=this.re,r=ar(this.re,e),i=ar(this.im,e),o=om(e)?e:e?e.precision:null;if(null!==o){var a=Math.pow(10,-o);Math.abs(n/t)<a&&(n=0),Math.abs(t/n)<a&&(t=0)}return 0===t?r:0===n?1===t?"i":-1===t?"-i":i+"i":t<0?-1===t?r+" - i":r+" - "+i.substring(1)+"i":1===t?r+" + i":r+" + "+i+"i"},lg.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if("object"==typeof t)return lg(t);throw TypeError("Input has to be an object with r and phi keys.");case 2:var n=arguments[0],r=arguments[1];if(om(n)){if(ob(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),om(r))return new lg({r:n,phi:r});throw TypeError("Phi is not a number nor an angle unit.")}throw TypeError("Radius r is not a number.");default:throw SyntaxError("Wrong number of arguments in function fromPolar")}},lg.prototype.valueOf=lg.prototype.toString,lg.fromJSON=function(e){return new lg(e)},lg.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},lg),{isClass:!0}),lv={s:1,n:0,d:1};function ly(e,t){if(isNaN(e=parseInt(e,10)))throw lM();return e*t}function lx(e,t){if(0===t)throw lC();var n=Object.create(lS.prototype);n.s=e<0?-1:1;var r=l_(e=e<0?-e:e,t);return n.n=e/r,n.d=t/r,n}function lb(e){for(var t={},n=e,r=2,i=4;i<=n;){for(;n%r==0;)n/=r,t[r]=(t[r]||0)+1;i+=1+2*r++}return n!==e?n>1&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}var lw=function(e,t){var n,r=0,i=1,o=1,a=0,s=0,l=0,u=1,c=1,d=0,h=1,p=1,f=1;if(null==e);else if(void 0!==t){if(o=(r=e)*(i=t),r%1!=0||i%1!=0)throw lA()}else switch(typeof e){case"object":if("d"in e&&"n"in e)r=e.n,i=e.d,"s"in e&&(r*=e.s);else if(0 in e)r=e[0],1 in e&&(i=e[1]);else throw lM();o=r*i;break;case"number":if(e<0&&(o=e,e=-e),e%1==0)r=e;else if(e>0){for(e>=1&&(c=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=c);h<=1e7&&f<=1e7;){if(e===(n=(d+p)/(h+f))){h+f<=1e7?(r=d+p,i=h+f):f>h?(r=p,i=f):(r=d,i=h);break}e>n?(d+=p,h+=f):(p+=d,f+=h),h>1e7?(r=p,i=f):(r=d,i=h)}r*=c}else(isNaN(e)||isNaN(t))&&(i=r=NaN);break;case"string":if(null===(h=e.match(/\d+|./g)))throw lM();if("-"===h[d]?(o=-1,d++):"+"===h[d]&&d++,h.length===d+1?s=ly(h[d++],o):"."===h[d+1]||"."===h[d]?("."!==h[d]&&(a=ly(h[d++],o)),(++d+1===h.length||"("===h[d+1]&&")"===h[d+3]||"'"===h[d+1]&&"'"===h[d+3])&&(s=ly(h[d],o),u=Math.pow(10,h[d].length),d++),("("===h[d]&&")"===h[d+2]||"'"===h[d]&&"'"===h[d+2])&&(l=ly(h[d+1],o),c=Math.pow(10,h[d+1].length)-1,d+=3)):"/"===h[d+1]||":"===h[d+1]?(s=ly(h[d],o),u=ly(h[d+2],1),d+=3):"/"===h[d+3]&&" "===h[d+1]&&(a=ly(h[d],o),s=ly(h[d+2],o),u=ly(h[d+4],1),d+=5),h.length<=d){o=r=l+(i=u*c)*a+c*s;break}default:throw lM()}if(0===i)throw lC();lv.s=o<0?-1:1,lv.n=Math.abs(r),lv.d=Math.abs(i)};function l_(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function lS(e,t){if(lw(e,t),!(this instanceof lS))return lx(lv.s*lv.n,lv.d);e=l_(lv.d,lv.n),this.s=lv.s,this.n=lv.n/e,this.d=lv.d/e}var lC=function(){return Error("Division by Zero")},lM=function(){return Error("Invalid argument")},lA=function(){return Error("Parameters must be integer")};lS.prototype={s:1,n:0,d:1,abs:function(){return lx(this.n,this.d)},neg:function(){return lx(-this.s*this.n,this.d)},add:function(e,t){return lw(e,t),lx(this.s*this.n*lv.d+lv.s*this.d*lv.n,this.d*lv.d)},sub:function(e,t){return lw(e,t),lx(this.s*this.n*lv.d-lv.s*this.d*lv.n,this.d*lv.d)},mul:function(e,t){return lw(e,t),lx(this.s*lv.s*this.n*lv.n,this.d*lv.d)},div:function(e,t){return lw(e,t),lx(this.s*lv.s*this.n*lv.d,this.d*lv.n)},clone:function(){return lx(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new lS(NaN);if(void 0===e)return lx(this.s*this.n%this.d,1);if(lw(e,t),0===lv.n&&0===this.d)throw lC();return lx(this.s*(lv.d*this.n)%(lv.n*this.d),lv.d*this.d)},gcd:function(e,t){return lw(e,t),lx(l_(lv.n,this.n)*l_(lv.d,this.d),lv.d*this.d)},lcm:function(e,t){return(lw(e,t),0===lv.n&&0===this.n)?lx(0,1):lx(lv.n*this.n,l_(lv.n,this.n)*l_(lv.d,this.d))},ceil:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new lS(NaN):lx(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new lS(NaN):lx(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new lS(NaN):lx(Math.round(e*this.s*this.n/this.d),e)},roundTo:function(e,t){return lw(e,t),lx(this.s*Math.round(this.n*lv.d/(this.d*lv.n))*lv.n,lv.d)},inverse:function(){return lx(this.s*this.d,this.n)},pow:function(e,t){if(lw(e,t),1===lv.d)if(lv.s<0)return lx(Math.pow(this.s*this.d,lv.n),Math.pow(this.n,lv.n));else return lx(Math.pow(this.s*this.n,lv.n),Math.pow(this.d,lv.n));if(this.s<0)return null;var n=lb(this.n),r=lb(this.d),i=1,o=1;for(var a in n)if("1"!==a){if("0"===a){i=0;break}if(n[a]*=lv.n,n[a]%lv.d!=0)return null;n[a]/=lv.d,i*=Math.pow(a,n[a])}for(var a in r)if("1"!==a){if(r[a]*=lv.n,r[a]%lv.d!=0)return null;r[a]/=lv.d,o*=Math.pow(a,r[a])}return lv.s<0?lx(o,i):lx(i,o)},equals:function(e,t){return lw(e,t),this.s*this.n*lv.d==lv.s*lv.n*this.d},compare:function(e,t){lw(e,t);var n=this.s*this.n*lv.d-lv.s*lv.n*this.d;return(0<n)-(n<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;e=e||.001;for(var t=this.abs(),n=t.toContinued(),r=1;r<n.length;r++){for(var i=lx(n[r-1],1),o=r-2;o>=0;o--)i=i.inverse().add(n[o]);if(Math.abs(i.sub(t).valueOf())<e)return i.mul(this.s)}return this},divisible:function(e,t){return lw(e,t),!(!(lv.n*this.d)||this.n*lv.d%(lv.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(t)||isNaN(n))return r;do r.push(Math.floor(t/n)),e=t%n,t=n,n=e;while(1!==t);return r},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var r=function(e){for(;e%2==0;e/=2);for(;e%5==0;e/=5);if(1===e)return 0;for(var t=10%e,n=1;1!==t;n++)if(t=10*t%e,n>2e3)return 0;return n}(n),i=function(e,t){for(var n=1,r=function(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,t,e),i=0;i<300;i++){if(n===r)return i;n=10*n%e,r=10*r%e}return 0}(n,r),o=this.s<0?"-":"";if(o+=t/n|0,t%=n,(t*=10)&&(o+="."),r){for(var a=i;a--;)o+=t/n|0,t%=n,t*=10;o+="(";for(var a=r;a--;)o+=t/n|0,t%=n,t*=10;o+=")"}else for(var a=e;t&&a--;)o+=t/n|0,t%=n,t*=10;return o}};var lT=o8("Fraction",[],()=>(lS.prototype.type="Fraction",lS.prototype.isFraction=!0,lS.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},lS.fromJSON=function(e){return new lS(e)},lS),{isClass:!0}),lI=n(42915);function lk(e,t){return!!e&&"object"==typeof e&&(!!o4(lO,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function lD(e){return"object"==typeof e&&e&&e.constructor===Object}var lO={length:!0,name:!0},lP={toString:!0,valueOf:!0,toLocaleString:!0};class lR{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){var t,n,r=this.wrappedObject;if(lD(r)&&lk(r,e))return r[e];if("function"==typeof r[e]&&(t=r,n=e,!(null==t||"function"!=typeof t[n]||o4(t,n)&&Object.getPrototypeOf&&n in Object.getPrototypeOf(t))&&(o4(lP,n)||!(n in Object.prototype)&&!(n in Function.prototype))))throw Error('Cannot access method "'+e+'" as a property');throw Error('No access to property "'+e+'"')}set(e,t){return!function(e,t,n){if(lD(e)&&lk(e,t))return e[t]=n;throw Error('No access to property "'+t+'"')}(this.wrappedObject,e,t),this}has(e){return e in this.wrappedObject}}function lE(e){return!!e&&(e instanceof Map||e instanceof lR||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}var lL=function(){return lL=lI.create,lI};function lN(e){throw Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function lz(e){throw Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function lF(e){throw Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var lB={BigNumberDependencies:lo,ComplexDependencies:{createComplexClass:lm},DenseMatrixDependencies:ls,FractionDependencies:{createFractionClass:lT},createTyped:o8("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:i}=e,o=lL();return o.types=[{name:"number",test:om},{name:"Complex",test:oy},{name:"BigNumber",test:ov},{name:"Fraction",test:ox},{name:"Unit",test:ob},{name:"string",test:ow},{name:"Chain",test:oJ},{name:"Array",test:o_},{name:"Matrix",test:oS},{name:"DenseMatrix",test:oM},{name:"SparseMatrix",test:oA},{name:"Range",test:oT},{name:"Index",test:oI},{name:"boolean",test:ok},{name:"ResultSet",test:oD},{name:"Help",test:oO},{name:"function",test:oP},{name:"Date",test:oR},{name:"RegExp",test:oE},{name:"null",test:oN},{name:"undefined",test:oz},{name:"AccessorNode",test:oF},{name:"ArrayNode",test:oB},{name:"AssignmentNode",test:oj},{name:"BlockNode",test:oV},{name:"ConditionalNode",test:oH},{name:"ConstantNode",test:oW},{name:"FunctionNode",test:o$},{name:"FunctionAssignmentNode",test:oG},{name:"IndexNode",test:oU},{name:"Node",test:oZ},{name:"ObjectNode",test:oY},{name:"OperatorNode",test:oX},{name:"ParenthesisNode",test:oq},{name:"RangeNode",test:oK},{name:"SymbolNode",test:oQ},{name:"Map",test:lE},{name:"Object",test:oL}],o.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||lN(e),e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||lz(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||lz(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||lz(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||lF(e);var t=new i(e);if(t.valueOf()!==e)throw TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||lN(e);try{return new t(e)}catch(t){throw Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||lF(e);try{return new i(e)}catch(t){throw Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||lz(e);try{return new n(e)}catch(t){throw Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||lN(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||lF(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||function(){throw Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],o})},lj="equalScalar",lV=o8(lj,["typed","config"],e=>{var{typed:t,config:n}=e;return t(lj,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return ac(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||function(e,t,n){if(null==n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){var r;return r=n.epsilon,ac(e.re,t.re,r)&&ac(e.im,t.im,r)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw Error("Cannot compare units with different base");return this(e.value,t.value)}})});o8(lj,["typed","config"],e=>{var{typed:t,config:n}=e;return t(lj,{"number, number":function(e,t){return ac(e,t,n.epsilon)}})});var lH={typedDependencies:lB,createEqualScalar:lV},lW=o8("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:n,Matrix:r}=e;function i(e,t){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ow(t))throw Error("Invalid datatype: "+t);if(oS(e)){var n,r,a;n=this,r=e,a=t,"SparseMatrix"===r.type?(n._values=r._values?o1(r._values):void 0,n._index=o1(r._index),n._ptr=o1(r._ptr),n._size=o1(r._size),n._datatype=a||r._datatype):o(n,r.valueOf(),a||r._datatype)}else if(e&&o_(e.index)&&o_(e.ptr)&&o_(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(o_(e))o(this,e,t);else if(e)throw TypeError("Unsupported type of data ("+o0(e)+")");else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}function o(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var o=r.length,a=0,s=n,l=0;if(ow(i)&&(s=t.find(n,[i,i])||n,l=t.convert(0,i)),o>0){var u=0;do{e._ptr.push(e._index.length);for(var c=0;c<o;c++){var d=r[c];if(o_(d)){if(0===u&&a<d.length&&(a=d.length),u<d.length){var h=d[u];s(h,l)||(e._values.push(h),e._index.push(c))}}else 0===u&&a<1&&(a=1),s(d,l)||(e._values.push(d),e._index.push(c))}u++}while(u<a)}e._ptr.push(e._index.length),e._size=[o,a]}function a(e,t,n,r){if(n-t==0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function s(e,t,n,r,i,o,a){i.splice(e,0,r),o.splice(e,0,t);for(var s=n+1;s<a.length;s++)a[s]++}function l(e,r,i,o){var a,s,l,u=o||0,c=n,d=0;ow(e._datatype)&&(c=t.find(n,[e._datatype,e._datatype])||n,d=t.convert(0,e._datatype),u=t.convert(u,e._datatype));var h=!c(u,d),p=e._size[0],f=e._size[1];if(i>f){for(s=f;s<i;s++)if(e._ptr[s]=e._values.length,h)for(a=0;a<p;a++)e._values.push(u),e._index.push(a);e._ptr[i]=e._values.length}else i<f&&(e._ptr.splice(i+1,f-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(f=i,r>p){if(h){var g=0;for(s=0;s<f;s++){e._ptr[s]=e._ptr[s]+g,l=e._ptr[s+1]+g;var m=0;for(a=p;a<r;a++,m++)e._values.splice(l+m,0,u),e._index.splice(l+m,0,a),g++}e._ptr[f]=e._values.length}}else if(r<p){var v=0;for(s=0;s<f;s++){e._ptr[s]=e._ptr[s]-v;var y=e._ptr[s],x=e._ptr[s+1]-v;for(l=y;l<x;l++)(a=e._index[l])>r-1&&(e._values.splice(l,1),e._index.splice(l,1),v++)}e._ptr[s]=e._values.length}return e._size[0]=r,e._size[1]=i,e}function u(e,t,n,r,i){var o,a,s=r[0],l=r[1],u=[];for(o=0;o<s;o++)for(a=0,u[o]=[];a<l;a++)u[o][a]=0;for(a=0;a<l;a++)for(var c=n[a],d=n[a+1],h=c;h<d;h++)u[o=t[h]][a]=e?i?o1(e[h]):e[h]:1;return u}return i.prototype=new r,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return aS(this._values,o0)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},i.prototype.subset=function(e,t,n){if(!this._values)throw Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(e,t){if(!oI(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var n,r,o,a,s=t.size();if(s.length!==e._size.length)throw new af(s.length,e._size.length);var l=t.min(),u=t.max();for(n=0,r=e._size.length;n<r;n++)ay(l[n],e._size[n]),ay(u[n],e._size[n]);var c=e._values,d=e._index,h=e._ptr,p=t.dimension(0),f=t.dimension(1),g=[],m=[];p.forEach(function(e,t){m[e]=t[0],g[e]=!0});var v=c?[]:void 0,y=[],x=[];return f.forEach(function(e){for(x.push(y.length),o=h[e],a=h[e+1];o<a;o++)!0===g[n=d[o]]&&(y.push(m[n]),v&&v.push(c[o]))}),x.push(y.length),new i({values:v,index:y,ptr:x,size:s,datatype:e._datatype})}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var i,o=t.size(),a=t.isScalar();if(oS(n)?(i=n.size(),n=n.toArray()):i=am(n),a){if(0!==i.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(1!==o.length&&2!==o.length)throw new af(o.length,e._size.length,"<");if(i.length<o.length){for(var s=0,l=0;1===o[s]&&1===i[s];)s++;for(;1===o[s];)l++,s++;n=a_(n,o.length,l,i)}if(!o5(o,i))throw new af(o,i,">");if(1===o.length)t.dimension(0).forEach(function(t,i){ay(t),e.set([t,0],n[i[0]],r)});else{var u=t.dimension(0),c=t.dimension(1);u.forEach(function(t,i){ay(t),c.forEach(function(o,a){ay(o),e.set([t,o],n[i[0]][a[0]],r)})})}}return e}(this,e,t,n);default:throw SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!o_(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new af(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke get on a Pattern only matrix");var t=e[0],n=e[1];ay(t,this._size[0]),ay(n,this._size[1]);var r=a(t,this._ptr[n],this._ptr[n+1],this._index);return r<this._ptr[n+1]&&this._index[r]===t?this._values[r]:0},i.prototype.set=function(e,r,i){if(!o_(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new af(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke set on a Pattern only matrix");var o=e[0],u=e[1],c=this._size[0],d=this._size[1],h=n,p=0;ow(this._datatype)&&(h=t.find(n,[this._datatype,this._datatype])||n,p=t.convert(0,this._datatype)),(o>c-1||u>d-1)&&(l(this,Math.max(o+1,c),Math.max(u+1,d),i),c=this._size[0],d=this._size[1]),ay(o,c),ay(u,d);var f=a(o,this._ptr[u],this._ptr[u+1],this._index);return f<this._ptr[u+1]&&this._index[f]===o?h(r,p)?function(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var o=t+1;o<i.length;o++)i[o]--}(f,u,this._values,this._index,this._ptr):this._values[f]=r:s(f,o,u,r,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,t,n){if(!oC(e))throw TypeError("Array or Matrix expected");var r=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==r.length)throw Error("Only two dimensions matrix are supported");return r.forEach(function(e){if(!om(e)||!at(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+ap(r)+")")}),l(n?this.clone():this,r[0],r[1],t)},i.prototype.reshape=function(e,t){if(!o_(e))throw TypeError("Array expected");if(2!==e.length)throw Error("Sparse matrices can only be reshaped in two dimensions");e.forEach(function(t){if(!om(t)||!at(t)||t<=-2||0===t)throw TypeError("Invalid size, must contain positive integers or -1 (size: "+ap(e)+")")});var n=this._size[0]*this._size[1],r=(e=ab(e,n))[0]*e[1];if(n!==r)throw Error("Reshaping sparse matrix will result in the wrong number of elements");var i=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return i;for(var o=[],l=0;l<i._ptr.length;l++)for(var u=0;u<i._ptr[l+1]-i._ptr[l];u++)o.push(l);for(var c=i._values.slice(),d=i._index.slice(),h=0;h<i._index.length;h++){var p=d[h],f=o[h],g=p*i._size[1]+f;o[h]=g%e[1],d[h]=Math.floor(g/e[1])}i._values.length=0,i._index.length=0,i._ptr.length=e[1]+1,i._size=e.slice();for(var m=0;m<i._ptr.length;m++)i._ptr[m]=0;for(var v=0;v<c.length;v++){var y=d[v],x=o[v],b=c[v];s(a(y,i._ptr[x],i._ptr[x+1],i._index),y,x,b,i._values,i._index,i._ptr)}return i},i.prototype.clone=function(){return new i({values:this._values?o1(this._values):void 0,index:o1(this._index),ptr:o1(this._ptr),size:o1(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,r){if(!this._values)throw Error("Cannot invoke map on a Pattern only matrix");var o=this;return function(e,r,o,a,s){var l=[],u=[],c=[],d=n,h=0;ow(e._datatype)&&(d=t.find(n,[e._datatype,e._datatype])||n,h=t.convert(0,e._datatype));for(var p=function(e,t,n){e=a(e,t,n),d(e,h)||(l.push(e),u.push(t))},f=0;f<=o;f++){c.push(l.length);var g=e._ptr[f],m=e._ptr[f+1];if(s)for(var v=g;v<m;v++){var y=e._index[v];y>=0&&y<=r&&p(e._values[v],y-0,f-0)}else{for(var x={},b=g;b<m;b++)x[e._index[b]]=e._values[b];for(var w=0;w<=r;w++)p(w in x?x[w]:0,w-0,f-0)}}return c.push(l.length),new i({values:l,index:u,ptr:c,size:[r-0+1,o-0+1]})}(this,this._size[0]-1,this._size[1]-1,function(t,n,r){return e(t,[n,r],o)},r)},i.prototype.forEach=function(e,t){if(!this._values)throw Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this._size[0],r=this._size[1],i=0;i<r;i++){var o=this._ptr[i],a=this._ptr[i+1];if(t)for(var s=o;s<a;s++){var l=this._index[s];e(this._values[s],[l,i],this)}else{for(var u={},c=o;c<a;c++)u[this._index[c]]=this._values[c];for(var d=0;d<n;d++)e(d in u?u[d]:0,[d,i],this)}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var n=this._ptr[t],r=this._ptr[t+1],i=n;i<r;i++){var o=this._index[i];yield{value:this._values[i],index:[o,t]}}},i.prototype.toArray=function(){return u(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return u(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+ap(t,e)+" x "+ap(n,e)+"] density: "+ap(r,e)+"\n",o=0;o<n;o++)for(var a=this._ptr[o],s=this._ptr[o+1],l=a;l<s;l++)i+="\n ("+ap(this._index[l],e)+", "+ap(o,e)+") ==> "+(this._values?ap(this._values[l],e):"X");return i},i.prototype.toString=function(){return ap(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(ov(e)&&(e=e.toNumber()),!om(e)||!at(e))throw TypeError("The parameter k must be an integer number")}else e=0;var t=e>0?e:0,n=e<0?-e:0,r=this._size[0],o=this._size[1],a=Math.min(r-n,o-t),s=[],l=[],u=[];u[0]=0;for(var c=t;c<o&&s.length<a;c++)for(var d=this._ptr[c],h=this._ptr[c+1],p=d;p<h;p++){var f=this._index[p];if(f===c-t+n){s.push(this._values[p]),l[s.length-1]=f-n;break}}return u.push(s.length),new i({values:s,index:l,ptr:u,size:[a,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,r,o,a,s){if(!o_(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(ov(e)&&(e=e.toNumber()),!om(e)||!at(e)||e<1)throw Error("Size values must be positive integers");return e}),o){if(ov(o)&&(o=o.toNumber()),!om(o)||!at(o))throw TypeError("The parameter k must be an integer number")}else o=0;var l,u=n,c=0;ow(s)&&(u=t.find(n,[s,s])||n,c=t.convert(0,s));var d=o>0?o:0,h=o<0?-o:0,p=e[0],f=e[1],g=Math.min(p-h,f-d);if(o_(r)){if(r.length!==g)throw Error("Invalid value array length");l=function(e){return r[e]}}else if(oS(r)){var m=r.size();if(1!==m.length||m[0]!==g)throw Error("Invalid matrix length");l=function(e){return r.get([e])}}else l=function(){return r};for(var v=[],y=[],x=[],b=0;b<f;b++){x.push(v.length);var w=b-d;if(w>=0&&w<g){var _=l(w);u(_,c)||(y.push(w+h),v.push(_))}}return x.push(v.length),new i({values:v,index:y,ptr:x,size:[p,f]})},i.prototype.swapRows=function(e,t){if(!om(e)||!at(e)||!om(t)||!at(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return ay(e,this._size[0]),ay(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,t,n,r,i){for(var o=r[e],a=r[e+1],s=o;s<a;s++)i(n[s],t[s])},i._swapRows=function(e,t,n,r,i,o){for(var s=0;s<n;s++){var l=o[s],u=o[s+1],c=a(e,l,u,i),d=a(t,l,u,i);if(c<u&&d<u&&i[c]===e&&i[d]===t){if(r){var h=r[c];r[c]=r[d],r[d]=h}continue}if(c<u&&i[c]===e&&(d>=u||i[d]!==t)){var p=r?r[c]:void 0;i.splice(d,0,t),r&&r.splice(d,0,p),i.splice(d<=c?c+1:c,1),r&&r.splice(d<=c?c+1:c,1);continue}if(d<u&&i[d]===t&&(c>=u||i[c]!==e)){var f=r?r[d]:void 0;i.splice(c,0,e),r&&r.splice(c,0,f),i.splice(c<=d?d+1:d,1),r&&r.splice(c<=d?d+1:d,1)}}},i},{isClass:!0}),lG="matrix",l$={DenseMatrixDependencies:ls,MatrixDependencies:la,SparseMatrixDependencies:{MatrixDependencies:la,equalScalarDependencies:lH,typedDependencies:lB,createSparseMatrixClass:lW},typedDependencies:lB,createMatrix:o8(lG,["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:t,Matrix:n,DenseMatrix:r,SparseMatrix:i}=e;return t(lG,{"":function(){return o([])},string:function(e){return o([],e)},"string, string":function(e,t){return o([],e,t)},Array:function(e){return o(e)},Matrix:function(e){return o(e,e.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(e,t,n){if("dense"===t||"default"===t||void 0===t)return new r(e,n);if("sparse"===t)return new i(e,n);throw TypeError("Unknown matrix type "+JSON.stringify(t)+".")}})},lU="zeros",lZ=o8(lU,["typed","config","matrix","BigNumber"],e=>{var{typed:t,config:n,matrix:r,BigNumber:i}=e;return t(lU,{"":function(){return"Array"===n.matrix?o([]):o([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var t=e.pop();return o(e,t)}return"Array"===n.matrix?o(e):o(e,"default")},Array:o,Matrix:function(e){var t=e.storage();return o(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return o(e.valueOf(),t)}});function o(e,t){var n,o=(n=!1,e.forEach(function(e,t,r){ov(e)&&(n=!0,r[t]=e.toNumber())}),n)?new i(0):0;if(e.forEach(function(e){if("number"!=typeof e||!at(e)||e<0)throw Error("Parameters in function zeros must be positive integers")}),t){var a=r(t);return e.length>0?a.resize(e,o):a}var s=[];return e.length>0?ax(s,e,o):s}}),lY=o8("algorithm11",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=n,g=0,m=i;"string"==typeof d&&(a=d,f=t.find(n,[a,a]),g=t.convert(0,a),r=t.convert(r,a),m=t.find(i,[a,a]));for(var v=[],y=[],x=[],b=0;b<p;b++){x[b]=y.length;for(var w=u[b],_=u[b+1],S=w;S<_;S++){var C=l[S],M=o?m(r,s[S]):m(s[S],r);f(M,g)||(y.push(C),v.push(M))}}return x[p]=y.length,e.createSparseMatrix({values:v,index:y,ptr:x,size:[h,p],datatype:a})}}),lX=o8("algorithm12",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=i;"string"==typeof d&&(a=d,r=t.convert(r,a),f=t.find(i,[a,a]));for(var g=[],m=[],v=[],y=0;y<p;y++){for(var x=y+1,b=u[y],w=u[y+1],_=b;_<w;_++){var S=l[_];m[S]=s[_],v[S]=x}for(var C=0;C<h;C++)0===y&&(g[C]=[]),v[C]===x?g[C][y]=o?f(r,m[C]):f(m[C],r):g[C][y]=o?f(r,0):f(0,r)}return new n({data:g,size:[h,p],datatype:a})}}),lq=o8("algorithm14",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a=e._data,s=e._size,l=e._datatype,u=r;"string"==typeof l&&(o=l,n=t.convert(n,o),u=t.find(r,[o,o]));var c=s.length>0?function e(t,n,r,i,o,a,s){var l=[];if(n===r.length-1)for(var u=0;u<i;u++)l[u]=s?t(a,o[u]):t(o[u],a);else for(var c=0;c<i;c++)l[c]=e(t,n+1,r,r[n+1],o[c],a,s);return l}(u,0,s,s[0],a,n,i):[];return e.createDenseMatrix({data:c,size:o1(s),datatype:o})}});function lK(e,t){var n;if(!at(e)||!at(t))throw Error("Parameters in function gcd must be integer numbers");for(;0!==t;)n=e%t,e=t,t=n;return e<0?-e:e}function lQ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!at(t)||t<0||t>15)throw Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(ao(e,t))}lK.signature="number, number";var lJ="Number of decimals in function round must be an integer",l0="round",l1=o8(l0,["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,BigNumber:o,DenseMatrix:a}=e,s=lY({typed:t,equalScalar:r}),l=lX({typed:t,DenseMatrix:a}),u=lq({typed:t});return t(l0,{number:lQ,"number, number":lQ,"number, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(lJ);return new o(e).toDecimalPlaces(t.toNumber())},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw TypeError(lJ);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(lJ);var n=t.toNumber();return e.round(n)},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(lJ);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw TypeError(lJ);return e.round(t)},"Fraction, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(lJ);return e.round(t.toNumber())},"Array | Matrix":function(e){return function e(t,n,r){return t&&"function"==typeof t.map?t.map(function(t){return e(t,n,r)}):n(t)}(e,this,!0)},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"Array, number | BigNumber":function(e,t){return u(n(e),t,this,!1).valueOf()},"number | Complex | BigNumber | Fraction, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"number | Complex | BigNumber | Fraction, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):u(t,e,this,!0)},"number | Complex | BigNumber | Fraction, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})}),l2=o8("algorithm01",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a,s=e._data,l=e._size,u=e._datatype,c=n._values,d=n._index,h=n._ptr,p=n._size,f=n._datatype;if(l.length!==p.length)throw new af(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var g=l[0],m=l[1],v="string"==typeof u&&u===f?u:void 0,y=v?t.find(r,[v,v]):r,x=[];for(o=0;o<g;o++)x[o]=[];var b=[],w=[];for(a=0;a<m;a++){for(var _=a+1,S=h[a],C=h[a+1],M=S;M<C;M++)b[o=d[M]]=i?y(c[M],s[o][a]):y(s[o][a],c[M]),w[o]=_;for(o=0;o<g;o++)w[o]===_?x[o][a]=b[o]:x[o][a]=s[o][a]}return e.createDenseMatrix({data:x,size:[g,m],datatype:v})}}),l5=o8("algorithm04",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o,a,s,l,u,c,d=e._values,h=e._index,p=e._ptr,f=e._size,g=e._datatype,m=r._values,v=r._index,y=r._ptr,x=r._size,b=r._datatype;if(f.length!==x.length)throw new af(f.length,x.length);if(f[0]!==x[0]||f[1]!==x[1])throw RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+x+")");var w=f[0],_=f[1],S=n,C=0,M=i;"string"==typeof g&&g===b&&(o=g,S=t.find(n,[o,o]),C=t.convert(0,o),M=t.find(i,[o,o]));var A=d&&m?[]:void 0,T=[],I=[],k=d&&m?[]:void 0,D=d&&m?[]:void 0,O=[],P=[];for(s=0;s<_;s++){I[s]=T.length;var R=s+1;for(u=p[s],c=p[s+1],l=u;l<c;l++)a=h[l],T.push(a),O[a]=R,k&&(k[a]=d[l]);for(u=y[s],c=y[s+1],l=u;l<c;l++)if(O[a=v[l]]===R){if(k){var E=M(k[a],m[l]);S(E,C)?O[a]=null:k[a]=E}}else T.push(a),P[a]=R,D&&(D[a]=m[l]);if(k&&D)for(l=I[s];l<T.length;)O[a=T[l]]===R?(A[l]=k[a],l++):P[a]===R?(A[l]=D[a],l++):T.splice(l,1)}return I[_]=T.length,e.createSparseMatrix({values:A,index:T,ptr:I,size:[w,_],datatype:o})}}),l3=o8("algorithm10",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=i;"string"==typeof d&&(a=d,r=t.convert(r,a),f=t.find(i,[a,a]));for(var g=[],m=[],v=[],y=0;y<p;y++){for(var x=y+1,b=u[y],w=u[y+1],_=b;_<w;_++){var S=l[_];m[S]=s[_],v[S]=x}for(var C=0;C<h;C++)0===y&&(g[C]=[]),v[C]===x?g[C][y]=o?f(r,m[C]):f(m[C],r):g[C][y]=r}return new n({data:g,size:[h,p],datatype:a})}}),l4=o8("algorithm13",["typed"],e=>{var{typed:t}=e;return function(e,n,r){var i,o=e._data,a=e._size,s=e._datatype,l=n._data,u=n._size,c=n._datatype,d=[];if(a.length!==u.length)throw new af(a.length,u.length);for(var h=0;h<a.length;h++){if(a[h]!==u[h])throw RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+u+")");d[h]=a[h]}var p=r;"string"==typeof s&&s===c&&(i=s,p=t.find(r,[i,i]));var f=d.length>0?function e(t,n,r,i,o,a){var s=[];if(n===r.length-1)for(var l=0;l<i;l++)s[l]=t(o[l],a[l]);else for(var u=0;u<i;u++)s[u]=e(t,n+1,r,r[n+1],o[u],a[u]);return s}(p,0,d,d[0],o,l):[];return e.createDenseMatrix({data:f,size:d,datatype:i})}}),l6=o8("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,BigNumber:i,DenseMatrix:o}=e,a=l2({typed:t}),s=l5({typed:t,equalScalar:r}),l=l3({typed:t,DenseMatrix:o}),u=l4({typed:t}),c=lq({typed:t});return t("gcd",{"number, number":lK,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!t.isZero();){var r=e.mod(t);e=t,t=r}return e.lt(n)?e.neg():e},"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return c(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return c(n(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}})});let{round:l9}=aD({roundDependencies:{BigNumberDependencies:lo,DenseMatrixDependencies:ls,equalScalarDependencies:lH,matrixDependencies:l$,typedDependencies:lB,zerosDependencies:{BigNumberDependencies:lo,matrixDependencies:l$,typedDependencies:lB,createZeros:lZ},createRound:l1}}),{gcd:l8}=aD({gcdDependencies:{BigNumberDependencies:lo,DenseMatrixDependencies:ls,equalScalarDependencies:lH,matrixDependencies:l$,typedDependencies:lB,createGcd:l6}}),l7=10;function ue(e,t){let n=t.startMs,r=e.values,i=[];for(let e of r){for(;n<e[0];)i.push([n,null]),n+=t.stepMs;i.push([n,e[1]]),n+=t.stepMs}for(;n<=t.endMs;)i.push([n,null]),n+=t.stepMs;return i}function ut(e){let t,n,r=[];for(let t of e)if(t&&"timeRange"in t){if(void 0===t||void 0===t.timeRange||void 0===t.stepMs)continue;if(r.push(t.stepMs),void 0===n){n=t.timeRange;continue}t.timeRange.start<n.start&&(n.start=t.timeRange.start),t.timeRange.end>n.end&&(n.end=t.timeRange.end)}else if(t&&"values"in t){for(let e=0;e<t.values.length;e++){let r=t.values[e];if(void 0===r)continue;let[i]=r,o=new Date(i),a=new Date(i);if(void 0===n){n={start:o,end:a};continue}o<n.start&&(n.start=o),a>n.end&&(n.end=a)}if(void 0===n)return;let e=n.start.valueOf(),r=n.end.valueOf(),i=r-e;return{startMs:e,endMs:r,rangeMs:i,stepMs:l7}}if(void 0===n)return;if(1===r.length)t=r[0];else{let e=l8(...r);t=e<l7?l7:e}let i=n.start.valueOf(),o=n.end.valueOf();return{startMs:i,endMs:o,stepMs:t,rangeMs:o-i}}function un(e){return/^[0-9a-fA-F]+$/.test(e)}function ur(e){return e.spec?.spec?.display?.name?e.spec.spec.display.name:e.spec?.display?.name?e.spec.display.name:e.metadata.name}function ui(e){return e.spec?.spec?.display?.name?`${e.spec.spec.display.name} (ID: ${e.metadata.name})`:e.spec?.display?.name?`${e.spec.display.name} (ID: ${e.metadata.name})`:e.metadata.name}let uo=(0,ed.createContext)(void 0);function ua(e){let{children:t,timeZone:n}=e;return(0,ec.jsx)(uo.Provider,{value:n,children:t})}function us(){let e=(0,ed.useContext)(uo);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>i4(t,n,e),dateFormatOptionsWithUserTimeZone:t=>i3(t,e)}}function ul({label:e,color:t,size:n="small",onColorChange:r,onClear:i}){let[o,a]=(0,ed.useState)(null),s=!!o,{thresholds:{defaultColor:l,palette:u}}=tl();return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(uu,{size:n,"aria-label":`change ${e} color`,isSelected:s,iconColor:t,onClick:e=>{a(e.currentTarget)},children:(0,ec.jsx)(eL,{})}),(0,ec.jsx)(ti.Ay,{"data-testid":"options color picker",open:s,anchorEl:o,onClose:()=>{a(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,ec.jsx)(tn,{color:t,palette:[l,...u],onChange:r,onClear:i})})]})}let uu=(0,ey.A)(eR.A,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})(({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e}));var uc=n(56599),ud=n(74628),uh=n(38662);function up(e,t){return"ALL"!==t&&!!t[e.id]}var uf=n(83926),ug=n(1337),um=n(54382),uv=n(29424),uy=n(67214);function ux(e){return(0,eS.Ay)("MuiListItemButton",e)}let ub=(0,e_.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),uw=(0,ey.A)(ug.A,{shouldForwardProp:e=>(0,uf.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,ex.A)(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ub.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eg.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ub.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,eg.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ub.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,eg.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eg.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ub.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ub.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),u_=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:c,selected:d=!1,className:h,...p}=n,f=ed.useContext(uy.A),g=ed.useMemo(()=>({dense:s||f.dense||!1,alignItems:r,disableGutters:l}),[r,f.dense,s,l]),m=ed.useRef(null);(0,um.A)(()=>{i&&m.current&&m.current.focus()},[i]);let v={...n,alignItems:r,dense:g.dense,disableGutters:l,divider:u,selected:d},y=(e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e,l=(0,ef.A)({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},ux,n);return{...n,...l}})(v),x=(0,uv.A)(m,t);return(0,ec.jsx)(uy.A.Provider,{value:g,children:(0,ec.jsx)(uw,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&"div"===o?"button":o,focusVisibleClassName:(0,ep.A)(y.focusVisible,c),ownerState:v,className:(0,ep.A)(y.root,h),...p,classes:y,children:a})})});var uS=n(14045);let uC=(0,ed.memo)(function({color:e,sx:t,...n}){return(0,ec.jsx)(ud.A,{...n,sx:iS({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})}),uM=(0,ed.forwardRef)(function({item:e,sx:t,truncateLabel:n,onClick:r,isVisuallySelected:i,onMouseOver:o,onMouseOut:a,index:s,...l},u){let[c,d]=(0,ed.useState)(n);return(0,ec.jsxs)(u_,{...l,role:"listitem",sx:iS({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{r(t,e.id),e.onClick?.(t)},onMouseOver:t=>o?.(t,{id:e.id,index:s}),onMouseOut:t=>a?.(t,{id:e.id,index:s}),selected:i,ref:u,children:[(0,ec.jsx)(ud.A,{sx:{display:"flex",alignItems:"center"},children:(0,ec.jsx)(uC,{color:e.color})}),(0,ec.jsx)(uS.A,{primary:e.label,primaryTypographyProps:{noWrap:c},onMouseOver:function(){n&&d(!1)},onMouseOut:function(){n&&d(!0)}})]})}),uA=(0,ed.memo)(uM);function uT({height:e,items:t,selectedItems:n,onLegendItemClick:r,onItemMouseOver:i,onItemMouseOut:o}){return(0,ec.jsx)(ud.A,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map((e,t)=>(0,ec.jsx)(uA,{item:e,index:t,isVisuallySelected:up(e,n),onMouseOver:i,onMouseOut:o,onClick:r,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id))})}function uI(e){e()}function uk(e,t){return n=>e(t(n))}function uD(e){return void 0!==e}function uO(){}function uP(e,t){return t(e)}function uR(...e){return e}function uE(e){e(2)}function uL(e){return e(4)}function uN(e,t){return e(1,e=>t(0,e))}function uz(e,t){let n=e(1,e=>{n(),t(e)});return n}function uF(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function uB(e,t){return e===t}function uj(e=uB){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function uV(e){return t=>n=>{e(n)&&t(n)}}function uH(e){return t=>uk(t,e)}function uW(e){return t=>()=>{t(e)}}function uG(e,...t){let n=function(...e){return t=>e.reduceRight(uP,t)}(...t);return(t,r)=>{switch(t){case 2:uE(e);return;case 1:return e(1,n(r))}}}function u$(e,t){return n=>r=>{n(t=e(t,r))}}function uU(e){return t=>n=>{e>0?e--:t(n)}}function uZ(e){let t=null,n;return r=>i=>{t=i,n||(n=setTimeout(()=>{n=void 0,r(t)},e))}}function uY(...e){let t=Array.from({length:e.length}),n=0,r=null,i=2**e.length-1;return e.forEach((e,o)=>{let a=2**o;e(1,e=>{let s=n;n|=a,t[o]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>o=>{let a=()=>{e([o].concat(t))};n===i?a():r=a}}function uX(e){let t=e,n=uK();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function uq(e,t){var n;return n=uX(t),uN(e,n),n}function uK(){let e=[];return(t,n)=>{switch(t){case 0:e.slice().forEach(e=>{e(n)});return;case 2:e.splice(0);return;case 1:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function uQ(e){var t;return t=uK(),uN(e,t),t}let uJ={singleton:!0};function u0(e,t=[],n=uJ){let{singleton:r}=n;return{constructor:e,dependencies:t,id:u1(),singleton:r}}let u1=()=>Symbol("id");function u2(...e){let t=uK(),n=Array.from({length:e.length}),r=0,i=2**e.length-1;return e.forEach((e,o)=>{let a=2**o;e(1,e=>{n[o]=e,(r|=a)===i&&t(0,n)})}),function(e,o){switch(e){case 2:return void uE(t);case 1:return r===i&&o(n),t(1,o)}}}function u5(e,t=uB){return uG(e,uj(t))}function u3(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(uI)}}(...e.map(e=>e(1,n)))}}}let u4=1,u6={0:"debug",3:"error",[u4]:"log",2:"warn"},u9=u0(()=>{let e=uX(3);return{log:uX((t,n,r=u4)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??uL(e))&&console[u6[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0}),u8=new WeakMap;function u7(e){return"self"in e?e.document.documentElement:e}function ce(e){u8.delete(u7(e))}function ct(e,t){return!function(e){let t=u7(e),n=u8.get(t);if(void 0!==n)return n;let r="rtl"===t.ownerDocument.defaultView.getComputedStyle(t).direction;return u8.set(t,r),r}(e)?t:-t}function cn(e,t,n){return cr(e,t,n).callbackRef}function cr(e,t,n){let r=eh().useRef(null),i=eh().useMemo(()=>"u">typeof ResizeObserver?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return{callbackRef:e=>{e&&t?(i?.observe(e),r.current=e):(r.current&&i?.unobserve(r.current),r.current=null)},ref:r}}function ci(e,t,n,r,i,o,a,s,l){return cr(eh().useCallback(n=>{let l,u=function(e,t,n,r){let i=e.length;if(0===i)return null;let o=[];for(let a=0;a<i;a++){let i=e.item(a);if(void 0===i.dataset.index)continue;let s=parseInt(i.dataset.index,10),l=parseFloat(i.dataset.knownSize),u=t(i,n);if(0===u&&r("Zero-sized element, this should not happen",{child:i},3),u===l)continue;let c=o[o.length-1];0===o.length||c.size!==u||c.endIndex!==s-1?o.push({endIndex:s,size:u,startIndex:s}):o[o.length-1].endIndex++}return o}(n.children,t,s?"offsetWidth":"offsetHeight",i),c=n.parentElement;for(;void 0===c.dataset.virtuosoScroller;)c=c.parentElement;let d=c.lastElementChild?.dataset.viewportType==="window";d&&(l=c.ownerDocument.defaultView);let h=a?s?a.scrollWidth:a.scrollHeight:d?s?l.document.documentElement.scrollWidth:l.document.documentElement.scrollHeight:s?c.scrollWidth:c.scrollHeight,p=a?s?a.offsetWidth:a.offsetHeight:d?s?l.innerWidth:l.innerHeight:s?c.offsetWidth:c.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(a?s?ct(a,a.scrollLeft):a.scrollTop:d?s?ct(l,l.scrollX||l.document.documentElement.scrollLeft):l.scrollY||l.document.documentElement.scrollTop:s?ct(c,c.scrollLeft):c.scrollTop,0),viewportHeight:p}),o?.(s?co("column-gap",getComputedStyle(n).columnGap,i):co("row-gap",getComputedStyle(n).rowGap,i)),null!==u&&e(u)},[e,t,i,o,a,r,s]),n,l)}function co(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,2),"normal"===t?0:parseInt(t??"0",10)}function ca(e,t,n){let r=eh().useRef(null),i=eh().useCallback(n=>{let i,o;if(!n?.offsetParent)return;let s=n.getBoundingClientRect(),l=s.width;if(t){let e=t.getBoundingClientRect(),n=s.top-e.top;o=e.height-Math.max(0,n),i=n+t.scrollTop}else{let e=a.current.ownerDocument.defaultView;o=e.innerHeight-Math.max(0,s.top),i=s.top+e.scrollY}r.current={listHeight:s.height,offsetTop:i,visibleHeight:o,visibleWidth:l},e(r.current)},[e,t]),{callbackRef:o,ref:a}=cr(i,!0,n),s=eh().useCallback(()=>{i(a.current)},[i,a]);return eh().useEffect(()=>{if(t){t.addEventListener("scroll",s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}let e=a.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",s),e?.addEventListener("resize",s),()=>{e?.removeEventListener("scroll",s),e?.removeEventListener("resize",s)}},[s,t,a]),o}let cs=u0(()=>{let e=uK(),t=uK(),n=uX(0),r=uK(),i=uX(0),o=uK(),a=uK(),s=uX(0),l=uX(0),u=uX(0),c=uX(0),d=uK(),h=uK(),p=uX(!1),f=uX(!1),g=uX(!1);return uN(uG(e,uH(({scrollTop:e})=>e)),t),uN(uG(e,uH(({scrollHeight:e})=>e)),a),uN(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),cl={lvl:0};function cu(e,t){let n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]),o=[];for(let a=1;a<n;a++){let{index:n,value:s}=t(e[a]);o.push({end:n-1,start:r,value:i}),r=n,i=s}return o.push({end:1/0,start:r,value:i}),o}function cc(e){return e===cl}function cd(e,t){if(!cc(e))return t===e.k?e.v:t<e.k?cd(e.l,t):cd(e.r,t)}function ch(e,t,n="k"){if(cc(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=ch(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return ch(e.l,t,n)}function cp(e,t,n){return cc(e)?cx(t,n,1):t===e.k?cv(e,{k:t,v:n}):t<e.k?cw(cb(cv(e,{l:cp(e.l,t,n)}))):cw(cb(cv(e,{r:cp(e.r,t,n)})))}function cf(e,t,n){if(cc(e))return[];let r=ch(e,t)[0];return cu(function e(t,n,r){if(cc(t))return[];let{k:i,l:o,r:a,v:s}=t,l=[];return i>n&&(l=l.concat(e(o,n,r))),i>=n&&i<=r&&l.push({k:i,v:s}),i<=r&&(l=l.concat(e(a,n,r))),l}(e,r,n),({k:e,v:t})=>({index:e,value:t}))}function cg(e){return cc(e)?[]:[...cg(e.l),{k:e.k,v:e.v},...cg(e.r)]}function cm(e){let{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(cy(t))return cb(cv(e,{lvl:n-1}));if(!cc(t)&&!cc(t.r))return cv(t.r,{l:cv(t,{r:t.r.l}),lvl:n,r:cv(e,{l:t.r.r,lvl:n-1})});throw Error("Unexpected empty nodes")}if(cy(e))return cw(cv(e,{lvl:n-1}));if(!cc(r)&&!cc(r.l)){let t=r.l,i=cy(t)?r.lvl-1:r.lvl;return cv(t,{l:cv(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:cw(cv(r,{l:t.r,lvl:i}))})}throw Error("Unexpected empty nodes")}function cv(e,t){return cx(void 0===t.k?e.k:t.k,void 0===t.v?e.v:t.v,void 0===t.lvl?e.lvl:t.lvl,void 0===t.l?e.l:t.l,void 0===t.r?e.r:t.r)}function cy(e){return cc(e)||e.lvl>e.r.lvl}function cx(e,t,n,r=cl,i=cl){return{k:e,l:r,lvl:n,r:i,v:t}}function cb(e){let{l:t}=e;return cc(t)||t.lvl!==e.lvl?e:cv(t,{r:cv(e,{l:t.r})})}function cw(e){let{lvl:t,r:n}=e;return cc(n)||cc(n.r)||n.lvl!==t||n.r.lvl!==t?e:cv(n,{l:cv(e,{r:n.l}),lvl:t+1})}function c_(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function cS(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}let cC=u0(()=>({recalcInProgress:uX(!1)}),[],{singleton:!0});function cM(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let o=Math.floor((r+i)/2),a=n(e[o],t);if(0===a)return o;if(-1===a){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function cA(e,t){return Math.round(e.getBoundingClientRect()[t])}function cT(e){return!cc(e.groupOffsetTree)}function cI({index:e},t){return t===e?0:t<e?-1:1}function ck({offset:e},t){return t===e?0:t<e?-1:1}function cD(e,t,n){if(0===t.length)return 0;let{index:r,offset:i,size:o}=t[cM(t,e,cI)],a=e-r,s=o*a+(a-1)*n+i;return s>0?s+n:s}function cO(e,t){if(!cT(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function cP(e,t,n){if(void 0!==e.groupIndex)return t.groupIndices[e.groupIndex]+1;let r=cO("LAST"===e.index?n:e.index,t);return Math.max(0,Math.min(n,r))}function cR(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,0);let o=e.sizeTree,a=o,s=0;if(n.length>0&&cc(o)&&2===t.length){let e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>cp(cp(t,n,e),n+1,r),a)}else[a,s]=function(e,t){let n=cc(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),cc(e)){e=cp(e,0,i);continue}let a=cf(e,o-1,t+1);if(a.some(function(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}(r)))continue;let s=!1,l=!1;for(let{end:n,start:r,value:o}of a)s?(t>=r||i===o)&&(e=function e(t,n){if(cc(t))return cl;let{k:r,l:i,r:o}=t;if(n===r){if(cc(i))return o;if(cc(o))return i;let[e,n]=function e(t){return cc(t.r)?[t.k,t.v]:e(t.r)}(i);return cm(cv(t,{k:e,l:function e(t){return cc(t.r)?t.l:cm(cv(t,{r:e(t.r)}))}(i),v:n}))}return n<r?cm(cv(t,{l:e(i,n)})):cm(cv(t,{r:e(o,n)}))}(e,r)):(l=o!==i,s=!0),n>t&&t>=r&&o!==i&&(e=cp(e,t+1,o));l&&(e=cp(e,o,i))}return[e,n]}(a,t);if(a===o)return e;let{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d}=cL(e.offsetTree,s,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>cp(e,t,cD(t,d,i)),cl),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d,sizeTree:a}}function cE(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n!==e)}function cL(e,t,n,r){let i=e,o=0,a=0,s=0,l=0;if(0===t)i=[];else{l=cM(i,t-1,cI),s=i[l].offset;let e=ch(n,t-1);o=e[0],a=e[1],i.length&&i[l].size===ch(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}for(let{start:e,value:l}of cf(n,t,1/0)){let t=e-o,n=t*a+s+t*r;i.push({index:e,offset:n,size:l}),o=e,s=n,a=l}return{lastIndex:o,lastOffset:s,lastSize:a,offsetTree:i}}function cN(e){return{index:e.index,value:e}}let cz={offsetHeight:"height",offsetWidth:"width"},cF=u0(([{log:e},{recalcInProgress:t}])=>{let n=uK(),r=uK(),i=uq(r,0),o=uK(),a=uK(),s=uX(0),l=uX([]),u=uX(void 0),c=uX(void 0),d=uX(void 0),h=uX(void 0),p=uX((e,t)=>cA(e,cz[t])),f=uX(void 0),g=uX(0),m={groupIndices:[],groupOffsetTree:cl,lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:cl},v=uq(uG(n,uY(l,e,g),u$(cR,m),uj()),m),y=uq(uG(l,uj(),u$((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),uH(({prev:e})=>e)),[]);uN(uG(l,uV(e=>e.length>0),uY(v,g),uH(([e,t,n])=>{let r=e.reduce((e,r,i)=>cp(e,r,cD(r,t.offsetTree,n)||i),cl);return{...t,groupIndices:e,groupOffsetTree:r}})),v),uN(uG(r,uY(v),uV(([e,{lastIndex:t}])=>e<t),uH(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),uN(u,c);let x=uq(uG(u,uH(e=>void 0===e)),!0);uN(uG(c,uV(e=>void 0!==e&&cc(uL(v).sizeTree)),uH(e=>{let t=uL(d),n=uL(l).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),uN(uG(h,uV(e=>void 0!==e&&e.length>0&&cc(uL(v).sizeTree)),uH(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let o=e[i];o!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=o,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),uN(uG(l,uY(d,c),uV(([,e,t])=>void 0!==e&&void 0!==t),uH(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];r.push({startIndex:o,endIndex:o,size:t}),void 0!==a&&r.push({startIndex:o+1,endIndex:a-1,size:n})}return r})),n);let b=uQ(uG(n,uY(v),u$(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:m}),uH(e=>e.changed)));uG(s,u$((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),uH(e=>e.diff))(1,e=>{let{groupIndices:n}=uL(v);if(e>0)t(0,!0),o(0,e+cE(e,n));else if(e<0){let t=uL(y);t.length>0&&(e-=cE(-e,t)),a(0,e)}}),uG(s,uY(e))(1,([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},3)});let w=uQ(o);uN(uG(o,uY(v),uH(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=cd(t.sizeTree,0),o=0,a=0;for(;o<e;){let e=t.groupIndices[a],s=t.groupIndices.length===a+1?1/0:t.groupIndices[a+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),a++,o+=s+1}let s=cg(t.sizeTree);return o!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return cg(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let _=uQ(uG(a,uY(v,g),uH(([e,{offsetTree:t},n])=>cD(-e,t,n))));return uN(uG(a,uY(v,g),uH(([e,t,n])=>{if(t.groupIndices.length>0){if(cc(t.sizeTree))return t;let r=cl,i=uL(y),o=0,a=0,s=0;for(;o<-e;){s=i[a];let e=i[a+1]-s-1;a++,o+=e+1}return r=cg(t.sizeTree).reduce((t,{k:n,v:r})=>cp(t,Math.max(0,n+e),r),r),o!==-e&&(r=cp(r,0,cd(t.sizeTree,s)),r=cp(r,1,ch(t.sizeTree,-e+1)[1])),{...t,sizeTree:r,...cL(t.offsetTree,0,r,n)}}let r=cg(t.sizeTree).reduce((t,{k:n,v:r})=>cp(t,Math.max(0,n+e),r),cl);return{...t,sizeTree:r,...cL(t.offsetTree,0,r,n)}})),v),{beforeUnshiftWith:w,data:f,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,fixedGroupSize:d,gap:g,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:b,shiftWith:a,shiftWithOffset:_,sizeRanges:n,sizes:v,statefulTotalCount:i,totalCount:r,trackItemSizes:x,unshiftWith:o}},uR(u9,cC),{singleton:!0});function cB(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}let cj=u0(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let o=uK(),a=uK(),s=uQ(uG(o,uH(cB)));return uN(uG(s,uH(e=>e.totalCount)),n),uN(uG(s,uH(e=>e.groupIndices)),e),uN(uG(u2(i,t,r),uV(([e,t])=>cT(t)),uH(([e,t,n])=>ch(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),uj(),uH(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},uR(cF,cs)),cV=u0(([{log:e}])=>{let t=uX(!1),n=uQ(uG(t,uV(e=>e),uj()));return t(1,t=>{t&&uL(e)("props updated",{},0)}),{didMount:n,propsReady:t}},uR(u9),{singleton:!0}),cH="u">typeof document&&"scrollBehavior"in document.documentElement.style;function cW(e){let t="number"==typeof e?{index:e}:{...e};return t.align||(t.align="start"),t.behavior&&cH||(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}let cG=u0(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:d},{log:h}])=>{let p=uK(),f=uK(),g=uX(0),m=null,v=null,y=null;function x(){null!==m&&(m(),m=null),null!==y&&(y(),y=null),v&&(clearTimeout(v),v=null),l(0,!1)}return uN(uG(p,uY(n,d,r,g,s,a,h),uY(e,o,i),uH(([[e,n,r,i,o,a,s,u],d,h,g])=>{let b=cW(e),{align:w,behavior:_,offset:S}=b,C=i-1,M=cP(b,n,C),A=cD(M,n.offsetTree,d)+a;"end"===w?(A+=h+ch(n.sizeTree,M)[1]-r+g,M===C&&(A+=s)):"center"===w?A+=(h+ch(n.sizeTree,M)[1]-r+g)/2:A-=o,void 0!==S&&0!==S&&(A+=S);let T=t=>{x(),t?(u("retrying to scroll to",{location:e},0),p(0,e)):(f(0,!0),u("list did not change, scroll successful",{},0))};if(x(),"smooth"===_){let e=!1;y=t(1,t=>{e=e||t}),m=uz(c,()=>{T(e)})}else m=uz(uG(t,e=>{let t=setTimeout(()=>{e(!1)},150);return n=>{n&&(e(!0),clearTimeout(t))}}),T);return v=setTimeout(()=>{x()},1200),l(0,!0),u("scrolling from index to",{behavior:_,index:M,top:A},0),{behavior:_,top:A}})),u),{scrollTargetReached:f,scrollToIndex:p,topListHeight:g}},uR(cF,cs,u9),{singleton:!0});function c$(e,t){0===e?t():requestAnimationFrame(()=>{c$(e-1,t)})}function cU(e,t){if(void 0===e)return 0;let n=t-1;return Math.max(0,Math.min("number"==typeof e?e:"LAST"===e.index?n:e.index,n))}function cZ(e){return void 0===e||("number"==typeof e?0===e:0===e.index&&(void 0===e.align||"start"===e.align)&&(void 0===e.offset||0===e.offset))}let cY=u0(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{let s=uX(!0),l=uX(0),u=uX(!0);return uN(uG(a,uY(l),uV(([e,t])=>!cZ(t)),uW(!1)),s),uN(uG(a,uY(l),uV(([e,t])=>!cZ(t)),uW(!1)),u),uG(u2(t,a),uY(s,n,e,u),uV(([[,e],t,{sizeTree:n},r,i])=>e&&(!cc(n)||uD(r))&&!t&&!i),uY(l))(1,([,e])=>{if(void 0===e){s(0,!0),u(0,!0);return}uz(i,()=>{u(0,!0)}),c$(4,()=>{uz(r,()=>{s(0,!0)}),o(0,e)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}},uR(cF,cs,cG,cV),{singleton:!0});function cX(e,t){return 1.01>Math.abs(e-t)}let cq="down",cK={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},cQ=u0(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{let a=uX(!1),s=uX(!0),l=uK(),u=uK(),c=uX(4),d=uX(0),h=uq(uG(u3(uG(u5(i),uU(1),uW(!0)),uG(u5(i),uU(1),uW(!1),uF(100))),uj()),!1),p=uq(uG(u3(uG(n,uW(!0)),uG(n,uW(!1),uF(200))),uj()),!1);uN(uG(u2(u5(i),u5(d)),uH(([e,t])=>e<=t),uj()),s),uN(uG(s,uZ(50)),u);let f=uQ(uG(u2(r,u5(o),u5(t),u5(e),u5(c)),u$((e,[{scrollHeight:t,scrollTop:n},r,i,o,a])=>{let s={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:s}}return{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},cK),uj((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),g=uq(uG(r,u$((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!cX(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),uV(e=>e.changed),uH(e=>e.jump)),0);uN(uG(f,uH(e=>e.atBottom)),a),uN(uG(a,uZ(50)),l);let m=uX(cq);uN(uG(r,uH(({scrollTop:e})=>e),uj(),u$((e,t)=>uL(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?"up":cq,prevScrollTop:t},{direction:cq,prevScrollTop:0}),uH(e=>e.direction)),m),uN(uG(r,uZ(50),uW("none")),m);let v=uX(0);return uN(uG(h,uV(e=>!e),uW(0)),v),uN(uG(i,uZ(100),uY(h),uV(([e,t])=>t),u$(([e,t],[n])=>[t,n],[0,0]),uH(([e,t])=>t-e)),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},uR(cs)),cJ="bottom",c0="none";function c1(e,t,n){return"number"==typeof e?"up"===n&&"top"===t||n===cq&&t===cJ?e:0:"up"===n?"top"===t?e.main:e.reverse:t===cJ?e.main:e.reverse}function c2(e,t){return"number"==typeof e?e:e[t]??0}let c5=u0(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let o=uK(),a=uX(0),s=uX(0),l=uX(0),u=uq(uG(u2(u5(r),u5(i),u5(n),u5(o,cS),u5(l),u5(a),u5(t),u5(e),u5(s)),uH(([e,t,n,[r,i],o,a,s,l,u])=>{let c=e-l,d=Math.max(n-c,0),h=c0,p=c2(u,"top"),f=c2(u,cJ);return r-=l,r+=n+s,i+=n+s,r>e+(a+s)-p&&(h="up"),(i-=l)<e-d+t+f&&(h=cq),h!==c0?[Math.max(c-n-c1(o,"top",h)-p,0),c-d-s+t+c1(o,cJ,h)+f]:null}),uV(e=>null!==e),uj(cS)),[0,0]);return{increaseViewportBy:s,listBoundary:o,overscan:l,topListHeight:a,visibleRange:u}},uR(cs),{singleton:!0}),c3={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function c4(e,t,n,r,i,o){let{lastIndex:a,lastOffset:s,lastSize:l}=i,u=0,c=0;if(e.length>0){u=e[0].offset;let t=e[e.length-1];c=t.offset+t.size}let d=n-a,h=u,p=s+d*l+(d-1)*r-c;return{bottom:c,firstItemIndex:o,items:c9(e,i,o),offsetBottom:p,offsetTop:u,top:h,topItems:c9(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function c6(e,t,n,r,i,o){let a=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-a>=e)break;a++}let s=e+a,l=cU(t,s);return c4(Array.from({length:s}).map((e,t)=>({data:o[t+l],index:t+l,offset:0,size:0})),[],s,i,n,r)}function c9(e,t,n){if(0===e.length)return[];if(!cT(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,o=[],a=cf(t.groupOffsetTree,r,i),s,l=0;for(let r of e){let e;(!s||s.end<r.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start)),e=r.index===s.start?{index:l,type:"group"}:{groupIndex:l,index:r.index-(l+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}function c8(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}let c7=u0(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:c},{topListHeight:d},h,{didMount:p},{recalcInProgress:f}])=>{let g=uX([]),m=uX(0),v=uK(),y=uX(0);uN(o.topItemsIndexes,g);let x=uq(uG(u2(p,f,u5(l,cS),u5(i),u5(r),u5(u),c,u5(g),u5(t),u5(n),u5(y),e),uV(([e,t,,n,,,,,,,,r])=>{let i=void 0!==r&&r.length!==n;return e&&!t&&!i}),uH(([,,[e,t],n,r,i,o,a,s,l,u,c])=>{var d;let{offsetTree:h,sizeTree:p}=r,f=uL(m);if(0===n)return{...c3,totalCount:n};if(0===e&&0===t)return 0===f?{...c3,totalCount:n}:c6(f,i,r,s,l,c||[]);if(cc(p))return f>0?null:c4(function(e,t,n){if(cT(t)){let r=cO(e,t);return[{index:ch(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(cU(i,n),r,c),[],n,l,r,s);let g=[];if(a.length>0){let e=a[0],t=a[a.length-1],n=0;for(let r of cf(p,e,t)){let i=r.value,o=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=o;e<=a;e++)g.push({data:c?.[e],index:e,offset:n,size:i}),n+=i}}if(!o)return c4([],g,n,l,r,s);let v=a.length>0?a[a.length-1]+1:0,y=function(e,t,n,r=0){let i,o;return r>0&&(t=Math.max(t,e[cM(e,r,cI)].offset)),cu((i=cM(e,t,ck),o=cM(e,n,ck,i),e.slice(i,o+1)),cN)}(h,e,t,v);if(0===y.length)return null;let x=n-1,b=((n=>{for(let r of y){let i=r.value,o=i.offset,a=r.start,s=i.size;if(i.offset<e){let t=(a+=Math.floor((e-i.offset+l)/(s+l)))-r.start;o+=t*s+t*l}a<v&&(o+=(v-a)*s,a=v);let u=Math.min(r.end,x);for(let e=a;e<=u&&!(o>=t);e++)n.push({data:c?.[e],index:e,offset:o,size:s}),o+=s+l}})(d=[]),d),w=c8(u,"top"),_=c8(u,cJ);if(b.length>0&&(w>0||_>0)){let e=b[0],t=b[b.length-1];if(w>0&&e.index>v){let t=Math.min(w,e.index-v),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=cf(p,i,i)[0]?.value??e.size;r-=t+l,n.unshift({data:c?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(_>0&&t.index<x){let e=Math.min(_,x-t.index),n=t.offset+t.size+l;for(let r=t.index+1;r<=t.index+e;r++){let e=cf(p,r,r)[0]?.value??t.size;b.push({data:c?.[r],index:r,offset:n,size:e}),n+=e+l}}}return c4(b,g,n,l,r,s)}),uV(e=>null!==e),uj()),c3);uN(uG(e,uV(uD),uH(e=>e?.length)),i),uN(uG(x,uH(e=>e.topListHeight)),d),uN(d,s),uN(uG(x,uH(e=>[e.top,e.bottom])),a),uN(uG(x,uH(e=>e.items)),v);let b=uQ(uG(x,uV(({items:e})=>e.length>0),uY(i,e),uV(([{items:e},t])=>e[e.length-1].originalIndex===t-1),uH(([,e,t])=>[e-1,t]),uj(cS),uH(([e])=>e))),w=uQ(uG(x,uZ(200),uV(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),uH(({items:e})=>e[0].index),uj())),_=uQ(uG(x,uV(({items:e})=>e.length>0),uH(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),uj(c_)));return{endReached:b,initialItemCount:m,itemsRendered:v,listState:x,minOverscanItemCount:y,rangeChanged:_,startReached:w,topItemsIndexes:g,...h}},uR(cF,cj,c5,cY,cG,cQ,cV,cC),{singleton:!0}),de=u0(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let o=uK(),a=uq(uG(u2(n,e,r,t,i),uH(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return uN(u5(a),o),{totalListHeight:a,totalListHeightChanged:o}},uR(cs,c7),{singleton:!0}),dt=u0(([{viewportHeight:e},{totalListHeight:t}])=>{let n=uX(!1),r=uq(uG(u2(n,e,t),uV(([e])=>e),uH(([,e,t])=>Math.max(0,e-t)),uZ(0),uj()),0);return{alignToBottom:n,paddingTopAddition:r}},uR(cs,de),{singleton:!0}),dn=u0(()=>({context:uX(null)})),dr=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:n??"start",...void 0===r?{}:{behavior:r}}:e>o?{...i,align:n??"end",...void 0===r?{}:{behavior:r}}:null,di=u0(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{let c=uK();return uN(uG(c,uY(t,l,n,o,i,r,s),uY(e),uH(([[e,t,n,r,i,o,s,l],u])=>{let{calculateViewLocation:c=dr,done:d,...h}=e,p=cP(e,t,r-1),f=cD(p,t.offsetTree,u)+i+o,g=c({itemBottom:f+ch(t.sizeTree,p)[1],itemTop:f,locationParams:h,viewportBottom:l+n-s,viewportTop:l+o});return null===g?d?.():d&&uz(uG(a,uV(e=>!e),uU(uL(a)?1:2)),d),g}),uV(e=>null!==e)),u),{scrollIntoView:c}},uR(cF,cs,cG,c7,u9),{singleton:!0});function da(e){return!1!==e&&("smooth"===e?"smooth":"auto")}let ds=u0(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:u},{log:c},{scrollingInProgress:d},{context:h},{scrollIntoView:p}])=>{let f=uX(!1),g=uK(),m=null;function v(e){a(0,{align:"end",behavior:e,index:"LAST"})}function y(e){setTimeout(uz(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===m&&(uL(c)("scrolling to bottom due to increased size",{},0),v("auto"))}),100)}uG(u2(uG(u5(t),uU(1)),l),uY(u5(f),o,s,d),uH(([[e,t],n,r,i,o])=>{let a,s=t&&i,l="auto";return s&&(a=r||o,l="function"==typeof n?da(n(a)):a&&da(n),s=s&&!1!==l),{followOutputBehavior:l,shouldFollow:s,totalCount:e}}),uV(({shouldFollow:e})=>e))(1,({followOutputBehavior:t,totalCount:r})=>{null!==m&&(m(),m=null),void 0===uL(n)?m=uz(e,()=>{uL(c)("following output to ",{totalCount:r},0),v(t),m=null}):requestAnimationFrame(()=>{uL(c)("following output to ",{totalCount:r},0),v(t)})}),uG(u2(u5(f),t,u),uV(([e,,t])=>!1!==e&&t),u$(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),uV(({refreshed:e})=>e),uY(f,t))(1,([,e])=>{uL(s)&&y(!1!==e)}),g(1,()=>{y(!1!==uL(f))}),u2(u5(f),i)(1,([e,t])=>{!1===e||t.atBottom||"VIEWPORT_HEIGHT_DECREASING"!==t.notAtBottomBecause||v("auto")});let x=uX(null),b=uK();return uN(u3(uG(u5(r),uH(e=>e?.length??0)),uG(u5(t))),b),uG(u2(uG(b,uU(1)),l),uY(u5(x),s,d,h),uH(([[e,t],n,r,i,o])=>t&&r&&n?.({context:o,totalCount:e,scrollingInProgress:i})),uV(e=>!!e),uZ(0))(1,t=>{null!==m&&(m(),m=null),void 0===uL(n)?m=uz(e,()=>{uL(c)("scrolling into view",{}),p(0,t),m=null}):requestAnimationFrame(()=>{uL(c)("scrolling into view",{}),p(0,t)})}),{autoscrollToBottom:g,followOutput:f,scrollIntoViewOnChange:x}},uR(cF,cQ,cG,cY,cV,u9,cs,dn,di)),dl=u0(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:s}])=>(uN(uG(s,uY(o),uV(([,e])=>0!==e),uY(i,r,t,n,e),uH(([[,e],t,n,r,i,o=[]])=>c6(e,t,n,r,i,o))),a),{}),uR(cF,cY,c7,cV),{singleton:!0}),du=u0(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=uX(0);return uG(e,uY(r),uV(([,e])=>0!==e),uH(([,e])=>({top:e})))(1,e=>{uz(uG(n,uU(1),uV(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{t(0,e)})})}),{initialScrollTop:r}},uR(cV,cs,c7),{singleton:!0}),dc=u0(([{scrollVelocity:e}])=>{let t=uX(!1),n=uK(),r=uX(!1);return uN(uG(e,uY(r,t,n),uV(([e,t])=>!1!==t&&void 0!==t),uH(([e,t,n,r])=>{let{enter:i,exit:o}=t;if(n){if(o(e,r))return!1}else if(i(e,r))return!0;return n}),uj()),t),uG(u2(t,e,n),uY(r))(1,([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},uR(cQ),{singleton:!0}),dd=u0(([{scrollContainerState:e,scrollTo:t}])=>{let n=uK(),r=uK(),i=uK(),o=uX(!1),a=uX(void 0);return uN(uG(u2(n,r),uH(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),uN(uG(t,uY(r),uH(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},uR(cs)),dh=u0(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{let u=uK(),c=uX(void 0),d=uX(null),h=uX(null);return uN(s,d),uN(l,h),uG(u,uY(t,r,a,d,h,n))(1,([e,t,n,r,i,o,a])=>{let s=cg(t.sizeTree).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:void 0===i?1/0:i.k-1,size:t,startIndex:e}});r&&null!==i&&null!==o&&(n=i.scrollTop-o.offsetTop),e({ranges:s,scrollTop:n-=a})}),uN(uG(c,uV(uD),uH(dp)),i),uN(uG(o,uY(c),uV(([,e])=>void 0!==e),uj(),uH(([,e])=>e.ranges)),e),{getState:u,restoreStateFrom:c}},uR(cF,cs,cY,cV,dd));function dp(e){return{align:"start",index:0,offset:e.scrollTop}}let df=u0(([{topItemsIndexes:e}])=>{let t=uX(0);return uN(uG(t,uV(e=>e>=0),uH(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},uR(c7));function dg(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}let dm=dg(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),dv=u0(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:d,sizes:h},{log:p},{recalcInProgress:f}])=>{let g=uQ(uG(l,uY(a),u$(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},s])=>{let l=r+o,u=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||0!=(u=l-n)&&(u+=s)),[u,i,a,l]},[0,[],0,0]),uV(([e])=>0!==e),uY(r,s,n,i,p,f),uV(([,e,t,n,,,r])=>!r&&!n&&0!==e&&"up"===t),uH(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},0),e))));function m(n){n>0?(t(0,{behavior:"auto",top:-n}),e(0,0)):(e(0,0),t(0,{behavior:"auto",top:-n}))}return uG(g,uY(e,o))(1,([t,n,r])=>{r&&dm()?e(0,n-t):m(-t)}),uG(u2(uq(o,!1),e,f),uV(([e,t,n])=>!e&&!n&&0!==t),uH(([e,t])=>t),uZ(1))(1,m),uN(uG(d,uH(e=>({top:-e}))),t),uG(u,uY(h,c),uH(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{if(0===t.length)return e*(n+i);let o=0,a=cd(r,0),s=0,l=0;for(;s<e;){s++,o+=a;let r=t.length===l+1?1/0:t[l+1]-t[l]-1;s+r>e&&(o-=a,r=e-s+1),s+=r,o+=r*(n+i),l++}return o}))(1,n=>{e(0,n),requestAnimationFrame(()=>{t(0,{top:n}),requestAnimationFrame(()=>{e(0,0),f(0,!1)})})}),{deviation:e}},uR(cs,cQ,c7,cF,u9,cC)),dy=u0(([e,t,n,r,i,o,a,s,l,u,c])=>({...e,...t,...n,...r,...i,...o,...a,...s,...l,...u,...c}),uR(c5,dl,cV,dc,de,du,dt,dd,di,u9,dn)),dx=u0(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:o,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:u,sizes:c,statefulTotalCount:d,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:m},v,y,x,b,{scrollToIndex:w},_,{topItemCount:S},{groupCounts:C},M])=>{let{listState:A,minOverscanItemCount:T,topItemsIndexes:I,rangeChanged:k,...D}=b;return uN(k,M.scrollSeekRangeChanged),uN(uG(M.windowViewportRect,uH(e=>e.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:o,groupCounts:C,heightEstimates:s,initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:m,sizeRanges:u,topItemCount:S,topItemsIndexes:I,totalCount:h,...x,groupIndices:a,itemSize:l,listState:A,minOverscanItemCount:T,scrollToIndex:w,statefulTotalCount:d,trackItemSizes:p,rangeChanged:k,...D,...M,...v,sizes:c,...y}},uR(cF,cY,cs,dh,ds,c7,cG,dv,df,cj,dy)),db=typeof document>"u"?eh().useEffect:eh().useLayoutEffect;function dw(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=eh().createContext({});function l(e,n){for(let i of(void 0!==e.propsReady&&(0,e.propsReady)(0,!1),r))(0,e[t.required[i]])(0,n[i]);for(let r of i)r in n&&(0,e[t.optional[r]])(0,n[r]);void 0!==e.propsReady&&(0,e.propsReady)(0,!0)}function u(e){return a.reduce((n,r)=>{var i;let o,a,s;return n[r]=(i=e[t.events[r]],s=()=>o?.(),function(e,t){switch(e){case 1:return t?a===t?void 0:(s(),a=t,o=i(1,t)):(s(),uO);case 2:s(),a=null;return}}),n},{})}return{Component:eh().forwardRef(function(c,d){var h;let{children:p,...f}=c,[g]=eh().useState(()=>{var t;let n,r;return n=new Map,l(t=(r=({constructor:e,dependencies:t,id:i,singleton:o})=>{if(o&&n.has(i))return n.get(i);let a=e(t.map(e=>r(e)));return o&&n.set(i,a),a})(e),f),t}),[m]=eh().useState(()=>u(g));return db(()=>{for(let e of a)e in f&&(0,m[e])(1,f[e]);return()=>{Object.values(m).map(uE)}},[f,m,g]),db(()=>{l(g,f)}),eh().useImperativeHandle(d,(h=o.reduce((e,n)=>(e[n]=e=>{(0,g[t.methods[n]])(0,e)},e),{}),()=>h)),(0,ec.jsx)(s.Provider,{value:g,children:void 0===n?p:(0,ec.jsx)(n,{...function(e,t){let n={},r={},i=0,o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}([...r,...i,...a],f),children:p})})}),useEmitter:(e,t)=>{let n=eh().useContext(s)[e];db(()=>n(1,t),[t,n])},useEmitterValue:parseInt(eh().version,10)>=18?e=>{let t=eh().useContext(s)[e],n=eh().useCallback(e=>t(1,e),[t]);return eh().useSyncExternalStore(n,()=>uL(t),()=>uL(t))}:e=>{let t=eh().useContext(s)[e],[n,r]=eh().useState(()=>uL(t));return db(()=>t(1,e=>{e!==n&&r(()=>e)}),[t,n]),n},usePublisher:e=>{let t=eh().useContext(s);return eh().useCallback(n=>{(0,t[e])(0,n)},[t,e])}}}let d_=eh().createContext(void 0),dS=eh().createContext(void 0),dC="-webkit-sticky",dM="sticky",dA=dg(()=>{if(typeof document>"u")return dM;let e=document.createElement("div");return e.style.position=dC,e.style.position===dC?dC:dM}),dT=typeof document>"u"?eh().useEffect:eh().useLayoutEffect;function dI(e){return"self"in e}function dk(e,t,n,r=uO,i,o){let a=eh().useRef(null),s=eh().useRef(null),l=eh().useRef(null),u=eh().useCallback(n=>{let r,i,a,u=n.target;if("body"in u||dI(u)){let e=dI(u)?u:u.defaultView;a=!0===o?ct(e,e.scrollX):e.scrollY,r=!0===o?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===o?e.innerWidth:e.innerHeight}else a=!0===o?ct(u,u.scrollLeft):u.scrollTop,r=!0===o?u.scrollWidth:u.scrollHeight,i=!0===o?u.offsetWidth:u.offsetHeight;let c=()=>{e({scrollHeight:r,scrollTop:Math.max(a,0),viewportHeight:i})};!0===n.suppressFlushSync?c():tw().flushSync(c),null!==s.current&&(a===s.current||a<=0||a===r-i)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,o]);return eh().useEffect(()=>{let e=i??a.current;return ce(e),r(i??a.current),u({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",u,{passive:!0}),()=>{ce(e),r(null),e.removeEventListener("scroll",u)}},[a,u,n,r,i]),{scrollByCallback:function(e){!0===o&&(e={...void 0===e.behavior?{}:{behavior:e.behavior},...void 0===e.top?{}:{left:ct(a.current,e.top)}}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(n){let r,i,u,c=a.current;if(!c||(!0===o?"offsetWidth"in c&&0===c.offsetWidth:"offsetHeight"in c&&0===c.offsetHeight))return;let d="smooth"===n.behavior;dI(c)?(i=Math.max(cA(c.document.documentElement,!0===o?"width":"height"),!0===o?c.document.documentElement.scrollWidth:c.document.documentElement.scrollHeight),r=!0===o?c.innerWidth:c.innerHeight,u=!0===o?ct(c,c.scrollX):c.scrollY):(i=c[!0===o?"scrollWidth":"scrollHeight"],r=cA(c,!0===o?"width":"height"),u=!0===o?ct(c,c.scrollLeft):c.scrollTop);let h=i-r;if(void 0===n.top)return void c.scrollTo(n);let p=Math.ceil(Math.max(Math.min(h,n.top),0));if(n.top=p,cX(r,i)||p===u){e({scrollHeight:i,scrollTop:u,viewportHeight:r}),d&&t(!0);return}d?(s.current=p,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,!0===o&&(n={...void 0===n.behavior?{}:{behavior:n.behavior},left:ct(c,p)}),c.scrollTo(n)}}}function dD(e){return e}let dO=u0(()=>{let e=uX(e=>`Item ${e}`),t=uX(e=>`Group ${e}`),n=uX({}),r=uX(dD),i=uX("div"),o=uX(uO),a=(e,t=null)=>uq(uG(n,uH(t=>t[e]),uj()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:i,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),dP=u0(([e,t])=>({...e,...t}),uR(dx,dO)),dR=({height:e})=>(0,ec.jsx)("div",{style:{height:e}}),dE={overflowAnchor:"none",position:dA(),zIndex:1},dL={overflowAnchor:"none"},dN={...dL,display:"inline-block",height:"100%"},dz=eh().memo(function({showTopList:e=!1}){let t=d0("listState"),n=d1("sizeRanges"),r=d0("useWindowScroll"),i=d0("customScrollParent"),o=d1("windowScrollContainerState"),a=d1("scrollContainerState"),s=d0("itemContent"),l=d0("context"),u=d0("groupContent"),c=d0("trackItemSizes"),d=d0("itemSize"),h=d0("log"),p=d1("gap"),f=d0("horizontalDirection"),{callbackRef:g}=ci(n,d,c,e?uO:i||r?o:a,h,p,i,f,d0("skipAnimationFrameInResizeObserver")),[m,v]=eh().useState(0);dJ("deviation",e=>{m!==e&&v(e)});let y=d0("EmptyPlaceholder"),x=d0("ScrollSeekPlaceholder")??dR,b=d0("ListComponent"),w=d0("ItemComponent"),_=d0("GroupComponent"),S=d0("computeItemKey"),C=d0("isSeeking"),M=d0("groupIndices").length>0,A=d0("alignToBottom"),T=d0("initialItemFinalLocationReached"),I=e?{}:{boxSizing:"border-box",...f?{display:"inline-block",height:"100%",marginInlineStart:0===m?A?"auto":0:m,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:"nowrap"}:{marginTop:0===m?A?"auto":0:m,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...T?{}:{visibility:"hidden"}};return e||0!==t.totalCount||null==y?(0,ec.jsx)(b,{...dW(b,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:I,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=S(n+t.firstItemIndex,e.data,l);return C?(0,ed.createElement)(x,{...dW(x,l),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,ed.createElement)(_,{...dW(_,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:dE},u(e.index,l)):(0,ed.createElement)(w,{...dW(w,l),...dG(w,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:f?dN:dL},M?s(e.index,e.groupIndex,e.data,l):s(e.index,e.data,l))})}):(0,ec.jsx)(y,{...dW(y,l)})}),dF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},dB={outline:"none",overflowX:"auto",position:"relative"},dj=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),dV=(e,t,n=0)=>({...dj(e),position:t?"relative":"absolute",top:t?-n:0}),dH={position:dA(),top:0,width:"100%",zIndex:1};function dW(e,t){if("string"!=typeof e)return{context:t}}function dG(e,t){return{item:"string"==typeof e?void 0:t}}let d$=eh().memo(function(){let e=d0("HeaderComponent"),t=d1("headerHeight"),n=d0("HeaderFooterTag"),r=cn(eh().useMemo(()=>e=>{t(cA(e,"height"))},[t]),!0,d0("skipAnimationFrameInResizeObserver")),i=d0("context");return null!=e?(0,ec.jsx)(n,{ref:r,children:(0,ec.jsx)(e,{...dW(e,i)})}):null}),dU=eh().memo(function(){let e=d0("FooterComponent"),t=d1("footerHeight"),n=d0("HeaderFooterTag"),r=cn(eh().useMemo(()=>e=>{t(cA(e,"height"))},[t]),!0,d0("skipAnimationFrameInResizeObserver")),i=d0("context");return null!=e?(0,ec.jsx)(n,{ref:r,children:(0,ec.jsx)(e,{...dW(e,i)})}):null});function dZ({useEmitter:e,useEmitterValue:t,usePublisher:n}){return eh().memo(function({children:r,style:i,context:o,...a}){let s=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:f}=dk(s,u,l,c,void 0,d);return e("scrollTo",f),e("scrollBy",h),(0,ec.jsx)(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?dB:dF,...i},tabIndex:0,...a,...dW(l,o),children:r})})}function dY({useEmitter:e,useEmitterValue:t,usePublisher:n}){return eh().memo(function({children:r,style:i,context:o,...a}){let s=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("totalListHeight"),d=t("deviation"),h=t("customScrollParent"),p=eh().useRef(null),{scrollByCallback:f,scrollerRef:g,scrollToCallback:m}=dk(s,u,l,t("scrollerRef"),h);return dT(()=>(g.current=h??p.current?.ownerDocument.defaultView,()=>{g.current=null}),[g,h]),e("windowScrollTo",m),e("scrollBy",f),(0,ec.jsx)(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0===c?void 0:{height:c+d}},...a,...dW(l,o),children:r})})}let dX=({children:e})=>{let t=eh().useContext(d_),n=d1("viewportHeight"),r=d1("fixedItemHeight"),i=d0("alignToBottom"),o=d0("horizontalDirection"),a=cn(eh().useMemo(()=>uk(n,e=>cA(e,o?"width":"height")),[n,o]),!0,d0("skipAnimationFrameInResizeObserver"));return eh().useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,ec.jsx)("div",{"data-viewport-type":"element",ref:a,style:dj(i),children:e})},dq=({children:e})=>{let t=eh().useContext(d_),n=d1("windowViewportRect"),r=d1("fixedItemHeight"),i=d0("customScrollParent"),o=d0("useWindowScroll"),a=d0("topListHeight"),s=ca(n,i,d0("skipAnimationFrameInResizeObserver")),l=d0("alignToBottom");return eh().useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,ec.jsx)("div",{"data-viewport-type":"window",ref:s,style:dV(l,o,a),children:e})},dK=({children:e})=>{let t=d0("TopItemListComponent")??"div",n=d0("headerHeight"),r={...dH,marginTop:`${n}px`},i=d0("context");return(0,ec.jsx)(t,{style:r,...dW(t,i),children:e})},{Component:dQ,useEmitter:dJ,useEmitterValue:d0,usePublisher:d1}=dw(dP,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},eh().memo(function(e){let t=d0("useWindowScroll"),n=d0("topItemsIndexes").length>0,r=d0("customScrollParent"),i=d0("context");return(0,ec.jsxs)(r||t?d5:d2,{...e,context:i,children:[n&&(0,ec.jsx)(dK,{children:(0,ec.jsx)(dz,{showTopList:!0})}),(0,ec.jsxs)(r||t?dq:dX,{children:[(0,ec.jsx)(d$,{}),(0,ec.jsx)(dz,{}),(0,ec.jsx)(dU,{})]})]})})),d2=dZ({useEmitter:dJ,useEmitterValue:d0,usePublisher:d1}),d5=dY({useEmitter:dJ,useEmitterValue:d0,usePublisher:d1}),d3=u0(()=>{let e=uX(e=>(0,ec.jsxs)("td",{children:["Item $",e]})),t=uX(null),n=uX(e=>(0,ec.jsxs)("td",{colSpan:1e3,children:["Group ",e]})),r=uX(null),i=uX(null),o=uX({}),a=uX(dD),s=uX(uO),l=(e,t=null)=>uq(uG(o,uH(t=>t[e]),uj()),t);return{components:o,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),d4=u0(([e,t])=>({...e,...t}),uR(dx,d3)),d6=({height:e})=>(0,ec.jsx)("tr",{children:(0,ec.jsx)("td",{style:{height:e}})}),d9=({height:e})=>(0,ec.jsx)("tr",{children:(0,ec.jsx)("td",{style:{border:0,height:e,padding:0}})}),d8={overflowAnchor:"none"},d7={position:dA(),zIndex:2,overflowAnchor:"none"},he=eh().memo(function({showTopList:e=!1}){let t=ha("listState"),n=ha("computeItemKey"),r=ha("firstItemIndex"),i=ha("context"),o=ha("isSeeking"),a=ha("fixedHeaderHeight"),s=ha("groupIndices").length>0,l=ha("itemContent"),u=ha("groupContent"),c=ha("ScrollSeekPlaceholder")??d6,d=ha("GroupComponent"),h=ha("TableRowComponent"),p=(e?t.topItems:[]).reduce((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let f=t.originalIndex,g=n(f+r,t.data,i),m=e?0===f?0:p[f-1]:0;return o?(0,ed.createElement)(c,{...dW(c,i),height:t.size,index:t.index,key:g,type:t.type||"item"}):"group"===t.type?(0,ed.createElement)(d,{...dW(d,i),"data-index":f,"data-item-index":t.index,"data-known-size":t.size,key:g,style:{...d7,top:a}},u(t.index,i)):(0,ed.createElement)(h,{...dW(h,i),...dG(h,t.data),"data-index":f,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:g,style:e?{...d7,top:a+m}:d8},s?l(t.index,t.groupIndex,t.data,i):l(t.index,t.data,i))})}),ht=eh().memo(function(){let e=ha("listState"),t=ha("topItemsIndexes").length>0,n=hs("sizeRanges"),r=ha("useWindowScroll"),i=ha("customScrollParent"),o=hs("windowScrollContainerState"),a=hs("scrollContainerState"),s=ha("trackItemSizes"),{callbackRef:l,ref:u}=ci(n,ha("itemSize"),s,i||r?o:a,ha("log"),void 0,i,!1,ha("skipAnimationFrameInResizeObserver")),[c,d]=eh().useState(0);ho("deviation",e=>{c!==e&&(u.current.style.marginTop=`${e}px`,d(e))});let h=ha("EmptyPlaceholder"),p=ha("FillerRow")??d9,f=ha("TableBodyComponent"),g=ha("paddingTopAddition"),m=ha("statefulTotalCount"),v=ha("context");if(0===m&&null!=h)return(0,ec.jsx)(h,{...dW(h,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),x=e.offsetTop+g+c-y,b=e.offsetBottom,w=x>0?(0,ec.jsx)(p,{context:v,height:x},"padding-top"):null,_=b>0?(0,ec.jsx)(p,{context:v,height:b},"padding-bottom"):null;return(0,ec.jsxs)(f,{"data-testid":"virtuoso-item-list",ref:l,...dW(f,v),children:[w,t&&(0,ec.jsx)(he,{showTopList:!0}),(0,ec.jsx)(he,{}),_]})}),hn=({children:e})=>{let t=eh().useContext(d_),n=hs("viewportHeight"),r=hs("fixedItemHeight"),i=cn(eh().useMemo(()=>uk(n,e=>cA(e,"height")),[n]),!0,ha("skipAnimationFrameInResizeObserver"));return eh().useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,ec.jsx)("div",{"data-viewport-type":"element",ref:i,style:dj(!1),children:e})},hr=({children:e})=>{let t=eh().useContext(d_),n=hs("windowViewportRect"),r=hs("fixedItemHeight"),i=ha("customScrollParent"),o=ha("useWindowScroll"),a=ca(n,i,ha("skipAnimationFrameInResizeObserver"));return eh().useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,ec.jsx)("div",{"data-viewport-type":"window",ref:a,style:dV(!1,o),children:e})},{Component:hi,useEmitter:ho,useEmitterValue:ha,usePublisher:hs}=dw(d4,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},eh().memo(function(e){let t=ha("useWindowScroll"),n=ha("customScrollParent"),r=hs("fixedHeaderHeight"),i=hs("fixedFooterHeight"),o=ha("fixedHeaderContent"),a=ha("fixedFooterContent"),s=ha("context"),l=cn(eh().useMemo(()=>uk(r,e=>cA(e,"height")),[r]),!0,ha("skipAnimationFrameInResizeObserver")),u=cn(eh().useMemo(()=>uk(i,e=>cA(e,"height")),[i]),!0,ha("skipAnimationFrameInResizeObserver")),c=n||t?hu:hl,d=n||t?hr:hn,h=ha("TableComponent"),p=ha("TableHeadComponent"),f=ha("TableFooterComponent"),g=o?(0,ec.jsx)(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...dW(p,s),children:o()},"TableHead"):null,m=a?(0,ec.jsx)(f,{ref:u,style:{bottom:0,position:"sticky",zIndex:1},...dW(f,s),children:a()},"TableFoot"):null;return(0,ec.jsx)(c,{...e,...dW(c,s),children:(0,ec.jsx)(d,{children:(0,ec.jsxs)(h,{style:{borderSpacing:0,overflowAnchor:"none"},...dW(h,s),children:[g,(0,ec.jsx)(ht,{},"TableBody"),m]})})})})),hl=dZ({useEmitter:ho,useEmitterValue:ha,usePublisher:hs}),hu=dY({useEmitter:ho,useEmitterValue:ha,usePublisher:hs}),hc={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},hd={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:hh,floor:hp,max:hf,min:hg,round:hm}=Math;function hv(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function hy(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function hx(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}let hb=u0(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:d},h,p,{didMount:f,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b},w])=>{let _=uX(0),S=uX(0),C=uX(hc),M=uX({height:0,width:0}),A=uX({height:0,width:0}),T=uK(),I=uK(),k=uX(0),D=uX(null),O=uX({column:0,row:0}),P=uK(),R=uK(),E=uX(!1),L=uX(0),N=uX(!0),z=uX(!1),F=uX(!1);uG(f,uY(L),uV(([e,t])=>!cZ(t)))(1,()=>{N(0,!1)}),uG(u2(f,N,A,M,L,z),uV(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i))(1,([,,,,e])=>{void 0===e?N(0,!0):(z(0,!0),c$(1,()=>{T(0,e)}),uz(uG(u),()=>{t(0,[0,0]),N(0,!0)}))}),uN(uG(R,uV(e=>null!=e&&e.scrollTop>0),uW(0)),S),uG(f,uY(R),uV(([,e])=>null!=e))(1,([,e])=>{e&&(M(0,e.viewport),A(0,e.item),O(0,e.gap),e.scrollTop>0&&(E(0,!0),uz(uG(u,uU(1)),e=>{E(0,!1)}),l(0,{top:e.scrollTop})))}),uN(uG(M,uH(({height:e})=>e)),d),uN(uG(u2(u5(M,hy),u5(A,hy),u5(O,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),u5(u)),uH(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),P),uN(uG(u2(u5(_),r,u5(O,hx),u5(A,hy),u5(M,hy),u5(D),u5(S),u5(E),u5(N),u5(L)),uV(([,,,,,,,e])=>!e),uH(([e,[t,n],r,i,o,a,s,,l,u])=>{let c,d,{column:h,row:p}=r,{height:f,width:g}=i,{width:m}=o;if(0===s&&(0===e||0===m))return hc;if(0===g){var v;let t=cU(u,e),n=t+Math.max(s-1,0);return v=hv(t,n,a),{...hd,items:v}}let y=hw(m,g,h);l?0===t&&0===n&&s>0?(c=0,d=s-1):(c=y*hp((t+p)/(f+p)),d=hg(e-1,hf(d=y*hh((n+p)/(f+p))-1,y-1)),c=hg(d,hf(0,c))):(c=0,d=-1);let x=hv(c,d,a),{bottom:b,top:w}=h_(o,r,i,x),_=hh(e/y);return{bottom:b,itemHeight:f,items:x,itemWidth:g,offsetBottom:_*f+(_-1)*p-b,offsetTop:w,top:w}})),C),uN(uG(D,uV(e=>null!==e),uH(e=>e.length)),_),uN(uG(u2(M,A,C,O),uV(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),uH(([e,t,{items:n},r])=>{let{bottom:i,top:o}=h_(e,r,t,n);return[o,i]}),uj(cS)),t);let B=uX(!1);uN(uG(u,uY(B),uH(([e,t])=>t||0!==e)),B);let j=uQ(uG(u2(C,_),uV(([{items:e}])=>e.length>0),uY(B),uV(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),uH(([[,e]])=>e-1),uj())),V=uQ(uG(u5(C),uV(({items:e})=>e.length>0&&0===e[0].index),uW(0),uj())),H=uQ(uG(u5(C),uY(E),uV(([{items:e},t])=>e.length>0&&!t),uH(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),uj(c_),uZ(0)));uN(H,p.scrollSeekRangeChanged),uN(uG(T,uY(M,A,_,O),uH(([e,t,n,r,i])=>{let o=cW(e),{align:a,behavior:s,offset:l}=o,u=o.index;"LAST"===u&&(u=r-1);let c=hS(t,i,n,u=hf(0,u,hg(r-1,u)));return"end"===a?c=hm(c-t.height+n.height):"center"===a&&(c=hm(c-t.height/2+n.height/2)),void 0!==l&&0!==l&&(c+=l),{behavior:s,top:c}})),l);let W=uq(uG(C,uH(e=>e.offsetBottom+e.bottom)),0);return uN(uG(b,uH(e=>({height:e.visibleHeight,width:e.visibleWidth}))),M),{customScrollParent:m,data:D,deviation:k,footerHeight:i,gap:O,headerHeight:o,increaseViewportBy:e,initialItemCount:S,itemDimensions:A,overscan:n,restoreStateFrom:R,scrollBy:a,scrollContainerState:s,scrollHeight:I,scrollTo:l,scrollToIndex:T,scrollTop:u,smoothScrollTargetReached:c,totalCount:_,useWindowScroll:v,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b,...p,gridState:C,horizontalDirection:F,initialTopMostItemIndex:L,totalListHeight:W,...h,endReached:j,propsReady:g,rangeChanged:H,startReached:V,stateChanged:P,stateRestoreInProgress:E,...w}},uR(c5,cs,cQ,dc,cV,dd,u9));function hw(e,t,n){return hf(1,hp((e+n)/(hp(t)+n)))}function h_(e,t,n,r){let{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};let o=hS(e,t,n,r[0].index);return{bottom:hS(e,t,n,r[r.length-1].index)+i,top:o}}function hS(e,t,n,r){let i=hp(r/hw(e.width,n.width,t.column)),o=i*n.height+hf(0,i-1)*t.row;return o>0?o+t.row:o}let hC=u0(()=>{let e=uX(e=>`Item ${e}`),t=uX({}),n=uX(null),r=uX("virtuoso-grid-item"),i=uX("virtuoso-grid-list"),o=uX(dD),a=uX("div"),s=uX(uO),l=(e,n=null)=>uq(uG(t,uH(t=>t[e]),uj()),n),u=uX(!1),c=uX(!1);return uN(u5(c),u),{components:t,computeItemKey:o,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),hM=u0(([e,t])=>({...e,...t}),uR(hb,hC)),hA=eh().memo(function(){let e=hP("gridState"),t=hP("listClassName"),n=hP("itemClassName"),r=hP("itemContent"),i=hP("computeItemKey"),o=hP("isSeeking"),a=hR("scrollHeight"),s=hP("ItemComponent"),l=hP("ListComponent"),u=hP("ScrollSeekPlaceholder"),c=hP("context"),d=hR("itemDimensions"),h=hR("gap"),p=hP("log"),f=hP("stateRestoreInProgress"),g=hR("reportReadyState"),m=cn(eh().useMemo(()=>e=>{a(e.parentElement.parentElement.scrollHeight);let t=e.firstChild;if(null!==t){let{height:e,width:n}=t.getBoundingClientRect();d({height:e,width:n})}h({column:hN("column-gap",getComputedStyle(e).columnGap,p),row:hN("row-gap",getComputedStyle(e).rowGap,p)})},[a,d,h,p]),!0,!1);return dT(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),f?null:(0,ec.jsx)(l,{className:t,ref:m,...dW(l,c),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let a=i(t.index,t.data,c);return o?(0,ec.jsx)(u,{...dW(u,c),height:e.itemHeight,index:t.index,width:e.itemWidth},a):(0,ed.createElement)(s,{...dW(s,c),className:n,"data-index":t.index,key:a},r(t.index,t.data,c))})})}),hT=eh().memo(function(){let e=hP("HeaderComponent"),t=hR("headerHeight"),n=hP("headerFooterTag"),r=cn(eh().useMemo(()=>e=>{t(cA(e,"height"))},[t]),!0,!1),i=hP("context");return null!=e?(0,ec.jsx)(n,{ref:r,children:(0,ec.jsx)(e,{...dW(e,i)})}):null}),hI=eh().memo(function(){let e=hP("FooterComponent"),t=hR("footerHeight"),n=hP("headerFooterTag"),r=cn(eh().useMemo(()=>e=>{t(cA(e,"height"))},[t]),!0,!1),i=hP("context");return null!=e?(0,ec.jsx)(n,{ref:r,children:(0,ec.jsx)(e,{...dW(e,i)})}):null}),hk=({children:e})=>{let t=eh().useContext(dS),n=hR("itemDimensions"),r=hR("viewportDimensions"),i=cn(eh().useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return eh().useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,ec.jsx)("div",{ref:i,style:dj(!1),children:e})},hD=({children:e})=>{let t=eh().useContext(dS),n=hR("windowViewportRect"),r=hR("itemDimensions"),i=hP("customScrollParent"),o=hP("useWindowScroll"),a=ca(n,i,!1);return eh().useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,ec.jsx)("div",{ref:a,style:dV(!1,o),children:e})},{useEmitter:hO,useEmitterValue:hP,usePublisher:hR}=dw(hM,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},eh().memo(function({...e}){let t=hP("useWindowScroll"),n=hP("customScrollParent"),r=n||t?hL:hE,i=n||t?hD:hk,o=hP("context");return(0,ec.jsx)(r,{...e,...dW(r,o),children:(0,ec.jsxs)(i,{children:[(0,ec.jsx)(hT,{}),(0,ec.jsx)(hA,{}),(0,ec.jsx)(hI,{})]})})})),hE=dZ({useEmitter:hO,useEmitterValue:hP,usePublisher:hR}),hL=dY({useEmitter:hO,useEmitterValue:hP,usePublisher:hR});function hN(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,2),"normal"===t?0:parseInt(t??"0",10)}function hz({items:e,height:t,width:n,selectedItems:r,onLegendItemClick:i,onItemMouseOver:o,onItemMouseOut:a}){let s=e.length>5;return(0,ec.jsx)(dQ,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,ec.jsx)(uA,{item:t,index:e,truncateLabel:s,isVisuallySelected:up(t,r),onClick:i,onMouseOver:o,onMouseOut:a,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function hF(e,t){return"function"==typeof e?e(t):e}function hB(e,t){return n=>{t.setState(t=>({...t,[e]:hF(n,t[e])}))}}function hj(e){return e instanceof Function}function hV(e,t,n){let r,i=[];return o=>{let a,s;n.key&&n.debug&&(a=Date.now());let l=e(o);if(!(l.length!==i.length||l.some((e,t)=>i[t]!==e)))return r;if(i=l,n.key&&n.debug&&(s=Date.now()),r=t(...l),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){let e=Math.round((Date.now()-a)*100)/100,t=Math.round((Date.now()-s)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
3
+ font-size: .6rem;
4
+ font-weight: bold;
5
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function hH(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}let hW="debugHeaders";function hG(e,t,n){var r;let i={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(i),e},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(i,e)}),i}function h$(e,t,n,r){var i,o;let a=0,s=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)},0)};s(e);let l=[],u=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},o=[];e.forEach(e=>{let a,s=[...o].reverse()[0],l=e.column.depth===i.depth,u=!1;if(l&&e.column.parent?a=e.column.parent:(a=e.column,u=!0),s&&(null==s?void 0:s.column)===a)s.subHeaders.push(e);else{let i=hG(n,a,{id:[r,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:u,placeholderId:u?`${o.filter(e=>e.column===a).length}`:void 0,depth:t,index:o.length});i.subHeaders.push(e),o.push(i)}i.headers.push(e),e.headerGroup=i}),l.push(i),t>0&&u(o,t-1)};u(t.map((e,t)=>hG(n,e,{depth:a,index:t})),a-1),l.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(null!=(i=null==(o=l[0])?void 0:o.headers)?i:[]),l}let hU=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(null!=n&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);if(null!=n&&n.accessorFn)return n.columnDef.getUniqueValues?s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r):s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=o?o:[],getLeafRows:()=>{var e,t;let n,r;return e=s.subRows,t=e=>e.subRows,n=[],(r=e=>{e.forEach(e=>{n.push(e);let i=t(e);null!=i&&i.length&&r(i)})})(e),n},getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:hV(()=>[e.getAllLeafColumns()],t=>t.map(t=>{var n;let r;return n=t.id,r={id:`${s.id}_${t.id}`,row:s,column:t,getValue:()=>s.getValue(n),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:hV(()=>[e,t,s,r],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),hH(e.options,"debugCells","cell.getContext"))},e._features.forEach(n=>{null==n.createCell||n.createCell(r,t,s,e)},{}),r}),hH(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:hV(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),hH(e.options,"debugRows","getAllCellsByColumnId"))};for(let t=0;t<e._features.length;t++){let n=e._features[t];null==n||null==n.createRow||n.createRow(s,e)}return s},hZ=(e,t,n)=>{var r,i;let o=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!!(null==(i=e.getValue(t))||null==(i=i.toString())||null==(i=i.toLowerCase())?void 0:i.includes(o))};hZ.autoRemove=e=>h5(e);let hY=(e,t,n)=>{var r;return!!(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};hY.autoRemove=e=>h5(e);let hX=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};hX.autoRemove=e=>h5(e);let hq=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};hq.autoRemove=e=>h5(e);let hK=(e,t,n)=>!n.some(n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))});hK.autoRemove=e=>h5(e)||!(null!=e&&e.length);let hQ=(e,t,n)=>n.some(n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)});hQ.autoRemove=e=>h5(e)||!(null!=e&&e.length);let hJ=(e,t,n)=>e.getValue(t)===n;hJ.autoRemove=e=>h5(e);let h0=(e,t,n)=>e.getValue(t)==n;h0.autoRemove=e=>h5(e);let h1=(e,t,n)=>{let[r,i]=n,o=e.getValue(t);return o>=r&&o<=i};h1.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,i="number"!=typeof n?parseFloat(n):n,o=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(i)?1/0:i;if(o>a){let e=o;o=a,a=e}return[o,a]},h1.autoRemove=e=>h5(e)||h5(e[0])&&h5(e[1]);let h2={includesString:hZ,includesStringSensitive:hY,equalsString:hX,arrIncludes:hq,arrIncludesAll:hK,arrIncludesSome:hQ,equals:hJ,weakEquals:h0,inNumberRange:h1};function h5(e){return null==e||""===e}function h3(e,t,n){return!!e&&!!e.autoRemove&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}let h4={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+("number"==typeof r?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);null!=i&&(i*=1)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!(Array.isArray(n)&&n.every(e=>"number"==typeof e)))return;if(1===n.length)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2!=0?i[r]:(i[r-1]+i[r])/2},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},h6=()=>({left:[],right:[]}),h9={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},h8=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),h7=null;function pe(e){return"touchstart"===e.type}function pt(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}let pn=()=>({pageIndex:0,pageSize:10}),pr=()=>({top:[],bottom:[]}),pi=(e,t,n,r,i)=>{var o;let a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(o=a.subRows)&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(t=>pi(e,t.id,n,r,i))};function po(e,t){let n=e.getState().rowSelection,r=[],i={},o=function(e,t){return e.map(e=>{var t;let a=pa(e,n);if(a&&(r.push(e),i[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:o(e.subRows)}),a)return e}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function pa(e,t){var n;return null!=(n=t[e.id])&&n}function ps(e,t,n){var r;if(!(null!=(r=e.subRows)&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(e=>{if((!o||i)&&(e.getCanSelect()&&(pa(e,t)?o=!0:i=!1),e.subRows&&e.subRows.length)){let n=ps(e,t);"all"===n?o=!0:("some"===n&&(o=!0),i=!1)}}),i?"all":!!o&&"some"}let pl=/([0-9]+)/gm;function pu(e,t){return e===t?0:e>t?1:-1}function pc(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function pd(e,t){let n=e.split(pl).filter(Boolean),r=t.split(pl).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),o=parseInt(t,10),a=[i,o].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return -1;continue}if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>o)return 1;if(o>i)return -1}return n.length-r.length}let ph={alphanumeric:(e,t,n)=>pd(pc(e.getValue(n)).toLowerCase(),pc(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>pd(pc(e.getValue(n)),pc(t.getValue(n))),text:(e,t,n)=>pu(pc(e.getValue(n)).toLowerCase(),pc(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>pu(pc(e.getValue(n)),pc(t.getValue(n))),datetime:(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},basic:(e,t,n)=>pu(e.getValue(n),t.getValue(n))},pp=[{createTable:e=>{e.getHeaderGroups=hV(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;let s=null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],l=null!=(a=null==i?void 0:i.map(e=>n.find(t=>t.id===e)).filter(Boolean))?a:[];return h$(t,[...s,...n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),...l],e)},hH(e.options,hW,"getHeaderGroups")),e.getCenterHeaderGroups=hV(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>h$(t,n=n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),e,"center"),hH(e.options,hW,"getCenterHeaderGroups")),e.getLeftHeaderGroups=hV(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;return h$(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],e,"left")},hH(e.options,hW,"getLeftHeaderGroups")),e.getRightHeaderGroups=hV(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;return h$(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],e,"right")},hH(e.options,hW,"getRightHeaderGroups")),e.getFooterGroups=hV(()=>[e.getHeaderGroups()],e=>[...e].reverse(),hH(e.options,hW,"getFooterGroups")),e.getLeftFooterGroups=hV(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),hH(e.options,hW,"getLeftFooterGroups")),e.getCenterFooterGroups=hV(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),hH(e.options,hW,"getCenterFooterGroups")),e.getRightFooterGroups=hV(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),hH(e.options,hW,"getRightFooterGroups")),e.getFlatHeaders=hV(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),hH(e.options,hW,"getFlatHeaders")),e.getLeftFlatHeaders=hV(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),hH(e.options,hW,"getLeftFlatHeaders")),e.getCenterFlatHeaders=hV(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),hH(e.options,hW,"getCenterFlatHeaders")),e.getRightFlatHeaders=hV(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),hH(e.options,hW,"getRightFlatHeaders")),e.getCenterLeafHeaders=hV(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),hH(e.options,hW,"getCenterLeafHeaders")),e.getLeftLeafHeaders=hV(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),hH(e.options,hW,"getLeftLeafHeaders")),e.getRightLeafHeaders=hV(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),hH(e.options,hW,"getRightLeafHeaders")),e.getLeafHeaders=hV(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,i,o,a,s,l;return[...null!=(r=null==(i=e[0])?void 0:i.headers)?r:[],...null!=(o=null==(a=t[0])?void 0:a.headers)?o:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map(e=>e.getLeafHeaders()).flat()},hH(e.options,hW,"getLeafHeaders"))}},{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:hB("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;let i=e.columns;return null==(n=i.length?i.some(e=>e.getIsVisible()):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=hV(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),hH(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=hV(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],hH(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(t,n)=>hV(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),hH(e.options,"debugColumns",t));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(null!=e.getIsVisible&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>null==e.getIsVisible?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:hB("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=hV(e=>[pt(t,e)],t=>t.findIndex(t=>t.id===e.id),hH(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return(null==(r=pt(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;let i=pt(t,n);return(null==(r=i[i.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=hV(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(null!=e&&e.length){let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}else i=r;var o=i;if(!(null!=t&&t.length)||!n)return o;let a=o.filter(e=>!t.includes(e.id));return"remove"===n?a:[...t.map(e=>o.find(t=>t.id===e)).filter(Boolean),...a]},hH(e.options,"debugTable","_getOrderColumnsFn"))}},{getInitialState:e=>({columnPinning:h6(),...e}),getDefaultOptions:e=>({onColumnPinningChange:hB("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,i,o,a,s,l;return"right"===n?{left:(null!=(o=null==e?void 0:e.left)?o:[]).filter(e=>!(null!=r&&r.includes(e))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter(e=>!(null!=r&&r.includes(e))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter(e=>!(null!=r&&r.includes(e))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter(e=>!(null!=r&&r.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=r&&r.includes(e))),right:(null!=(i=null==e?void 0:e.right)?i:[]).filter(e=>!(null!=r&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,i;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(i=t.options.enableColumnPinning)?i:t.options.enablePinning)||r)}),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==i?void 0:i.includes(e));return o?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();return i?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[i])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=hV(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.column.id))},hH(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=hV(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"left"})),hH(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=hV(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"right"})),hH(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?h6():null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:h6())},e.getIsSomeColumnsPinned=t=>{var n,r,i;let o=e.getState().columnPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.left)?void 0:r.length)||(null==(i=o.right)?void 0:i.length))},e.getLeftLeafColumns=hV(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),hH(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=hV(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),hH(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=hV(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.id))},hH(e.options,"debugColumns","getCenterLeafColumns"))}},{createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:hB("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?h2.includesString:"number"==typeof r?h2.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?h2.equals:Array.isArray(r)?h2.arrIncludes:h2.weakEquals},e.getFilterFn=()=>{var n,r;return hj(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:h2[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(i=t.options.enableFilters)||i)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find(t=>t.id===e.id))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{var r,i;let o=e.getFilterFn(),a=null==t?void 0:t.find(t=>t.id===e.id),s=hF(n,a?a.value:void 0);if(h3(o,s,e))return null!=(r=null==t?void 0:t.filter(t=>t.id!==e.id))?r:[];let l={id:e.id,value:s};return a?null!=(i=null==t?void 0:t.map(t=>t.id===e.id?l:t))?i:[]:null!=t&&t.length?[...t,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange(e=>{var r;return null==(r=hF(t,e))?void 0:r.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&h3(t.getFilterFn(),e.value,t))&&!0})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel)?e.getPreFilteredRowModel():e._getFilteredRowModel()}},{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:hB("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;let r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(i=t.options.enableFilters)||i)&&(null==(o=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||o)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>h2.includesString,e.getGlobalFilterFn=()=>{var t,n;let{globalFilterFn:r}=e.options;return hj(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:h2[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:hB("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return ph.datetime;if("string"==typeof n&&(r=!0,n.split(pl).length>1))return ph.alphanumeric}return r?ph.text:ph.basic},e.getAutoSortDir=()=>{let n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw Error();return hj(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:ph[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),o=null!=n;t.setSorting(a=>{let s,l=null==a?void 0:a.find(t=>t.id===e.id),u=null==a?void 0:a.findIndex(t=>t.id===e.id),c=[],d=o?n:"desc"===i;if("toggle"!=(s=null!=a&&a.length&&e.getCanMultiSort()&&r?l?"toggle":"add":null!=a&&a.length&&u!==a.length-1?"replace":l?"toggle":"replace")||o||i||(s="remove"),"add"===s){var h;(c=[...a,{id:e.id,desc:d}]).splice(0,c.length-(null!=(h=t.options.maxMultiSortColCount)?h:Number.MAX_SAFE_INTEGER))}else c="toggle"===s?a.map(t=>t.id===e.id?{...t,desc:d}:t):"remove"===s?a.filter(t=>t.id!==e.id):[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;let o=e.getFirstSortDir(),a=e.getIsSorted();return a?(a===o||null!=(r=t.options.enableSortingRemoval)&&!r||!!n&&null!=(i=t.options.enableMultiRemove)&&!i)&&("desc"===a?"asc":"desc"):o},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;let r=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.clearSorting=()=>{t.setSorting(t=>null!=t&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel)?e.getPreSortedRowModel():e._getSortedRowModel()}},{getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:hB("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>null!=t&&t.includes(e.id)?t.filter(t=>t!==e.id):[...null!=t?t:[],e.id])},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?h4.sum:"[object Date]"===Object.prototype.toString.call(r)?h4.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw Error();return hj(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:h4[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel)?e.getPreGroupedRowModel():e._getGroupedRowModel()},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!(null!=(t=n.subRows)&&t.length)}}},{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:hB("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t)return void e._queue(()=>{t=!0});if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(".");t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel)?e.getPreExpandedRowModel():e._getExpandedRowModel()},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;let o=!0===r||!!(null!=r&&r[e.id]),a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n=null!=(i=n)?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{var n;let r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,i;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!!(null!=(i=e.subRows)&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)n=(r=t.getRow(r.parentId,!0)).getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{...pn(),...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:hB("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t)return void e._queue(()=>{t=!0});if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange(e=>hF(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?pn():null!=(n=e.initialState.pagination)?n:pn())},e.setPageIndex=t=>{e.setPagination(n=>{let r=hF(t,n.pageIndex);return r=Math.max(0,Math.min(r,void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,hF(t,e.pageSize)),r=Math.floor(e.pageSize*e.pageIndex/n);return{...e,pageIndex:r,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var r;let i=hF(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof i&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=hV(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},hH(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return -1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel)?e.getPrePaginationRowModel():e._getPaginationRowModel(),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:pr(),...e}),getDefaultOptions:e=>({onRowPinningChange:hB("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let o=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],a=new Set([...i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],e.id,...o]);t.setRowPinning(e=>{var t,r,i,o,s,l;return"bottom"===n?{top:(null!=(i=null==e?void 0:e.top)?i:[]).filter(e=>!(null!=a&&a.has(e))),bottom:[...(null!=(o=null==e?void 0:e.bottom)?o:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)]}:"top"===n?{top:[...(null!=(s=null==e?void 0:e.top)?s:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter(e=>!(null!=a&&a.has(e)))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter(e=>!(null!=a&&a.has(e))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter(e=>!(null!=a&&a.has(e)))}})},e.getCanPin=()=>{var n;let{enableRowPinning:r,enablePinning:i}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:i)||n},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==i?void 0:i.includes(e));return o?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();if(!i)return -1;let o=null==(n="top"===i?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(r=null==o?void 0:o.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?pr():null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:pr())},e.getIsSomeRowsPinned=t=>{var n,r,i;let o=e.getState().rowPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.top)?void 0:r.length)||(null==(i=o.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var i;return(null==(i=e.options.keepPinnedRows)||i?(null!=n?n:[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(null!=n?n:[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r}))},e.getTopRows=hV(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),hH(e.options,"debugRows","getTopRows")),e.getBottomRows=hV(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),hH(e.options,"debugRows","getBottomRows")),e.getCenterRows=hV(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!r.has(e.id))},hH(e.options,"debugRows","getCenterRows"))}},{getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:hB("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=void 0!==t?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(t=>{pi(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=hV(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?po(e,n):{rows:[],flatRows:[],rowsById:{}},hH(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=hV(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?po(e,n):{rows:[],flatRows:[],rowsById:{}},hH(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=hV(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?po(e,n):{rows:[],flatRows:[],rowsById:{}},hH(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=void 0!==n?n:!i,e.getCanSelect()&&i===n)return o;let s={...o};return pi(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return pa(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return"some"===ps(e,n)},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return"all"===ps(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},{getDefaultColumnDef:()=>h9,getInitialState:e=>({columnSizing:{},columnSizingInfo:h8(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:hB("columnSizing",e),onColumnSizingInfoChange:hB("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;let o=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:h9.minSize,null!=(r=null!=o?o:e.columnDef.size)?r:h9.size),null!=(i=e.columnDef.maxSize)?i:h9.maxSize)},e.getStart=hV(e=>[e,pt(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),hH(t.options,"debugColumns","getStart")),e.getAfter=hV(e=>[e,pt(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),hH(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{if(e.subHeaders.length)e.subHeaders.forEach(n);else{var r;t+=null!=(r=e.column.getSize())?r:0}};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=null==r?void 0:r.getCanResize();return o=>{if(!r||!i||(null==o.persist||o.persist(),pe(o)&&o.touches&&o.touches.length>1))return;let a=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],l=pe(o)?Math.round(o.touches[0].clientX):o.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var r,i;let o="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*o,s=Math.max(a/(null!=(i=null==e?void 0:e.startSize)?i:0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*s,0))/100}),{...e,deltaOffset:a,deltaPercentage:s}}),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing(e=>({...e,...u})))},d=e=>{c("end",e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||("u">typeof document?document:null),p={moveHandler:e=>c("move",e.clientX),upHandler:e=>{null==h||h.removeEventListener("mousemove",p.moveHandler),null==h||h.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},f={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c("move",e.touches[0].clientX),!1),upHandler:e=>{var t;null==h||h.removeEventListener("touchmove",f.moveHandler),null==h||h.removeEventListener("touchend",f.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof h7)return h7;let e=!1;try{let t=()=>{};window.addEventListener("test",t,{get passive(){return e=!0,!1}}),window.removeEventListener("test",t)}catch(t){e=!1}return h7=e}()&&{passive:!1};pe(o)?(null==h||h.addEventListener("touchmove",f.moveHandler,g),null==h||h.addEventListener("touchend",f.upHandler,g)):(null==h||h.addEventListener("mousemove",p.moveHandler,g),null==h||h.addEventListener("mouseup",p.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?h8():null!=(n=e.initialState.columnSizingInfo)?n:h8())},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0}}}];function pf(e){let t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}let pg={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},pm=RegExp(Object.keys(pg).join("|"),"g"),pv={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function py(e,t,n){let r;return(e=px(e,n),(t=px(t,n)).length>e.length)?pv.NO_MATCH:e===t?pv.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?pv.EQUAL:e.startsWith(t)?pv.STARTS_WITH:e.includes(` ${t}`)?pv.WORD_STARTS_WITH:e.includes(t)?pv.CONTAINS:1===t.length?pv.NO_MATCH:(r="",e.split(" ").forEach(e=>{e.split("-").forEach(e=>{r+=e.substr(0,1)})}),r).includes(t)?pv.ACRONYM:function(e,t){var n;let r,i=0,o=0;function a(e,t,n){for(let r=n,o=t.length;r<o;r++)if(t[r]===e)return i+=1,r+1;return -1}let s=a(t[0],e,0);if(s<0)return pv.NO_MATCH;o=s;for(let n=1,r=t.length;n<r;n++)if(!((o=a(t[n],e,o))>-1))return pv.NO_MATCH;return n=o-s,r=i/t.length,pv.MATCHES+1/n*r}(e,t)}function px(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(pm,e=>pg[e])),e}let pb={maxRanking:1/0,minRanking:-1/0};function pw(e,t,{isHeader:n,isLastColumn:r,isFirstColumn:i,defaultColumnHeight:o}={}){var a,s;let l=e.spacing(1),u=e.spacing(1.25),c=e.spacing(2),d=i?c:u,h=r?c:u,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize;"compact"===t&&(l=e.spacing(.5),u=e.spacing(.5),c=e.spacing(1),d=i?c:u,h=r?c:u,p=e.typography.body2.lineHeight,f=e.typography.body2.fontSize),"comfortable"===t&&(l=e.spacing(2),u=e.spacing(1.5),c=e.spacing(2),d=i?c:u,h=r?c:u,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize);let g=n||!o||"auto"===o?(a=p,s=l,("string"==typeof a?parseInt(a,10):a??0)+2*("string"==typeof s?parseInt(s,10):s)):o;return{padding:`${l} ${h} ${l} ${d}`,height:g,fontSize:f,lineHeight:p}}function p_(e,t){return e.map(({width:e,align:n,headerDescription:r,cellDescription:i,enableSorting:o,dataLink:a,enableResizing:s,...l})=>{var u,c,d,h,p,f,g;let m=s??t?.enableResizing??!1,v="auto"===e||void 0===e?(u=m,c=t?.minWidth,d=t?.maxWidth,u?{size:150,minSize:c??60,maxSize:d??1e3}:{size:0,minSize:0,maxSize:0}):(h=m,p=e,f=t?.minWidth,g=t?.maxWidth,h?{size:p,minSize:f??60,maxSize:g??1e3}:{size:p});return{...l,...v,enableSorting:!!o,enableResizing:m,meta:{align:n,headerDescription:r,cellDescription:i,dataLink:a}}})}var pS=n(42927);function pC({color:e,density:t,...n}){let r="compact"===t;return(0,ec.jsx)(pS.A,{size:r?"small":"medium",...n,focusRipple:!1,tabIndex:-1,sx:{color:e,padding:e=>e.spacing(r?.25:.5),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":{color:e},"&.Mui-focusVisible":{background:e?(0,eg.X4)(e,.5):void 0},"& .MuiSvgIcon-root":{fontSize:r?16:18}}})}var pM=n(3399),pA=n(76746),pT=n(97653),pI=n(76795),pk=n(45271);function pD(e){return(0,eS.Ay)("MuiToolbar",e)}(0,e_.A)("MuiToolbar",["root","gutters","regular","dense"]);let pO=(0,ey.A)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((0,ex.A)(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),pP=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiToolbar"}),{className:r,component:i="div",disableGutters:o=!1,variant:a="regular",...s}=n,l={...n,component:i,disableGutters:o,variant:a},u=(e=>{let{classes:t,disableGutters:n,variant:r}=e;return(0,ef.A)({root:["root",!n&&"gutters",r]},pD,t)})(l);return(0,ec.jsx)(pO,{as:i,className:(0,ep.A)(u.root,r),ref:t,ownerState:l,...s})});var pR=n(35216),pE=n(96913),pL=n(70776),pN=n(22402);let pz=(0,pN.A)((0,ec.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),pF=(0,pN.A)((0,ec.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),pB=ed.forwardRef(function(e,t){let{backIconButtonProps:n,count:r,disabled:i=!1,getItemAriaLabel:o,nextIconButtonProps:a,onPageChange:s,page:l,rowsPerPage:u,showFirstButton:c,showLastButton:d,slots:h={},slotProps:p={},...f}=e,g=(0,pR.I)(),m=h.firstButton??eR.A,v=h.lastButton??eR.A,y=h.nextButton??eR.A,x=h.previousButton??eR.A,b=h.firstButtonIcon??pF,w=h.lastButtonIcon??pz,_=h.nextButtonIcon??pL.A,S=h.previousButtonIcon??pE.A,C=g?v:m,M=g?y:x,A=g?x:y,T=g?m:v,I=g?p.lastButton:p.firstButton,k=g?p.nextButton:p.previousButton,D=g?p.previousButton:p.nextButton,O=g?p.firstButton:p.lastButton;return(0,ec.jsxs)("div",{ref:t,...f,children:[c&&(0,ec.jsx)(C,{onClick:e=>{s(e,0)},disabled:i||0===l,"aria-label":o("first",l),title:o("first",l),...I,children:g?(0,ec.jsx)(w,{...p.lastButtonIcon}):(0,ec.jsx)(b,{...p.firstButtonIcon})}),(0,ec.jsx)(M,{onClick:e=>{s(e,l-1)},disabled:i||0===l,color:"inherit","aria-label":o("previous",l),title:o("previous",l),...k??n,children:g?(0,ec.jsx)(_,{...p.nextButtonIcon}):(0,ec.jsx)(S,{...p.previousButtonIcon})}),(0,ec.jsx)(A,{onClick:e=>{s(e,l+1)},disabled:i||-1!==r&&l>=Math.ceil(r/u)-1,color:"inherit","aria-label":o("next",l),title:o("next",l),...D??a,children:g?(0,ec.jsx)(S,{...p.previousButtonIcon}):(0,ec.jsx)(_,{...p.nextButtonIcon})}),d&&(0,ec.jsx)(T,{onClick:e=>{s(e,Math.max(0,Math.ceil(r/u)-1))},disabled:i||l>=Math.ceil(r/u)-1,"aria-label":o("last",l),title:o("last",l),...O,children:g?(0,ec.jsx)(b,{...p.firstButtonIcon}):(0,ec.jsx)(w,{...p.lastButtonIcon})})]})});var pj=n(63392);function pV(e){return(0,eS.Ay)("MuiTablePagination",e)}let pH=(0,e_.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var pW=n(73397);let pG=(0,ey.A)(pk.A,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((0,ex.A)(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),p$=(0,ey.A)(pP,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${pH.actions}`]:t.actions,...t.toolbar})})((0,ex.A)(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${pH.actions}`]:{flexShrink:0,marginLeft:20}}))),pU=(0,ey.A)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),pZ=(0,ey.A)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((0,ex.A)(({theme:e})=>({...e.typography.body2,flexShrink:0}))),pY=(0,ey.A)(pI.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${pH.selectIcon}`]:t.selectIcon,[`& .${pH.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${pH.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),pX=(0,ey.A)(pT.A,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),pq=(0,ey.A)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((0,ex.A)(({theme:e})=>({...e.typography.body2,flexShrink:0})));function pK({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function pQ(e){return`Go to ${e} page`}let pJ=ed.forwardRef(function(e,t){let n,r=(0,ew.b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=pB,backIconButtonProps:o,colSpan:a,component:s=pk.A,count:l,disabled:u=!1,getItemAriaLabel:c=pQ,labelDisplayedRows:d=pK,labelRowsPerPage:h="Rows per page:",nextIconButtonProps:p,onPageChange:f,onRowsPerPageChange:g,page:m,rowsPerPage:v,rowsPerPageOptions:y=[10,25,50,100],SelectProps:x={},showFirstButton:b=!1,showLastButton:w=!1,slotProps:_={},slots:S={},...C}=r,M=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},pV,t)})(r),T=_?.select??x,I=T.native?"option":pX;(s===pk.A||"td"===s)&&(n=a||1e3);let k=(0,pj.A)(T.id),D=(0,pj.A)(T.labelId),O={slots:S,slotProps:_},[P,R]=(0,pW.A)("root",{ref:t,className:M.root,elementType:pG,externalForwardedProps:{...O,component:s,...C},ownerState:r,additionalProps:{colSpan:n}}),[E,L]=(0,pW.A)("toolbar",{className:M.toolbar,elementType:p$,externalForwardedProps:O,ownerState:r}),[N,z]=(0,pW.A)("spacer",{className:M.spacer,elementType:pU,externalForwardedProps:O,ownerState:r}),[F,B]=(0,pW.A)("selectLabel",{className:M.selectLabel,elementType:pZ,externalForwardedProps:O,ownerState:r,additionalProps:{id:D}}),[j,V]=(0,pW.A)("select",{className:M.select,elementType:pY,externalForwardedProps:O,ownerState:r}),[H,W]=(0,pW.A)("menuItem",{className:M.menuItem,elementType:I,externalForwardedProps:O,ownerState:r}),[G,$]=(0,pW.A)("displayedRows",{className:M.displayedRows,elementType:pq,externalForwardedProps:O,ownerState:r});return(0,ec.jsx)(P,{...R,children:(0,ec.jsxs)(E,{...L,children:[(0,ec.jsx)(N,{...z}),y.length>1&&(0,ec.jsx)(F,{...B,children:h}),y.length>1&&(0,ec.jsx)(j,{variant:"standard",...!T.variant&&{input:A||(A=(0,ec.jsx)(pA.Ay,{}))},value:v,onChange:g,id:k,labelId:D,...T,classes:{...T.classes,root:(0,ep.A)(M.input,M.selectRoot,(T.classes||{}).root),select:(0,ep.A)(M.select,(T.classes||{}).select),icon:(0,ep.A)(M.selectIcon,(T.classes||{}).icon)},disabled:u,...V,children:y.map(e=>(0,ed.createElement)(H,{...W,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e))}),(0,ec.jsx)(G,{...$,children:d({from:0===l?0:m*v+1,to:-1===l?(m+1)*v:-1===v?l:Math.min(l,(m+1)*v),count:-1===l?-1:l,page:m})}),(0,ec.jsx)(i,{className:M.actions,backIconButtonProps:o,count:l,nextIconButtonProps:p,onPageChange:f,page:m,rowsPerPage:v,showFirstButton:b,showLastButton:w,slotProps:_.actions,slots:S.actions,getItemAriaLabel:c,disabled:u})]})})}),p0={row:0,column:0},p1=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];var p2=n(91394);let p5=(0,ey.A)(p2.A)(({theme:e})=>({tableLayout:"fixed",borderCollapse:"separate",backgroundColor:e.palette.background.default})),p3={compact:"small",standard:"medium",comfortable:"medium"},p4=(0,ed.forwardRef)(function({density:e,...t},n){return(0,ec.jsx)(p5,{...t,tabIndex:-1,size:p3[e],ref:n,sx:{width:"100%"}})});var p6=n(5139);let p9=(0,ed.forwardRef)(function(e,t){return(0,ec.jsx)(p6.A,{...e,ref:t})});var p8=n(57438);let p7=(0,ey.A)(pk.A)(({theme:e})=>({padding:0,backgroundColor:"inherit","&.MuiTableCell-head":{backgroundColor:e.palette.background.default},"&:focus-visible":{outline:`solid 1px ${e.palette.primary.main}`,outlineOffset:"-1px",borderRadius:0}}));function fe({children:e,density:t,variant:n,width:r,defaultColumnHeight:i,focusState:o="none",onFocusTrigger:a,isFirstColumn:s,isLastColumn:l,description:u,align:c,color:d,backgroundColor:h,dataLink:p,adjacentCellsValuesMap:f,...g}){let m=(0,uc.A)(),v=(0,ed.useRef)(),y="head"===n;(0,ed.useEffect)(()=>{"trigger-focus"===o&&v.current&&v.current.focus()},[o]);let x=e=>{a?.(e)},b=(0,ed.useMemo)(()=>{if(p){if(f&&i$(p.url)){let{text:e}=iV(p.url,f,{urlEncode:!0});return{...p,url:e}}return p}},[p,f]);return(0,ec.jsx)(p7,{...g,tabIndex:"none"!==o?0:-1,onFocus:e=>{let t=e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');t&&t.focus()},onClick:x,onKeyUp:x,style:{width:r},sx:{position:"relative",borderBottom:y?`solid 1px ${m.palette.grey[100]}`:`solid 1px ${m.palette.grey[50]}`,"&:hover #original-cell":{position:"absolute",top:0,left:0,zIndex:10,width:"fit-content",minWidth:"100%",whiteSpace:"nowrap",overflow:"visible",backgroundColor:`${h??m.palette.background.default} !important`,outline:`solid 1px ${m.palette.info.main}`,outlineOffset:"-1px"}},ref:v,children:(0,ec.jsx)(ud.A,{id:"original-cell",sx:{...pw(m,t,{isHeader:y,isLastColumn:l,isFirstColumn:s,defaultColumnHeight:i}),position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexDirection:"inherit"},style:{backgroundColor:h??"inherit",color:d??"inherit"},title:u,"aria-label":u,textAlign:c,children:b?(0,ec.jsx)(p8.A,{href:b.url,target:b.targetBlank?"_blank":"_self",rel:b.targetBlank?"noopener noreferrer":void 0,children:e}):e})})}var ft=n(91644);function fn(e){return(0,eS.Ay)("MuiTableFooter",e)}(0,e_.A)("MuiTableFooter",["root"]);let fr=(0,ey.A)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),fi={variant:"footer"},fo="tfoot",fa=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiTableFooter"}),{className:r,component:i=fo,...o}=n,a={...n,component:i},s=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"]},fn,t)})(a);return(0,ec.jsx)(ft.A.Provider,{value:fi,children:(0,ec.jsx)(fr,{as:i,className:(0,ep.A)(s.root,r),ref:t,role:i===fo?null:"rowgroup",ownerState:a,...o})})}),fs=(0,ed.forwardRef)(function(e,t){return(0,ec.jsx)(fa,{...e,ref:t})});var fl=n(70561);let fu=(0,ed.forwardRef)(function(e,t){return(0,ec.jsx)(fl.A,{...e,ref:t})});var fc=n(88091);let fd=(0,pN.A)((0,ec.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function fh(e){return(0,eS.Ay)("MuiTableSortLabel",e)}let fp=(0,e_.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]),ff=(0,ey.A)(ug.A,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})((0,ex.A)(({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${fp.icon}`]:{opacity:.5}},[`&.${fp.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${fp.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),fg=(0,ey.A)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,ev.A)(n.direction)}`]]}})((0,ex.A)(({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]}))),fm=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:o,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=fd,slots:u={},slotProps:c={},...d}=n,h={...n,active:r,direction:a,hideSortIcon:s,IconComponent:l},p=(e=>{let{classes:t,direction:n,active:r}=e,i={root:["root",r&&"active",`direction${(0,ev.A)(n)}`],icon:["icon",`iconDirection${(0,ev.A)(n)}`]};return(0,ef.A)(i,fh,t)})(h),f={slots:u,slotProps:c},[g,m]=(0,pW.A)("root",{elementType:ff,externalForwardedProps:f,ownerState:h,className:(0,ep.A)(p.root,o),ref:t}),[v,y]=(0,pW.A)("icon",{elementType:fg,externalForwardedProps:f,ownerState:h,className:p.icon});return(0,ec.jsxs)(g,{disableRipple:!0,component:"span",...m,...d,children:[i,s&&!r?null:(0,ec.jsx)(v,{as:l,...y})]})});var fv=n(6227);function fy({onSort:e,sortDirection:t,nextSortDirection:n,children:r,resizeConfig:i,...o}){let a=!!e,s=(0,ec.jsx)(fc.A,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:r}),l=!!t;return(0,ec.jsxs)(fe,{...o,children:[a?(0,ec.jsx)(fm,{onClick:e,direction:l?t:n,active:l,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${fp.icon}`]:{opacity:l?1:.5}}},children:s}):s,i&&(0,ec.jsx)(ud.A,{onMouseDown:e=>{2===e.detail?i.resetSizeHandler():i.resizeHandler(e)},onTouchStart:i.resizeHandler,sx:{position:"absolute",height:"100%",top:0,right:"4px",cursor:"col-resize"},children:(0,ec.jsx)(fv.A,{flexItem:!0,orientation:"vertical",sx:e=>({backgroundColor:i.isResizing?e.palette.action.active:e.palette.divider,borderRadius:"2px",borderWidth:"2px",height:"100%",touchAction:"none",transform:"translateX(4px)",userSelect:"none"})})})]})}let fx=(0,ed.forwardRef)(function(e,t){return(0,ec.jsx)(pM.A,{...e,ref:t,sx:{backgroundColor:e=>e.palette.background.default,"&:hover":{backgroundColor:e=>(0,eg.X4)(e.palette.primary.main,e.palette.action.hoverOpacity)}}})});var fb=n(2582),fw=n(65211),f_=n(30145),fS=n(7800),fC=n(98599),fM=n(16979),fA=n(9323),fT=n(12933),fI=n(46177);let fk=(0,ed.forwardRef)(function({debounceMs:e=250,value:t,onChange:n,...r},i){let[o,a]=(0,ed.useState)(t),s=(0,ed.useCallback)(e=>{n?.(e)},[n]),l=(0,ed.useMemo)(()=>fI(s,e),[e,s]);return(0,ec.jsx)(eE.A,{ref:i,value:o,onChange:function(e){a(e.target.value),l(e.target.value)},...r})});function fD({isSearchEnabled:e,globalFilter:t,onGlobalFilterChange:n,isColumnFilterEnabled:r,columns:i,width:o,columnFilterMenuMaxHeight:a=400,isExpandAllEnabled:s,isAllExpanded:l,onExpandAllChange:u}){let[c,d]=(0,ed.useState)(null),h=!!c,[p,f]=(0,ed.useState)(0),g=(0,ed.useCallback)(()=>{n(""),f(e=>e+1)},[n]);return e||r||s?(0,ec.jsxs)(eP.A,{direction:"row",gap:1,alignItems:"center",justifyContent:"flex-end",width:o,padding:"0.5rem",sx:{backgroundColor:e=>e.palette.background.default},children:[e&&(0,ec.jsx)(fk,{placeholder:"Search...",value:t,onChange:n,variant:"standard",slotProps:{htmlInput:{"aria-label":"search table"},input:{startAdornment:(0,ec.jsx)(fb.A,{position:"start",children:(0,ec.jsx)(fC,{fontSize:"small"})}),endAdornment:""!==t&&(0,ec.jsx)(fb.A,{position:"end",children:(0,ec.jsx)(eR.A,{onClick:g,children:(0,ec.jsx)(fS,{fontSize:"small"})})})}},sx:{flexGrow:1}},p),s&&(0,ec.jsx)(fw.A,{title:l?"Collapse all":"Expand all",children:(0,ec.jsx)(eR.A,{onClick:u,color:"info","aria-label":l?"collapse all rows":"expand all rows",children:l?(0,ec.jsx)(fM,{}):(0,ec.jsx)(fA,{})})}),r&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(eR.A,{onClick:e=>d(e.currentTarget),"aria-haspopup":"listbox","aria-expanded":h,color:"info",children:(0,ec.jsx)(fT,{})}),(0,ec.jsx)(f_.A,{anchorEl:c,open:h,onClose:()=>d(null),slotProps:{list:{dense:!0}},sx:{maxHeight:a},children:i.map(e=>{let t=e.columnDef.header,n="string"==typeof t?t:e.id;return(0,ec.jsxs)(pT.A,{disabled:!e.getCanHide(),onClick:e.getCanHide()?e.getToggleVisibilityHandler():void 0,dense:!0,children:[(0,ec.jsx)(pS.A,{checked:e.getIsVisible(),disabled:!e.getCanHide(),size:"small",disableRipple:!0,sx:{p:0,mr:1}}),(0,ec.jsx)(uS.A,{primary:n})]},e.id)})})]})]}):null}fk.displayName="TextField";var fO=n(347);let fP=(0,ed.forwardRef)(function(e,t){return(0,ec.jsx)(fO.A,{...e,tabIndex:-1,ref:t,sx:iS({flexGrow:1},e.sx)})});function fR({width:e,height:t,density:n,defaultColumnWidth:r,defaultColumnHeight:i,onRowClick:o,onRowMouseOver:a,onRowMouseOut:s,rows:l,columns:u,headers:c,columnSizing:d,columnSizingInfo:h,cellConfigs:p,pagination:f,onPaginationChange:g,rowCount:m,toolbarConfig:v}){let y=(0,ed.useRef)(null),x=(0,ed.useRef)({startIndex:0,endIndex:0}),b=function({visibleRange:e,virtualTable:t,maxRows:n,maxColumns:r}){return function({maxRows:e,maxColumns:t,onActiveCellChange:n}){let[r,i]=(0,ed.useState)(p0),[o,a]=(0,ed.useState)(!1);return{activeCell:r,isActive:o,onTableKeyDown:(0,ed.useCallback)(r=>{let o=r.key;(p1.includes(o)||"Home"===o||"End"===o||"PageDown"===o||"PageUp"===o)&&i(i=>{let a=i.row,s=i.column;"ArrowRight"===o&&s<t-1?(r.preventDefault(),s+=1):"ArrowLeft"===o&&s>0?(r.preventDefault(),s-=1):"ArrowDown"===o&&a<e-1?(r.preventDefault(),a+=1):"ArrowUp"===o&&a>0?(r.preventDefault(),a-=1):"Home"===o?(r.preventDefault(),a=0,s=0):"End"===o&&(r.preventDefault(),a=e-1,s=t-1);let l={column:s,row:a},u=n?.(r,i,l)||l;return u.row===i.row&&u.column===i.column?i:u})},[t,e,n]),onCellFocus:e=>{e.column===r.column&&e.row===r.row&&o||(a(!0),i(e))},onTableBlur:(0,ed.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||(a(!1),i(p0))},[])}}({maxRows:n,maxColumns:r,onActiveCellChange:(r,i,o)=>{let a=r.key,s=o&&(i.column!==o.column||i.row!==o.row),l=o?.row??i.row;if("ArrowDown"===a&&s)(l-1<e.current.startIndex||l-1>e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"end"});else if("ArrowUp"===a&&s)(l-1<e.current.startIndex||l-1>e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"start"});else if(s&&("Home"===a||"End"===a))t.current?.scrollToIndex({index:Math.max(l-1,0),align:"start"});else if("PageDown"===a){r.preventDefault();let o=i.row;return o=Math.min(n-1,e.current.endIndex+1),t.current?.scrollToIndex({index:o-1,align:"start"}),{row:o,column:i.column}}else if("PageUp"===a){let n=i.row;return n=Math.max(0,e.current.startIndex-1),t.current?.scrollToIndex({index:n-1,align:"end"}),{row:n,column:i.column}}return o}})}({visibleRange:x,virtualTable:y,maxRows:l.length+1,maxColumns:u.length}),w=e=>e.row===b.activeCell.row&&e.column===b.activeCell.column?b.isActive?"trigger-focus":"focus-next":"none",_=(0,ed.useMemo)(()=>({Scroller:fP,Table:t=>(0,ec.jsx)(p4,{...t,width:e,density:n,onKeyDown:b.onTableKeyDown,onBlur:b.onTableBlur}),TableHead:fu,TableFoot:fs,TableRow:({item:e,...t})=>{let r=l[t["data-index"]];if(!r)return null;let i={id:r.id,index:r.index};return(0,ec.jsx)(fx,{...t,onClick:e=>o(e,r.id),density:n,onMouseOver:e=>{a?.(e,i)},onMouseOut:e=>{s?.(e,i)}})},TableBody:p9}),[n,b.onTableKeyDown,b.onTableBlur,o,s,a,l,e]),S=(e,t)=>{f&&g&&g({...f,pageIndex:t})},C=e=>{f&&g&&g({pageIndex:0,pageSize:parseInt(e.target.value,10)})},M=(0,ed.useMemo)(()=>{let e={};return c.forEach(t=>{t.headers.filter(e=>e.column.getCanResize()).forEach(t=>{e[`--header-${t.id}-size`]=t.getSize(),e[`--col-${t.column.id}-size`]=t.column.getSize()})}),e},[h,d,c]);return(0,ec.jsxs)(ud.A,{style:{width:e,height:t,...M},children:[(0,ec.jsx)(fD,{...v,width:e}),(0,ec.jsx)(hi,{ref:y,totalCount:l.length,components:_,rangeChanged:e=>{x.current=e},fixedHeaderContent:()=>(0,ec.jsx)(ec.Fragment,{children:c.map(e=>(0,ec.jsx)(fx,{density:n,children:e.headers.map((e,t,o)=>{var a,s,l,u,c;let d,h=e.column,p={row:0,column:t},f=h.getIsSorted(),g=h.getNextSortingOrder();return(0,ec.jsx)(fy,{onSort:h.getCanSort()?h.getToggleSortingHandler():void 0,sortDirection:"string"==typeof f?f:void 0,nextSortDirection:"string"==typeof g?g:void 0,width:e.column.getCanResize()?`calc(var(--header-${e?.id}-size) * 1px)`:h.getSize()||r,defaultColumnHeight:i,align:h.columnDef.meta?.align,variant:"head",density:n,description:h.columnDef.meta?.headerDescription,focusState:w(p),onFocusTrigger:()=>b.onCellFocus(p),isFirstColumn:0===t,isLastColumn:t===o.length-1,resizeConfig:e.column.getCanResize()?{resizeHandler:e.getResizeHandler(),resetSizeHandler:e.column.resetSize,isResizing:e.column.getIsResizing()}:void 0,children:(a=h.columnDef.header,s=e.getContext(),a?"function"==typeof(u=l=a)&&(d=Object.getPrototypeOf(u)).prototype&&d.prototype.isReactComponent||"function"==typeof l||"object"==typeof(c=l)&&"symbol"==typeof c.$$typeof&&["react.memo","react.forward_ref"].includes(c.$$typeof.description)?ed.createElement(a,s):a:null)},e.id)})},e.id))}),fixedFooterContent:f?()=>(0,ec.jsx)(pM.A,{sx:{backgroundColor:e=>e.palette.background.default},children:(0,ec.jsx)(pJ,{colSpan:u.length,count:m,page:f.pageIndex,rowsPerPage:f.pageSize,onPageChange:S,onRowsPerPageChange:C})}):void 0,itemContent:e=>{let t=l[e];return t?(0,ec.jsx)(ec.Fragment,{children:t.getVisibleCells().map((o,a,s)=>{let l,u={row:e+1,column:a},c=o.getContext(),d=p?.[c.cell.id],h=o.column.columnDef.cell,f="function"==typeof h?h(c):null,g=o.column.columnDef.meta?.cellDescription;"function"==typeof g?l=g(c):g&&"string"==typeof f&&(l=f);let m=Object.entries(t.original)?.filter(([e,t])=>["string","number"].includes(typeof t)).reduce((e,[t,n])=>({...e,[t]:String(n)}),{});return(0,ec.jsx)(fe,{"data-testid":o.id,title:l||d?.text||f,width:o.column.getCanResize()?`calc(var(--col-${o.column.id}-size) * 1px)`:o.column.getSize()||r,defaultColumnHeight:i,align:o.column.columnDef.meta?.align,density:n,focusState:w(u),onFocusTrigger:()=>b.onCellFocus(u),isFirstColumn:0===a,isLastColumn:a===s.length-1,description:l,color:d?.textColor??void 0,backgroundColor:d?.backgroundColor??void 0,dataLink:o.column.columnDef.meta?.dataLink,adjacentCellsValuesMap:m,children:d?.text||f},o.id)})}):null}})]})}let fE=(e,t)=>`${t}`,fL={},fN=[];function fz({data:e,columns:t,cellConfigs:n,density:r="standard",defaultColumnWidth:i=150,defaultColumnHeight:o="auto",checkboxSelection:a,onRowSelectionChange:s,onSortingChange:l,getCheckboxColor:u,getRowId:c=fE,rowSelection:d=fL,sorting:h=fN,getItemActions:p,hasItemActions:f,pagination:g,onPaginationChange:m,rowSelectionVariant:v="standard",getSubRows:y,hiddenColumns:x,tableToolbarConfig:b,columnResizeMode:w="onChange",defaultColumnConfig:_,...S}){let C=(0,uc.A)(),M=!!y,[A,T]=(0,ed.useState)({}),{globalFilter:I,setGlobalFilter:k,fuzzySearchOptions:D}=function(e,t,n,r){let[i,o]=(0,ed.useState)(""),[a,s]=(0,ed.useState)(n),l=(0,ed.useCallback)(e=>{o(t=>(t?t&&!e&&r(a):(s(n),r(!0)),e))},[n,a,r]);return{globalFilter:i,setGlobalFilter:l,fuzzySearchOptions:{filterFns:{fuzzy:(e,n,r,i)=>{let o=function(e,t,n){var r;if((n=n||{}).threshold=null!=(r=n.threshold)?r:pv.MATCHES,!n.accessors){let r=py(e,t,n);return{rankedValue:e,rank:r,accessorIndex:-1,accessorThreshold:n.threshold,passed:r>=n.threshold}}let i=function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r],o="function"==typeof i?pb:{...pb,...i},a=function(e,t){let n=t;"object"==typeof t&&(n=t.accessor);let r=n(e);return null==r?[]:Array.isArray(r)?r:[String(r)]}(e,i);for(let e=0,t=a.length;e<t;e++)n.push({itemValue:a[e],attributes:o})}return n}(e,n.accessors),o={rankedValue:e,rank:pv.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let e=0;e<i.length;e++){let r=i[e],a=py(r.itemValue,t,n),{minRanking:s,maxRanking:l,threshold:u=n.threshold}=r.attributes;a<s&&a>=pv.MATCHES?a=s:a>l&&(a=l),(a=Math.min(a,l))>=u&&a>o.rank&&(o.rank=a,o.passed=!0,o.accessorIndex=e,o.accessorThreshold=u,o.rankedValue=r.itemValue)}return o}(e.getValue(n),r,{threshold:pv[t]});return i({itemRank:o}),o.passed}},globalFilterFn:e?"fuzzy":void 0,getFilteredRowModel:e?e=>hV(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{var i,o,a,s,l,u,c,d,h,p;let f,g,m,v,y,x,b,w,_,S;if(!t.rows.length||!(null!=n&&n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}let C=[],M=[];(null!=n?n:[]).forEach(t=>{var n;let r=e.getColumn(t.id);if(!r)return;let i=r.getFilterFn();i&&C.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value})});let A=(null!=n?n:[]).map(e=>e.id),T=e.getGlobalFilterFn(),I=e.getAllLeafColumns().filter(e=>e.getCanGlobalFilter());r&&T&&I.length&&(A.push("__global__"),I.forEach(e=>{var t;M.push({id:e.id,filterFn:T,resolvedValue:null!=(t=null==T.resolveFilterValue?void 0:T.resolveFilterValue(r))?t:r})}));for(let e=0;e<t.flatRows.length;e++){let n=t.flatRows[e];if(n.columnFilters={},C.length)for(let e=0;e<C.length;e++){let t=(f=C[e]).id;n.columnFilters[t]=f.filterFn(n,t,f.resolvedValue,e=>{n.columnFiltersMeta[t]=e})}if(M.length){for(let e=0;e<M.length;e++){let t=(g=M[e]).id;if(g.filterFn(n,t,g.resolvedValue,e=>{n.columnFiltersMeta[t]=e})){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return i=t.rows,o=e=>{for(let t=0;t<A.length;t++)if(!1===e.columnFilters[A[t]])return!1;return!0},e.options.filterFromLeafRows?(a=i,s=o,m=[],v={},y=null!=(u=(l=e).options.maxLeafRowFilterDepth)?u:100,{rows:(x=function(e,t){void 0===t&&(t=0);let n=[];for(let i=0;i<e.length;i++){var r;let o=e[i],a=hU(l,o.id,o.original,o.index,o.depth,void 0,o.parentId);if(a.columnFilters=o.columnFilters,null!=(r=o.subRows)&&r.length&&t<y){if(a.subRows=x(o.subRows,t+1),s(o=a)&&!a.subRows.length||s(o)||a.subRows.length){n.push(o),v[o.id]=o,m.push(o);continue}}else s(o=a)&&(n.push(o),v[o.id]=o,m.push(o))}return n})(a),flatRows:m,rowsById:v}):(c=i,d=o,b=[],w={},_=null!=(p=(h=e).options.maxLeafRowFilterDepth)?p:100,{rows:(S=function(e,t){void 0===t&&(t=0);let n=[];for(let i=0;i<e.length;i++){let o=e[i];if(d(o)){var r;if(null!=(r=o.subRows)&&r.length&&t<_){let e=hU(h,o.id,o.original,o.index,o.depth,void 0,o.parentId);e.subRows=S(o.subRows,t+1),o=e}n.push(o),b.push(o),w[o.id]=o}}return n})(c),flatRows:b,rowsById:w})},hH(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex())):void 0,filterFromLeafRows:e,onGlobalFilterChange:l}}}(b?.isSearchEnabled,b?.fuzzyMatchThreshold??"CONTAINS",A,T),[O,P]=(0,ed.useState)(x?.reduce((e,t)=>({...e,[t]:!1}),{})??{}),R=(0,ed.useCallback)((e,t,n)=>{"standard"===v||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():s?.({[t.id]:!0})},[s,v]),E=(0,ed.useCallback)((e,t,n)=>{let r=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0;R(t,n,!!r?.metaKey||!!r?.shiftKey)},[R]),L=(0,ed.useMemo)(()=>({id:"itemActions",header:"Actions",cell:({row:e})=>(0,ec.jsx)(eP.A,{direction:"row",alignItems:"center",children:p?.({id:e.id,data:e.original})}),enableSorting:!1,enableResizing:!1}),[p]),N=(0,ed.useMemo)(()=>({id:"checkboxRowSelect",size:28,header:({table:e})=>(0,ec.jsx)(pC,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler(),color:C.palette.text.primary,density:r}),cell:({row:e,table:t})=>(0,ec.jsx)(pC,{checked:e.getIsSelected(),indeterminate:e.getIsSomeSelected(),onChange:n=>{E(n,t,e)},color:u?.(e.original),density:r}),enableSorting:!1,enableResizing:!1}),[C.palette.text.primary,r,u,E]),z=function(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=ed.useState(()=>({current:function(e){var t,n;let r=[...pp,...null!=(t=e._features)?t:[]],i={_features:r},o=i._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(i)),{}),a={...null!=(n=e.initialState)?n:{}};i._features.forEach(e=>{var t;a=null!=(t=null==e.getInitialState?void 0:e.getInitialState(a))?t:a});let s=[],l=!1,u={_features:r,options:{...o,...e},initialState:a,_queue:e=>{s.push(e),l||(l=!0,Promise.resolve().then(()=>{for(;s.length;)s.shift()();l=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{i.setState(i.initialState)},setOptions:e=>{var t;t=hF(e,i.options),i.options=i.options.mergeOptions?i.options.mergeOptions(o,t):{...o,...t}},getState:()=>i.options.state,setState:e=>{null==i.options.onStateChange||i.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==i.options.getRowId?void 0:i.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?i.getPrePaginationRowModel():i.getRowModel()).rowsById[e];if(!n&&!(n=i.getCoreRowModel().rowsById[e]))throw Error();return n},_getDefaultColumnDef:hV(()=>[i.options.defaultColumn],e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...i._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef()),{}),...e}},hH(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:hV(()=>[i._getColumnDefs()],e=>{let t=function(e,n,r){return void 0===r&&(r=0),e.map(e=>{let o=function(e,t,n,r){var i,o;let a,s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=null!=(i=null!=(o=s.id)?o:l?"function"==typeof String.prototype.replaceAll?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)?i:"string"==typeof s.header?s.header:void 0;if(s.accessorFn?a=s.accessorFn:l&&(a=l.includes(".")?e=>{let t=e;for(let e of l.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[s.accessorKey]),!u)throw Error();let c={id:`${String(u)}`,accessorFn:a,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:hV(()=>[!0],()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap(e=>e.getFlatColumns())]},hH(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:hV(()=>[e._getOrderColumnsFn()],e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap(e=>e.getLeafColumns())):[c]},hH(e.options,"debugColumns","column.getLeafColumns"))};for(let t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(i,e,r,n);return o.columns=e.columns?t(e.columns,o,r+1):[],o})};return t(e)},hH(e,"debugColumns","getAllColumns")),getAllFlatColumns:hV(()=>[i.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),hH(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:hV(()=>[i.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),hH(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:hV(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),hH(e,"debugColumns","getAllLeafColumns")),getColumn:e=>i._getAllFlatColumnsById()[e]};Object.assign(i,u);for(let e=0;e<i._features.length;e++){let t=i._features[e];null==t||null==t.createTable||t.createTable(i)}return i}(t)})),[r,i]=ed.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:e,columns:(0,ed.useMemo)(()=>{let e=p_(t,_);return f&&e.unshift(L),a&&e.unshift(N),e},[t,_,f,a,L,N]),getRowId:c,getCoreRowModel:e=>hV(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,o){void 0===i&&(i=0);let a=[];for(let l=0;l<t.length;l++){let u=hU(e,e._getRowId(t[l],l,o),t[l],l,i,void 0,null==o?void 0:o.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var s;u.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=u.originalSubRows)&&s.length&&(u.subRows=r(u.originalSubRows,i+1,u))}}return a};return n.rows=r(t),n},hH(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex())),getSortedRowModel:e=>hV(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(null!=t&&t.length))return n;let r=e.getState().sorting,i=[],o=r.filter(t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()}),a={};o.forEach(t=>{let n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});let s=e=>{let t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let r=0;r<o.length;r+=1){var n;let i=o[r],s=a[i.id],l=s.sortUndefined,u=null!=(n=null==i?void 0:i.desc)&&n,c=0;if(l){let n=e.getValue(i.id),r=t.getValue(i.id),o=void 0===n,a=void 0===r;if(o||a){if("first"===l)return o?-1:1;if("last"===l)return o?1:-1;c=o&&a?0:o?l:-l}}if(0===c&&(c=s.sortingFn(e,t,i.id)),0!==c)return u&&(c*=-1),s.invertSorting&&(c*=-1),c}return e.index-t.index}),t.forEach(e=>{var t;i.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))}),t};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},hH(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex())),getPaginationRowModel:g?e=>hV(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(t,n)=>{let r;if(!n.rows.length)return n;let{pageSize:i,pageIndex:o}=t,{rows:a,flatRows:s,rowsById:l}=n,u=i*o;a=a.slice(u,u+i),(r=e.options.paginateExpandedRows?{rows:a,flatRows:s,rowsById:l}:pf({rows:a,flatRows:s,rowsById:l})).flatRows=[];let c=e=>{r.flatRows.push(e),e.subRows.length&&e.subRows.forEach(c)};return r.rows.forEach(c),r},hH(e.options,"debugTable","getPaginationRowModel")):void 0,manualPagination:!g,enableRowSelection:!!a,onRowSelectionChange:e=>{let t="function"==typeof e?e(d):e;s?.(t)},onSortingChange:e=>{let t="function"==typeof e?e(h):e;l?.(t)},onColumnVisibilityChange:P,getSubRows:y,getExpandedRowModel:M?e=>hV(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(e,t,n)=>t.rows.length&&(!0===e||Object.keys(null!=e?e:{}).length)&&n?pf(t):t,hH(e.options,"debugTable","getExpandedRowModel")):void 0,...D,sortDescFirst:!0,columnResizeMode:w,onExpandedChange:T,state:{rowSelection:d,sorting:h,globalFilter:b?.isSearchEnabled?I:void 0,columnVisibility:O,...g?{pagination:g}:{},expanded:A}}),F=(0,ed.useCallback)((e,t)=>{let n=z.getRow(t);R(z,n,e.metaKey||e.shiftKey)},[R,z]);return(0,ec.jsx)(fR,{...S,density:r,defaultColumnWidth:i,defaultColumnHeight:o,onRowClick:F,rows:z.getRowModel().rows,columns:z.getVisibleFlatColumns(),columnSizing:z.getState().columnSizing,columnSizingInfo:z.getState().columnSizingInfo,headers:z.getHeaderGroups(),cellConfigs:n,pagination:g,onPaginationChange:m,rowCount:z.getRowCount(),toolbarConfig:{isSearchEnabled:b?.isSearchEnabled,globalFilter:I,onGlobalFilterChange:k,isColumnFilterEnabled:b?.isColumnFilterEnabled,columns:z.getAllColumns(),columnFilterMenuMaxHeight:b?.columnFilterMenuMaxHeight,isExpandAllEnabled:M,isAllExpanded:z.getIsAllRowsExpanded(),onExpandAllChange:z.getToggleAllRowsExpandedHandler()}})}let fF=[{accessorKey:"label",header:"Name",enableSorting:!0,enableResizing:!0,cell:({getValue:e})=>(0,ec.jsx)("span",{title:e(),children:e()})}],fB=e=>e.id,fj=e=>e.color;function fV({items:e,selectedItems:t,onSelectedItemsChange:n,onItemMouseOver:r,onItemMouseOut:i,height:o,width:a,columns:s=[],sorting:l,onSortingChange:u}){let c=(0,ed.useMemo)(()=>"string"!=typeof t?t:e.reduce((e,t,n)=>(e[fB(t,n)]=!0,e),{}),[t,e]),d=(0,ed.useMemo)(()=>{let e=Math.max(a-(s?.reduce((e,t)=>e+("number"==typeof t.width?t.width:150),0)??0)-45,60*fF.length)/fF.length;return[...fF.map(t=>({...t,width:e})),...s]},[s,a]);return(0,ec.jsx)(fz,{height:o,width:a,rowSelection:c,onRowSelectionChange:n,onRowMouseOver:r,onRowMouseOut:i,sorting:l,onSortingChange:u,data:e,columns:d,density:"compact",defaultColumnWidth:"auto",getRowId:fB,getCheckboxColor:fj,checkboxSelection:!0,rowSelectionVariant:"legend"})}function fH({width:e,height:t,options:n,data:r,selectedItems:i,onSelectedItemsChange:o,onItemMouseOver:a,onItemMouseOut:s,tableProps:l}){let u,c=(e,t)=>{let n=e.metaKey||e.shiftKey;o((0,uh.jM)(i,e=>{if("ALL"===e)return{[t]:!0};let r=!!e[t];return n?(r?delete e[t]:e[t]=!0,e):r?"ALL":{[t]:!0}}))},d=nZ(n.mode),h=r.length>=500,p={height:t,items:r,selectedItems:i,onLegendItemClick:c,onItemMouseOver:a,onItemMouseOut:s};return(u="table"===d?(0,ec.jsx)(fV,{...p,onSelectedItemsChange:o,width:e,...l}):"right"===n.position||h?(0,ec.jsx)(hz,{...p,width:e,onLegendItemClick:c}):(0,ec.jsx)(uT,{...p,onLegendItemClick:c}),"right"===n.position)?(0,ec.jsx)(ud.A,{style:{width:e,height:t},sx:{position:"absolute",top:0,right:0,backgroundColor:e=>`${e.palette.background.default}`},children:u}):(0,ec.jsx)(ud.A,{style:{width:e,height:t},sx:{position:"absolute",bottom:0,backgroundColor:e=>`${e.palette.background.default}`},children:u})}let fW={medium:{bottom:6,right:250},small:{bottom:4,right:150}};function fG({children:e,legendProps:t,width:n,height:r,spacing:i=0,legendSize:o,minChildrenWidth:a=100,minChildrenHeight:s=100}){let{content:l,legend:u,margin:c}=function({width:e,height:t,legendProps:n,legendSize:r,minChildrenHeight:i,minChildrenWidth:o,spacing:a,theme:s}){let l,u,c=n?.options,d={legend:{show:!1,width:0,height:0},content:{width:e,height:t},margin:{right:0,bottom:0}};if(!c)return d;let{position:h}=c;if("list"===nZ(c.mode))l="right"===h?200:e,u=40,"right"===h?u=t:t>=300&&(u=100);else{let i=pw(s,"compact"),o=(n?.tableProps?.columns||[]).reduce((e,t)=>("number"==typeof t.width&&(e+=t.width),e),0);l="right"===h?fW[r].right+o:e;let a=Math.min(fW[r].bottom,n.data.length+1);u="bottom"===h?a*i.height:t}let p="right"===h?e-l-a:e,f="bottom"===h?t-u-a:t;return"right"===h&&p<o||"bottom"===h&&f<i?d:{legend:{width:l,height:u,show:!0},content:{width:p,height:f},margin:{right:"right"===h?a:0,bottom:"bottom"===h?a:0}}}({width:n,height:r,legendProps:t,minChildrenHeight:s,minChildrenWidth:a,spacing:i,theme:(0,uc.A)(),legendSize:nY(o)});return(0,ec.jsxs)(ud.A,{style:{width:n,height:r},sx:{position:"relative",overflow:"hidden"},children:[(0,ec.jsx)(ud.A,{style:{width:l.width,height:l.height},sx:{marginRight:`${c.right}px`,marginBottom:`${c.bottom}px`},children:"function"==typeof e?e({width:l.width,height:l.height}):e}),t&&u.show&&(0,ec.jsx)(fH,{...t,height:u.height,width:u.width})]})}var f$=n(91467),fU=n(66834),fZ=n(92890),fY=n(39750);let fX=(0,ey.A)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),fq=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),fK=({children:e,...t})=>(0,ec.jsx)(fZ.A,{...t,children:e});fK.Header=({children:e,onClose:t,...n})=>(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(f$.A,{style:{textOverflow:"ellipsis",overflow:"hidden"},...n,children:e}),t&&(0,ec.jsx)(eR.A,{"aria-label":"Close",onClick:t,sx:fq,children:(0,ec.jsx)(fS,{})})]}),fK.Form=fX,fK.Content=({children:e,sx:t,...n})=>(0,ec.jsx)(fU.A,{dividers:!0,...n,sx:iS({minWidth:"500px",textWrap:"balance"},t),children:e}),fK.PrimaryButton=({children:e,...t})=>(0,ec.jsx)(eD.A,{variant:"contained",type:"submit",...t,children:e}),fK.SecondaryButton=({children:e,...t})=>(0,ec.jsx)(eD.A,{variant:"outlined",color:"secondary",...t,children:e}),fK.Actions=fY.A;let fQ=e=>{let{description:t,isOpen:n,onCancel:r,onDiscardChanges:i}=e;return(0,ec.jsxs)(fK,{open:n,"aria-labelledby":"discard-dialog",children:[(0,ec.jsx)(fK.Header,{children:"Discard Changes"}),(0,ec.jsx)(fK.Content,{children:t}),(0,ec.jsxs)(fK.Actions,{children:[(0,ec.jsx)(eD.A,{variant:"contained",onClick:i,children:"Discard Changes"}),(0,ec.jsx)(eD.A,{variant:"outlined",color:"secondary",onClick:r,children:"Cancel"})]})]})};var fJ=n(66395);let f0=({children:e})=>(0,ec.jsx)(fJ.Ay,{item:!0,xs:4,children:(0,ec.jsx)(eP.A,{spacing:3,children:e})});var f1=n(67987),f2=n(9799),f5=n(17366),f3=n(32751);let f4=({id:e,title:t,description:n,placement:r,children:i,enterDelay:o,enterNextDelay:a})=>{let s=(0,ec.jsx)("span",{children:i});return(0,ec.jsx)(f9,{arrow:!0,id:e,placement:r??"top",title:(0,ec.jsx)(f6,{title:t,description:n}),enterDelay:o??500,enterNextDelay:a??500,children:s})},f6=({title:e,description:t})=>(0,ec.jsxs)(ec.Fragment,{children:[e&&(0,ec.jsx)(fc.A,{variant:"body2",sx:e=>({color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}),children:e}),(0,ec.jsx)(fc.A,{variant:"caption",sx:e=>({color:e.palette.text.primary,whiteSpace:"pre-line"}),children:t})]}),f9=(0,ey.A)(({className:e,...t})=>(0,ec.jsx)(fw.A,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${f3.A.tooltip}`]:{backgroundColor:e.palette.background.tooltip,color:e.palette.text.primary,maxWidth:"300px",padding:e.spacing(1),boxShadow:e.shadows[1]},[`& .${f3.A.arrow}`]:{color:e.palette.background.tooltip}})),f8=({label:e,control:t,description:n})=>{let r=iC("EditorSectionControl"),i=`${r}-control`,o=`${r}-label`;return(0,ec.jsx)(f1.A,{children:(0,ec.jsxs)(eP.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,ec.jsxs)(eP.A,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,ec.jsx)(f2.A,{id:o,htmlFor:i,children:e}),n&&(0,ec.jsx)(f4,{description:n,enterDelay:100,children:(0,ec.jsx)(eR.A,{size:"small",sx:e=>({borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}),children:(0,ec.jsx)(f5,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:e=>e.palette.grey[700]}})})})]}),(0,ec.jsxs)(ud.A,{sx:{width:"180px",textAlign:"right"},children:[" ",eh().cloneElement(t,{id:i,"aria-labelledby":o})]})]})})},f7=({children:e})=>(0,ec.jsx)(fJ.Ay,{container:!0,spacing:8,children:e}),ge=({title:e,children:t,icon:n})=>(0,ec.jsxs)(ud.A,{children:[(0,ec.jsxs)(ud.A,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:e=>e.spacing(1),children:[(0,ec.jsx)(fc.A,{variant:"overline",component:"h4",children:e}),n&&(0,ec.jsx)(ud.A,{sx:{marginLeft:"auto"},children:n})]}),(0,ec.jsx)(eP.A,{spacing:1,children:t})]});var gt=n(31271),gn=n(81227);function gr({options:e,renderInput:t=e=>(0,ec.jsx)(eE.A,{...e}),id:n,"aria-labelledby":r,...i}){let o=e=>e.label??e.id;return(0,ec.jsx)(gt.A,{isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionDisabled:e=>!!e.disabled,getOptionLabel:o,options:e,renderInput:e=>t({...e,inputProps:{...e.inputProps,id:n,"aria-labelledby":r}}),renderOption:({key:e,...t},n)=>(0,ec.jsx)("li",{...t,children:(0,ec.jsxs)("div",{children:[(0,ec.jsx)(fc.A,{variant:"body1",component:"div",children:o(n)}),n.description&&(0,ec.jsx)(fc.A,{variant:"body2",component:"div",sx:{color:e=>e.palette.text.secondary},children:n.description})]})},e),filterOptions:(0,gn.Z)({stringify:e=>`${o(e)} ${e.description||""}`}),...i})}let gi=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function go({onChange:e,value:t="standard"}){return(0,ec.jsx)(f8,{label:"Density",control:(0,ec.jsx)(gr,{value:gi.find(e=>e.id===t),options:gi,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function ga(){return(0,ec.jsxs)(eP.A,{direction:"row",alignItems:"center",children:[(0,ec.jsx)(ud.A,{sx:{content:'""',width:8,height:8,boxSizing:"border-box",position:"absolute",backgroundColor:e=>e.palette.background.default,border:e=>`2px solid ${e.palette.info.main}`,borderRadius:"50%"}}),(0,ec.jsx)(ud.A,{sx:{content:'""',height:2,background:e=>e.palette.info.main,width:"100%"}})]})}function gs(e){return(gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gl(e,t,n){var r;return(r=function(e,t){if("object"!=gs(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=gs(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==gs(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gu(Object(n),!0).forEach(function(t){gl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gd={top:function(e,t){return Math.abs(t.y-e.top)},right:function(e,t){return Math.abs(e.right-t.x)},bottom:function(e,t){return Math.abs(e.bottom-t.y)},left:function(e,t){return Math.abs(t.x-e.left)}},gh=Symbol("closestEdge");function gp(e){var t;return null!=(t=e[gh])?t:null}function gf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gg(e,t){if(e){if("string"==typeof e)return gf(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gf(e,t):void 0}}function gm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||gg(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gv(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){t.forEach(function(e){return e()})}}var gy=n(96907),gx="data-pdnd-honey-pot";function gb(e){return e instanceof Element&&e.hasAttribute(gx)}function gw(e){var t=gm(document.elementsFromPoint(e.x,e.y),2),n=t[0],r=t[1];return n?gb(n)?null!=r?r:null:n:null}var g_={inset:"unset",border:"none",padding:0,margin:0,overflow:"visible",color:"inherit",background:"transparent"};function gS(e){var t=null;return function(){if(!t){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t={result:e.apply(this,r)}}return t.result}}var gC=gS(function(){return"u">typeof HTMLElement&&"function"==typeof HTMLElement.prototype.showPopover});function gM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gM(Object(n),!0).forEach(function(t){gl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gT(e){var t,n,r,i,o={x:Math.min((i={x:Math.max((r={x:(n={x:Math.floor((t=e.client).x),y:Math.floor(t.y)}).x-1,y:n.y-1}).x,0),y:Math.max(r.y,0)}).x,window.innerWidth-2),y:Math.min(i.y,window.innerHeight-2)};return DOMRect.fromRect({x:o.x,y:o.y,width:2,height:2})}function gI(e){var t=e.clientRect;return{left:"".concat(t.left,"px"),top:"".concat(t.top,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px")}}function gk(e){return function(e){if(Array.isArray(e))return gf(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gg(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var gD=gS(function(){return navigator.userAgent.includes("Firefox")}),gO=gS(function(){var e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}),gP={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};if(!("u"<typeof window)&&gO()){var gR=gE();(0,gy.bindAll)(window,[{type:"dragstart",listener:function(){gR.enterCount=0,gR.isOverWindow=!0}},{type:"drop",listener:gL},{type:"dragend",listener:gL},{type:"dragenter",listener:function(e){gR.isOverWindow||0!==gR.enterCount||(e[gP.isEnteringWindow]=!0),gR.isOverWindow=!0,gR.enterCount++}},{type:"dragleave",listener:function(e){gR.enterCount--,gR.isOverWindow&&0===gR.enterCount&&(e[gP.isLeavingWindow]=!0,gR.isOverWindow=!1)}}],{capture:!0})}function gE(){return{enterCount:0,isOverWindow:!1}}function gL(){gR=gE()}function gN(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var gz=(d=function(e){return e()},h=[],p=null,(f=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];h=t,p||(p=requestAnimationFrame(function(){p=null,d.apply(void 0,h)}))}).cancel=function(){p&&(cancelAnimationFrame(p),p=null)},f),gF=(g=null,{schedule:function(e){g={frameId:requestAnimationFrame(function(){g=null,e()}),fn:e}},flush:function(){g&&(cancelAnimationFrame(g.frameId),g.fn(),g=null)}}),gB={isActive:!1};function gj(){return!gB.isActive}function gV(e){var t,n=e.event,r=null==(t=e.current[0])?void 0:t.dropEffect;null!=r&&n.dataTransfer&&(n.dataTransfer.dropEffect=r)}var gH=function(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=e.dispatchEvent;if(gj()){var o,a,s=function(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=gN(t);if("external"===n.startedFrom)return{input:i,dropTargets:[]};var o=r({input:i,source:n.payload,target:t.target,current:[]});return{input:i,dropTargets:o}}({event:t,dragType:n,getDropTargetsOver:r});gB.isActive=!0;var l={current:s};gV({event:t,current:s.dropTargets});var u=function(e){var t=e.source,n=e.initial,r=e.dispatchEvent,i={dropTargets:[]};function o(e){r(e),i={dropTargets:e.payload.location.current.dropTargets}}return{start:function(e){var r=e.nativeSetDragImage,a={current:n,previous:i,initial:n};o({eventName:"onGenerateDragPreview",payload:{source:t,location:a,nativeSetDragImage:r}}),gF.schedule(function(){o({eventName:"onDragStart",payload:{source:t,location:a}})})},dragUpdate:function(e){var r=e.current;gF.flush(),gz.cancel(),o({eventName:"onDropTargetChange",payload:{source:t,location:{initial:n,previous:i,current:r}}})},drag:function(e){var r=e.current;gz(function(){gF.flush(),o({eventName:"onDrag",payload:{source:t,location:{initial:n,previous:i,current:r}}})})},drop:function(e){var r=e.current,a=e.updatedSourcePayload;gF.flush(),gz.cancel(),o({eventName:"onDrop",payload:{source:null!=a?a:t,location:{current:r,previous:i,initial:n}}})}}}({source:n.payload,dispatchEvent:i,initial:s}),c=(0,gy.bindAll)(window,[{type:"dragover",listener:function(e){h(e),u.drag({current:l.current})}},{type:"dragenter",listener:h},{type:"dragleave",listener:function(e){(function(e){var t=e.dragLeave,n=t.type,r=t.relatedTarget;return"dragleave"===n&&(gO()?!!gO()&&t.hasOwnProperty(gP.isLeavingWindow):null==r||(gD()?"nodeName"in r&&r.ownerDocument!==document:r instanceof HTMLIFrameElement))})({dragLeave:e})&&(d({input:l.current.input,dropTargets:[]}),"external"===n.startedFrom&&p())}},{type:"drop",listener:function(e){(l.current={dropTargets:l.current.dropTargets,input:gN(e)},l.current.dropTargets.length)?(e.preventDefault(),gV({event:e,current:l.current.dropTargets}),u.drop({current:l.current,updatedSourcePayload:"external"===n.type?n.getDropPayload(e):null}),f()):p()}},{type:"dragend",listener:function(e){l.current={dropTargets:l.current.dropTargets,input:gN(e)},p()}}].concat(gk([{type:"pointermove",listener:(a=0,function(){a<20?a++:o()})},{type:"pointerdown",listener:o=p}])),{capture:!0});u.start({nativeSetDragImage:t.dataTransfer?t.dataTransfer.setDragImage.bind(t.dataTransfer):null})}function d(e){var t=function(e){var t=e.current,n=e.next;if(t.length!==n.length)return!0;for(var r=0;r<t.length;r++)if(t[r].element!==n[r].element)return!0;return!1}({current:l.current.dropTargets,next:e.dropTargets});l.current=e,t&&u.dragUpdate({current:l.current})}function h(e){var t=gN(e),i=r({target:gb(e.target)?gw({x:t.clientX,y:t.clientY}):e.target,input:t,source:n.payload,current:l.current.dropTargets});i.length&&(e.preventDefault(),gV({event:e,current:i})),d({dropTargets:i,input:t})}function p(){l.current.dropTargets.length&&d({dropTargets:[],input:l.current.input}),u.drop({current:l.current,updatedSourcePayload:null}),f()}function f(){gB.isActive=!1,c()}},gW=new Map;function gG(e,t){var n=t.attribute,r=t.value;return e.setAttribute(n,r),function(){return e.removeAttribute(n)}}function g$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g$(Object(n),!0).forEach(function(t){gl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gZ(e,t){var n="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e){if(e){if("string"==typeof e)return gY(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gY(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function gY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gX(e){return e.slice(0).reverse()}function gq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var gQ=gS(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),gJ="text/plain",g0=new WeakMap,g1=(m=null,{bindEvents:function(){return m=null,(0,gy.bind)(window,{type:"pointermove",listener:function(e){m={x:e.clientX,y:e.clientY}},options:{capture:!0}})},getOnPostDispatch:function(){var e=null;return function(t){var n=t.eventName,r=t.payload;if("onDragStart"===n){var i,o,a,s=r.location.initial.input,l=null!=m?m:{x:s.clientX,y:s.clientY};(i=document.createElement("div")).setAttribute(gx,"true"),gC()&&i.setAttribute("popover","manual"),o=gT({client:l}),Object.assign(i.style,gA(gA({position:"fixed"},gC()?g_:{zIndex:0x7fffffff}),{},{backgroundColor:"transparent",padding:0,margin:0,boxSizing:"border-box",pointerEvents:"auto"},gI({clientRect:o}))),document.body.appendChild(i),gC()&&i.showPopover(),a=(0,gy.bind)(window,{type:"pointermove",listener:function(e){o=gT({client:{x:e.clientX,y:e.clientY}}),Object.assign(i.style,gI({clientRect:o}))},options:{capture:!0}}),e=function(e){var t,n,r,s=e.current;if(a(),n=(t={client:s,clientRect:o}).client,r=t.clientRect,n.x>=r.x&&n.x<=r.x+r.width&&n.y>=r.y&&n.y<=r.y+r.height)return void i.remove();function l(){u(),i.remove()}var u=(0,gy.bindAll)(window,[{type:"pointerdown",listener:l},{type:"pointermove",listener:l},{type:"focusin",listener:l},{type:"focusout",listener:l},{type:"dragstart",listener:l},{type:"dragenter",listener:l},{type:"dragover",listener:l}],{capture:!0})}}if("onDrop"===n){var u,c=r.location.current.input;null==(u=e)||u({current:{x:c.clientX,y:c.clientY}}),e=null,m=null}}}}),g2=function(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,i=e.onPostDispatch,o=e.defaultDropEffect,a=function(){var e=new Set,t=null;function n(e){t&&(!e.canMonitor||e.canMonitor(t.canMonitorArgs))&&t.active.add(e)}return{dispatchEvent:function(r){var i=r.eventName,o=r.payload;if("onGenerateDragPreview"===i){t={canMonitorArgs:{initial:o.location.initial,source:o.source},active:new Set};var a,s=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return gq(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gq(e,void 0):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e);try{for(s.s();!(a=s.n()).done;){var l=a.value;n(l)}}catch(e){s.e(e)}finally{s.f()}}if(t){for(var u=Array.from(t.active),c=0;c<u.length;c++){var d,h=u[c];t.active.has(h)&&(null==(d=h[i])||d.call(h,o))}"onDrop"===i&&(t.active.clear(),t=null)}},monitorForConsumers:function(r){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gK(Object(n),!0).forEach(function(t){gl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},r);return e.add(i),n(i),gS(function(){e.delete(i),t&&t.active.delete(i)})}}}(),s=function(e){var t=e.typeKey,n=e.defaultDropEffect,r=new WeakMap,i="data-drop-target-for-".concat(t),o="[".concat(i,"]");function a(e){var t,n=e.eventName,i=e.payload,o=gZ(i.location.current.dropTargets);try{for(o.s();!(t=o.n()).done;){var a,s=t.value,l=r.get(s.element),u=gU(gU({},i),{},{self:s});null==l||null==(a=l[n])||a.call(l,u)}}catch(e){o.e(e)}finally{o.f()}}var s={onGenerateDragPreview:a,onDrag:a,onDragStart:a,onDrop:a,onDropTargetChange:function(e){var t,n=e.payload,i=new Set(n.location.current.dropTargets.map(function(e){return e.element})),o=new Set,a=gZ(n.location.previous.dropTargets);try{for(a.s();!(t=a.n()).done;){var s,l,u=t.value;o.add(u.element);var c=r.get(u.element),d=i.has(u.element),h=gU(gU({},n),{},{self:u});null==c||null==(s=c.onDropTargetChange)||s.call(c,h),d||null==c||null==(l=c.onDragLeave)||l.call(c,h)}}catch(e){a.e(e)}finally{a.f()}var p,f=gZ(n.location.current.dropTargets);try{for(f.s();!(p=f.n()).done;){var g,m,v=p.value;if(!o.has(v.element)){var y=gU(gU({},n),{},{self:v}),x=r.get(v.element);null==x||null==(g=x.onDropTargetChange)||g.call(x,y),null==x||null==(m=x.onDragEnter)||m.call(x,y)}}}catch(e){f.e(e)}finally{f.f()}}};return{dropTargetForConsumers:function(e){return gS(gv(gG(e.element,{attribute:i,value:"true"}),(r.set(e.element,e),function(){return r.delete(e.element)})))},getIsOver:function(e){var t=e.source,i=e.target,a=e.input,s=e.current,l=function e(t){var i,a,s,l,u=t.source,c=t.target,d=t.input,h=t.result,p=void 0===h?[]:h;if(null==c)return p;if(!(c instanceof Element))return c instanceof Node?e({source:u,target:c.parentElement,input:d,result:p}):p;var f=c.closest(o);if(null==f)return p;var g=r.get(f);if(null==g)return p;var m={input:d,source:u,element:g.element};if(g.canDrop&&!g.canDrop(m))return e({source:u,target:g.element.parentElement,input:d,result:p});var v=null!=(i=null==(a=g.getData)?void 0:a.call(g,m))?i:{},y=null!=(s=null==(l=g.getDropEffect)?void 0:l.call(g,m))?s:n,x={data:v,element:g.element,dropEffect:y,isActiveDueToStickiness:!1};return e({source:u,target:g.element.parentElement,input:d,result:[].concat(gk(p),[x])})}({source:t,target:i,input:a});if(l.length>=s.length)return l;for(var u=gX(s),c=gX(l),d=[],h=0;h<u.length;h++){var p,f=u[h],g=c[h];if(null!=g){d.push(g);continue}var m=d[h-1],v=u[h-1];if((null==m?void 0:m.element)!==(null==v?void 0:v.element))break;var y=r.get(f.element);if(!y)break;var x={input:a,source:t,element:y.element};if(y.canDrop&&!y.canDrop(x)||!(null!=(p=y.getIsSticky)&&p.call(y,x)))break;d.push(gU(gU({},f),{},{isActiveDueToStickiness:!0}))}return gX(d)},dispatchEvent:function(e){s[e.eventName](e)}}}({typeKey:t,defaultDropEffect:o});function l(e){null==r||r(e),s.dispatchEvent(e),a.dispatchEvent(e),null==i||i(e)}function u(e){gH({event:e.event,dragType:e.dragType,getDropTargetsOver:s.getIsOver,dispatchEvent:l})}return{registerUsage:function(){var e,r;return r=function(e){var t=e.typeKey,n=e.mount,r=gW.get(t);if(r)return r.usageCount++,r;var i={typeKey:t,unmount:n(),usageCount:1};return gW.set(t,i),i}(e={typeKey:t,mount:function(){return n({canStart:gj,start:u})}}),function(){r.usageCount--,r.usageCount>0||(r.unmount(),gW.delete(e.typeKey))}},dropTarget:s.dropTargetForConsumers,monitor:a.monitorForConsumers}}({typeKey:"element",defaultDropEffect:"move",mount:function(e){return gv(g1.bindEvents(),(0,gy.bind)(document,{type:"dragstart",listener:function(t){if(e.canStart(t)&&!t.defaultPrevented&&t.dataTransfer){var n,r,i,o,a,s,l=t.target;if(l instanceof HTMLElement){var u=g0.get(l);if(u){var c=gN(t),d={element:u.element,dragHandle:null!=(n=u.dragHandle)?n:null,input:c};if(u.canDrag&&!u.canDrag(d))return void t.preventDefault();if(u.dragHandle){var h=gw({x:c.clientX,y:c.clientY});if(!u.dragHandle.contains(h))return void t.preventDefault()}var p=null!=(r=null==(i=u.getInitialDataForExternal)?void 0:i.call(u,d))?r:null;if(p)for(var f=0,g=Object.entries(p);f<g.length;f++){var m=gm(g[f],2),v=m[0],y=m[1];t.dataTransfer.setData(v,null!=y?y:"")}!gQ()||t.dataTransfer.types.includes(gJ)||t.dataTransfer.types.includes("text/uri-list")||t.dataTransfer.setData(gJ,"pdnd:android-fallback"),t.dataTransfer.setData("application/vnd.pdnd","");var x={element:u.element,dragHandle:null!=(o=u.dragHandle)?o:null,data:null!=(a=null==(s=u.getInitialData)?void 0:s.call(u,d))?a:{}};e.start({event:t,dragType:{type:"element",payload:x,startedFrom:"internal"}})}}}}}))},dispatchEventToSource:function(e){var t,n,r=e.eventName,i=e.payload;null==(t=g0.get(i.source.element))||null==(n=t[r])||n.call(t,i)},onPostDispatch:g1.getOnPostDispatch()}),g5=g2.dropTarget,g3=g2.monitor;let g4={type:"idle"};function g6({elements:e,accessKey:t,axis:n="vertical",onChange:r}){return(0,ed.useEffect)(()=>g3({onDrop({location:i,source:o}){var a,s;let l=i.current.dropTargets[0];if(!l)return;let u=o.data,c=l.data,d=e.findIndex(e=>e[t]===u[t]),h=e.findIndex(e=>e[t]===c[t]);h<0||d<0||r(function(e){var t=e.list,n=e.startIndex,r=e.finishIndex;if(-1===n||-1===r)return Array.from(t);var i=Array.from(t),o=gm(i.splice(n,1),1)[0];return i.splice(r,0,o),i}({list:(a={list:e,startIndex:d,indexOfTarget:h,closestEdgeOfTarget:gp(c),axis:n}).list,startIndex:s=a.startIndex,finishIndex:function(e){var t=e.startIndex,n=e.closestEdgeOfTarget,r=e.indexOfTarget,i=e.axis;if(-1===t||-1===r||t===r)return t;if(null==n)return r;var o="vertical"===i&&"bottom"===n||"horizontal"===i&&"right"===n;return t<r?o?r:r-1:o?r+1:r}({closestEdgeOfTarget:a.closestEdgeOfTarget,startIndex:s,indexOfTarget:a.indexOfTarget,axis:a.axis})}))}}),[t,n,e,r])}function g9({children:e,data:t}){let n=(0,ed.useRef)(null),[r,i]=(0,ed.useState)(g4);return(0,ed.useEffect)(()=>{let e=n.current;if(e){var r;return gv((r={element:e,getInitialData:()=>t,onDragStart(){i({type:"is-dragging"})},onDrop(){i(g4)}},gS(gv(g2.registerUsage(),(g0.set(r.element,r),function(){g0.delete(r.element)}),gG(r.element,{attribute:"draggable",value:"true"})))),g5({element:e,canDrop:({source:t})=>t.element!==e,getData:({input:n})=>{var r,i,o,a,s,l,u,c,d;return a=(r={element:e,input:n,allowedEdges:["top","bottom"]}).element,s=r.input,l=r.allowedEdges,u={x:s.clientX,y:s.clientY},c=a.getBoundingClientRect(),d=null!=(i=null==(o=l.map(function(e){return{edge:e,value:gd[e](c,u)}}).sort(function(e,t){return e.value-t.value})[0])?void 0:o.edge)?i:null,gc(gc({},t),{},gl({},gh,d))},getIsSticky:()=>!0,onDragEnter({self:e}){i({type:"is-dragging-over",closestEdge:gp(e.data)})},onDrag({self:e}){let t=gp(e.data);i(e=>"is-dragging-over"===e.type&&e.closestEdge===t?e:{type:"is-dragging-over",closestEdge:t})},onDragLeave(){i(g4)},onDrop(){i(g4)}}))}},[t]),(0,ec.jsxs)(eP.A,{ref:n,spacing:1,style:{opacity:"is-dragging"===r.type?.5:"unset"},children:["is-dragging-over"===r.type&&"top"===r.closestEdge?(0,ec.jsx)(ga,{}):null,e,"is-dragging-over"===r.type&&"bottom"===r.closestEdge?(0,ec.jsx)(ga,{}):null]})}var g8=n(53064);function g7(e,t){let n=t.indexOf(e);if(0===n)return t;let r=[...t];return r.splice(n,1),r.splice(n-1,0,e),r}function me(e,t){let n=t.indexOf(e);if(n===t.length-1)return t;let r=[...t];return r.splice(n,1),r.splice(n+1,0,e),r}let mt=(0,ed.forwardRef)(function({onMoveUp:e,onMoveDown:t,onMoveLeft:n,onMoveRight:r,menuSx:i,...o},a){let[s,l]=(0,ed.useState)(null),u=!!s;function c(e){l(null),e?.()}return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(eR.A,{...o,ref:a,"aria-label":"move","aria-haspopup":!0,"aria-expanded":u,size:"small",onClick:function(e){l(e.currentTarget)},children:(0,ec.jsx)(g8,{})}),(e||t||n||r)&&(0,ec.jsxs)(f_.A,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:s,open:u,onClose:()=>c(void 0),sx:i,children:[e&&(0,ec.jsx)(pT.A,{onClick:()=>c(e),children:"Move Up"}),t&&(0,ec.jsx)(pT.A,{onClick:()=>c(t),children:"Move Down"}),n&&(0,ec.jsx)(pT.A,{onClick:()=>c(n),children:"Move Left"}),r&&(0,ec.jsx)(pT.A,{onClick:()=>c(r),children:"Move Right"}),r&&(0,ec.jsx)(pT.A,{onClick:()=>c(r),children:"Move Right"})]})]})});var mn=n(8072),mr=n(10972),mi=n(46477),mo=n(30443),ma=n(55403),ms=n(32494),ml=n(63025);function mu(e,t,n){let r=function(e,t,n){let r,i=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),a=(0,ml.A)(t);if(t.fakeTransform)r=t.fakeTransform;else{let e=a.getComputedStyle(t);r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(r&&"none"!==r&&"string"==typeof r){let e=r.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-i.left}px)`:`translateX(${a.innerWidth+s-i.left}px)`:"right"===e?o?`translateX(-${i.right-o.left-s}px)`:`translateX(-${i.left+i.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-i.top}px)`:`translateY(${a.innerHeight+l-i.top}px)`:o?`translateY(-${i.top-o.top+i.height-l}px)`:`translateY(-${i.top+i.height-l}px)`}(e,t,"function"==typeof n?n():n);r&&(t.style.webkitTransform=r,t.style.transform=r)}let mc=ed.forwardRef(function(e,t){let n=(0,uc.A)(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,container:l,direction:u="down",easing:c=r,in:d,onEnter:h,onEntered:p,onEntering:f,onExit:g,onExited:m,onExiting:v,style:y,timeout:x=i,TransitionComponent:b=mi.Ay,...w}=e,_=ed.useRef(null),S=(0,uv.A)((0,mo.A)(s),_,t),C=e=>t=>{e&&(void 0===t?e(_.current):e(_.current,t))},M=C((e,t)=>{mu(u,e,l),(0,ms.q)(e),h&&h(e,t)}),A=C((e,t)=>{let r=(0,ms.c)({timeout:x,style:y,easing:c},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...r}),e.style.transition=n.transitions.create("transform",{...r}),e.style.webkitTransform="none",e.style.transform="none",f&&f(e,t)}),T=C(p),I=C(v),k=C(e=>{let t=(0,ms.c)({timeout:x,style:y,easing:c},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),mu(u,e,l),g&&g(e)}),D=C(e=>{e.style.webkitTransition="",e.style.transition="",m&&m(e)}),O=ed.useCallback(()=>{_.current&&mu(u,_.current,l)},[u,l]);return ed.useEffect(()=>{if(d||"down"===u||"right"===u)return;let e=(0,ma.A)(()=>{_.current&&mu(u,_.current,l)}),t=(0,ml.A)(_.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[u,d,l]),ed.useEffect(()=>{d||O()},[d,O]),(0,ec.jsx)(b,{nodeRef:_,onEnter:M,onEntered:T,onEntering:A,onExit:k,onExited:D,onExiting:I,addEndListener:e=>{o&&o(_.current,e)},appear:a,in:d,timeout:x,...w,children:(e,{ownerState:t,...n})=>ed.cloneElement(s,{ref:S,style:{visibility:"exited"!==e||d?void 0:"hidden",...y,...s.props.style},...n})})});var md=n(11502);function mh(e){return(0,eS.Ay)("MuiDrawer",e)}(0,e_.A)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var mp=n(64606);let mf=(e,t)=>{let{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},mg=(0,ey.A)(mr.A,{name:"MuiDrawer",slot:"Root",overridesResolver:mf})((0,ex.A)(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),mm=(0,ey.A)("div",{shouldForwardProp:uf.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:mf})({flex:"0 0 auto"}),mv=(0,ey.A)(md.A,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,ev.A)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,ev.A)(n.anchor)}`]]}})((0,ex.A)(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),my={left:"right",right:"left",top:"down",bottom:"up"},mx=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiDrawer"}),r=(0,uc.A)(),i=(0,pR.I)(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:u,elevation:c=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:h,...p}={},onClose:f,open:g=!1,PaperProps:m={},SlideProps:v,TransitionComponent:y,transitionDuration:x=o,variant:b="temporary",slots:w={},slotProps:_={},...S}=n,C=ed.useRef(!1);ed.useEffect(()=>{C.current=!0},[]);let M=function({direction:e},t){return"rtl"===e&&["left","right"].includes(t)?my[t]:t}({direction:i?"rtl":"ltr"},a),A={...n,anchor:a,elevation:c,open:g,variant:b,...S},T=(e=>{let{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${(0,ev.A)(n)}`],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,ev.A)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,ev.A)(n)}`]};return(0,ef.A)(i,mh,t)})(A),I={slots:{transition:y,...w},slotProps:{paper:m,transition:v,..._,backdrop:(0,mp.A)(_.backdrop||{...s,...h},{transitionDuration:x})}},[k,D]=(0,pW.A)("root",{ref:t,elementType:mg,className:(0,ep.A)(T.root,T.modal,u),shouldForwardComponentProp:!0,ownerState:A,externalForwardedProps:{...I,...S,...p},additionalProps:{open:g,onClose:f,hideBackdrop:d,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[O,P]=(0,pW.A)("paper",{elementType:mv,shouldForwardComponentProp:!0,className:(0,ep.A)(T.paper,m.className),ownerState:A,externalForwardedProps:I,additionalProps:{elevation:"temporary"===b?c:0,square:!0}}),[R,E]=(0,pW.A)("docked",{elementType:mm,ref:t,className:(0,ep.A)(T.root,T.docked,u),ownerState:A,externalForwardedProps:I,additionalProps:S}),[L,N]=(0,pW.A)("transition",{elementType:mc,ownerState:A,externalForwardedProps:I,additionalProps:{in:g,direction:my[M],timeout:x,appear:C.current}}),z=(0,ec.jsx)(O,{...P,children:l});if("permanent"===b)return(0,ec.jsx)(R,{...E,children:z});let F=(0,ec.jsx)(L,{...N,children:z});return"persistent"===b?(0,ec.jsx)(R,{...E,children:F}):(0,ec.jsx)(k,{...D,children:F})}),mb=({anchor:e="right",isOpen:t,onClose:n,PaperProps:r,children:i,...o})=>{let a=(0,mn.A)("(max-width:1080px)");return(0,ec.jsx)(mx,{...o,open:t,onClose:n,anchor:e,PaperProps:{...r,sx:iS({width:a?"100%":"1080px",overflow:"hidden"},r?.sx)},"aria-hidden":!t,children:i})};var mw="12px sans-serif",m_=function(e){var t={};if("u"<typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[r]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),mS={createCanvas:function(){return"u">typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!v){var n=mS.createCanvas();v=n&&n.getContext("2d")}if(v)return y!==t&&(y=v.font=t||mw),v.measureText(e);e=e||"",t=t||mw;var r=/(\d+)px/.exec(t),i=r&&+r[1]||12,o=0;if(t.indexOf("mono")>=0)o=i*e.length;else for(var a=0;a<e.length;a++){var s=m_[e[a]];o+=null==s?i:s*i}return{width:o}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},mC=mU(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),mM=mU(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),mA=Object.prototype.toString,mT=Array.prototype,mI=mT.forEach,mk=mT.filter,mD=mT.slice,mO=mT.map,mP=(function(){}).constructor,mR=mP?mP.prototype:null,mE="__proto__",mL=2311;function mN(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"u">typeof console&&console.error.apply(console,e)}function mz(e){if(null==e||"object"!=typeof e)return e;var t=e,n=mA.call(e);if("[object Array]"===n){if(!e[vi]){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=mz(e[r])}}else if(mM[n]){if(!e[vi]){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!mC[n]&&!e[vi]&&!m4(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==mE&&(t[a]=mz(e[a]));return t}function mF(e,t,n){if(!m2(t)||!m2(e))return n?mz(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==mE){var i=e[r],o=t[r];!(m2(o)&&m2(i))||mK(o)||mK(i)||m4(o)||m4(i)||m5(o)||m5(i)||o[vi]||i[vi]?!n&&r in e||(e[r]=mz(t[r])):mF(i,o,n)}return e}function mB(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==mE&&(e[n]=t[n]);return e}function mj(e,t,n){for(var r=mY(t),i=0;i<r.length;i++){var o=r[i];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}function mV(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return -1}function mH(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else mj(e,t,n)}function mW(e){return!!e&&"string"!=typeof e&&"number"==typeof e.length}function mG(e,t,n){if(e&&t)if(e.forEach&&e.forEach===mI)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function m$(e,t,n){if(!e)return[];if(!t)return ve(e);if(e.map&&e.map===mO)return e.map(t,n);for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.call(n,e[i],i,e));return r}function mU(e,t,n,r){if(e&&t){for(var i=0,o=e.length;i<o;i++)n=t.call(r,n,e[i],i,e);return n}}function mZ(e,t,n){if(!e)return[];if(!t)return ve(e);if(e.filter&&e.filter===mk)return e.filter(t,n);for(var r=[],i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function mY(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}mS.createCanvas;var mX=mR&&mQ(mR.bind)?mR.call.bind(mR.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(mD.call(arguments)))}};function mq(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(mD.call(arguments)))}}function mK(e){return Array.isArray?Array.isArray(e):"[object Array]"===mA.call(e)}function mQ(e){return"function"==typeof e}function mJ(e){return"string"==typeof e}function m0(e){return"[object String]"===mA.call(e)}function m1(e){return"number"==typeof e}function m2(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function m5(e){return!!mC[mA.call(e)]}function m3(e){return!!mM[mA.call(e)]}function m4(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function m6(e){return null!=e.colorStops}function m9(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function m8(e,t){return null!=e?e:t}function m7(e,t,n){return null!=e?e:null!=t?t:n}function ve(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return mD.apply(e,t)}function vt(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function vn(e,t){if(!e)throw Error(t)}function vr(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var vi="__ec_primitive__",vo=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return mY(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),va="function"==typeof Map,vs=function(){function e(t){var n=mK(t);this.data=va?new Map:new vo;var r=this;function i(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(i):t&&mG(t,i)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return va?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function vl(e){return new vs(e)}function vu(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&mB(n,t),n}function vc(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function vd(e,t){return e.hasOwnProperty(t)}function vh(){}var vp=180/Math.PI;function vf(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r){if(l>0){if(e<=i)return a;else if(e>=o)return s}else if(e>=i)return a;else if(e<=o)return s}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function vg(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return mJ(e)?e.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function vm(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function vv(e){return e.sort(function(e,t){return e-t}),e}function vy(e){if(isNaN(e*=1))return 0;if(e>1e-14){for(var t,n,r,i,o,a=1,s=0;s<15;s++,a*=10)if(Math.round(e*a)/a===e)return s}return r=(n=(t=e.toString().toLowerCase()).indexOf("e"))>0?+t.slice(n+1):0,i=n>0?n:t.length,Math.max(0,((o=t.indexOf("."))<0?0:i-1-o)-r)}function vx(e,t){var n=Math.log,r=Math.LN10,i=Math.min(Math.max(-Math.floor(n(e[1]-e[0])/r)+Math.round(n(Math.abs(t[1]-t[0]))/r),0),20);return isFinite(i)?i:20}function vb(e){var t=2*Math.PI;return(e%t+t)%t}function vw(e){return e>-1e-4&&e<1e-4}var v_=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function vS(e){if(e instanceof Date)return e;if(mJ(e)){var t=v_.exec(e);if(!t)return new Date(NaN);if(!t[8])return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0);var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return null==e?new Date(NaN):new Date(Math.round(e))}function vC(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function vM(e,t){var n=vC(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function vA(e){e.sort(function(e,t){return!function e(t,n,r){return t.interval[r]<n.interval[r]||t.interval[r]===n.interval[r]&&(t.close[r]-n.close[r]==(r?-1:1)||!r&&e(t,n,1))}(e,t,0)?1:-1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,o=e[r].close,a=0;a<2;a++)i[a]<=t&&(i[a]=t,o[a]=a?1:1-n),t=i[a],n=o[a];i[0]===i[1]&&o[0]*o[1]!=1?e.splice(r,1):r++}return e}function vT(e){var t=parseFloat(e);return t==e&&(0!==t||!mJ(e)||0>=e.indexOf("x"))?t:NaN}function vI(){return Math.round(9*Math.random())}function vk(e,t){return null==e?t:null==t?e:e*t/function e(t,n){return 0===n?t:e(n,t%n)}(e,t)}var vD=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},vO=new function(){this.browser=new vD,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="u">typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(vO.wxa=!0,vO.touchEventsSupported=!0):"u"<typeof document&&"u">typeof self?vO.worker=!0:"u"<typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(vO.node=!0,vO.svgSupported=!0):(r=navigator.userAgent,o=(i=vO).browser,a=r.match(/Firefox\/([\d.]+)/),s=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),l=r.match(/Edge?\/([\d.]+)/),u=/micromessenger/i.test(r),a&&(o.firefox=!0,o.version=a[1]),s&&(o.ie=!0,o.version=s[1]),l&&(o.edge=!0,o.version=l[1],o.newEdge=+l[1].split(".")[0]>18),u&&(o.weChat=!0),i.svgSupported="u">typeof SVGRect,i.touchEventsSupported="ontouchstart"in window&&!o.ie&&!o.edge,i.pointerEventsSupported="onpointerdown"in window&&(o.edge||o.ie&&+o.version>=11),i.domSupported="u">typeof document,c=document.documentElement.style,i.transform3dSupported=(o.ie&&"transition"in c||o.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in c)&&!("OTransition"in c),i.transformSupported=i.transform3dSupported||o.ie&&+o.version>=9);var vP="series\0",vR="\0_ec_\0";function vE(e){return e instanceof Array?e:null==e?[]:[e]}function vL(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var vN=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function vz(e){return!m2(e)||mK(e)||e instanceof Date?e:e.value}function vF(e,t,n){var r=vj(t[e],null),i=vj(n[e],null);return null!=r&&null!=i&&r===i}function vB(e){return vj(e,"")}function vj(e,t){return null==e?t:mJ(e)?e:m1(e)||m0(e)?e+"":t}function vV(e){var t=e.name;return!!(t&&t.indexOf(vP))}function vH(e){return e&&null!=e.id&&0===vB(e.id).indexOf(vR)}function vW(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?mK(t.dataIndex)?m$(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?mK(t.name)?m$(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function vG(){var e="__ec_inner_"+v$++;return function(t){return t[e]||(t[e]={})}}var v$=vI();function vU(e,t,n){var r=vZ(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each(function(t,r){var i=vq(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]}),a}function vZ(e,t){if(mJ(e)){var n,r={};r[e+"Index"]=0,n=r}else n=e;var i=vl(),o={},a=!1;return mG(n,function(e,n){if("dataIndex"===n||"dataIndexInside"===n){o[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();!s||!l||t&&t.includeMainTypes&&0>mV(t.includeMainTypes,s)||(a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e)}),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var vY={useDefault:!0,enableAll:!1,enableNone:!1},vX={useDefault:!1,enableAll:!0,enableNone:!0};function vq(e,t,n,r){r=r||vY;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(vn(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[]):("all"===i&&(vn(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a})),s}function vK(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function vQ(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(m1(r)){var a,s=(r-(a=n||0))*i+a;return vm(s,o?Math.max(vy(n||0),vy(r)):t)}if(mJ(r))return i<1?n:r;for(var l=[],u=Math.max(n?n.length:0,r.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)l[c]=(i<1&&n?n:r)[c];else{var h=n&&n[c]?n[c]:0,p=r[c],s=(p-h)*i+h;l[c]=vm(s,o?Math.max(vy(h),vy(p)):t)}}return l}var vJ=vl(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),v0="original",v1="arrayRows",v2="objectRows",v5="keyedColumns",v3="typedArray",v4="unknown",v6="column",v9=vG();function v8(e,t,n){var r,i,o={},a=ye(t);if(!a||!e)return o;var s=[],l=[],u=v9(t.ecModel).datasetMap,c=a.uid+"_"+n.seriesLayoutBy;mG(e=e.slice(),function(t,n){var a=m2(t)?t:e[n]={name:t};"ordinal"===a.type&&null==r&&(r=n,i=p(a)),o[a.name]=[]});var d=u.get(c)||u.set(c,{categoryWayDim:i,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function p(e){var t=e.dimsDef;return t?t.length:1}return mG(e,function(e,t){var n=e.name,i=p(e);if(null==r){var a=d.valueWayDim;h(o[n],a,i),h(l,a,i),d.valueWayDim+=i}else if(r===t)h(o[n],0,i),h(s,0,i);else{var a=d.categoryWayDim;h(o[n],a,i),h(l,a,i),d.categoryWayDim+=i}}),s.length&&(o.itemName=s),l.length&&(o.seriesName=l),o}function v7(e,t,n){var r,i={};if(!ye(e))return i;var o=t.sourceFormat,a=t.dimensionsDefine;(o===v2||o===v5)&&mG(a,function(e,t){(m2(e)?e.name:e)==="name"&&(r=t)});var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=yn(t.data,o,t.seriesLayoutBy,a,t.startIndex,l);s.push(c);var d=3===c;if(d&&null==e.v&&l!==r&&(e.v=l),null!=e.n&&e.n!==e.v&&(d||3!==s[e.n])||(e.n=l),h(e)&&3!==s[e.n])return e;d||(2===c&&null==i.v&&l!==r&&(i.v=l),(null==i.n||i.n===i.v)&&(i.n=l))}function h(e){return null!=e.v&&null!=e.n}return h(e)?e:h(i)?i:null}();if(s){i.value=[s.v];var l=null!=r?r:s.n;i.itemName=[l],i.seriesName=[l]}return i}function ye(e){if(!e.get("data",!0))return vq(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},vY).models[0]}function yt(e,t){return yn(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function yn(e,t,n,r,i,o){var a,s,l;if(m3(e))return 3;if(r){var u=r[o];m2(u)?(s=u.name,l=u.type):mJ(u)&&(s=u)}if(null!=l)return"ordinal"===l?1:3;if(t===v1)if("row"===n){for(var c=e[o],d=0;d<(c||[]).length&&d<5;d++)if(null!=(a=g(c[i+d])))return a}else for(var d=0;d<e.length&&d<5;d++){var h=e[i+d];if(h&&null!=(a=g(h[o])))return a}else if(t===v2){if(!s)return 3;for(var d=0;d<e.length&&d<5;d++){var p=e[d];if(p&&null!=(a=g(p[s])))return a}}else if(t===v5){if(!s)return 3;var c=e[s];if(!c||m3(c))return 3;for(var d=0;d<c.length&&d<5;d++)if(null!=(a=g(c[d])))return a}else if(t===v0)for(var d=0;d<e.length&&d<5;d++){var p=e[d],f=vz(p);if(!mK(f))return 3;if(null!=(a=g(f[o])))return a}function g(e){var t=mJ(e);return null!=e&&isFinite(e)&&""!==e?t?2:3:t&&"-"!==e?1:void 0}return 3}var yr=function(e){this.data=e.data||(e.sourceFormat===v5?{}:[]),this.sourceFormat=e.sourceFormat||v4,this.seriesLayoutBy=e.seriesLayoutBy||v6,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&1===yt(this,n)&&(r.type="ordinal")}};function yi(e){return e instanceof yr}function yo(e,t,n){n=n||ys(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){if(!e)return{dimensionsDefine:yl(i),startIndex:a,dimensionsDetectedCount:o};if(t===v1){var o,a;"auto"===r||null==r?yu(function(e){null!=e&&"-"!==e&&(mJ(e)?null==a&&(a=1):a=0)},n,e,10):a=m1(r)?r:+!!r,i||1!==a||(i=[],yu(function(e,t){i[t]=null!=e?e+"":""},n,e,1/0)),o=i?i.length:"row"===n?e.length:e[0]?e[0].length:null}else if(t===v2)i||(i=function(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t)return mY(t)}(e));else if(t===v5)i||(i=[],mG(e,function(e,t){i.push(t)}));else if(t===v0){var s=vz(e[0]);o=mK(s)&&s.length||1}return{startIndex:a,dimensionsDefine:yl(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new yr({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:mz(t)})}function ya(e){return new yr({data:e,sourceFormat:m3(e)?v3:v0})}function ys(e){var t=v4;if(m3(e))t=v3;else if(mK(e)){0===e.length&&(t=v1);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(mK(i)||m3(i)){t=v1;break}else if(m2(i)){t=v2;break}}}}else if(m2(e)){for(var o in e)if(vd(e,o)&&mW(e[o])){t=v5;break}}return t}function yl(e){if(e){var t=vl();return m$(e,function(e,n){var r={name:(e=m2(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r})}}function yu(e,t,n,r){if("row"===t)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var o=n[0]||[],i=0;i<o.length&&i<r;i++)e(o[i],i)}function yc(e){var t=e.sourceFormat;return t===v2||t===v5}var yd=vG(),yh={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},yp=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=ym(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return m8(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=yc(this.source),n=!(e>30),r="",i=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=yh[l]||"f",u&&(r+=u.uid),r+="$"}var h=this.source;return{dimensions:i,hash:[h.seriesLayoutBy,h.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function yf(e){return e instanceof yp}function yg(e){for(var t=vl(),n=0;n<(e||[]).length;n++){var r=e[n],i=m2(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function ym(e){var t=yd(e);return t.dimNameMap||(t.dimNameMap=yg(e.dimensionsDefine))}function yv(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function yy(e,t){return yv(e,t)?e.getCalculationInfo("stackResultDimension"):t}function yx(){var e=vG();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==a||o!==s)&&"reset"}}var yb="u">typeof Float32Array,yw=yb?Float32Array:Array;function y_(e){return mK(e)?yb?new Float32Array(e):e:new yw(e)}var yS="__ec_stack_";function yC(e){return e.get("stack")||yS+e.seriesIndex}function yM(e){return e.dim+e.index}function yA(e,t){var n=[];return t.eachSeriesByType(e,function(e){yD(e)&&n.push(e)}),n}function yT(e){var t=function(e){var t={};mG(e,function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}});var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort(function(e,t){return e-t});for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return mG(e,function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=t[i.dim+"_"+i.index],s=Math.abs(o[1]-o[0]),l=i.scale.getExtent(),u=Math.abs(l[1]-l[0]);r=a?s/u*a:s}else{var c=e.getData();r=Math.abs(o[1]-o[0])/c.count()}var d=vg(e.get("barWidth"),r),h=vg(e.get("barMaxWidth"),r),p=vg(e.get("barMinWidth")||(yO(e)?.5:1),r),f=e.get("barGap"),g=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:d,barMaxWidth:h,barMinWidth:p,barGap:f,barCategoryGap:g,axisKey:yM(i),stackId:yC(e)})}),yI(n)}function yI(e){var t={};mG(e,function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;!a[s]&&o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var h=e.barCategoryGap;null!=h&&(o.categoryGap=h)});var n={};return mG(t,function(e,t){n[t]={};var r,i=e.stacks,o=e.bandWidth,a=e.categoryGap;null==a&&(a=Math.max(35-4*mY(i).length,15)+"%");var s=vg(a,o),l=vg(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),mG(i,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}}),d=Math.max(d=(u-s)/(c+(c-1)*l),0);var h=0;mG(i,function(e,t){e.width||(e.width=d),r=e,h+=e.width*(1+l)}),r&&(h-=r.width*l);var p=-h/2;mG(i,function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:p,width:e.width},p+=e.width*(1+l)})}),n}function yk(e,t){var n=yA(e,t),r=yT(n);mG(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=yC(e),o=r[yM(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})})}function yD(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function yO(e){return e.pipelineContext&&e.pipelineContext.large}var yP={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)!isNaN(e[r])&&(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},minmax:function(e){for(var t=-1/0,n=-1/0,r=0;r<e.length;r++){var i=e[r],o=Math.abs(i);o>t&&(t=o,n=i)}return isFinite(n)?n:NaN},nearest:function(e){return e[0]}},yR=function(e){return Math.round(e.length/2)};function yE(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.round(a/(Math.abs(u[1]-u[0])*(c||1)));if(isFinite(d)&&d>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/d));var h=void 0;mJ(i)?h=yP[i]:mQ(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/d,h,yR))}}}}}var yL=function(e,t){return(yL=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function yN(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}yL(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var yz="___EC__COMPONENT__CONTAINER___",yF="___EC__EXTENDED_CLASS___";function yB(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function yj(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;if(mQ(t=r)&&/^class\s/.test(Function.prototype.toString.call(t)))n=function(e){function t(){return e.apply(this,arguments)||this}return yN(t,e),t}(r);else{var i=n=function(){(e.$constructor||r).apply(this,arguments)},o=i.prototype;function a(){}for(var s in a.prototype=this.prototype,i.prototype=new a,o)o.hasOwnProperty(s)&&(i.prototype[s]=o[s]);i.prototype.constructor=i,i.superClass=this}return mB(n.prototype,e),n[yF]=!0,n.extend=this.extend,n.superCall=yW,n.superApply=yG,n.superClass=r,n}}function yV(e,t){e.extend=t.extend}var yH=Math.round(10*Math.random());function yW(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function yG(e,t,n){return this.superClass.prototype[t].apply(e,n)}function y$(e){var t={};e.registerClass=function(e){var n=e.type||e.prototype.type;if(n){vn(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),e.prototype.type=n;var r,i,o=yB(n);o.sub?o.sub!==yz&&(((i=t[(r=o).main])&&i[yz]||((i=t[r.main]={})[yz]=!0),i)[o.sub]=e):t[o.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[yz]&&(i=n?i[n]:null),r&&!i)throw Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=yB(e),r=[],i=t[n.main];return i&&i[yz]?mG(i,function(e,t){t!==yz&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[yB(e).main]},e.getAllClassMainTypes=function(){var e=[];return mG(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[yB(e).main];return n&&n[yz]}}function yU(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&mV(r,s)>=0||i&&0>mV(i,s))){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var yZ=yU([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),yY=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return yZ(this,e,t)},e}(),yX=function(e,t){return(yX=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function yq(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}yX(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var yK=function(e){this.value=e},yQ=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new yK(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),yJ=function(){function e(e){this._list=new yQ,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new yK(t),a.key=e,n.insertEntry(a),r[e]=a}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),y0=new yJ(50);function y1(e,t,n,r,i){if(!e)return t;if("string"!=typeof e)return e;if(t&&t.__zrImageSrc===e||!n)return t;var o=y0.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?y5(t=o.image)||o.pending.push(a):((t=mS.loadImage(e,y2,y2)).__zrImageSrc=e,y0.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}function y2(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function y5(e){return e&&e.width&&e.height}function y3(){return[1,0,0,1,0,0]}function y4(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function y6(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e}function y9(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function y8(e,t,n,r){void 0===r&&(r=[0,0]);var i=t[0],o=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*c,e[1]=-i*c+s*d,e[2]=o*d+l*c,e[3]=-o*c+d*l,e[4]=d*(a-r[0])+c*(u-r[1])+r[0],e[5]=d*(u-r[1])-c*(a-r[0])+r[1],e}function y7(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=t[5],l=n*a-o*r;return l?(l=1/l,e[0]=a*l,e[1]=-o*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*i)*l,e[5]=(o*i-n*s)*l,e):null}let xe=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}();var xt=Math.min,xn=Math.max,xr=new xe,xi=new xe,xo=new xe,xa=new xe,xs=new xe,xl=new xe;let xu=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=xt(e.x,this.x),n=xt(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=xn(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=xn(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t,n,r,i=e.width/this.width,o=e.height/this.height,a=y3();return y9(a,a,[-this.x,-this.y]),n=(t=[i,o])[0],r=t[1],a[0]=a[0]*n,a[1]=a[1]*r,a[2]=a[2]*n,a[3]=a[3]*r,a[4]=a[4]*n,a[5]=a[5]*r,y9(a,a,[e.x,e.y]),a},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this.x,i=this.x+this.width,o=this.y,a=this.y+this.height,s=t.x,l=t.x+t.width,u=t.y,c=t.y+t.height,d=!(i<s||l<r||a<u||c<o);if(n){var h=1/0,p=0,f=Math.abs(i-s),g=Math.abs(l-r),m=Math.abs(a-u),v=Math.abs(c-o),y=Math.min(f,g),x=Math.min(m,v);i<s||l<r?y>p&&(p=y,f<g?xe.set(xl,-f,0):xe.set(xl,g,0)):y<h&&(h=y,f<g?xe.set(xs,f,0):xe.set(xs,-g,0)),a<u||c<o?x>p&&(p=x,m<v?xe.set(xl,0,-m):xe.set(xl,0,v)):y<h&&(h=y,m<v?xe.set(xs,0,m):xe.set(xs,0,-v))}return n&&xe.copy(n,d?xs:xl),d},e.prototype.contain=function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];t.x=n.x*i+a,t.y=n.y*o+s,t.width=n.width*i,t.height=n.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}xr.x=xo.x=n.x,xr.y=xa.y=n.y,xi.x=xa.x=n.x+n.width,xi.y=xo.y=n.y+n.height,xr.transform(r),xa.transform(r),xi.transform(r),xo.transform(r),t.x=xt(xr.x,xi.x,xo.x,xa.x),t.y=xt(xr.y,xi.y,xo.y,xa.y);var l=xn(xr.x,xi.x,xo.x,xa.x),u=xn(xr.y,xi.y,xo.y,xa.y);t.width=l-t.x,t.height=u-t.y},e}();var xc={};function xd(e,t){var n=xc[t=t||mw];n||(n=xc[t]=new yJ(500));var r=n.get(e);return null==r&&(r=mS.measureText(e,t).width,n.put(e,r)),r}function xh(e,t,n,r){var i=xd(e,t),o=xm(t);return new xu(xf(0,i,n),xg(0,o,r),i,o)}function xp(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return xh(i[0],t,n,r);for(var o=new xu(0,0,0,0),a=0;a<i.length;a++){var s=xh(i[a],t,n,r);0===a?o.copy(s):o.union(s)}return o}function xf(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function xg(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function xm(e){return xd("国",e)}function xv(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function xy(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=xv(r[0],n.width),u+=xv(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=i,u+=s,c="right",d="middle";break;case"right":l+=i+a,u+=s,d="middle";break;case"top":l+=a/2,u-=i,c="center",d="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=i,u+=s,d="middle";break;case"insideRight":l+=a-i,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",d="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,d="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var xx=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function xb(e,t,n,r){var i=mB({},r=r||{});i.font=t,n=m8(n,"..."),i.maxIterations=m8(r.maxIterations,2);var o=i.minChar=m8(r.minChar,0);i.cnCharWidth=xd("国",t);var a=i.ascCharWidth=xd("a",t);i.placeholder=m8(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=xd(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function xw(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=xd(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?function(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=xd(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}var x_=function(){},xS=function(e){this.tokens=[],e&&(this.tokens=e)},xC=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function xM(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var h=l.padding,p=h?h[1]+h[3]:0;if(null!=l.width&&"auto"!==l.width){var f=xv(l.width,r.width)+p;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=xT(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new x_;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:xd(v,c),m||d)u.push(new xS([y]));else{var x=(u[u.length-1]||(u[0]=new xS)).tokens,b=x.length;1===b&&x[0].isLineHolder?x[0]=y:(v||!b||s)&&x.push(y)}}}var xA=mU(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function xT(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var h=e.charAt(d);if("\n"===h){l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0;continue}var p=xd(h,t),f=!r&&!function(e){var t;return(!((t=e.charCodeAt(0))>=32)||!(t<=591))&&(!(t>=880)||!(t<=4351))&&(!(t>=4608)||!(t<=5119))&&(!(t>=7680)||!(t<=8303))||!!xA[e]}(h);if(o.length?c+p>n:i+c+p>n){c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=h,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=h,c=p)):f?(o.push(l),a.push(u),l=h,u=p):(o.push(h),a.push(p));continue}c+=p,f?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h)}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}function xI(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function xk(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function xD(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function xO(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function xP(e,t){var n,r=Math.sqrt((n=t)[0]*n[0]+n[1]*n[1]);return 0===r?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function xR(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var xE=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function xL(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function xN(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function xz(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function xF(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}function xB(e){return e>5e-5||e<-5e-5}var xj=[],xV=[],xH=y3(),xW=Math.abs,xG=function(){var e;function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return xB(this.rotation)||xB(this.x)||xB(this.y)||xB(this.scaleX-1)||xB(this.scaleY-1)||xB(this.skewX)||xB(this.skewY)},t.prototype.updateTransform=function(){var e,t=this.parent&&this.parent.transform,n=this.needLocalTransform(),r=this.transform;if(!(n||t)){r&&(y4(r),this.invTransform=null);return}r=r||y3(),n?this.getLocalTransform(r):y4(r),t&&(n?y6(r,t,r):((e=r)[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5])),this.transform=r,this._resolveGlobalScaleRatio(r)},t.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(xj);var n=xj[0]<0?-1:1,r=xj[1]<0?-1:1,i=((xj[0]-n)*t+n)/xj[0]||0,o=((xj[1]-r)*t+r)/xj[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||y3(),y7(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||y3(),y6(xV,e.invTransform,t),t=xV);var n=this.originX,r=this.originY;(n||r)&&(xH[4]=n,xH[5]=r,y6(xV,t,xH),xV[4]-=n,xV[5]-=r,t=xV),this.setLocalTransform(t)}},t.prototype.getGlobalScale=function(e){var t=this.transform;return(e=e||[],t)?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1])):(e[0]=1,e[1]=1),e},t.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&xN(n,n,r),n},t.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&xN(n,n,r),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&xW(e[0]-1)>1e-10&&xW(e[3]-1)>1e-10?Math.sqrt(xW(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){for(var t=this,n=e,r=0;r<x$.length;r++){var i=x$[r];t[i]=n[i]}},t.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,o=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||r||a||s){var p=n+a,f=r+s;t[4]=-p*i-d*f*o,t[5]=-f*o-h*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=h*i,t[2]=d*o,l&&y8(t,t,l),t[4]+=n+u,t[5]+=r+c,t},t.initDefaultProps=void((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0),t}(),x$=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"],xU={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin(2*Math.PI*(e-t)/.4)+1)},elasticInOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),(e*=2)<1)?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)):n*Math.pow(2,-10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)*.5+1},backIn:function(e){return e*e*(2.70158*e-1.70158)},backOut:function(e){return--e*e*(2.70158*e+1.70158)+1},backInOut:function(e){return(e*=2)<1?e*e*(3.5949095*e-2.5949095)*.5:.5*((e-=2)*e*(3.5949095*e+2.5949095)+2)},bounceIn:function(e){return 1-xU.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*xU.bounceIn(2*e):.5*xU.bounceOut(2*e-1)+.5}},xZ=Math.pow,xY=Math.sqrt,xX=xY(3),xq=1/3,xK=xI(),xQ=xI(),xJ=xI();function x0(e){return e>-1e-8&&e<1e-8}function x1(e){return e>1e-8||e<-1e-8}function x2(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function x5(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function x3(e,t,n,r,i,o){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-i,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,p=0;if(x0(c)&&x0(d))if(x0(s))o[0]=0;else{var f=-l/s;f>=0&&f<=1&&(o[p++]=f)}else{var g=d*d-4*c*h;if(x0(g)){var m=d/c,f=-s/a+m,v=-m/2;f>=0&&f<=1&&(o[p++]=f),v>=0&&v<=1&&(o[p++]=v)}else if(g>0){var y=xY(g),x=c*s+1.5*a*(-d+y),b=c*s+1.5*a*(-d-y),f=(-s-((x=x<0?-xZ(-x,xq):xZ(x,xq))+(b=b<0?-xZ(-b,xq):xZ(b,xq))))/(3*a);f>=0&&f<=1&&(o[p++]=f)}else{var w=Math.acos((2*c*s-3*a*d)/(2*xY(c*c*c)))/3,_=xY(c),S=Math.cos(w),f=(-s-2*_*S)/(3*a),v=(-s+_*(S+xX*Math.sin(w)))/(3*a),C=(-s+_*(S-xX*Math.sin(w)))/(3*a);f>=0&&f<=1&&(o[p++]=f),v>=0&&v<=1&&(o[p++]=v),C>=0&&C<=1&&(o[p++]=C)}}return p}function x4(e,t,n,r,i){var o=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(x0(a)){if(x1(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(x0(c))i[0]=-o/(2*a);else if(c>0){var d=xY(c),u=(-o+d)/(2*a),h=(-o-d)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function x6(e,t,n,r,i,o){var a=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,d=(c-u)*i+u;o[0]=e,o[1]=a,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=r}function x9(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function x8(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function x7(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function be(e,t,n,r,i){var o=(t-e)*r+e,a=(n-t)*r+t,s=(a-o)*r+o;i[0]=e,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}var bt=/cubic-bezier\(([0-9,\.e ]+)\)/;function bn(e){var t=e&&bt.exec(e);if(t){var n=t[1].split(","),r=+vr(n[0]),i=+vr(n[1]),o=+vr(n[2]),a=+vr(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:x3(0,r,o,1,e,s)&&x2(0,i,a,1,s[0])}}}var br=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||vh,this.ondestroy=e.ondestroy||vh,this.onrestart=e.onrestart||vh,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i)if(!this.loop)return!0;else this._startTime=e-r%n,this._pausedTime=0,this.onrestart();return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=mQ(e)?e:xU[e]||bn(e)},e}(),bi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function bo(e){return(e=Math.round(e))<0?0:e>255?255:e}function ba(e){return e<0?0:e>1?1:e}function bs(e){return e.length&&"%"===e.charAt(e.length-1)?bo(parseFloat(e)/100*255):bo(parseInt(e,10))}function bl(e){return e.length&&"%"===e.charAt(e.length-1)?ba(parseFloat(e)/100):ba(parseFloat(e))}function bu(e,t,n){return(n<0?n+=1:n>1&&(n-=1),6*n<1)?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function bc(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function bd(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var bh=new yJ(20),bp=null;function bf(e,t){bp&&bd(bp,t),bp=bh.put(e,bp||t.slice())}function bg(e,t){if(e){t=t||[];var n=bh.get(e);if(n)return bd(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in bi)return bd(t,bi[r]),bf(e,t),t;var i=r.length;if("#"===r.charAt(0)){if(4===i||5===i){var o=parseInt(r.slice(1,4),16);return o>=0&&o<=4095?(bc(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),bf(e,t),t):void bc(t,0,0,0,1)}if(7===i||9===i){var o=parseInt(r.slice(1,7),16);return o>=0&&o<=0xffffff?(bc(t,(0xff0000&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),bf(e,t),t):void bc(t,0,0,0,1)}return}var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?bc(t,+u[0],+u[1],+u[2],1):bc(t,0,0,0,1);c=bl(u.pop());case"rgb":if(u.length>=3)return bc(t,bs(u[0]),bs(u[1]),bs(u[2]),3===u.length?c:bl(u[3])),bf(e,t),t;return void bc(t,0,0,0,1);case"hsla":if(4!==u.length)return void bc(t,0,0,0,1);return u[3]=bl(u[3]),bm(u,t),bf(e,t),t;case"hsl":if(3!==u.length)return void bc(t,0,0,0,1);return bm(u,t),bf(e,t),t;default:return}}bc(t,0,0,0,1)}}function bm(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=bl(e[1]),i=bl(e[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return bc(t=t||[],bo(255*bu(a,o,n+1/3)),bo(255*bu(a,o,n)),bo(255*bu(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function bv(e,t){var n=bg(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return bw(n,4===n.length?"rgba":"rgb")}}function by(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r,i,o,a,s=e*(t.length-1),l=Math.floor(s),u=Math.ceil(s),c=t[l],d=t[u],h=s-l;return n[0]=bo((r=c[0],r+(d[0]-r)*h)),n[1]=bo((i=c[1],i+(d[1]-i)*h)),n[2]=bo((o=c[2],o+(d[2]-o)*h)),n[3]=ba((a=c[3],a+(d[3]-a)*h)),n}}function bx(e,t,n,r){var i,o=bg(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,h=((s-o)/6+l/2)/l;r===s?t=h-d:i===s?t=1/3+c-h:o===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(o),null!=t&&(o[0]=(i=Math.round(i=t))<0?0:i>360?360:i),null!=n&&(o[1]=bl(n)),null!=r&&(o[2]=bl(r)),bw(bm(o),"rgba")}function bb(e,t){var n=bg(e);if(n&&null!=t)return n[3]=ba(t),bw(n,"rgba")}function bw(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return("rgba"===t||"hsva"===t||"hsla"===t)&&(n+=","+e[3]),t+"("+n+")"}}function b_(e,t){var n=bg(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var bS=new yJ(100);function bC(e){if(mJ(e)){var t=bS.get(e);return t||(t=bv(e,-.1),bS.put(e,t)),t}if(m6(e)){var n=mB({},e);return n.colorStops=m$(e.colorStops,function(e){return{offset:e.offset,color:bv(e.color,-.1)}}),n}return e}vO.hasGlobalWindow&&mQ(window.btoa);var bM=Array.prototype.slice;function bA(e,t,n,r){for(var i,o=t.length,a=0;a<o;a++)e[a]=(i=t[a],(n[a]-i)*r+i);return e}function bT(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=t[o]+n[o]*r;return e}function bI(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function bk(e){if(mW(e)){var t=e.length;if(mW(e[0])){for(var n=[],r=0;r<t;r++)n.push(bM.call(e[r]));return n}return bM.call(e)}return e}function bD(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function bO(e){return 4===e||5===e}function bP(e){return 1===e||2===e}var bR=[0,0,0,0],bE=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=t;if(mW(t)){var l=mW(t&&t[0])?2:1;a=l,(1!==l||m1(t[0]))&&(2!==l||m1(t[0][0]))||(o=!0)}else if(m1(t)&&t==t)a=0;else if(mJ(t))if(isNaN(+t)){var u=bg(t);u&&(s=u,a=3)}else a=0;else if(m6(t)){var c=mB({},s);(c.colorStops=m$(t.colorStops,function(e){return{offset:e.offset,color:bg(e.color)}}),"linear"===t.type)?a=4:"radial"===t.type&&(a=5),s=c}0===i?this.valType=a:(a!==this.valType||6===a)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=mQ(n)?n:xU[n]||bn(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=bP(r),l=bO(r),u=0;u<i;u++){var c=n[u],d=c.value,h=o.value;c.percent=c.time/e,!a&&(s&&u!==i-1?function(e,t,n){if(e.push&&t.push){var r=e.length,i=t.length;if(r!==i)if(r>i)e.length=i;else for(var o=r;o<i;o++)e.push(1===n?t[o]:bM.call(t[o]));for(var a=e[0]&&e[0].length,o=0;o<e.length;o++)if(1===n)isNaN(e[o])&&(e[o]=t[o]);else for(var s=0;s<a;s++)isNaN(e[o][s])&&(e[o][s]=t[o][s])}}(d,h,r):l&&function(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,r);s++)i.push({offset:a.offset,color:a.color.slice()})}(d.colorStops,h.colorStops))}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-p:3===r?n[u].additiveValue=bT([],n[u].value,p,-1):bP(r)&&(n[u].additiveValue=1===r?bT([],n[u].value,p,-1):bI([],n[u].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=3===s,h=this._lastFr,p=Math.min;if(1===u)r=i=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=p(h+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;n<u&&!(l[n].percent>t);n++);n=p(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var f=i.percent-r.percent,g=0===f?1:p((t-r.percent)/f,1);i.easingFunc&&(g=i.easingFunc(g));var m=o?this._additiveValue:d?bR:e[c];if((bP(s)||d)&&!m&&(m=this._additiveValue=[]),this.discrete)e[c]=g<1?r.rawValue:i.rawValue;else if(bP(s))1===s?bA(m,r[a],i[a],g):function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s,l=0;l<o;l++)e[a][l]=(s=t[a][l],(n[a][l]-s)*r+s)}}(m,r[a],i[a],g);else if(bO(s)){var v,y,x,b,w,_=r[a],S=i[a],C=4===s;(e[c]={type:C?"linear":"radial",x:(v=_.x,(S.x-v)*g+v),y:(y=_.y,(S.y-y)*g+y),colorStops:m$(_.colorStops,function(e,t){var n,r=S.colorStops[t];return{offset:(n=e.offset,(r.offset-n)*g+n),color:bD(bA([],e.color,r.color,g))}}),global:S.global},C)?(e[c].x2=(x=_.x2,(S.x2-x)*g+x),e[c].y2=(b=_.y2,(S.y2-b)*g+b)):e[c].r=(w=_.r,(S.r-w)*g+w)}else if(d)bA(m,r[a],i[a],g),o||(e[c]=bD(m));else{var M,A=(M=r[a],(i[a]-M)*g+M);o?this._additiveValue=A:e[c]=A}o&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(bg(e[n],bR),bT(bR,bR,r,1),e[n]=bD(bR)):1===t?bT(e[n],e[n],r,1):2===t&&bI(e[n],e[n],r,1)},e}(),bL=function(){function e(e,t,n,r){(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r)?mN("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,mY(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o],s=i[a];if(!s){s=i[a]=new bE(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,3===u.valType&&l&&(l=bD(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,bk(l),r),this._trackKeys.push(a)}s.addKeyframe(e,bk(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new br({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,o=0;o<r.length;o++)if(r[o]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var o=0;o<n.length;o++)n[o].step(t._target,e);var a=t._onframeCbs;if(a)for(var o=0;o<a.length;o++)a[o](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return m$(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}for(var a=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],o=this._tracks[i];if(!(!o||o.isFinished())){var a=o.keyframes,s=a[n?0:a.length-1];s&&(e[i]=bk(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||mY(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var o=i.keyframes;if(o.length>1){var a=o.pop();i.addKeyframe(a.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),bN=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[e].length-1,u=i[e][l];return u&&u.callAtLast?i[e].splice(l,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(e,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=t[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,o-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),bz=1;vO.hasGlobalWindow&&(bz=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var bF=bz,bB="#333",bj="#ccc",bV="__zr_normal__",bH=x$.concat(["ignore"]),bW=mU(x$,function(e,t){return e[t]=!0,e},{ignore:!1}),bG={},b$=new xu(0,0,0,0),bU=function(){function e(e){this.id=mL++,this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;if(i.copyTransform(t),null!=n.position){n.layoutRect?b$.copy(n.layoutRect):b$.copy(this.getBoundingRect()),r||b$.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(bG,n,b$):xy(bG,n,b$),i.x=bG.x,i.y=bG.y,o=bG.align,a=bG.verticalAlign;var u=n.origin;if(u&&null!=n.rotation){var c=void 0,d=void 0;"center"===u?(c=.5*b$.width,d=.5*b$.height):(c=xv(u[0],b$.width),d=xv(u[1],b$.height)),l=!0,i.originX=-i.x+c+(r?0:b$.x),i.originY=-i.y+d+(r?0:b$.y)}}null!=n.rotation&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],l||(i.originX=-h[0],i.originY=-h[1]));var p=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,f=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,m=void 0,v=void 0;p&&this.canBeInsideText()?(g=n.insideFill,m=n.insideStroke,(null==g||"auto"===g)&&(g=this.getInsideTextFill()),(null==m||"auto"===m)&&(m=this.getInsideTextStroke(g),v=!0)):(g=n.outsideFill,m=n.outsideStroke,(null==g||"auto"===g)&&(g=this.getOutsideFill()),(null==m||"auto"===m)&&(m=this.getOutsideStroke(g),v=!0)),((g=g||"#000")!==f.fill||m!==f.stroke||v!==f.autoStroke||o!==f.align||a!==f.verticalAlign)&&(s=!0,f.fill=g,f.stroke=m,f.autoStroke=v,f.align=o,f.verticalAlign=a,t.setDefaultTextStyle(f)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?bj:bB},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&bg(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+255*!i*(1-r);return n[3]=1,bw(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},mB(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(m2(e))for(var n=mY(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!r.getLoop()&&(!i||i===bV)){var o=r.targetName,a=o?t[o]:t;r.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,bH)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(bV,!1,e)},e.prototype.useState=function(e,t,n,r){var i,o=e===bV;if(this.hasState()||!o){var a=this.currentStates,s=this.stateTransition;if(!(mV(a,e)>=0)||!t&&1!==a.length){if(this.stateProxy&&!o&&(i=this.stateProxy(e)),i||(i=this.states&&this.states[e]),!i&&!o)return void mN("State "+e+" not exists.");o||this.saveCurrentToNormalState(i);var l=!!(i&&i.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,i,this._normalState,t,!n&&!this.__inHover&&s&&s.duration>0,s);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),i}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,o=e.length,a=o===i.length;if(a){for(var s=0;s<o;s++)if(e[s]!==i[s]){a=!1;break}}if(!a){for(var s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&r.push(u)}var c=r[o-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=mV(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=mV(r,e),o=mV(r,t)>=0;i>=0?o?r.splice(i,1):r[i]=t:n&&!o&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];mB(n,i),i.textConfig&&mB(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,i,o){var a=!(t&&r);t&&t.textConfig?(this.textConfig=mB({},r?this.textConfig:n.textConfig),mB(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<bH.length;u++){var c=bH[u],d=i&&bW[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!i)for(var u=0;u<this.animators.length;u++){var h=this.animators[u],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||n)[p]:t||n)}l&&this._transitionState(e,s,o)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new xG,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),mB(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new bL(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=mV(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],o=0;o<r;o++){var a=n[o];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){bZ(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){bZ(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=bZ(this,t,n,r),o=0;o<i.length;o++)i[o].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){return this[n]||o(this,this[n]=[]),this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,o(this,e)}});function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function bZ(e,t,n,r,i){var o=[];!function e(t,n,r,i,o,a,s,l){for(var u=mY(i),c=o.duration,d=o.delay,h=o.additive,p=o.setToFinal,f=!m2(a),g=t.animators,m=[],v=0;v<u.length;v++){var y=u[v],x=i[y];if(null!=x&&null!=r[y]&&(f||a[y]))if(!m2(x)||mW(x)||m6(x))m.push(y);else{if(n){l||(r[y]=x,t.updateDuringAnimation(n));continue}e(t,y,r[y],x,o,a&&a[y],s,l)}else l||(r[y]=x,t.updateDuringAnimation(n),m.push(y))}var b=m.length;if(!h&&b)for(var w=0;w<g.length;w++){var _=g[w];if(_.targetName===n&&_.stopTracks(m)){var S=mV(g,_);g.splice(S,1)}}if(o.force||(b=(m=mZ(m,function(e){var t,n;return!((t=i[e])===(n=r[e])||mW(t)&&mW(n)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(t,n))})).length),b>0||o.force&&!s.length){var C=void 0,M=void 0,A=void 0;if(l){M={},p&&(C={});for(var w=0;w<b;w++){var y=m[w];M[y]=r[y],p?C[y]=i[y]:r[y]=i[y]}}else if(p){A={};for(var w=0;w<b;w++){var y=m[w];A[y]=bk(r[y]),function(e,t,n){if(mW(t[n]))if(mW(e[n])||(e[n]=[]),m3(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),bY(e[n],t[n],r))}else{var i=t[n],o=e[n],a=i.length;if(mW(i[0]))for(var s=i[0].length,l=0;l<a;l++)o[l]?bY(o[l],i[l],s):o[l]=Array.prototype.slice.call(i[l]);else bY(o,i,a);o.length=i.length}else e[n]=t[n]}(r,i,y)}}var _=new bL(r,!1,!1,h?mZ(g,function(e){return e.targetName===n}):null);_.targetName=n,o.scope&&(_.scope=o.scope),p&&C&&_.whenWithKeys(0,C,m),A&&_.whenWithKeys(0,A,m),_.whenWithKeys(null==c?500:c,l?M:i,m).delay(d||0),t.addAnimator(_,n),s.push(_)}}(e,"",e,t,n=n||{},r,o,i);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},d=function(){--a<=0&&(s?l&&l():u&&u())};!a&&l&&l(),o.length>0&&n.during&&o[0].during(function(e,t){n.during(t)});for(var h=0;h<o.length;h++){var p=o[h];c&&p.done(c),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return o}function bY(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}mH(bU,bN),mH(bU,xG);var bX="__zr_style_"+Math.round(10*Math.random()),bq={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},bK={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};bq[bX]=!0;var bQ=["z","z2","invisible"],bJ=["invisible"],b0=function(e){var t;function n(t){return e.call(this,t)||this}return yq(n,e),n.prototype._init=function(t){for(var n=mY(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(e,t,n,r){var i,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(i=this,o=e,a=t,b1.copy(i.getBoundingRect()),i.transform&&b1.applyTransform(i.transform),b2.width=o,b2.height=a,!b1.intersect(b2))||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(r&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},n.prototype.contain=function(e,t){return this.rectContain(e,t)},n.prototype.traverse=function(e,t){e.call(t,this)},n.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},n.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new xu(0,0,0,0)),t?xu.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},n.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new xu(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(e){return this.animate("style",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},n.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:mB(this.style,e),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(e){return vu(bq,e)},n.prototype.useStyle=function(e){e[bX]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},n.prototype.isStyleObject=function(e){return e[bX]},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,bQ)},n.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=mY(u),d=0;d<c.length;d++){var h=c[d];h in s&&(s[h]=s[h],this.style[h]=u[h])}for(var p=mY(s),d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);for(var f=this.__inHover?bJ:bQ,d=0;d<f.length;d++){var h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},n.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},n.prototype._mergeStyle=function(e,t){return mB(e,t),e},n.prototype.getAnimationStyleProps=function(){return bK},n.initDefaultProps=void((t=n.prototype).type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=3),n}(bU),b1=new xu(0,0,0,0),b2=new xu(0,0,0,0),b5=Math.min,b3=Math.max,b4=Math.sin,b6=Math.cos,b9=2*Math.PI,b8=xI(),b7=xI(),we=xI();function wt(e,t,n,r,i,o){i[0]=b5(e,n),i[1]=b5(t,r),o[0]=b3(e,n),o[1]=b3(t,r)}var wn=[],wr=[],wi={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},wo=[],wa=[],ws=[],wl=[],wu=[],wc=[],wd=Math.min,wh=Math.max,wp=Math.cos,wf=Math.sin,wg=Math.abs,wm=Math.PI,wv=2*wm,wy="u">typeof Float32Array,wb=[];function ww(e){return Math.round(e/wm*1e8)/1e8%2*wm}function w_(e,t){var n=ww(e[0]);n<0&&(n+=wv);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=wv?i=n+wv:t&&n-i>=wv?i=n-wv:!t&&n>i?i=n+(wv-ww(n-i)):t&&n<i&&(i=n-(wv-ww(i-n))),e[0]=n,e[1]=i}var wS=function(){var e;function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=wg(n/bF/e)||0,this._uy=wg(n/bF/t)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(wi.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},t.prototype.lineTo=function(e,t){var n=wg(e-this._xi),r=wg(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(wi.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(wi.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(wi.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},t.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),wb[0]=r,wb[1]=i,w_(wb,o),r=wb[0];var a=(i=wb[1])-r;return this.addData(wi.A,e,t,n,n,r,a,0,+!o),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=wp(i)*n+e,this._yi=wf(i)*n+t,this},t.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},t.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(wi.R,e,t,n,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(wi.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&wy&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},t.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();wy&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(var i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},t.prototype.addData=function(e,t,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,wy&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){ws[0]=ws[1]=wu[0]=wu[1]=Number.MAX_VALUE,wl[0]=wl[1]=wc[0]=wc[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(n=t[e],r=t[e+1],i=n,o=r),a){case wi.M:n=i=t[e++],r=o=t[e++],wu[0]=i,wu[1]=o,wc[0]=i,wc[1]=o;break;case wi.L:wt(n,r,t[e],t[e+1],wu,wc),n=t[e++],r=t[e++];break;case wi.C:!function(e,t,n,r,i,o,a,s,l,u){var c=x4(e,n,i,a,wn);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<c;d++){var h=x2(e,n,i,a,wn[d]);l[0]=b5(h,l[0]),u[0]=b3(h,u[0])}c=x4(t,r,o,s,wr);for(var d=0;d<c;d++){var p=x2(t,r,o,s,wr[d]);l[1]=b5(p,l[1]),u[1]=b3(p,u[1])}l[0]=b5(e,l[0]),u[0]=b3(e,u[0]),l[0]=b5(a,l[0]),u[0]=b3(a,u[0]),l[1]=b5(t,l[1]),u[1]=b3(t,u[1]),l[1]=b5(s,l[1]),u[1]=b3(s,u[1])}(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],wu,wc),n=t[e++],r=t[e++];break;case wi.Q:!function(e,t,n,r,i,o,a,s){var l=b3(b5(x7(e,n,i),1),0),u=b3(b5(x7(t,r,o),1),0),c=x9(e,n,i,l),d=x9(t,r,o,u);a[0]=b5(e,i,c),a[1]=b5(t,o,d),s[0]=b3(e,i,c),s[1]=b3(t,o,d)}(n,r,t[e++],t[e++],t[e],t[e+1],wu,wc),n=t[e++],r=t[e++];break;case wi.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],h=t[e++],p=t[e++]+h;e+=1;var f=!t[e++];s&&(i=wp(h)*c+l,o=wf(h)*d+u),function(e,t,n,r,i,o,a,s,l){var u=Math.abs(i-o);if(u%b9<1e-4&&u>1e-4){s[0]=e-n,s[1]=t-r,l[0]=e+n,l[1]=t+r;return}if(b8[0]=b6(i)*n+e,b8[1]=b4(i)*r+t,b7[0]=b6(o)*n+e,b7[1]=b4(o)*r+t,xz(s,b8,b7),xF(l,b8,b7),(i%=b9)<0&&(i+=b9),(o%=b9)<0&&(o+=b9),i>o&&!a?o+=b9:i<o&&a&&(i+=b9),a){var c=o;o=i,i=c}for(var d=0;d<o;d+=Math.PI/2)d>i&&(we[0]=b6(d)*n+e,we[1]=b4(d)*r+t,xz(s,we,s),xF(l,we,l))}(l,u,c,d,h,p,f,wu,wc),n=wp(p)*c+l,r=wf(p)*d+u;break;case wi.R:wt(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],wu,wc);break;case wi.Z:n=i,r=o}xz(ws,ws,wu),xF(wl,wl,wc)}return 0===e&&(ws[0]=ws[1]=wl[0]=wl[1]=0),new xu(ws[0],ws[1],wl[0]-ws[0],wl[1]-ws[1])},t.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var h=e[d++],p=1===d;p&&(i=e[d],o=e[d+1],a=i,s=o);var f=-1;switch(h){case wi.M:i=a=e[d++],o=s=e[d++];break;case wi.L:var g=e[d++],m=e[d++],v=g-i,y=m-o;(wg(v)>n||wg(y)>r||d===t-1)&&(f=Math.sqrt(v*v+y*y),i=g,o=m);break;case wi.C:var x=e[d++],b=e[d++],g=e[d++],m=e[d++],w=e[d++],_=e[d++];f=function(e,t,n,r,i,o,a,s){for(var l=e,u=t,c=0,d=1;d<=10;d++){var h=.1*d,p=x2(e,n,i,a,h),f=x2(t,r,o,s,h),g=p-l,m=f-u;c+=Math.sqrt(g*g+m*m),l=p,u=f}return c}(i,o,x,b,g,m,w,_),i=w,o=_;break;case wi.Q:var x=e[d++],b=e[d++],g=e[d++],m=e[d++];f=function(e,t,n,r,i,o){for(var a=e,s=t,l=0,u=1;u<=10;u++){var c=.1*u,d=x9(e,n,i,c),h=x9(t,r,o,c),p=d-a,f=h-s;l+=Math.sqrt(p*p+f*f),a=d,s=h}return l}(i,o,x,b,g,m),i=g,o=m;break;case wi.A:var S=e[d++],C=e[d++],M=e[d++],A=e[d++],T=e[d++],I=e[d++],k=I+T;d+=1,p&&(a=wp(T)*M+S,s=wf(T)*A+C),f=wh(M,A)*wd(wv,Math.abs(I)),i=wp(k)*M+S,o=wf(k)*A+C;break;case wi.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case wi.Z:var v=a-i,y=s-o;f=Math.sqrt(v*v+y*y),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,d,h=this.data,p=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))t:for(var b=0;b<g;){var w=h[b++],_=1===b;switch(_&&(i=h[b],o=h[b+1],n=i,r=o),w!==wi.L&&x>0&&(e.lineTo(c,d),x=0),w){case wi.M:n=i=h[b++],r=o=h[b++],e.moveTo(i,o);break;case wi.L:a=h[b++],s=h[b++];var S=wg(a-i),C=wg(s-o);if(S>p||C>f){if(m){var M=l[y++];if(v+M>u){var A=(u-v)/M;e.lineTo(i*(1-A)+a*A,o*(1-A)+s*A);break t}v+=M}e.lineTo(a,s),i=a,o=s,x=0}else{var T=S*S+C*C;T>x&&(c=a,d=s,x=T)}break;case wi.C:var I=h[b++],k=h[b++],D=h[b++],O=h[b++],P=h[b++],R=h[b++];if(m){var M=l[y++];if(v+M>u){var A=(u-v)/M;x6(i,I,D,P,A,wo),x6(o,k,O,R,A,wa),e.bezierCurveTo(wo[1],wa[1],wo[2],wa[2],wo[3],wa[3]);break t}v+=M}e.bezierCurveTo(I,k,D,O,P,R),i=P,o=R;break;case wi.Q:var I=h[b++],k=h[b++],D=h[b++],O=h[b++];if(m){var M=l[y++];if(v+M>u){var A=(u-v)/M;be(i,I,D,A,wo),be(o,k,O,A,wa),e.quadraticCurveTo(wo[1],wa[1],wo[2],wa[2]);break t}v+=M}e.quadraticCurveTo(I,k,D,O),i=D,o=O;break;case wi.A:var E=h[b++],L=h[b++],N=h[b++],z=h[b++],F=h[b++],B=h[b++],j=h[b++],V=!h[b++],H=N>z?N:z,W=wg(N-z)>.001,G=F+B,$=!1;if(m){var M=l[y++];v+M>u&&(G=F+B*(u-v)/M,$=!0),v+=M}if(W&&e.ellipse?e.ellipse(E,L,N,z,j,F,G,V):e.arc(E,L,H,F,G,V),$)break t;_&&(n=wp(F)*N+E,r=wf(F)*z+L),i=wp(G)*N+E,o=wf(G)*z+L;break;case wi.R:n=i=h[b],r=o=h[b+1],a=h[b++],s=h[b++];var U=h[b++],Z=h[b++];if(m){var M=l[y++];if(v+M>u){var Y=u-v;e.moveTo(a,s),e.lineTo(a+wd(Y,U),s),(Y-=U)>0&&e.lineTo(a+U,s+wd(Y,Z)),(Y-=Z)>0&&e.lineTo(a+wh(U-Y,0),s+Z),(Y-=U)>0&&e.lineTo(a,s+wh(Z-Y,0));break t}v+=M}e.rect(a,s,U,Z);break;case wi.Z:if(m){var M=l[y++];if(v+M>u){var A=(u-v)/M;e.lineTo(i*(1-A)+n*A,o*(1-A)+r*A);break t}v+=M}e.closePath(),i=n,o=r}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=wi,t.initDefaultProps=void((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0),t}();function wC(e,t,n,r,i,o,a){if(0===i)return!1;var s=0,l=e;if(a>t+i&&a>r+i||a<t-i&&a<r-i||o>e+i&&o>n+i||o<e-i&&o<n-i)return!1;if(e===n)return Math.abs(o-e)<=i/2;s=(t-r)/(e-n);var u=s*o-a+(l=(e*r-n*t)/(e-n));return u*u/(s*s+1)<=i/2*i/2}var wM=2*Math.PI;function wA(e){return(e%=wM)<0&&(e+=wM),e}var wT=2*Math.PI;function wI(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r||r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;(1===a||0===a)&&(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var wk=wS.CMD,wD=2*Math.PI,wO=[-1,-1,-1],wP=[-1,-1];function wR(e,t,n,r,i){for(var o,a,s=e.data,l=e.len(),u=0,c=0,d=0,h=0,p=0,f=0;f<l;){var g,m,v,y,x,b,w,_,S,C,M,A,T,I,k=s[f++],D=1===f;switch(k===wk.M&&f>1&&!n&&(u+=wI(c,d,h,p,r,i)),D&&(c=s[f],d=s[f+1],h=c,p=d),k){case wk.M:h=s[f++],p=s[f++],c=h,d=p;break;case wk.L:if(n){if(wC(c,d,s[f],s[f+1],t,r,i))return!0}else u+=wI(c,d,s[f],s[f+1],r,i)||0;c=s[f++],d=s[f++];break;case wk.C:if(n){if(g=c,m=d,v=s[f++],y=s[f++],x=s[f++],b=s[f++],w=s[f],_=s[f+1],0!==t&&(!(i>m+t)||!(i>y+t)||!(i>b+t)||!(i>_+t))&&(!(i<m-t)||!(i<y-t)||!(i<b-t)||!(i<_-t))&&(!(r>g+t)||!(r>v+t)||!(r>x+t)||!(r>w+t))&&(!(r<g-t)||!(r<v-t)||!(r<x-t)||!(r<w-t))&&function(e,t,n,r,i,o,a,s,l,u){var c,d,h,p,f,g=.005,m=1/0;xK[0]=l,xK[1]=u;for(var v=0;v<1;v+=.05)xQ[0]=x2(e,n,i,a,v),xQ[1]=x2(t,r,o,s,v),(p=xE(xK,xQ))<m&&(c=v,m=p);m=1/0;for(var y=0;y<32&&!(g<1e-4);y++)d=c-g,h=c+g,xQ[0]=x2(e,n,i,a,d),xQ[1]=x2(t,r,o,s,d),p=xE(xQ,xK),d>=0&&p<m?(c=d,m=p):(xJ[0]=x2(e,n,i,a,h),xJ[1]=x2(t,r,o,s,h),f=xE(xJ,xK),h<=1&&f<m?(c=h,m=f):g*=.5);return xY(m)}(g,m,v,y,x,b,w,_,r,i)<=t/2)return!0}else u+=function(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c=x3(t,r,o,s,u,wO);if(0===c)return 0;for(var d=0,h=-1,p=void 0,f=void 0,g=0;g<c;g++){var m=wO[g],v=0===m||1===m?.5:1;x2(e,n,i,a,m)<l||(h<0&&(h=x4(t,r,o,s,wP),wP[1]<wP[0]&&h>1&&function(){var e=wP[0];wP[0]=wP[1],wP[1]=e}(),p=x2(t,r,o,s,wP[0]),h>1&&(f=x2(t,r,o,s,wP[1]))),2===h?m<wP[0]?d+=p<t?v:-v:m<wP[1]?d+=f<p?v:-v:d+=s<f?v:-v:m<wP[0]?d+=p<t?v:-v:d+=s<p?v:-v)}return d}(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],r,i)||0;c=s[f++],d=s[f++];break;case wk.Q:if(n){if(S=c,C=d,M=s[f++],A=s[f++],T=s[f],I=s[f+1],0!==t&&(!(i>C+t)||!(i>A+t)||!(i>I+t))&&(!(i<C-t)||!(i<A-t)||!(i<I-t))&&(!(r>S+t)||!(r>M+t)||!(r>T+t))&&(!(r<S-t)||!(r<M-t)||!(r<T-t))&&function(e,t,n,r,i,o,a,s){var l,u=.005,c=1/0;xK[0]=a,xK[1]=s;for(var d=0;d<1;d+=.05){xQ[0]=x9(e,n,i,d),xQ[1]=x9(t,r,o,d);var h=xE(xK,xQ);h<c&&(l=d,c=h)}c=1/0;for(var p=0;p<32&&!(u<1e-4);p++){var f=l-u,g=l+u;xQ[0]=x9(e,n,i,f),xQ[1]=x9(t,r,o,f);var h=xE(xQ,xK);if(f>=0&&h<c)l=f,c=h;else{xJ[0]=x9(e,n,i,g),xJ[1]=x9(t,r,o,g);var m=xE(xJ,xK);g<=1&&m<c?(l=g,c=m):u*=.5}}return xY(c)}(S,C,M,A,T,I,r,i)<=t/2)return!0}else u+=function(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(x0(o)){if(x1(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(x0(c)){var u=-a/(2*o);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var d=xY(c),u=(-a+d)/(2*o),h=(-a-d)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}(t,r,o,s,wO);if(0===l)return 0;var u=x7(t,r,o);if(u>=0&&u<=1){for(var c=0,d=x9(t,r,o,u),h=0;h<l;h++){var p=0===wO[h]||1===wO[h]?.5:1,f=x9(e,n,i,wO[h]);f<a||(wO[h]<u?c+=d<t?p:-p:c+=o<d?p:-p)}return c}var p=0===wO[0]||1===wO[0]?.5:1,f=x9(e,n,i,wO[0]);return f<a?0:o<t?p:-p}(c,d,s[f++],s[f++],s[f],s[f+1],r,i)||0;c=s[f++],d=s[f++];break;case wk.A:var O=s[f++],P=s[f++],R=s[f++],E=s[f++],L=s[f++],N=s[f++];f+=1;var z=!!(1-s[f++]);o=Math.cos(L)*R+O,a=Math.sin(L)*E+P,D?(h=o,p=a):u+=wI(c,d,o,a,r,i);var F=(r-O)*E/R+O;if(n){if(function(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=Math.sqrt((s-=e)*s+(l-=t)*l);if(u-a>n||u+a<n)return!1;if(Math.abs(r-i)%wT<1e-4)return!0;if(o){var c=r;r=wA(i),i=wA(c)}else r=wA(r),i=wA(i);r>i&&(i+=wT);var d=Math.atan2(l,s);return d<0&&(d+=wT),d>=r&&d<=i||d+wT>=r&&d+wT<=i}(O,P,E,L,L+N,z,t,F,i))return!0}else u+=function(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);wO[0]=-l,wO[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=wD-1e-4){r=0,i=wD;var c=o?1:-1;return a>=wO[0]+e&&a<=wO[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=wD,i+=wD);for(var h=0,p=0;p<2;p++){var f=wO[p];if(f+e>a){var g=Math.atan2(s,f),c=o?1:-1;g<0&&(g=wD+g),(g>=r&&g<=i||g+wD>=r&&g+wD<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),h+=c)}}return h}(O,P,E,L,L+N,z,F,i);c=Math.cos(L+N)*R+O,d=Math.sin(L+N)*E+P;break;case wk.R:h=c=s[f++],p=d=s[f++];var B=s[f++],j=s[f++];if(o=h+B,a=p+j,n){if(wC(h,p,o,p,t,r,i)||wC(o,p,o,a,t,r,i)||wC(o,a,h,a,t,r,i)||wC(h,a,h,p,t,r,i))return!0}else u+=wI(o,p,o,a,r,i),u+=wI(h,a,h,p,r,i);break;case wk.Z:if(n){if(wC(c,d,h,p,t,r,i))return!0}else u+=wI(c,d,h,p,r,i);c=h,d=p}}return n||1e-4>Math.abs(d-p)||(u+=wI(c,d,h,p,r,i)||0),0!==u}var wE=mj({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},bq),wL={style:mj({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bK.style)},wN=x$.concat(["invisible","culling","z","z2","zlevel","parent"]);let wz=function(e){var t;function n(t){return e.call(this,t)||this}return yq(n,e),n.prototype.update=function(){var t=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new n;i.buildPath===n.prototype.buildPath&&(i.buildPath=function(e){t.buildPath(e,t.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<wN.length;++s)i[wN[s]]=this[wN[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(t){var n=mY(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?mB(this.style,a):this.useStyle(a):"shape"===o?mB(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(mJ(e)){var t=b_(e,0);return t>.5?bB:t>.2?"#eee":bj}else if(e)return bj}return bB},n.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(mJ(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==.4>b_(e,0))return t}},n.prototype.buildPath=function(e,t,n){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(e){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},n.prototype.createPathProxy=function(){this.path=new wS(!1)},n.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},n.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},n.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},n.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),wR(o,a/s,!0,e,t)))return!0}if(this.hasFill())return wR(o,0,!1,e,t)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(e){return this.animate("shape",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},n.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:mB(n,e),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(e){return vu(wE,e)},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=mB({},this.shape))},n.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=mB({},r.shape),mB(s,n.shape)):(s=mB({},i?this.shape:r.shape),mB(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=mB({},this.shape);for(var u={},c=mY(s),d=0;d<c.length;d++){var h=c[d];"object"==typeof s[h]?this.shape[h]=s[h]:u[h]=s[h]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},n.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},n.prototype.getAnimationStyleProps=function(){return wL},n.prototype.isZeroArea=function(){return!1},n.extend=function(e){var t=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return yq(n,t),n.prototype.getDefaultStyle=function(){return mz(e.style)},n.prototype.getDefaultShape=function(){return mz(e.shape)},n}(n);for(var r in e)"function"==typeof e[r]&&(t.prototype[r]=e[r]);return t},n.initDefaultProps=void((t=n.prototype).type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=7),n}(b0);var wF=mj({strokeFirst:!0,font:mw,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},wE),wB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yq(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return vu(wF,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=xp(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(b0);wB.prototype.type="tspan";var wj=mj({x:0,y:0},bq),wV={style:mj({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},bK.style)},wH=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yq(t,e),t.prototype.createStyle=function(e){return vu(wj,e)},t.prototype._getSize=function(e){var t,n=this.style,r=n[e];if(null!=r)return r;var i=(t=n.image)&&"string"!=typeof t&&t.width&&t.height?n.image:this.__image;if(!i)return 0;var o="width"===e?"height":"width",a=n[o];return null==a?i[e]:i[e]/i[o]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return wV},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new xu(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(b0);wH.prototype.type="image";let wW=wH;var wG=Math.round;function w$(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s&&(wG(2*r)===wG(2*i)&&(e.x1=e.x2=wZ(r,s,!0)),wG(2*o)===wG(2*a)&&(e.y1=e.y2=wZ(o,s,!0))),e}}function wU(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s&&(e.x=wZ(r,s,!0),e.y=wZ(i,s,!0),e.width=Math.max(wZ(r+o,s,!1)-e.x,+(0!==o)),e.height=Math.max(wZ(i+a,s,!1)-e.y,+(0!==a))),e}}function wZ(e,t,n){if(!t)return e;var r=wG(2*e);return(r+wG(t))%2==0?r/2:(r+(n?1:-1))/2}var wY=function(){this.x=0,this.y=0,this.width=0,this.height=0},wX={},wq=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultShape=function(){return new wY},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,r,i,o,a,s,l,u,c,d,h,p,f,g,m,v=wU(wX,t,this.style);p=v.x,f=v.y,g=v.width,m=v.height,v.r=t.r,t=v}else p=t.x,f=t.y,g=t.width,m=t.height;t.r?(l=(n=t).x,u=n.y,c=n.width,d=n.height,h=n.r,c<0&&(l+=c,c=-c),d<0&&(u+=d,d=-d),"number"==typeof h?r=i=o=a=h:h instanceof Array?1===h.length?r=i=o=a=h[0]:2===h.length?(r=o=h[0],i=a=h[1]):3===h.length?(r=h[0],i=a=h[1],o=h[2]):(r=h[0],i=h[1],o=h[2],a=h[3]):r=i=o=a=0,r+i>c&&(s=r+i,r*=c/s,i*=c/s),o+a>c&&(s=o+a,o*=c/s,a*=c/s),i+o>d&&(s=i+o,i*=d/s,o*=d/s),r+a>d&&(s=r+a,r*=d/s,a*=d/s),e.moveTo(l+r,u),e.lineTo(l+c-i,u),0!==i&&e.arc(l+c-i,u+i,i,-Math.PI/2,0),e.lineTo(l+c,u+d-o),0!==o&&e.arc(l+c-o,u+d-o,o,0,Math.PI/2),e.lineTo(l+a,u+d),0!==a&&e.arc(l+a,u+d-a,a,Math.PI/2,Math.PI),e.lineTo(l,u+r),0!==r&&e.arc(l+r,u+r,r,Math.PI,1.5*Math.PI)):e.rect(p,f,g,m)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(wz);wq.prototype.type="rect";let wK=wq;var wQ={fill:"#000"},wJ={style:mj({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},bK.style)},w0=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=wQ,n.attr(t),n}return yq(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,w4(e=this.style),mG(e.rich,w4),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new xu(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||wQ},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return mB(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=mY(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},mB(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return wJ},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||mw,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a=xm(o),s=m8(t.lineHeight,a),l=!!t.backgroundColor,u="truncate"===t.lineOverflow,c=t.width,d=(n=null!=c&&("break"===r||"breakAll"===r)?e?xT(e,t.font,c,"breakAll"===r,0).lines:[]:e?e.split("\n"):[]).length*s,h=m8(t.height,d);if(d>h&&u){var p=Math.floor(h/s);n=n.slice(0,p)}if(e&&"truncate"===r&&null!=c)for(var f=xb(c,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g<n.length;g++)n[g]=xw(n[g],f);for(var m=h,v=0,g=0;g<n.length;g++)v=Math.max(xd(n[g],o),v);null==c&&(c=v);var y=v;return i&&(m+=i[0]+i[2],y+=i[1]+i[3],c+=i[1]+i[3]),l&&(y=c),{lines:n,height:h,outerWidth:y,outerHeight:m,lineHeight:s,calculatedLineHeight:a,contentWidth:v,contentHeight:d,width:c}}(w7(e),e),i=_e(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,h=e.x||0,p=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=h,v=xg(p,r.contentHeight,g);if(i||n){var y=xf(h,s,f),x=xg(p,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=w8(h,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var b=0,w=!1,_=w9("fill"in e?e.fill:(w=!0,d.fill)),S=w6("stroke"in e?e.stroke:o||d.autoStroke&&!w?null:(b=2,d.stroke)),C=e.textShadowBlur>0,M=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),A=r.calculatedLineHeight,T=0;T<u.length;T++){var I=this._getOrCreateChild(wB),k=I.createStyle();I.useStyle(k),k.text=u[T],k.x=m,k.y=v,f&&(k.textAlign=f),k.textBaseline="middle",k.opacity=e.opacity,k.strokeFirst=!0,C&&(k.shadowBlur=e.textShadowBlur||0,k.shadowColor=e.textShadowColor||"transparent",k.shadowOffsetX=e.textShadowOffsetX||0,k.shadowOffsetY=e.textShadowOffsetY||0),k.stroke=S,k.fill=_,S&&(k.lineWidth=e.lineWidth||b,k.lineDash=e.lineDash,k.lineDashOffset=e.lineDashOffset||0),k.font=t,w3(k,e),v+=c,M&&I.setBoundingRect(new xu(xf(k.x,e.width,k.textAlign),xg(k.y,A,k.textBaseline),l,A))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n,r=new xC;if(null!=e&&(e+=""),!e)return r;for(var i=t.width,o=t.height,a=t.overflow,s=("break"===a||"breakAll"===a)&&null!=i?{width:i,accumWidth:0,breakAll:"breakAll"===a}:null,l=xx.lastIndex=0;null!=(n=xx.exec(e));){var u=n.index;u>l&&xM(r,e.substring(l,u),t,s),xM(r,n[2],t,s,n[1]),l=xx.lastIndex}l<e.length&&xM(r,e.substring(l,e.length),t,s);var c=[],d=0,h=0,p=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,h=Math.max(h,t)}n:for(var v=0;v<r.lines.length;v++){for(var y=r.lines[v],x=0,b=0,w=0;w<y.tokens.length;w++){var _=y.tokens[w],S=_.styleName&&t.rich[_.styleName]||{},C=_.textPadding=S.padding,M=C?C[1]+C[3]:0,A=_.font=S.font||t.font;_.contentHeight=xm(A);var T=m8(S.height,_.contentHeight);if(_.innerHeight=T,C&&(T+=C[0]+C[2]),_.height=T,_.lineHeight=m7(S.lineHeight,t.lineHeight,T),_.align=S&&S.align||t.align,_.verticalAlign=S&&S.verticalAlign||"middle",g&&null!=o&&d+_.lineHeight>o){w>0?(y.tokens=y.tokens.slice(0,w),m(y,b,x),r.lines=r.lines.slice(0,v+1)):r.lines=r.lines.slice(0,v);break n}var I=S.width,k=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))_.percentWidth=I,c.push(_),_.contentWidth=xd(_.text,A);else{if(k){var D=S.backgroundColor,O=D&&D.image;O&&y5(O=function(e){if("string"!=typeof e)return e;var t=y0.get(e);return t&&t.image}(O))&&(_.width=Math.max(_.width,O.width*T/O.height))}var P=f&&null!=i?i-b:null;null!=P&&P<_.width?!k||P<M?(_.text="",_.width=_.contentWidth=0):(_.text=function(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=xb(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=xw(o[a],i);return o.join("\n")}(_.text,P-M,A,t.ellipsis,{minChar:t.truncateMinChar}),_.width=_.contentWidth=xd(_.text,A)):_.contentWidth=xd(_.text,A)}_.width+=M,b+=_.width,S&&(x=Math.max(x,_.lineHeight))}m(y,b,x)}r.outerWidth=r.width=m8(i,h),r.outerHeight=r.height=m8(o,d),r.contentHeight=d,r.contentWidth=h,p&&(r.outerWidth+=p[1]+p[3],r.outerHeight+=p[0]+p[2]);for(var v=0;v<c.length;v++){var _=c[v],R=_.percentWidth;_.width=parseInt(R,10)/100*r.width}return r}(w7(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign,d=xf(a,r,u),h=xg(s,i,c),p=d,f=h;o&&(p+=o[3],f+=o[0]);var g=p+n;_e(e)&&this._renderBackground(e,e,d,h,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,b=x.length,w=y.lineHeight,_=y.width,S=0,C=p,M=g,A=b-1,T=void 0;S<b&&(!(T=x[S]).align||"left"===T.align);)this._placeToken(T,e,w,f,C,"left",m),_-=T.width,C+=T.width,S++;for(;A>=0&&"right"===(T=x[A]).align;)this._placeToken(T,e,w,f,M,"right",m),_-=T.width,M-=T.width,A--;for(C+=(n-(C-p)-(g-M)-_)/2;S<=A;)T=x[S],this._placeToken(T,e,w,f,C+T.width/2,"center",m),C+=T.width,S++;f+=w}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&_e(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=w8(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(wB),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=w9("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=w6("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=u,x&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=o,p.textBaseline="middle",p.font=e.font||mw,p.opacity=m7(s.opacity,t.opacity,1),w3(p,s),y&&(p.lineWidth=m7(s.lineWidth,t.lineWidth,m),p.lineDash=m8(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var b=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new xu(xf(p.x,b,p.textAlign),xg(p.y,w,p.textBaseline),b,w))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,d=l&&l.image,h=l&&!d,p=e.borderRadius,f=this;if(h||e.lineHeight||u&&c){(a=this._getOrCreateChild(wK)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=r,g.width=i,g.height=o,g.r=p,a.dirtyShape()}if(h){var m=a.style;m.fill=l||null,m.fillOpacity=m8(e.fillOpacity,1)}else if(d){(s=this._getOrCreateChild(wW)).onload=function(){f.dirtyStyle()};var v=s.style;v.image=l.image,v.x=n,v.y=r,v.width=i,v.height=o}if(u&&c){var m=a.style;m.lineWidth=u,m.stroke=c,m.strokeOpacity=m8(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=m7(e.opacity,t.opacity,1)},t.makeFont=function(e){var t,n,r="";return(null!=(t=e).fontSize||t.fontFamily||t.fontWeight)&&(r=[e.fontStyle,e.fontWeight,"string"==typeof(n=e.fontSize)&&(-1!==n.indexOf("px")||-1!==n.indexOf("rem")||-1!==n.indexOf("em"))?n:isNaN(+n)?"12px":n+"px",e.fontFamily||"sans-serif"].join(" ")),r&&vr(r)||e.textFont||e.font},t}(b0),w1={left:!0,right:1,center:1},w2={top:1,bottom:1,middle:1},w5=["fontStyle","fontWeight","fontSize","fontFamily"];function w3(e,t){for(var n=0;n<w5.length;n++){var r=w5[n],i=t[r];null!=i&&(e[r]=i)}}function w4(e){if(e){e.font=w0.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||w1[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||w2[n]?n:"top",e.padding&&(e.padding=vt(e.padding))}}function w6(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function w9(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function w8(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function w7(e){var t=e.text;return null!=t&&(t+=""),t}function _e(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}let _t=w0;var _n=vG(),_r=function(e,t,n,r){if(r){var i=_n(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType="chart","group"===r.type&&r.traverse(function(r){var i=_n(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType="chart"})}},_i=1,_o={},_a=vG(),_s=vG(),_l=["emphasis","blur","select"],_u=["normal","emphasis","blur","select"],_c="highlight",_d="downplay",_h="select",_p="unselect",_f="toggleSelect";function _g(e){return null!=e&&"none"!==e}function _m(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function _v(e){_m(e,"emphasis",2)}function _y(e){2===e.hoverState&&_m(e,"normal",0)}function _x(e){_m(e,"blur",1)}function _b(e){1===e.hoverState&&_m(e,"normal",0)}function _w(e){e.selected=!0}function __(e){e.selected=!1}function _S(e,t,n){t(e,n),e.isGroup&&e.traverse(function(e){t(e,n)})}function _C(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function _M(e,t){var n,r,i,o,a,s=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n){var r=t&&mV(t,"select")>=0,i=!1;if(e instanceof wz){var o=_a(e),a=r&&o.selectFill||o.normalFill,s=r&&o.selectStroke||o.normalStroke;if(_g(a)||_g(s)){var l=(n=n||{}).style||{};"inherit"===l.fill?(i=!0,n=mB({},n),(l=mB({},l)).fill=a):!_g(l.fill)&&_g(a)?(i=!0,n=mB({},n),(l=mB({},l)).fill=bC(a)):!_g(l.stroke)&&_g(s)&&(i||(n=mB({},n),l=mB({},l)),l.stroke=bC(s)),n.style=l}}if(n&&null==n.z2){i||(n=mB({},n));var u=e.z2EmphasisLift;n.z2=e.z2+(null!=u?u:10)}return n}(this,t,s);else if("blur"===e)return n=s,r=mV(this.currentStates,e)>=0,i=this.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[s]:l}for(var a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&0>u.__fromStateTransition.indexOf(n)&&"style"===u.targetName&&u.saveTo(o,t)}return o}(this,["opacity"],e,{opacity:1}),null==(a=(n=n||{}).style||{}).opacity&&(n=mB({},n),a=mB({opacity:r?i:.1*o.opacity},a),n.style=a),n;else if("select"===e){var l=s;if(l&&null==l.z2){l=mB({},l);var u=this.z2SelectLift;l.z2=this.z2+(null!=u?u:9)}return l}}return s}function _A(e){e.stateProxy=_M;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=_M),n&&(n.stateProxy=_M)}function _T(e,t){_O(e,t)||e.__highByOuter||_S(e,_v)}function _I(e,t){_O(e,t)||e.__highByOuter||_S(e,_y)}function _k(e,t){e.__highByOuter|=1<<(t||0),_S(e,_v)}function _D(e,t){(e.__highByOuter&=~(1<<(t||0)))||_S(e,_y)}function _O(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function _P(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var o=_s(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);a||r.push(s),o.isBlured&&(s.group.traverse(function(e){_b(e)}),a&&n.push(i)),o.isBlured=!1}),mG(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function _R(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&_S(r,_b)}}if((n=n||"coordinateSystem",null!=e)&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(e){var i=a===e,u=e.coordinateSystem;u&&u.master&&(u=u.master);var c=u&&s?u===s:i;if(!("series"===n&&!i||"coordinateSystem"===n&&!c||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&"self"===t||_x(e)}),mW(t))o(e.getData(),t);else if(m2(t))for(var d=mY(t),h=0;h<d.length;h++)o(e.getData(d[h]),t[d[h]]);l.push(e),_s(e).isBlured=!0}}),i.eachComponent(function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}})}}function _E(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){_s(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){_x(e)})}}}function _L(e,t,n,r){var i,o={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return o;var a=r.getModel().getComponent(e,t);if(!a)return o;var s=r.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return o;for(var l=s.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===_n(l[u]).focus){i=!0;break}return{focusSelf:i,dispatchers:l}}function _N(e){mG(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?_S(t,_w):_S(t,__)})})}function _z(e,t,n){var r,i,o,a;_H(e,!0),_S(e,_A),r=e,i=t,o=n,a=_n(r),null!=i?(a.focus=i,a.blurScope=o):a.focus&&(a.focus=null)}function _F(e,t,n,r){r?_H(e,!1):_z(e,t,n)}var _B=["emphasis","blur","select"],_j={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function _V(e,t,n,r){n=n||"itemStyle";for(var i=0;i<_B.length;i++){var o=_B[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[_j[n]]()}}function _H(e,t){var n=!1===t;e.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||e.__highDownDispatcher)&&(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}function _W(e){return!!(e&&e.__highDownDispatcher)}function _G(e){var t=e.type;return t===_h||t===_p||t===_f}function _$(e){var t=e.type;return t===_c||t===_d}var _U=vG();function _Z(e,t,n,r,i){if(t&&t.ecModel){var o,a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s=t&&t.isAnimationEnabled(),l="update"===e;if(!s)return null;var u=void 0,c=void 0,d=void 0;return r?(u=m8(r.duration,200),c=m8(r.easing,"cubicOut"),d=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),c=t.getShallow(l?"animationEasingUpdate":"animationEasing"),d=t.getShallow(l?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(u=o.duration),null!=o.easing&&(c=o.easing),null!=o.delay&&(d=o.delay)),mQ(d)&&(d=d(n,i)),mQ(u)&&(u=u(n)),{duration:u||0,delay:d,easing:c}}function _Y(e,t,n,r,i,o,a){var s,l=!1;mQ(i)?(a=o,o=i,i=null):m2(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=_Z(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),l||t.attr(n),a&&a(1),o&&o()}function _X(e,t,n,r,i,o){_Y("update",e,t,n,r,i,o)}function _q(e,t,n,r,i,o){_Y("enter",e,t,n,r,i,o)}function _K(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if("leave"===e.animators[t].scope)return!0;return!1}function _Q(e,t,n,r,i,o){_K(e)||_Y("leave",e,t,n,r,i,o)}function _J(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),_Q(e,{style:{opacity:0}},t,n,r)}function _0(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||_J(e,t,n,r)}):_J(e,t,n,r)}function _1(e){_U(e).oldStyle=e.style}var _2={};function _5(e,t){for(var n=0;n<_l.length;n++){var r=_l[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}function _3(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=mQ(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<_l.length;u++){var c=_l[u],d=t[c];l[c]=m8(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function _4(e,t,n,r){n=n||_2;for(var i=e instanceof _t,o=!1,a=0;a<_u.length;a++){var s=t[_u[a]];if(s&&s.getShallow("show")){o=!0;break}}var l=i?e:e.getTextContent();if(o){!i&&(l||(l=new _t,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var u=_3(n,t),c=t.normal,d=!!c.getShallow("show"),h=_9(c,r&&r.normal,n,!1,!i);h.text=u.normal,i||e.setTextConfig(_8(c,n,!1));for(var a=0;a<_l.length;a++){var p=_l[a],s=t[p];if(s){var f=l.ensureState(p),g=!!m8(s.getShallow("show"),d);g!==d&&(f.ignore=!g),f.style=_9(s,r&&r[p],n,!0,!i),f.style.text=u[p],i||(e.ensureState(p).textConfig=_8(s,n,!0))}}l.silent=!!c.getShallow("silent"),null!=l.style.x&&(h.x=l.style.x),null!=l.style.y&&(h.y=l.style.y),l.ignore=!d,l.useStyle(h),l.dirty(),n.enableTextSetter&&(Si(l).setLabelText=function(e){var r=_3(n,t,e);_5(l,r)})}else l&&(l.ignore=!0);e.dirty()}function _6(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<_l.length;r++){var i=_l[r];n[i]=e.getModel([i,t])}return n}function _9(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||_2;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||_2).rich;if(n){t=t||{};for(var r=mY(n),i=0;i<r.length;i++)t[r[i]]=1}e=e.parentModel}return t}(t);if(l){for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);Sn(o[u]={},c,s,n,r,i,!1,!0)}}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var h=t.get("minMargin");null!=h&&(e.margin=h),Sn(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&mB(o,t),o}function _8(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=m8(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(i.rotation=o*=Math.PI/180),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var _7=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Se=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],St=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Sn(e,t,n,r,i,o,a,s){n=!i&&n||_2;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=m8(t.getShallow("opacity"),n.opacity);("inherit"===u||"auto"===u)&&(u=l||null),("inherit"===c||"auto"===c)&&(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var h=m8(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(e.lineWidth=h);var p=m8(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=m8(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),i||o||null!=e.fill||!r.inheritColor||(e.fill=r.inheritColor);for(var g=0;g<_7.length;g++){var m=_7[g],v=m8(t.getShallow(m),n[m]);null!=v&&(e[m]=v)}for(var g=0;g<Se.length;g++){var m=Se[g],v=t.getShallow(m);null!=v&&(e[m]=v)}if(null==e.verticalAlign){var y=t.getShallow("baseline");null!=y&&(e.verticalAlign=y)}if(!a||!r.disableBox){for(var g=0;g<St.length;g++){var m=St[g],v=t.getShallow(m);null!=v&&(e[m]=v)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),("auto"===e.backgroundColor||"inherit"===e.backgroundColor)&&l&&(e.backgroundColor=l),("auto"===e.borderColor||"inherit"===e.borderColor)&&l&&(e.borderColor=l)}}function Sr(e,t){var n=t&&t.getModel("textStyle");return vr([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var Si=vG();function So(e,t,n,r){if(e){var i=Si(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}var Sa=["textStyle","color"],Ss=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Sl=new _t,Su=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(Sa):null)},e.prototype.getFont=function(){return Sr({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Ss.length;n++)t[Ss[n]]=this.getShallow(Ss[n]);return Sl.useStyle(t),Sl.update(),Sl.getBoundingRect()},e}(),Sc=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Sd=yU(Sc),Sh=function(){function e(){}return e.prototype.getLineStyle=function(e){return Sd(this,e)},e}(),Sp=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Sf=yU(Sp),Sg=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Sf(this,e,t)},e}(),Sm=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){mF(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new this.constructor(mz(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!vO.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;else if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();yj(Sm),x=["__\0is_clz",yH++].join("_"),Sm.prototype[x]=!0,Sm.isInstance=function(e){return!!(e&&e[x])},mH(Sm,Sh),mH(Sm,Sg),mH(Sm,yY),mH(Sm,Su);var Sv=Math.round(10*Math.random());function Sy(e){return[e||"",Sv++].join("_")}function Sx(e,t){return mF(mF({},e,!0),t,!0)}var Sb=Math.log(2);function Sw(e,t,n,r,i,o){var a=r+"-"+i,s=e.length;if(o.hasOwnProperty(a))return o[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~i)/Sb);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var d=0,h=0,p=0;h<s;h++){var f=1<<h;!(f&i)&&(d+=(p%2?-1:1)*e[n][h]*Sw(e,t-1,c,u,i|f,o),p++)}return o[a]=d,d}function S_(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Sw(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*Sw(n,7,+(0===a),1<<a,1<<s,r)/i*t[a];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}var SS="___zrEVENTSAVED",SC=[];function SM(e,t,n,r,i){if(t.getBoundingClientRect&&vO.domSupported&&!SA(t)){var o=t[SS]||(t[SS]={}),a=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],o=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),l=l&&o&&h===o[d]&&p===o[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=a,t[r]=n?S_(s,a):S_(a,s))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=a.style,l=o%2,u=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",i[u]+":0",r[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),o,i);if(a)return a(e,n,r),!0}return!1}function SA(e){return"CANVAS"===e.nodeName.toUpperCase()}var ST=/([&<>"'])/g,SI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Sk(e){return null==e?"":(e+"").replace(ST,function(e,t){return SI[t]})}var SD={},SO={},SP=vO.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||"EN").toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function SR(e,t){SO[e=e.toUpperCase()]=new Sm(t),SD[e]=t}SR("EN",{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),SR("ZH",{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var SE={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},SL="{yyyy}-{MM}-{dd}",SN={year:"{yyyy}",month:"{yyyy}-{MM}",day:SL,hour:SL+" "+SE.hour,minute:SL+" "+SE.minute,second:SL+" "+SE.second,millisecond:SE.none},Sz=["year","month","day","hour","minute","second","millisecond"],SF=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function SB(e,t){return e+="","0000".substr(0,t-e.length)+e}function Sj(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function SV(e,t,n,r){var i=vS(e),o=i[SG(n)](),a=i[S$(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[SU(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[SZ(n)](),d=(c-1)%12+1,h=i[SY(n)](),p=i[SX(n)](),f=i[Sq(n)](),g=(r instanceof Sm?r:SO[r||SP]||SO.EN).getModel("time"),m=g.get("month"),v=g.get("monthAbbr"),y=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,SB(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,SB(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,SB(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,y[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,SB(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,SB(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,SB(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,SB(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,SB(f,3)).replace(/{S}/g,f+"")}function SH(e,t){var n=vS(e),r=n[S$(t)]()+1,i=n[SU(t)](),o=n[SZ(t)](),a=n[SY(t)](),s=n[SX(t)](),l=0===n[Sq(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,h=d&&1===i;if(h&&1===r)return"year";if(h)return"month";if(d)return"day";if(c)return"hour";if(u)return"minute";else if(l)return"second";else return"millisecond"}function SW(e,t,n){var r=m1(e)?vS(e):e;switch(t=t||SH(e,n)){case"year":return r[SG(n)]();case"half-year":return+(r[S$(n)]()>=6);case"quarter":return Math.floor((r[S$(n)]()+1)/4);case"month":return r[S$(n)]();case"day":return r[SU(n)]();case"half-day":return r[SZ(n)]()/24;case"hour":return r[SZ(n)]();case"minute":return r[SY(n)]();case"second":return r[SX(n)]();case"millisecond":return r[Sq(n)]()}}function SG(e){return e?"getUTCFullYear":"getFullYear"}function S$(e){return e?"getUTCMonth":"getMonth"}function SU(e){return e?"getUTCDate":"getDate"}function SZ(e){return e?"getUTCHours":"getHours"}function SY(e){return e?"getUTCMinutes":"getMinutes"}function SX(e){return e?"getUTCSeconds":"getSeconds"}function Sq(e){return e?"getUTCMilliseconds":"getMilliseconds"}function SK(e){return e?"setUTCMonth":"setMonth"}function SQ(e){return e?"setUTCDate":"setDate"}function SJ(e){return e?"setUTCHours":"setHours"}function S0(e){return e?"setUTCMinutes":"setMinutes"}function S1(e){return e?"setUTCSeconds":"setSeconds"}function S2(e){return e?"setUTCMilliseconds":"setMilliseconds"}function S5(e){if(isNaN(vT(e)))return mJ(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function S3(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}function S4(e,t,n){function r(e){return e&&vr(e)?e:"-"}function i(e){return!!(null!=e&&!isNaN(e)&&isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?vS(e):e;if(!isNaN(+s))return SV(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return m0(e)?r(e):m1(e)&&i(e)?e+"":"-";var l=vT(e);return i(l)?S5(l):m0(e)?r(e):"boolean"==typeof e?e+"":"-"}var S6=["a","b","c","d","e","f","g"],S9=function(e,t){return"{"+e+(null==t?"":t)+"}"};function S8(e,t,n){mK(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=S6[o];e=e.replace(S9(a),S9(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(S9(S6[l],s),n?Sk(u):u)}return e}function S7(e,t){return t=t||"transparent",mJ(e)?e:m2(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Ce(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var Ct=["left","right","top","bottom","width","height"],Cn=[["width","left","right"],["height","top","bottom"]];function Cr(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild(function(l,u){var c,d,h=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=h.width+(f?-f.x+h.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var m=h.height+(f?-f.y+h.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)})}function Ci(e,t,n){n=vt(n||0);var r=t.width,i=t.height,o=vg(e.left,r),a=vg(e.top,i),s=vg(e.right,r),l=vg(e.bottom,i),u=vg(e.width,r),c=vg(e.height,i),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=r-s-h-o),isNaN(c)&&(c=i-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=r-s-u-h),isNaN(a)&&(a=i-l-c-d),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-h}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}o=o||0,a=a||0,isNaN(u)&&(u=r-h-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new xu(o+n[3],a+n[0],u,c);return f.margin=n,f}function Co(e,t,n,r,i,o){var a,s=!i||!i.hv||i.hv[0],l=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if((o=o||e).x=e.x,o.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new xu(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=Ci(mj({width:a.width,height:a.height},t),n,r),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(o.x=h,o.y=p):(o.x+=h,o.y+=p),o===e&&e.markRedraw(),!0}function Ca(e){var t=e.layoutMode||e.constructor.layoutMode;return m2(t)?t:t?{type:t}:null}function Cs(e,t,n){var r=n&&n.ignoreSize;mK(r)||(r=[r,r]);var i=a(Cn[0],0),o=a(Cn[1],1);function a(n,i){var o={},a=0,u={},c=0;if(mG(n,function(t){u[t]=e[t]}),mG(n,function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++}),r[i])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2===c||!a)return u;if(a>=2)return o;for(var d=0;d<n.length;d++){var h=n[d];if(!s(o,h)&&s(e,h)){o[h]=e[h];break}}return o}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){mG(e,function(e){t[e]=n[e]})}u(Cn[0],e,i),u(Cn[1],e,o)}function Cl(e){var t,n;return t={},(n=e)&&t&&mG(Ct,function(e){n.hasOwnProperty(e)&&(t[e]=n[e])}),t}mq(Cr,"vertical"),mq(Cr,"horizontal");var Cu=vG(),Cc=function(e){var t;function n(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Sy("ec_cpt_model"),i}return yN(n,e),n.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ca(this),r=n?Cl(e):{};mF(e,t.getTheme().get(this.mainType)),mF(e,this.getDefaultOption()),n&&Cs(e,r,n)},n.prototype.mergeOption=function(e,t){mF(this.option,e,!0);var n=Ca(this);n&&Cs(this.option,e,n)},n.prototype.optionUpdated=function(e,t){},n.prototype.getDefaultOption=function(){var e=this.constructor;if(!(e&&e[yF]))return e.defaultOption;var t=Cu(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=mF(o,n[a],!0);t.defaultOption=o}return t.defaultOption},n.prototype.getReferringComponents=function(e,t){return vq(this.ecModel,e,{index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)},t)},n.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(e){this.option.zlevel=e},n.protoInitialize=void((t=n.prototype).type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0),n}(Sm);yV(Cc,Sm),y$(Cc),b={},Cc.registerSubTypeDefaulter=function(e,t){b[yB(e).main]=t},Cc.determineSubType=function(e,t){var n=t.type;if(!n){var r=yB(e).main;Cc.hasSubTypes(e)&&b[r]&&(n=b[r](t))}return n};var Cd=function(e){var t=[];return mG(Cc.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=m$(t,function(e){return yB(e).main}),"dataset"!==e&&0>=mV(t,"dataset")&&t.unshift("dataset"),t};function Ch(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}Cc.topologicalTravel=function(e,t,n,r){if(e.length){var i,o,a,s=(o={},a=[],mG(i=t,function(e){var t,n,r,s=Ch(o,e),l=(t=s.originalDeps=Cd(e),n=i,r=[],mG(t,function(e){mV(n,e)>=0&&r.push(e)}),r);s.entryCount=l.length,0===s.entryCount&&a.push(e),mG(l,function(t){0>mV(s.predecessor,t)&&s.predecessor.push(t);var n=Ch(o,t);0>mV(n.successor,t)&&n.successor.push(e)})}),{graph:o,noEntryList:a}),l=s.graph,u=s.noEntryList,c={};for(mG(e,function(e){c[e]=!0});u.length;){var d=u.pop(),h=l[d],p=!!c[d];p&&(n.call(r,d,h.originalDeps.slice()),delete c[d]),mG(h.successor,p?g:f)}mG(c,function(){throw Error("")})}function f(e){l[e].entryCount--,0===l[e].entryCount&&u.push(e)}function g(e){c[e]=!0,f(e)}};var Cp=vG();vG();var Cf=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){return function(e,t,n,r,i,o,a){var s=t(o=o||e),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if((c=c||n)&&c.length){var d=c[l];return i&&(u[i]=d),s.paletteIdx=(l+1)%c.length,d}}(this,Cp,vE(this.get("color",!0)),this.get("colorLayer",!0),e,t,n)},e.prototype.clearColorPalette=function(){var e,t;e=this,(t=Cp)(e).paletteIdx=0,t(e).paletteNameMap={}},e}(),Cg=function(){var e;function t(e,t){var n=yi(e)?e:ya(e);this._source=n;var r=this._data=n.data;n.sourceFormat===v3&&(this._offset=0,this._dimSize=t,this._data=r),O(this,r,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,t){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=void((e=t.prototype).pure=!1,e.persistent=!0),t.internalField=function(){O=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;mB(e,D[C_(a,s)]),a===v3?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=mX(function(e,t){return Cv[C_(e,t)]}(a,s),null,i,l,u),e.count=mX(function(e,t){return Cx[C_(e,t)]}(a,s),null,i,l,u))};var e,t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],h=0;h<c;h++){var p=i[h*o+a];d[e+h]=p,p<l&&(l=p),p>u&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[v1+"_"+v6]={pure:!0,appendData:i},e[v1+"_row"]={pure:!0,appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[v2]={pure:!0,appendData:i},e[v5]={pure:!0,appendData:function(e){var t=this._data;mG(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[v0]={appendData:i},e[v3]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},D=e}(),t}(),Cm=function(e,t,n,r){return e[r]},Cv=((T={})[v1+"_"+v6]=function(e,t,n,r){return e[r+t]},T[v1+"_row"]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=0;a<e.length;a++){var s=e[a];o[a]=s?s[r]:null}return o},T[v2]=Cm,T[v5]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},T[v0]=Cm,T),Cy=function(e,t,n){return e.length},Cx=((I={})[v1+"_"+v6]=function(e,t,n){return Math.max(0,e.length-t)},I[v1+"_row"]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},I[v2]=Cy,I[v5]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},I[v0]=Cy,I),Cb=function(e,t,n){return e[t]},Cw=((k={})[v1]=Cb,k[v2]=function(e,t,n){return e[n]},k[v5]=Cb,k[v0]=function(e,t,n){var r=vz(e);return r instanceof Array?r[t]:r},k[v3]=Cb,k);function C_(e,t){return e===v1?e+"_"+t:e}function CS(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return Cw[o](r,a,s)}var l=r;return o===v0&&(l=vz(r)),l}}}var CC=/\{@(.+?)\}/g,CM=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,h=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);return(o&&(s.value=o.interpolatedValue),null!=r&&mK(s.value)&&(s.value=s.value[r]),i||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"])),mQ(i))?(s.status=t,s.dimensionIndex=r,i(s)):mJ(i)?S8(i,s).replace(CC,function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=CS(a,e,i);if(o&&mK(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}):void 0},e.prototype.getRawValue=function(e,t){return CS(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function CA(e){var t,n;return m2(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function CT(e){return new CI(e)}var CI=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n,r,i,o=this._upstream,a=e&&e.skip;if(this._dirty&&o){var s=this.context;s.data=s.outputData=o.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(r=this._plan(this.context));var l=((t=this._modBy)>=1||(t=1),t),u=this._modDataCount||0,c=((n=e&&e.modBy)>=1||(n=1),n),d=e&&e.modDataCount||0;(l!==c||u!==d)&&(r="reset"),(this._dirty||"reset"===r)&&(this._dirty=!1,i=this._doReset(a)),this._modBy=c,this._modDataCount=d;var h=e&&e.step;if(o?this._dueEnd=o._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!a&&(i||p<f)){var g=this._progress;if(mK(g))for(var m=0;m<g.length;m++)this._doProgress(g[m],p,f,c,d);else this._doProgress(g,p,f,c,d)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){Ck.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Ck.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),mK(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var t,n,r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),Ck=function(){var e,t,n,r,i,o={reset:function(l,u,c,d){t=l,e=u,n=c,i=Math.ceil((r=d)/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function CD(e){throw Error(e)}function CO(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||m1(e)||null==e||"-"===e||(e=+vS(e)),null==e||""===e?NaN:+e)}vl({number:function(e){return parseFloat(e)},time:function(e){return+vS(e)},trim:function(e){return mJ(e)?vr(e):e}});var CP={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(e,t){m1(t)||CD(""),this._opFn=CP[e],this._rvalFloat=vT(t)}).prototype.evaluate=function(e){return m1(e)?this._opFn(e,this._rvalFloat):this._opFn(vT(e),this._rvalFloat)};var CR=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=m1(e)?e:vT(e),r=m1(t)?t:vT(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=mJ(e),s=mJ(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=vT(t)}).prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&("number"===n||"number"===this._rvalTypeof)&&(t=vT(e)===this._rvalFloat)}return this._isEQ?t:!t};var CE=function(){function e(){}return e.prototype.getRawData=function(){throw Error("not supported")},e.prototype.getRawDataItem=function(e){throw Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return CO(e,t)},e}();function CL(e){return Cj(e.sourceFormat)||CD(""),e.data}function CN(e){var t=e.sourceFormat,n=e.data;if(Cj(t)||CD(""),t===v1){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===v2){for(var r=[],i=0,o=n.length;i<o;i++)r.push(mB({},n[i]));return r}}function Cz(e,t,n){if(null!=n){if(m1(n)||!isNaN(n)&&!vd(t,n))return e[n];else if(vd(t,n))return t[n]}}function CF(e){return mz(e)}var CB=vl();function Cj(e){return e===v1||e===v2}var CV="undefined",CH=typeof Uint32Array===CV?Array:Uint32Array,CW=typeof Uint16Array===CV?Array:Uint16Array,CG=typeof Int32Array===CV?Array:Int32Array,C$=typeof Float64Array===CV?Array:Float64Array,CU={float:C$,int:CG,ordinal:Array,number:Array,time:C$};function CZ(e){return e>65535?CH:CW}function CY(){return[1/0,-1/0]}function CX(e,t,n,r,i){var o=CU[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var Cq=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=vl()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=P[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],yc(r),this._dimensions=m$(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new CU[t||"float"](this._rawCount),this._rawExtent[i]=CY(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=CY());for(var s=i[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){var u=r[l];CX(n,l,u.type,s,!0)}for(var c=[],d=a;d<s;d++)for(var h=d-a,p=0;p<i;p++){var u=r[p],f=P.arrayRows.call(this,e[h]||c,u.property,h,p);n[p][d]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=m$(o,function(e){return e.property}),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=CY()),CX(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],h=e;h<t;h++){d=r.getItem(h,d);for(var p=0;p<a;p++){var f=i[p],g=this._dimValueGetter(d,l[p],h,p);f[h]=g;var m=s[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var o=this.get(e,r);isNaN(o)||(n+=o)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)});var n=t.sort(function(e,t){return e-t}),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return -1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return -1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=CZ(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(CZ(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,h=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a)d=t(u[l][h],c);else{for(var p=0;p<a;p++)o[p]=u[e[p]][h];o[p]=c,d=t.apply(null,o)}d&&(i[s++]=h)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=mY(e),i=r.length;if(!i)return this;var o=t.count(),a=new(CZ(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,h=!1;if(!t._indices){var p=0;if(1===i){for(var f=d[r[0]],g=0;g<n;g++){var m=f[g];(m>=u&&m<=c||isNaN(m))&&(a[s++]=p),p++}h=!0}else if(2===i){for(var f=d[r[0]],v=d[r[1]],y=e[r[1]][0],x=e[r[1]][1],g=0;g<n;g++){var m=f[g],b=v[g];(m>=u&&m<=c||isNaN(m))&&(b>=y&&b<=x||isNaN(b))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===i)for(var g=0;g<o;g++){var w=t.getRawIndex(g),m=d[r[0]][w];(m>=u&&m<=c||isNaN(m))&&(a[s++]=w)}else for(var g=0;g<o;g++){for(var _=!0,w=t.getRawIndex(g),S=0;S<i;S++){var C=r[S],m=d[C][w];(m<e[C][0]||m>e[C][1])&&(_=!1)}_&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=CY();for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),h=0;h<o;h++)s[h]=r[t[h]][d];s[o]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(i[0]=p,p=i);for(var u=0;u<p.length;u++){var f=t[u],g=p[u],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(CZ(this._rawCount))(Math.min((Math.ceil(s/u)+2)*2,s));d[l++]=c;for(var h=1;h<s-1;h+=u){for(var p=Math.min(h+u,s-1),f=Math.min(h+2*u,s),g=(f+p)/2,m=0,v=p;v<f;v++){var y=this.getRawIndex(v),x=a[y];isNaN(x)||(m+=x)}m/=f-p;var b=h,w=Math.min(h+u,s),_=h-1,S=a[c];n=-1,i=b;for(var C=-1,M=0,v=b;v<w;v++){var y=this.getRawIndex(v),x=a[y];if(isNaN(x)){M++,C<0&&(C=y);continue}(r=Math.abs((_-g)*(x-S)-(_-v)*(m-S)))>n&&(n=r,i=y)}M>0&&M<w-b&&(d[l++]=Math.min(C,i),i=Math.max(C,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=CY(),d=new(CZ(this._rawCount))(Math.ceil(u/s)),h=0,p=0;p<u;p+=s){s>u-p&&(a.length=s=u-p);for(var f=0;f<s;f++){var g=this.getRawIndex(p+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(p+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[h++]=v}return i._count=h,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t,n=this._chunks[e],r=CY();if(!n)return r;var i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(t=this._extent[e])return t.slice();for(var o=(t=r)[0],a=t[1],s=0;s<i;s++){var l=n[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return t=[o,a],this._extent[e]=t,t},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,o=t&&mU(t,function(e,t){return e[t]=!0,e},{});if(o)for(var a=0;a<i.length;a++)r._chunks[a]=o[a]?function(e){var t=e.constructor;return t===Array?e.slice():new t(e)}(i[a]):i[a];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=mz(this._extent),e._rawExtent=mz(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return CO(e[r],this._dimensions[r])}P={arrayRows:e,objectRows:function(e,t,n,r){return CO(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return CO(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),CK=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(CJ(n)){var o=void 0,a=void 0,s=void 0;if(i){var l=r[0];l.prepareSource(),o=(s=l.getSource()).data,a=s.sourceFormat,t=[l._getVersionSign()]}else a=m3(o=n.get("data",!0))?v3:v0,t=[];var u=this._getSourceMetaRawOption()||{},c=s&&s.metaRawOption||{},d=m8(u.seriesLayoutBy,c.seriesLayoutBy)||null,h=m8(u.sourceHeader,c.sourceHeader),p=m8(u.dimensions,c.dimensions);e=d!==c.seriesLayoutBy||!!h!=!!c.sourceHeader||p?[yo(o,{seriesLayoutBy:d,sourceHeader:h,dimensions:p},a)]:[]}else if(i){var f=this._applyTransform(r);e=f.sourceList,t=f.upstreamSignList}else e=[yo(n.get("source",!0),this._getSourceMetaRawOption(),null)],t=[];this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n,r=this._sourceHost,i=r.get("transform",!0),o=r.get("fromTransformResult",!0);null!=o&&1!==e.length&&C0("");var a=[],s=[];return(mG(e,function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||C0(""),a.push(t),s.push(e._getVersionSign())}),i)?n=function(e,t,n){var r=vE(e),i=r.length;i||CD("");for(var o=0;o<i;o++)t=function(e,t){t.length||CD(""),m2(e)||CD("");var n=e.type,r=CB.get(n);r||CD("");var i=m$(t,function(e){return function(e,t){var n=new CE,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==v6&&CD("");var a=[],s={},l=e.dimensionsDefine;if(l)mG(l,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(vd(s,n)&&CD(""),s[n]=r)});else for(var u=0;u<e.dimensionsDetectedCount||0;u++)a.push({index:u});var c=Cv[C_(i,v6)];t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=mX(CL,null,e)),n.cloneRawData=mX(CN,null,e),n.count=mX(Cx[C_(i,v6)],null,r,o,a);var d=Cw[i];n.retrieveValue=function(e,t){return h(c(r,o,a,e),t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=mX(Cz,null,a,s),n.cloneAllDimensionInfo=mX(CF,null,a),n}(e,r)});return m$(vE(r.transform({upstream:i[0],upstreamList:i,config:mz(e.config)})),function(e,n){m2(e)||CD(""),e.data||CD(""),Cj(ys(e.data))||CD("");var r,i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:v6,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:v6,sourceHeader:0,dimensions:e.dimensions};return yo(e.data,r,null)})}(r[o],t),o!==i-1&&(t.length=Math.max(t.length,1));return t}(i,a,{datasetIndex:r.componentIndex}):null!=o&&(n=[new yr({data:(t=a[0]).data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:mz(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})]),{sourceList:n,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];CJ(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new Cq).initData(new Cg(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(CJ(e)){var t=ye(e);return t?[t.getSourceManager()]:[]}return m$(e.get("transform",!0)||e.get("fromTransformResult",!0)?vq(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},vY).models:[],function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;return CJ(r)?(e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0)),{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function CQ(e){e.option.transform&&(e.option.transform[vi]=!0)}function CJ(e){return"series"===e.mainType}function C0(e){throw Error(e)}var C1="line-height:1";function C2(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+Sk(r+"")+"px;color:"+Sk(n)+";font-weight:"+Sk(i+""),valueStyle:"font-size:"+Sk(a+"")+"px;color:"+Sk(o)+";font-weight:"+Sk(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var C5=[0,10,20,30],C3=["","\n","\n\n","\n\n\n"];function C4(e,t){return t.type=e,t}function C6(e){return"section"===e.type}function C9(e,t,n,r){var i,o=t.noHeader,a={html:C5[i=function e(t){if(C6(t)){var n=0,r=t.blocks.length,i=r>1||r>0&&!t.noHeader;return mG(t.blocks,function(t){var r=e(t);r>=n&&(n=r+ +(i&&(!r||C6(t)&&!t.noHeader)))}),n}return 0}(t)],richText:C3[i]},s=[],l=t.blocks||[];vn(!l||mK(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(vd(c,u)){var d=new CR(c[u],null);l.sort(function(e,t){return d.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&l.reverse()}mG(l,function(n,i){var o=t.valueFormatter,l=(C6(n)?C9:C8)(o?mB(mB({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)});var h="richText"===e.renderMode?s.join(a.richText):Me(s.join(""),o?n:a.html);if(o)return h;var p=S4(t.header,"ordinal",e.useUTC),f=C2(r,e.renderMode).nameStyle;return"richText"===e.renderMode?Mt(e,p,f)+a.richText+h:Me('<div style="'+f+";"+C1+';">'+Sk(p)+"</div>"+h,n)}function C8(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return m$(e=mK(e)?e:[e],function(e,t){return S4(e,mK(w)?w[t]:w,u)})};if(!o||!a){var d,h,p,f,g,m,v,y,x=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),b=o?"":S4(l,"ordinal",u),w=t.valueType,_=a?[]:c(t.value,t.dataIndex),S=!s||!o,C=!s&&o,M=C2(r,i),A=M.nameStyle,T=M.valueStyle;return"richText"===i?(s?"":x)+(o?"":Mt(e,b,A))+(a?"":(d=e,h=_,p=S,f=C,g=[T],p&&g.push({padding:[0,0,0,f?10:20],align:"right"}),d.markupStyleCreator.wrapRichTextStyle(mK(h)?h.join(" "):h,g))):Me((s?"":x)+(o?"":'<span style="'+A+";"+(s?"":"margin-left:2px")+'">'+Sk(b)+"</span>")+(a?"":(m=_,v=S,y=C,'<span style="'+(v?"float:right;margin-left:"+(y?"10px":"20px"):"")+";"+T+'">'+m$(m=mK(m)?m:[m],function(e){return Sk(e)}).join("&nbsp;&nbsp;")+"</span>")),n)}}function C7(e,t,n,r,i,o){if(e)return(C6(e)?C9:C8)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function Me(e,t){return'<div style="margin: '+t+"px 0 0;"+C1+';">'+e+'<div style="clear:both"></div></div>'}function Mt(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Mn(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var Mr=function(){function e(){this.richTextStyles={},this._nextStyleNameId=vI()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r,i,o,a,s,l,u="richText"===n?this._generateStyleName():null,c=(a=(o=mJ(r={color:t,type:e,renderMode:n,markerId:u})?{color:r,extraCssText:i}:r||{}).color,s=o.type,i=o.extraCssText,l=o.renderMode||"html",a?"html"===l?"subItem"===s?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Sk(a)+";"+(i||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Sk(a)+";"+(i||"")+'"></span>':{renderMode:l,content:"{"+(o.markerId||"markerX")+"|} ",style:"subItem"===s?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}:"");return mJ(c)?c:(this.richTextStyles[u]=c.style,c.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};mK(t)?mG(t,function(e){return mB(n,e)}):mB(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}(),Mi=vG();function Mo(e,t){return e.getName(t)||e.getId(t)}var Ma=function(e){var t;function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return yN(n,e),n.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=CT({count:Ml,reset:Mu}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Mi(this).sourceManager=new CK(this)).prepareSource();var r=this.getInitialData(e,n);Md(r,this),this.dataTask.context.data=r,Mi(this).dataBeforeProcessed=r,Ms(this),this._initSelectedMapFromData(r)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ca(this),r=n?Cl(e):{},i=this.subType;Cc.hasClass(i)&&(i+="Series"),mF(e,t.getTheme().get(this.subType)),mF(e,this.getDefaultOption()),vL(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Cs(e,r,n)},n.prototype.mergeOption=function(e,t){e=mF(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Ca(this);n&&Cs(this.option,e,n);var r=Mi(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Md(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Mi(this).dataBeforeProcessed=i,Ms(this),this._initSelectedMapFromData(i)},n.prototype.fillDataTextStyle=function(e){if(e&&!m3(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&vL(e[n],"label",t)},n.prototype.getInitialData=function(e,t){},n.prototype.appendData=function(e){this.getRawData().appendData(e.data)},n.prototype.getData=function(e){var t=Mp(this);if(!t)return Mi(this).data;var n=t.context.data;return null==e?n:n.getLinkedData(e)},n.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},n.prototype.setData=function(e){var t=Mp(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}Mi(this).data=e},n.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return vl(e)},n.prototype.getSourceManager=function(){return Mi(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return Mi(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},n.prototype.formatTooltip=function(e,t,n){return function(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),h=mK(d),p=S7(o.getData().getItemVisual(a,"style")[o.visualDrawType]);if(c>1||h&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=mU(e,function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName},!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(C4("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?mG(r,function(e){c(CS(o,n,e),e)}):mG(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=CS(l,a,u[0]),n=g.type}else i=t=h?d[0]:d;var m=vV(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return C4("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[C4("nameValue",{markerType:"item",markerColor:p,name:x,noName:!vr(x),value:t,valueType:n,dataIndex:a})].concat(r||[])})}({series:this,dataIndex:e,multipleSeries:t})},n.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(vO.node&&!(e&&e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Cf.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},n.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},n.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<e.length;o++){var a=Mo(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=mY(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},n.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[Mo(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},n.prototype._innerSelect=function(e,t){var n,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a){if("series"===o)i.selectedMap="all";else if("multiple"===o){m2(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l],c=Mo(e,u);s[c]=!0,this._selectedDataIndicesMap[c]=e.getRawIndex(u)}}else if("single"===o||!0===o){var d=t[a-1],c=Mo(e,d);(n={})[c]=!0,i.selectedMap=n,this._selectedDataIndicesMap=((r={})[c]=e.getRawIndex(d),r)}}},n.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},n.registerClass=function(e){return Cc.registerClass(e)},n.protoInitialize=void((t=n.prototype).type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"),n}(Cc);function Ms(e){var t,n,r,i=e.name;vV(e)||(e.name=(n=(t=e.getRawData()).mapDimensionsAll("seriesName"),r=[],mG(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(" ")||i))}function Ml(e){return e.model.getRawData().count()}function Mu(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Mc}function Mc(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Md(e,t){mG(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,mq(Mh,t))})}function Mh(e,t){var n=Mp(e);return n&&n.setOutputEnd((t||this).count()),t}function Mp(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}function Mf(e){return null==e?0:e.length||1}function Mg(e){return e}mH(Ma,CM),mH(Ma,Cf),yV(Ma,Cc);var Mm=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||Mg,this._newKeyGetter=r||Mg,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=Mf(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=Mf(l),d=Mf(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var h=0;h<c;h++)this._remove&&this._remove(l[h]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=Mf(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=Mf(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),Mv=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function My(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}let Mx=function(e){this.otherDims={},null!=e&&mB(this,e)};var Mb=m2,Mw="u"<typeof Int32Array?Array:Int32Array,M_=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],MS=["_approximateExtent"],MC=function(){function e(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,r=!1;yf(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=mJ(c)?new Mx({name:c}):c instanceof Mx?c:new Mx(c),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};o.push(h),i[h]=d,null!=l[h]&&(s=!0),d.createInvertedIndices&&(a[h]=[]),0===p.itemName&&(this._nameDimIdx=u),0===p.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=vl();mG(o,function(e){f.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return -1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(m1(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||0>this._schema.getSourceDimensionIndex(e)))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i,o,a,s,l,u,c,d,h,p,f,g,m=this;if(e instanceof Cq&&(g=e),!g){var v=this.dimensions,y=yi(e)||mW(e)?new Cg(e,v.length):e;g=new Cq;var x=m$(v,function(e){return{type:m._dimInfos[e].type,property:e}});g.initData(y,x,n)}this._store=g,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,g.count()),this._dimSummary=(r=this,i=this._schema,a=(o={}).encode={},s=vl(),l=[],u=[],c={},mG(r.dimensions,function(e){var t=r.getDimensionInfo(e),n=t.coordDim;if(n){var i,o=t.coordDimIndex;My(a,n)[o]=e,t.isExtraCoord||(s.set(n,1),"ordinal"!==(i=t.type)&&"time"!==i&&(l[0]=e),My(c,n)[o]=r.getDimensionIndex(t.name)),t.defaultTooltip&&u.push(e)}vJ.each(function(e,n){var r=My(a,n),i=t.otherDims[n];null!=i&&!1!==i&&(r[i]=t.name)})}),d=[],h={},s.each(function(e,t){var n=a[t];h[t]=n[0],d=d.concat(n)}),o.dataDimsOnCoord=d,o.dataDimIndicesOnCoord=m$(d,function(e){return r.getDimensionInfo(e).storeDimIndex}),o.encodeFirstDimNotExtra=h,(p=a.label)&&p.length&&(l=p.slice()),(f=a.tooltip)&&f.length?u=f.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,o.userOutput=new Mv(c,i),o),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&B(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==v3&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===v0&&!n.pure)for(var o=[],a=e;a<t;a++){var s,l=n.getItem(a,o);if(!(!this.hasItemOption&&m2(s=l))||s instanceof Array||(this.hasItemOption=!0),l){var u=l.name;null==r[a]&&null!=u&&(r[a]=vj(u,null));var c=l.id;null==i[a]&&null!=c&&(i[a]=vj(c,null))}}if(this._shouldMakeIdFromName())for(var a=e;a<t;a++)B(this,a);R(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Mb(e)?mB(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=L(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return E(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return mK(e)?r.getValues(m$(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return -1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){mQ(e)&&(n=t,t=e,e=[]);var r=n||this,i=m$(N(e),this._getStoreDimIndex,this);this._store.each(i,r?mX(t,r):t)},e.prototype.filterSelf=function(e,t,n){mQ(e)&&(n=t,t=e,e=[]);var r=n||this,i=m$(N(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?mX(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=mY(e),i=[];return mG(r,function(r){var o=t._getStoreDimIndex(r);n[o]=e[r],i.push(o)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){mQ(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=m$(N(e),this._getStoreDimIndex,this),a=F(this);return a._store=this._store.map(o,i?mX(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=m$(N(e),this._getStoreDimIndex,this);this._store.modify(o,i?mX(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=F(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=F(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new Sm(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Mm(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return E(e,t)},function(e){return E(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Mb(e)?mB(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(mK(i=this.getVisual(t))?i=i.slice():Mb(i)&&(i=mB({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Mb(t)?mB(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Mb(e)?mB(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?mB(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){_r(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){mG(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:m$(this.dimensions,this._getDimInfo,this),this.hostModel)),z(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];mQ(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(ve(arguments)))})},e.internalField=void(R=function(e){var t=e._invertedIndicesMap;mG(t,function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new Mw(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(var s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}})},L=function(e,t,n){return vj(e._getCategory(t,n),null)},E=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=L(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},N=function(e){return mK(e)||(e=null!=e?[e]:[]),e},F=function(t){var n=new e(t._schema?t._schema:m$(t.dimensions,t._getDimInfo,t),t.hostModel);return z(n,t),n},z=function(e,t){mG(M_.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,mG(MS,function(n){e[n]=mz(t[n])}),e._calculationInfo=mB({},t._calculationInfo)},B=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=L(e,i,t)),null==s&&null!=o&&(r[t]=s=L(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}}),e}();function MM(e,t){yi(e)||(e=ya(e));var n,r,i,o,a,s=(t=t||{}).coordDimensions||[],l=t.dimensionsDefine||e.dimensionsDefine||[],u=vl(),c=[],d=(n=e,r=s,i=l,o=t.dimensionsCount,a=Math.max(n.dimensionsDetectedCount||1,r.length,i.length,o||0),mG(r,function(e){var t;m2(e)&&(t=e.dimsDef)&&(a=Math.max(a,t.length))}),a),h=t.canOmitUnusedDimensions&&d>30,p=l===e.dimensionsDefine,f=p?ym(e):yg(l),g=t.encodeDefine;!g&&t.encodeDefaulter&&(g=t.encodeDefaulter(e,d));for(var m=vl(g),v=new CG(d),y=0;y<v.length;y++)v[y]=-1;function x(e){var t=v[e];if(t<0){var n=l[e],r=m2(n)?n:{name:n},i=new Mx,o=r.name;null!=o&&null!=f.get(o)&&(i.name=i.displayName=o),null!=r.type&&(i.type=r.type),null!=r.displayName&&(i.displayName=r.displayName);var a=c.length;return v[e]=a,i.storeDimIndex=e,c.push(i),i}return c[t]}if(!h)for(var y=0;y<d;y++)x(y);m.each(function(e,t){var n=vE(e).slice();if(1===n.length&&!mJ(n[0])&&n[0]<0)return void m.set(t,!1);var r=m.set(t,[]);mG(n,function(e,n){var i=mJ(e)?f.get(e):e;null!=i&&i<d&&(r[n]=i,w(x(i),t,n))})});var b=0;function w(e,t,n){null!=vJ.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,u.set(t,!0))}mG(s,function(e){if(mJ(e))i=e,r={};else{var t,n,r,i=(r=e).name,o=r.ordinalMeta;r.ordinalMeta=null,(r=mB({},r)).ordinalMeta=o,t=r.dimsDef,n=r.otherDims,r.name=r.coordDim=r.coordDimIndex=r.dimsDef=r.otherDims=null}var a=m.get(i);if(!1!==a){if(!(a=vE(a)).length)for(var s=0;s<(t&&t.length||1);s++){for(;b<d&&null!=x(b).coordDim;)b++;b<d&&a.push(b++)}mG(a,function(e,o){var a=x(e);if(p&&null!=r.type&&(a.type=r.type),w(mj(a,r),i,o),null==a.name&&t){var s=t[o];m2(s)||(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}n&&mj(a.otherDims,n)})}});var _=t.generateCoord,S=t.generateCoordCount,C=null!=S;S=_?S||1:0;var M=_||"value";function A(e){null==e.name&&(e.name=e.coordDim)}if(h)mG(c,function(e){A(e)}),c.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var T=0;T<d;T++){var I=x(T);null==I.coordDim&&(I.coordDim=function(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}(M,u,C),I.coordDimIndex=0,(!_||S<=0)&&(I.isExtraCoord=!0),S--),A(I),null==I.type&&(1===yt(e,T)||I.isExtraCoord&&(null!=I.otherDims.itemName||null!=I.otherDims.seriesName))&&(I.type="ordinal")}return function(e){for(var t=vl(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(c),new yp({source:e,dimensions:c,fullDimensionCount:d,dimensionOmitted:h})}var MA={},MT=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];mG(MA,function(r,i){var o=r.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){mG(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){MA[e]=t},e.get=function(e){return MA[e]},e}(),MI=function(e){this.coordSysDims=[],this.axisMap=vl(),this.categoryAxisMap=vl(),this.coordSysName=e},Mk={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",vY).models[0],o=e.getReferringComponents("yAxis",vY).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),MD(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),MD(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",vY).models[0];t.coordSysDims=["single"],n.set("single",i),MD(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",vY).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),MD(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),MD(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();mG(o.parallelAxisIndex,function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),MD(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))})}};function MD(e){return"category"===e.get("type")}let MO=function(e,t,n){n=n||{};var r,i,o,a,s,l,u,c,d=t.getSourceManager(),h=!1;e?(h=!0,c=ya(e)):h=(c=d.getSource()).sourceFormat===v0;var p=function(e){var t=e.get("coordinateSystem"),n=new MI(t),r=Mk[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),f=(i=t.get("coordinateSystem"),o=MT.get(i),p&&p.coordSysDims&&(r=m$(p.coordSysDims,function(e){var t,n={name:e},r=p.axisMap.get(e);return r&&(n.type="category"===(t=r.get("type"))?"ordinal":"time"===t?"time":"float"),n})),r||(r=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),r),g=n.useEncodeDefaulter,m=mQ(g)?g:g?mq(v8,f,t):null,v=MM(c,{coordDimensions:f,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:m,canOmitUnusedDimensions:!h}),y=(a=v.dimensions,s=n.createInvertedIndices,p&&mG(a,function(e,t){var n=e.coordDim,r=p.categoryAxisMap.get(n);r&&(null==l&&(l=t),e.ordinalMeta=r.getOrdinalMeta(),s&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(u=!0)}),u||null==l||(a[l].otherDims.itemName=0),l),x=h?null:d.getSharedDataStore(v),b=function(e,t,n){var r,i,o,a,s,l,u,c=(n=n||{}).byIndex,d=n.stackedCoordDimension;yf(t.schema)?(r=(i=t.schema).dimensions,o=t.store):r=t;var h=!!(e&&e.get("stack"));if(mG(r,function(e,t){mJ(e)&&(r[t]=e={name:e}),h&&!e.isExtraCoord&&(c||a||!e.ordinalMeta||(a=e),s||"ordinal"===e.type||"time"===e.type||d&&d!==e.coordDim||(s=e))}),!s||c||a||(c=!0),s){l="__\0ecstackresult_"+e.id,u="__\0ecstackedover_"+e.id,a&&(a.createInvertedIndices=!0);var p=s.coordDim,f=s.type,g=0;mG(r,function(e){e.coordDim===p&&g++});var m={name:l,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:u,coordDim:u,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(u,f),v.storeDimIndex=o.ensureCalculationDimension(l,f)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:c,stackedOverDimension:u,stackResultDimension:l}}(t,{schema:v,store:x}),w=new MC(v,t);w.setCalculationInfo(b);var _=null!=y&&function(e){if(e.sourceFormat===v0)return!mK(vz(function(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}(c)?function(e,t,n,r){return r===y?n:this.defaultDimValueGetter(e,t,n,r)}:null;return w.hasItemOption=!1,w.initData(h?c:x,null,_),w};var MP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)mG(r.getAxes(),function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=i[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),!(r.length<2)){if(2===r.length){o[n]=e.toGlobalCoord(e.getExtent()[+!!l]);return}for(var u=void 0,c=void 0,d=1,h=0;h<r.length;h++){var p=r[h].coord,f=h===r.length-1?r[h-1].tickValue+d:r[h].tickValue;if(f===s){c=p;break}if(f<s)u=p;else if(null!=u&&f>s){c=(p+u)/2;break}1===h&&(d=f-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),o[n]=e.toGlobalCoord(c)}}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=+!r.getBaseAxis().isHorizontal();o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(Ma);Ma.registerClass(MP);var MR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.getInitialData=function(){return MO(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Sx(MP.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(MP),ME=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return yq(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=mV(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=mV(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new xu(0,0,0,0),n=e||this._children,r=[],i=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(xu.applyTransform(t,s,l),(i=i||t.clone()).union(t)):(i=i||s.clone()).union(s)}}return i||t},t}(bU);ME.prototype.type="group";let ML=ME;var MN=wS.CMD,Mz=[[],[],[]],MF=Math.sqrt,MB=Math.atan2,Mj=Math.sqrt,MV=Math.sin,MH=Math.cos,MW=Math.PI;function MG(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function M$(e,t){return(e[0]*t[0]+e[1]*t[1])/(MG(e)*MG(t))}function MU(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(M$(e,t))}function MZ(e,t,n,r,i,o,a,s,l,u,c){var d=MW/180*l,h=MH(d)*(e-n)/2+MV(d)*(t-r)/2,p=-1*MV(d)*(e-n)/2+MH(d)*(t-r)/2,f=h*h/(a*a)+p*p/(s*s);f>1&&(a*=Mj(f),s*=Mj(f));var g=(i===o?-1:1)*Mj((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,m=g*a*p/s,v=-(g*s)*h/a,y=(e+n)/2+MH(d)*m-MV(d)*v,x=(t+r)/2+MV(d)*m+MH(d)*v,b=MU([1,0],[(h-m)/a,(p-v)/s]),w=[(h-m)/a,(p-v)/s],_=[(-1*h-m)/a,(-1*p-v)/s],S=MU(w,_);if(-1>=M$(w,_)&&(S=MW),M$(w,_)>=1&&(S=0),S<0){var C=Math.round(S/MW*1e6)/1e6;S=2*MW+C%2*MW}c.addData(u,y,x,a,s,b,S,d,o)}var MY=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,MX=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Mq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yq(t,e),t.prototype.applyTransform=function(e){},t}(wz);function MK(e){return null!=e.setData}function MQ(e,t){var n=function(e){var t,n=new wS;if(!e)return n;var r=0,i=0,o=0,a=0,s=wS.CMD,l=e.match(MY);if(!l)return n;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),h=void 0,p=c.match(MX)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,b=void 0,w=void 0,_=void 0,S=void 0,C=r,M=i,A=void 0,T=void 0;switch(d){case"l":r+=p[m++],i+=p[m++],h=s.L,n.addData(h,r,i);break;case"L":r=p[m++],i=p[m++],h=s.L,n.addData(h,r,i);break;case"m":r+=p[m++],i+=p[m++],h=s.M,n.addData(h,r,i),o=r,a=i,d="l";break;case"M":r=p[m++],i=p[m++],h=s.M,n.addData(h,r,i),o=r,a=i,d="L";break;case"h":r+=p[m++],h=s.L,n.addData(h,r,i);break;case"H":r=p[m++],h=s.L,n.addData(h,r,i);break;case"v":i+=p[m++],h=s.L,n.addData(h,r,i);break;case"V":i=p[m++],h=s.L,n.addData(h,r,i);break;case"C":h=s.C,n.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),r=p[m-2],i=p[m-1];break;case"c":h=s.C,n.addData(h,p[m++]+r,p[m++]+i,p[m++]+r,p[m++]+i,p[m++]+r,p[m++]+i),r+=p[m-2],i+=p[m-1];break;case"S":v=r,y=i,A=n.len(),T=n.data,t===s.C&&(v+=r-T[A-4],y+=i-T[A-3]),h=s.C,C=p[m++],M=p[m++],r=p[m++],i=p[m++],n.addData(h,v,y,C,M,r,i);break;case"s":v=r,y=i,A=n.len(),T=n.data,t===s.C&&(v+=r-T[A-4],y+=i-T[A-3]),h=s.C,C=r+p[m++],M=i+p[m++],r+=p[m++],i+=p[m++],n.addData(h,v,y,C,M,r,i);break;case"Q":C=p[m++],M=p[m++],r=p[m++],i=p[m++],h=s.Q,n.addData(h,C,M,r,i);break;case"q":C=p[m++]+r,M=p[m++]+i,r+=p[m++],i+=p[m++],h=s.Q,n.addData(h,C,M,r,i);break;case"T":v=r,y=i,A=n.len(),T=n.data,t===s.Q&&(v+=r-T[A-4],y+=i-T[A-3]),r=p[m++],i=p[m++],h=s.Q,n.addData(h,v,y,r,i);break;case"t":v=r,y=i,A=n.len(),T=n.data,t===s.Q&&(v+=r-T[A-4],y+=i-T[A-3]),r+=p[m++],i+=p[m++],h=s.Q,n.addData(h,v,y,r,i);break;case"A":x=p[m++],b=p[m++],w=p[m++],_=p[m++],S=p[m++],C=r,M=i,r=p[m++],MZ(C,M,r,i=p[m++],_,S,x,b,w,h=s.A,n);break;case"a":x=p[m++],b=p[m++],w=p[m++],_=p[m++],S=p[m++],C=r,M=i,r+=p[m++],MZ(C,M,r,i+=p[m++],_,S,x,b,w,h=s.A,n)}}("z"===d||"Z"===d)&&(h=s.Z,n.addData(h),r=o,i=a),t=h}return n.toStatic(),n}(e),r=mB({},t);return r.buildPath=function(e){if(MK(e)){e.setData(n.data);var t=e.getContext();t&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=MN.M,d=MN.C,h=MN.L,p=MN.R,f=MN.A,g=MN.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case h:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=MF(t[0]*t[0]+t[1]*t[1]),x=MF(t[2]*t[2]+t[3]*t[3]),b=MB(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=b,l[i++]+=b,i+=2,o=i;break;case p:s[0]=l[i++],s[1]=l[i++],xN(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],xN(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var w=Mz[a];w[0]=l[i++],w[1]=l[i++],xN(w,w,t),l[o++]=w[0],l[o++]=w[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var MJ=function(){this.cx=0,this.cy=0,this.r=0},M0=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultShape=function(){return new MJ},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(wz);M0.prototype.type="circle";let M1=M0;var M2=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},M5=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultShape=function(){return new M2},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=t.rx,o=t.ry,a=.5522848*i,s=.5522848*o;e.moveTo(n-i,r),e.bezierCurveTo(n-i,r-s,n-a,r-o,n,r-o),e.bezierCurveTo(n+a,r-o,n+i,r-s,n+i,r),e.bezierCurveTo(n+i,r+s,n+a,r+o,n,r+o),e.bezierCurveTo(n-a,r+o,n-i,r+s,n-i,r),e.closePath()},t}(wz);M5.prototype.type="ellipse";let M3=M5;var M4=Math.PI,M6=2*M4,M9=Math.sin,M8=Math.cos,M7=Math.acos,Ae=Math.atan2,At=Math.abs,An=Math.sqrt,Ar=Math.max,Ai=Math.min;function Ao(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/An(s*s+l*l),c=u*l,d=-u*s,h=e+c,p=t+d,f=n+c,g=r+d,m=(h+f)/2,v=(p+g)/2,y=f-h,x=g-p,b=y*y+x*x,w=i-o,_=h*g-f*p,S=(x<0?-1:1)*An(Ar(0,w*w*b-_*_)),C=(_*x-y*S)/b,M=(-_*y-x*S)/b,A=(_*x+y*S)/b,T=(-_*y+x*S)/b,I=C-m,k=M-v,D=A-m,O=T-v;return I*I+k*k>D*D+O*O&&(C=A,M=T),{cx:C,cy:M,x0:-c,y0:-d,x1:C*(i/w-1),y1:M*(i/w-1)}}var Aa=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},As=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultShape=function(){return new Aa},t.prototype.buildPath=function(e,t){!function(e,t){var n,r=Ar(t.r,0),i=Ar(t.r0||0,0),o=r>0,a=i>0;if(o||a){if(o||(r=i,i=0),i>r){var s=r;r=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,d=t.cy,h=!!t.clockwise,p=At(u-l),f=p>M6&&p%M6;if(f>1e-4&&(p=f),r>1e-4)if(p>M6-1e-4)e.moveTo(c+r*M8(l),d+r*M9(l)),e.arc(c,d,r,l,u,!h),i>1e-4&&(e.moveTo(c+i*M8(u),d+i*M9(u)),e.arc(c,d,i,u,l,h));else{var g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,b=void 0,w=void 0,_=void 0,S=void 0,C=void 0,M=void 0,A=void 0,T=void 0,I=void 0,k=void 0,D=void 0,O=r*M8(l),P=r*M9(l),R=i*M8(u),E=i*M9(u),L=p>1e-4;if(L){var N=t.cornerRadius;N&&(g=(n=function(e){var t;if(mK(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(N))[0],m=n[1],v=n[2],y=n[3]);var z=At(r-i)/2;if(x=Ai(z,v),b=Ai(z,y),w=Ai(z,g),_=Ai(z,m),M=S=Ar(x,b),A=C=Ar(w,_),(S>1e-4||C>1e-4)&&(T=r*M8(u),I=r*M9(u),k=i*M8(l),D=i*M9(l),p<M4)){var F=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,h=d*l-c*u;if(!(h*h<1e-4))return h=(c*(t-o)-d*(e-i))/h,[e+h*l,t+h*u]}(O,P,k,D,T,I,R,E);if(F){var B=O-F[0],j=P-F[1],V=T-F[0],H=I-F[1],W=1/M9(M7((B*V+j*H)/(An(B*B+j*j)*An(V*V+H*H)))/2),G=An(F[0]*F[0]+F[1]*F[1]);M=Ai(S,(r-G)/(W+1)),A=Ai(C,(i-G)/(W-1))}}}if(L)if(M>1e-4){var $=Ai(v,M),U=Ai(y,M),Z=Ao(k,D,O,P,r,$,h),Y=Ao(T,I,R,E,r,U,h);e.moveTo(c+Z.cx+Z.x0,d+Z.cy+Z.y0),M<S&&$===U?e.arc(c+Z.cx,d+Z.cy,M,Ae(Z.y0,Z.x0),Ae(Y.y0,Y.x0),!h):($>0&&e.arc(c+Z.cx,d+Z.cy,$,Ae(Z.y0,Z.x0),Ae(Z.y1,Z.x1),!h),e.arc(c,d,r,Ae(Z.cy+Z.y1,Z.cx+Z.x1),Ae(Y.cy+Y.y1,Y.cx+Y.x1),!h),U>0&&e.arc(c+Y.cx,d+Y.cy,U,Ae(Y.y1,Y.x1),Ae(Y.y0,Y.x0),!h))}else e.moveTo(c+O,d+P),e.arc(c,d,r,l,u,!h);else e.moveTo(c+O,d+P);if(i>1e-4&&L)if(A>1e-4){var $=Ai(g,A),U=Ai(m,A),Z=Ao(R,E,T,I,i,-U,h),Y=Ao(O,P,k,D,i,-$,h);e.lineTo(c+Z.cx+Z.x0,d+Z.cy+Z.y0),A<C&&$===U?e.arc(c+Z.cx,d+Z.cy,A,Ae(Z.y0,Z.x0),Ae(Y.y0,Y.x0),!h):(U>0&&e.arc(c+Z.cx,d+Z.cy,U,Ae(Z.y0,Z.x0),Ae(Z.y1,Z.x1),!h),e.arc(c,d,i,Ae(Z.cy+Z.y1,Z.cx+Z.x1),Ae(Y.cy+Y.y1,Y.cx+Y.x1),h),$>0&&e.arc(c+Y.cx,d+Y.cy,$,Ae(Y.y1,Y.x1),Ae(Y.y0,Y.x0),!h))}else e.lineTo(c+R,d+E),e.arc(c,d,i,u,l,h);else e.lineTo(c+R,d+E)}else e.moveTo(c,d);e.closePath()}}}(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(wz);As.prototype.type="sector";let Al=As;var Au=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Ac=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultShape=function(){return new Au},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(wz);Ac.prototype.type="ring";let Ad=Ac;function Ah(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=e.length;h<p;h++)xz(a,a,e[h]),xF(s,s,e[h]);xz(a,a,r[0]),xF(s,s,r[1])}for(var h=0,p=e.length;h<p;h++){var f,g=e[h];if(n)i=e[h?h-1:p-1],o=e[(h+1)%p];else if(0===h||h===p-1){l.push([(f=e[h])[0],f[1]]);continue}else i=e[h-1],o=e[h+1];xD(u,o,i),xO(u,u,t);var m=xR(g,i),v=xR(g,o),y=m+v;0!==y&&(m/=y,v/=y),xO(c,u,-m),xO(d,u,v);var x=xk([],g,c),b=xk([],g,d);r&&(xF(x,x,a),xz(x,x,s),xF(b,b,a),xz(b,b,s)),l.push(x),l.push(b)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var Ap=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Af=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultShape=function(){return new Ap},t.prototype.buildPath=function(e,t){Ah(e,t,!0)},t}(wz);Af.prototype.type="polygon";let Ag=Af;var Am=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Av=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Am},t.prototype.buildPath=function(e,t){Ah(e,t,!1)},t}(wz);Av.prototype.type="polyline";let Ay=Av;var Ax={},Ab=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Aw=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Ab},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,r,i,o,a=w$(Ax,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(wz);Aw.prototype.type="line";let A_=Aw;var AS=[],AC=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function AM(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?x5:x2)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?x5:x2)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?x8:x9)(e.x1,e.cpx1,e.x2,t),(n?x8:x9)(e.y1,e.cpy1,e.y2,t)]}var AA=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new AC},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&(be(n,a,i,c,AS),a=AS[1],i=AS[2],be(r,s,o,c,AS),s=AS[1],o=AS[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(x6(n,a,l,i,c,AS),a=AS[1],l=AS[2],i=AS[3],x6(r,s,u,o,c,AS),s=AS[1],u=AS[2],o=AS[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return AM(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=AM(this.shape,e,!0);return xP(t,t)},t}(wz);AA.prototype.type="bezier-curve";let AT=AA;var AI=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Ak=function(e){function t(t){return e.call(this,t)||this}return yq(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new AI},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(wz);Ak.prototype.type="arc";let AD=Ak,AO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return yq(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),wz.prototype.getBoundingRect.call(this)},t}(wz);var AP=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}();let AR=function(e){function t(t,n,r,i,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return yq(t,e),t}(AP),AE=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return yq(t,e),t}(AP);var AL=[0,0],AN=[0,0],Az=new xe,AF=new xe;let AB=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new xe;for(var n=0;n<2;n++)this._axes[n]=new xe;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);xe.sub(r[0],n[1],n[0]),xe.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return(Az.set(1/0,1/0),AF.set(0,0),!this._intersectCheckOneSide(this,e,Az,AF,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,Az,AF,r,-1)&&(n=!1,r))?n:(r||xe.copy(t,n?Az:AF),n)},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,AL),this._getProjMinMaxOnAxis(s,t._corners,AN),AL[1]<AN[0]||AL[0]>AN[1]){if(a=!1,i)return a;var u=Math.abs(AN[0]-AL[1]),c=Math.abs(AL[0]-AN[1]);Math.min(u,c)>r.len()&&(u<c?xe.scale(r,l,-u*o):xe.scale(r,l,c*o))}else if(n){var u=Math.abs(AN[0]-AL[1]),c=Math.abs(AL[0]-AN[1]);Math.min(u,c)<n.len()&&(u<c?xe.scale(n,l,u*o):xe.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}();var Aj=[];let AV=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return yq(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new xu(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Aj)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(b0);var AH=Math.max,AW=Math.min,AG={};function A$(e){return wz.extend(e)}var AU=function(e,t){var n=MQ(e,t),r=Mq;function i(e){var t=r.call(this,e)||this;return t.applyTransform=n.applyTransform,t.buildPath=n.buildPath,t}return yq(i,r),i};function AZ(e,t){return AU(e,t)}function AY(e,t){AG[e]=t}function AX(e){if(AG.hasOwnProperty(e))return AG[e]}function Aq(e,t,n,r){var i=new Mq(MQ(e,t));return n&&("center"===r&&(n=AQ(n,i.getBoundingRect())),A0(i,n)),i}function AK(e,t,n){var r=new wW({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(AQ(t,i))}}});return r}function AQ(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var AJ=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new wz(t);return a.createPathProxy(),a.buildPath=function(e){if(MK(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function A0(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function A1(e,t){return w$(e,e,{lineWidth:t}),e}function A2(e){return wU(e.shape,e.shape,e.style),e}var A5=wZ;function A3(e,t){for(var n=y4([]);e&&e!==t;)y6(n,e.getLocalTransform(),n),e=e.parent;return n}function A4(e,t,n){return t&&!mW(t)&&(t=xG.getLocalTransform(t)),n&&(t=y7([],t)),xN([],e,t)}function A6(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return Math.abs((o=A4(o,t,n))[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function A9(e,t,n){if(e&&t){var r,i=(r={},e.traverse(function(e){!e.isGroup&&e.anid&&(r[e.anid]=e)}),r);t.traverse(function(e){if(!e.isGroup&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),_X(e,r,n,_n(e).dataIndex)}}})}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return null!=e.shape&&(t.shape=mB({},e.shape)),t}}function A8(e,t){return m$(e,function(e){var n=e[0];n=AW(n=AH(n,t.x),t.x+t.width);var r=e[1];return[n,r=AW(r=AH(r,t.y),t.y+t.height)]})}function A7(e,t){var n=AH(e.x,t.x),r=AW(e.x+e.width,t.x+t.width),i=AH(e.y,t.y),o=AW(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}}function Te(e,t,n){var r=mB({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),mj(i,n),new wW(r)):Aq(e.replace("path://",""),r,n,"center")}function Tt(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(Tn(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function Tn(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,h=s-o,p=d*c-u*h;if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=(f*c-u*g)/p;if(m<0||m>1)return!1;var v=(f*h-d*g)/p;return!(v<0)&&!(v>1)}function Tr(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=mJ(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&mG(mY(l),function(e){vd(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=_n(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:mj({content:r,formatterParams:s},i)}}function Ti(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function To(e,t){if(e)if(mK(e))for(var n=0;n<e.length;n++)Ti(e[n],t);else Ti(e,t)}AG.circle=M1,AG.ellipse=M3,AG.sector=Al,AG.ring=Ad,AG.polygon=Ag,AG.polyline=Ay,AG.rect=wK,AG.line=A_,AG.bezierCurve=AT,AG.arc=AD;var Ta="\0__throttleOriginMethod",Ts="\0__throttleRate",Tl="\0__throttleType";function Tu(e,t,n){var r,i,o,a,s,l=0,u=0,c=null;function d(){u=new Date().getTime(),c=null,e.apply(o,a||[])}t=t||0;var h=function(){for(var e=[],h=0;h<arguments.length;h++)e[h]=arguments[h];r=new Date().getTime(),o=this,a=e;var p=s||t,f=s||n;s=null,i=r-(f?l:u)-p,clearTimeout(c),f?c=setTimeout(d,p):i>=0?d():c=setTimeout(d,-i),l=r};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function Tc(e,t,n,r){var i=e[t];if(i){var o=i[Ta]||i,a=i[Tl];if(i[Ts]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=Tu(o,n,"debounce"===r))[Ta]=o,i[Tl]=r,i[Ts]=n}return i}}function Td(e,t){var n=e[t];n&&n[Ta]&&(n.clear&&n.clear(),e[t]=n[Ta])}function Th(e,t,n,r,i){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new wK({shape:{x:a,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=mQ(i)?function(e){i(e,d)}:null;_q(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function Tp(e,t,n){var r=e.getArea(),i=vm(r.r0,1),o=vm(r.r,1),a=new Al({shape:{cx:vm(e.cx,1),cy:vm(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,_q(a,{shape:{endAngle:r.endAngle,r:o}},n)),a}function Tf(e,t,n,r,i){if(e){if("polar"===e.type)return Tp(e,t,n);else if("cartesian2d"===e.type)return Th(e,t,n,r,i)}return null}var Tg=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Tm=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return yN(t,e),t.prototype.getDefaultShape=function(){return new Tg},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=(o-i)*.5,s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-l<d:l-u<d;h||(l=u-(c?d:-d));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);h?(e.moveTo(p*i+n,f*i+r),e.arc(p*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(p*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(wz),Tv=vG(),Ty=yx(),Tx=function(){function e(){this.group=new ML,this.uid=Sy("viewChart"),this.renderTask=CT({plan:T_,reset:TS}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Tw(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Tw(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){To(this.group,e)},e.markUpdateMethod=function(e,t){Tv(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function Tb(e,t,n){e&&_W(e)&&("emphasis"===t?_k:_D)(e,n)}function Tw(e,t,n){var r,i,o=vW(e,t),a=t&&null!=t.highlightKey?(null==(i=_o[r=t.highlightKey])&&_i<=32&&(i=_o[r]=_i++),i):null;null!=o?mG(vE(o),function(t){Tb(e.getItemGraphicEl(t),n,a)}):e.eachItemGraphicEl(function(e){Tb(e,n,a)})}function T_(e){return Ty(e.model)}function TS(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&Tv(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),TC[l]}yj(Tx,["dispose"]),y$(Tx);var TC={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function TM(e,t){return e.type===t}function TA(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=CS(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(CS(e,t,n[a]));return o.join(" ")}}function TT(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!mK(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}function TI(e,t,n){return t*Math.sin(e)*(n?-1:1)}function Tk(e,t,n){return t*Math.cos(e)*(n?1:-1)}function TD(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;mK(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:m$(r,function(e){return xv(e,i)})}}var TO=Math.max,TP=Math.min,TR=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return yN(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");("cartesian2d"===i||"polar"===i)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){To(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(TM(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,b=r&&r.isInitSort,w=r&&"changeAxisOrder"===r.type;function _(e){var t,n,r,o=TV[l.type](a,e),s=(t=l,n=i,r=o,new("polar"===t.type?Al:wK)({shape:TY(n,r,t),silent:!0,z2:0}));return s.useStyle(m.getItemStyle()),"cartesian2d"===l.type?s.setShape("r",v):s.setShape("cornerRadius",v),y[e]=s,s}a.diff(s).add(function(t){var n=a.getItemModel(t),r=TV[l.type](a,t,n);if(g&&_(t),a.hasValue(t)&&Tj[l.type](r)){var s=!1;h&&(s=TE[l.type](p,r));var m=TL[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),TW(m,a,t,n,r,e,i,"polar"===l.type),b?m.attr({shape:r}):d?TN(d,c,m,r,t,i,!1,!1):_q(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}}).update(function(t,n){var r=a.getItemModel(t),S=TV[l.type](a,t,r);if(g){var C=void 0;0===x.length?C=_(n):((C=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var M=TV[l.type](a,t);_X(C,{shape:TY(i,M,l)},c,t)}var A=s.getItemGraphicEl(n);if(!a.hasValue(t)||!Tj[l.type](S))return void o.remove(A);var T=!1;if(h&&(T=TE[l.type](p,S))&&o.remove(A),A?_1(A):A=TL[l.type](e,a,t,S,i,c,u.model,!!A,f),d&&(A.forceLabelAnimation=!0),w){var I=A.getTextContent();if(I){var k=Si(I);null!=k.prevValue&&(k.prevValue=k.value)}}else TW(A,a,t,r,S,e,i,"polar"===l.type);b?A.attr({shape:S}):d?TN(d,c,A,S,t,i,!0,w):_X(A,{shape:S},e,t,null),a.setItemGraphicEl(t,A),A.ignore=T,o.add(A)}).remove(function(t){var n=s.getItemGraphicEl(t);n&&_0(n,e,t)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new ML);S.removeAll();for(var C=0;C<y.length;++C)S.add(y[C]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),TU(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),TU(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&Tf(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:m$(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?5e-324:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){_0(t,e,_n(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Tx),TE={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=TO(t.x,e.x),s=TP(t.x+t.width,i),l=TO(t.y,e.y),u=TP(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>i?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=TP(t.r,e.r),o=TO(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return a}},TL={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new wK({shape:mB({},r),z2:1});return u.__dataIndex=n,u.name="item",o&&(u.shape[i?"height":"width"]=0),u},polar:function(e,t,n,r,i,o,a,s,l){var u,c,d=!i&&l?Tm:Al,h=new d({shape:r,z2:1});if(h.name="item",u=TH(i),c=d===Tm,h.calculateTextPosition=function(e,t,n){var r=t.position;if(!r||r instanceof Array)return xy(e,t,n);var i=u(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,d=a.r,h=a.r0,p=(d+h)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=c?Math.abs(d-h)/2:0,y=Math.cos,x=Math.sin,b=s+d*y(f),w=l+d*x(f),_="left",S="top";switch(i){case"startArc":b=s+(h-o)*y(m),w=l+(h-o)*x(m),_="center",S="top";break;case"insideStartArc":b=s+(h+o)*y(m),w=l+(h+o)*x(m),_="center",S="bottom";break;case"startAngle":b=s+p*y(f)+TI(f,o+v,!1),w=l+p*x(f)+Tk(f,o+v,!1),_="right",S="middle";break;case"insideStartAngle":b=s+p*y(f)+TI(f,-o+v,!1),w=l+p*x(f)+Tk(f,-o+v,!1),_="left",S="middle";break;case"middle":b=s+p*y(m),w=l+p*x(m),_="center",S="middle";break;case"endArc":b=s+(d+o)*y(m),w=l+(d+o)*x(m),_="center",S="bottom";break;case"insideEndArc":b=s+(d-o)*y(m),w=l+(d-o)*x(m),_="center",S="top";break;case"endAngle":b=s+p*y(g)+TI(g,o+v,!0),w=l+p*x(g)+Tk(g,o+v,!0),_="left",S="middle";break;case"insideEndAngle":b=s+p*y(g)+TI(g,-o+v,!0),w=l+p*x(g)+Tk(g,-o+v,!0),_="right",S="middle";break;default:return xy(e,t,n)}return(e=e||{}).x=b,e.y=w,e.align=_,e.verticalAlign=S,e},o){var p=h.shape,f=i?"r":"endAngle",g={};p[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?_X:_q)(h,{shape:g},o)}return h}};function TN(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?_X:_q)(n,{shape:l},t,i,null),(a?_X:_q)(n,{shape:u},t?e.baseAxis.model:null,i)}function Tz(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var TF=["x","y","width","height"],TB=["cx","cy","r","startAngle","endAngle"],Tj={cartesian2d:function(e){return!Tz(e,TF)},polar:function(e){return!Tz(e,TB)}},TV={cartesian2d:function(e,t,n){var r,i,o,a=e.getItemLayout(t),s=n?(r=n,i=a,(o=r.get(["itemStyle","borderColor"]))&&"none"!==o?Math.min(r.get(["itemStyle","borderWidth"])||0,isNaN(i.width)?Number.MAX_VALUE:Math.abs(i.width),isNaN(i.height)?Number.MAX_VALUE:Math.abs(i.height)):0):0,l=a.width>0?1:-1,u=a.height>0?1:-1;return{x:a.x+l*s/2,y:a.y+u*s/2,width:a.width-l*s,height:a.height-u*s}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function TH(e){var t;return t=e?"Arc":"Angle",function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}function TW(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape,c=TD(r.getModel("itemStyle"),u,!0);mB(u,c),e.setShape(u)}}else{var d=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",d)}e.useStyle(l);var h=r.getShallow("cursor");h&&e.attr("cursor",h);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",f=_6(r);_4(e,f,{labelFetcher:o,labelDataIndex:n,defaultText:TA(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var g=e.getTextContent();if(s&&g){var m=r.get(["label","position"]);e.textConfig.inside="middle"===m||null,function(e,t,n,r){if(m1(r))return e.setTextConfig({rotation:r});if(mK(t))return e.setTextConfig({rotation:0});var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=n(t);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=(a+s)/2;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:e.setTextConfig({rotation:0});return}var u=1.5*Math.PI-i;"middle"===l&&u>Math.PI/2&&u<1.5*Math.PI&&(u-=Math.PI),e.setTextConfig({rotation:u})}(e,"outside"===m?p:m,TH(a),r.get(["label","rotate"]))}So(g,f,o.getRawValue(n),function(e){return TT(t,e)});var v=r.getModel(["emphasis"]);_F(e,v.get("focus"),v.get("blurScope"),v.get("disabled")),_V(e,r),null!=i.startAngle&&null!=i.endAngle&&i.startAngle===i.endAngle&&(e.style.fill="none",e.style.stroke="none",mG(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var TG=function(){},T$=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return yN(t,e),t.prototype.getDefaultShape=function(){return new TG},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(wz);function TU(e,t,n,r){var i=e.getData(),o=+!!i.getLayout("valueAxisHorizontal"),a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new T$({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new T$({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(i.getVisual("style")),_n(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",TZ),d.on("mousemove",TZ)),n&&n.push(d)}var TZ=Tu(function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var h=3*c;if(l[r]=u,l[i]=o[h+2],s[r]=o[h+r],s[i]=o[h+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return -1}(this,e.offsetX,e.offsetY);_n(this).dataIndex=t>=0?t:null},30,!1);function TY(e,t,n){if(TM(n,"cartesian2d")){var r=n.getArea();return{x:e?t.x:r.x,y:e?r.y:t.y,width:e?t.width:r.width,height:e?r.height:t.height}}var r=n.getArea();return{cx:r.cx,cy:r.cy,r0:e?r.r0:t.r0,r:e?r.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}}var TX=wz.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),Tq=wz.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),TK=wz.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),h=Math.cos(u),p=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*p,l+s+h*p,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*p,l+s+h*p,n-c,l+s),e.closePath()}}),TQ=wz.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),TJ={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},T0={};mG({line:A_,rect:wK,roundRect:wK,square:wK,circle:M1,diamond:Tq,pin:TK,arrow:TQ,triangle:TX},function(e,t){T0[t]=new e});var T1=wz.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=xy(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=T0[r];i||(i=T0[r="rect"]),TJ[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function T2(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function T5(e,t,n,r,i,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?AK(e.slice(8),new xu(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?Aq(e.slice(7),{},new xu(t,n,r,i),a?"center":"cover"):new T1({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=T2,o&&s.setColor(o),s}function T3(e){return mK(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function T4(e,t){if(null!=e)return mK(e)||(e=[e,e]),[vg(e[0],t[0])||0,vg(m8(e[1],e[0]),t[1])||0]}var T6=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return yN(t,e),t.prototype.getInitialData=function(e){return MO(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new ML,n=T5("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=T5(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=("inherit"===e.iconRotate?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Ma),T9=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return yN(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=T5(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=T8,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){_k(this.childAt(0))},t.prototype.downplay=function(){_D(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{var d=this.childAt(0);d.silent=!1;var h={scaleX:s[0]/2,scaleY:s[1]/2};u?d.attr(h):_X(d,h,a,n),_1(d)}if(this._updateCommon(e,n,s,r,i),l){var d=this.childAt(0);if(!u){var h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,_q(d,h,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,d,h,p,f=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,h=r.hoverScale,p=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=_6(m),h=v.getShallow("scale"),p=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=T4(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var b=e.getItemVisual(t,"style"),w=b.fill;if(f instanceof wW){var _=f.style;f.useStyle(mB({image:_.image,x:_.x,y:_.y,width:_.width,height:_.height},b))}else f.__isEmptyBrush?f.useStyle(mB({},b)):f.useStyle(b),f.style.decal=null,f.setColor(w,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),C=this._z2;null!=S?null==C&&(this._z2=f.z2,f.z2+=S):null!=C&&(f.z2=C,this._z2=null);var M=i&&i.useNameLabel;_4(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return M?e.getName(t):TA(e,t)},inheritColor:w,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var A=f.ensureState("emphasis");A.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var T=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;A.scaleX=this._sizeX*T,A.scaleY=this._sizeY*T,this.setSymbolScale(1),_F(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=_n(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&_Q(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();_Q(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return T3(e.getItemVisual(t,"symbolSize"))},t}(ML);function T8(e,t){this.parent.drift(e,t)}function T7(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function Ie(e){return null==e||m2(e)||(e={isIgnore:e}),e||{}}function It(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:_6(t),cursorStyle:t.get("cursor")}}var In=function(){function e(e){this.group=new ML,this._SymbolCtor=e||T9}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Ie(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=It(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=u(r);if(T7(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}}).update(function(c,d){var h=i.getItemGraphicEl(d),p=u(c);if(!T7(e,p,c,t))return void n.remove(h);var f=e.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new o(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var m={x:p[0],y:p[1]};a?h.attr(m):_X(h,m,r)}n.add(h),e.setItemGraphicEl(c,h)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=It(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=Ie(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(T7(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){To(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function Ir(e,t,n){var r,i,o,a,s=e.getBaseAxis(),l=e.getOtherAxis(s),u=(r=l,i=n,o=0,a=r.scale.getExtent(),"start"===i?o=a[0]:"end"===i?o=a[1]:m1(i)&&!isNaN(i)?o=i:a[0]>0?o=a[0]:a[1]<0&&(o=a[1]),o),c=s.dim,d=l.dim,h=t.mapDimension(d),p=t.mapDimension(c),f=+("x"===d||"radius"===d),g=m$(e.dimensions,function(e){return t.mapDimension(e)}),m=!1,v=t.getCalculationInfo("stackResultDimension");return yv(t,g[0])&&(m=!0,g[0]=v),yv(t,g[1])&&(m=!0,g[1]=v),{dataDimsForPoint:g,valueStart:u,valueAxisDim:d,baseAxisDim:c,stacked:!!m,valueDim:h,baseDim:p,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Ii(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var Io=Math.min,Ia=Math.max;function Is(e,t){return isNaN(e)||isNaN(t)}function Il(e,t,n,r,i,o,a,s,l){for(var u,c,d,h,p,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(Is(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,h=y;else{var x=v-u,b=y-c;if(x*x+b*b<.5){g+=o;continue}if(a>0){for(var w=g+o,_=t[2*w],S=t[2*w+1];_===v&&S===y&&m<r;)m++,w+=o,g+=o,_=t[2*w],S=t[2*w+1],v=t[2*g],y=t[2*g+1],x=v-u,b=y-c;var C=m+1;if(l)for(;Is(_,S)&&C<r;)C++,w+=o,_=t[2*w],S=t[2*w+1];var M=.5,A=0,T=0,I=void 0,k=void 0;if(C>=r||Is(_,S))p=v,f=y;else{A=_-u,T=S-c;var D=v-u,O=_-v,P=y-c,R=S-y,E=void 0,L=void 0;if("x"===s){E=Math.abs(D),L=Math.abs(O);var N=A>0?1:-1;p=v-N*E*a,f=y,I=v+N*L*a,k=y}else if("y"===s){E=Math.abs(P),L=Math.abs(R);var z=T>0?1:-1;p=v,f=y-z*E*a,I=v,k=y+z*L*a}else E=Math.sqrt(D*D+P*P),p=v-A*a*(1-(M=(L=Math.sqrt(O*O+R*R))/(L+E))),f=y-T*a*(1-M),I=v+A*a*M,k=y+T*a*M,I=Io(I,Ia(_,v)),k=Io(k,Ia(S,y)),I=Ia(I,Io(_,v)),k=Ia(k,Io(S,y)),A=I-v,T=k-y,p=v-A*E/L,f=y-T*E/L,p=Io(p,Ia(u,v)),f=Io(f,Ia(c,y)),p=Ia(p,Io(u,v)),f=Ia(f,Io(c,y)),A=v-p,T=y-f,I=v+A*L/E,k=y+T*L/E}e.bezierCurveTo(d,h,p,f,v,y),d=I,h=k}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var Iu=function(){this.smooth=0,this.smoothConstraint=!0},Ic=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return yN(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Iu},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Is(n[2*i-2],n[2*i-1]);i--);for(;r<i&&Is(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=Il(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=wS.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=i[l++],c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0,m=void 0;switch(u){case o.M:n=i[l++],r=i[l++];break;case o.L:if(c=i[l++],d=i[l++],(m=a?(e-n)/(c-n):(e-r)/(d-r))<=1&&m>=0){var v=a?(d-r)*m+r:(c-n)*m+n;return a?[e,v]:[v,e]}n=c,r=d;break;case o.C:c=i[l++],d=i[l++],h=i[l++],p=i[l++],f=i[l++],g=i[l++];var y=a?x3(n,c,h,f,e,s):x3(r,d,p,g,e,s);if(y>0)for(var x=0;x<y;x++){var b=s[x];if(b<=1&&b>=0){var v=a?x2(r,d,p,g,b):x2(n,c,h,f,b);return a?[e,v]:[v,e]}}n=f,r=g}}},t}(wz),Id=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t}(Iu),Ih=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return yN(t,e),t.prototype.getDefaultShape=function(){return new Id},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&Is(n[2*o-2],n[2*o-1]);o--);for(;i<o&&Is(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=Il(e,n,i,o,o,1,t.smooth,a,t.connectNulls);Il(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(wz);function Ip(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function If(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function Ig(e,t){var n=If(e),r=n[0],i=n[1],o=If(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function Im(e){return m1(e)?e:.5*!!e}function Iv(e,t,n,r){var i=t.getBaseAxis(),o=+("x"!==i.dim&&"radius"!==i.dim),a=[],s=0,l=[],u=[],c=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var h=(u[o]+c[o])/2,p=[];l[o]=p[o]=h,l[1-o]=u[1-o],p[1-o]=c[1-o],a.push(l[0],l[1]),a.push(p[0],p[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function Iy(e,t){return[e[2*t],e[2*t+1]]}function Ix(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<_l.length;t++)if(e.get([_l[t],"endLabel","show"]))return!0;return!1}function Ib(e,t,n,r){if(!TM(t,"cartesian2d"))return Tp(t,n,r);var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=Ix(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=Th(t,n,r,function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})},l);if(!r.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}var Iw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.init=function(){var e=new ML,t=new In;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r,i=this,o=e.coordinateSystem,a=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),c=s.getLayout("points")||[],d="polar"===o.type,h=this._coordSys,p=this._symbolDraw,f=this._polyline,g=this._polygon,m=this._lineGroup,v=!t.ssr&&e.get("animation"),y=!u.isEmpty(),x=u.get("origin"),b=Ir(o,s,x),w=y&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=y_(2*r),o=0;o<r;o++){var a=Ii(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(o,s,b),_=e.get("showSymbol"),S=e.get("connectNulls"),C=_&&!d&&function(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&!(i&&function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*T9.getSymbolSize(t,a)[+!!e.isHorizontal()]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return mG(o.getViewLabels(),function(e){s[o.scale.getRawOrdinalNumber(e.tickValue)]=1}),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}(e,s,o),M=this._data;M&&M.eachItemGraphicEl(function(e,t){e.__temp&&(a.remove(e),M.setItemGraphicEl(t,null))}),_||p.remove(),a.add(m);var A=!d&&e.get("step");o&&o.getArea&&e.get("clip",!0)&&(null!=(r=o.getArea()).width?(r.x-=.1,r.y-=.1,r.width+=.2,r.height+=.2):r.r0&&(r.r0-=.5,r.r+=.5)),this._clipShapeForSymbol=r;var T=function(e,t,n){var r,i,o=e.getVisual("visualMeta");if(o&&o.length&&e.count()){if("cartesian2d"!==t.type)return;for(var a=o.length-1;a>=0;a--){var s=e.getDimensionInfo(o[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){i=o[a];break}}if(!i)return;var l=t.getAxis(r),u=m$(i.stops,function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}}),c=u.length,d=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=function(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord,i=function(e,t){if(t&&t.length&&e>=0&&e<=1){var n,r,i,o,a=e*(t.length-1),s=Math.floor(a),l=Math.ceil(a),u=bg(t[s]),c=bg(t[l]),d=a-s;return bw([bo((n=u[0],n+(c[0]-n)*d)),bo((r=u[1],r+(c[1]-r)*d)),bo((i=u[2],i+(c[2]-i)*d)),ba((o=u[3],o+(c[3]-o)*d))],"rgba")}}((n-r)/(t.coord-r),[e.color,t.color]);return{coord:n,color:i}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}else n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}return i}(u,"x"===r?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,g=h[p-1].coord+10,m=g-f;if(m<.001)return"transparent";mG(h,function(e){e.offset=(e.coord-f)/m}),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new AR(0,0,0,0,h,!0);return v[r]=f,v[r+"2"]=g,v}}(s,o,n)||s.getVisual("style")[s.getVisual("drawType")];if(f&&h.type===o.type&&A===this._step){y&&!g?g=this._newPolygon(c,w):g&&!y&&(m.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(e,o,S7(T));var I=m.getClipPath();I?_q(I,{shape:Ib(this,o,!1,e).shape},e):m.setClipPath(Ib(this,o,!0,e)),_&&p.updateData(s,{isIgnore:C,clipShape:r,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),Ip(this._stackedOnPoints,w)&&Ip(this._points,c)||(v?this._doUpdateAnimation(s,w,o,n,A,x,S):(A&&(c=Iv(c,o,A,S),w&&(w=Iv(w,o,A,S))),f.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:w})))}else _&&p.updateData(s,{isIgnore:C,clipShape:r,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),v&&this._initSymbolLabelAnimation(s,o,r),A&&(c=Iv(c,o,A,S),w&&(w=Iv(w,o,A,S))),f=this._newPolyline(c),y?g=this._newPolygon(c,w):g&&(m.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(e,o,S7(T)),m.setClipPath(Ib(this,o,!0,e));var k=e.getModel("emphasis"),D=k.get("focus"),O=k.get("blurScope"),P=k.get("disabled");f.useStyle(mj(l.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"})),_V(f,e,"lineStyle"),f.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"])&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1),_n(f).seriesIndex=e.seriesIndex,_F(f,D,O,P);var R=Im(e.get("smooth")),E=e.get("smoothMonotone");if(f.setShape({smooth:R,smoothMonotone:E,connectNulls:S}),g){var L=s.getCalculationInfo("stackedOnSeries"),N=0;g.useStyle(mj(u.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),L&&(N=Im(L.get("smooth"))),g.setShape({smooth:R,stackedOnSmooth:N,smoothMonotone:E,connectNulls:S}),_V(g,e,"areaStyle"),_n(g).seriesIndex=e.seriesIndex,_F(g,D,O,P)}var z=function(e){i._changePolyState(e)};s.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=z)}),this._polyline.onHoverStateChange=z,this._data=s,this._coordSys=o,this._stackedOnPoints=w,this._points=c,this._step=A,this._valueOrigin=x,e.get("triggerLineEvent")&&(this.packEventData(e,f),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,t){_n(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=vW(i,r);if(this._changePolyState("emphasis"),o instanceof Array||null==o||!(o>=0))Tx.prototype.highlight.call(this,e,t,n,r);else{var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new T9(i,o)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=vW(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Tx.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;_C(this._polyline,e),t&&_C(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Ic({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Ih({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");mQ(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=mQ(u)?u(null):u;e.eachItemGraphicEl(function(e,o){if(e){var s=[e.x,e.y],d=void 0,h=void 0,p=void 0;if(n)if(i){var f=t.pointToCoord(s);r?(d=n.startAngle,h=n.endAngle,p=-f[1]/180*Math.PI):(d=n.r0,h=n.r,p=f[0])}else r?(d=n.x,h=n.x+n.width,p=e.x):(d=n.y+n.height,h=n.y,p=e.y);var g=h===d?0:(p-d)/(h-d);a&&(g=1-g);var m=mQ(u)?u(o):l*g+c,v=e.getSymbolPath(),y=v.getTextContent();e.attr({scaleX:0,scaleY:0}),e.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:m}),y&&y.animateFrom({style:{opacity:0}},{duration:300,delay:m}),v.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(Ix(e)){var i,o,a,s=e.getData(),l=this._polyline,u=s.getLayout("points");if(!u){l.removeTextContent(),this._endLabel=null;return}var c=this._endLabel;c||((c=this._endLabel=new _t({z2:200})).ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var d=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(u);d>=0&&(_4(l,_6(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:d,defaultText:function(e,t,n){return null!=n?TT(s,n):TA(s,e)},enableTextSetter:!0},(o=(i=t.getBaseAxis()).isHorizontal(),a=i.inverse,{normal:{align:r.get("align")||(o?a?"right":"left":"center"),verticalAlign:r.get("verticalAlign")||(o?"middle":a?"top":"bottom")}})),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?p:0)*(m?-1:1),b=(g?0:-p)*(m?-1:1),w=g?"x":"y",_=function(e,t,n){for(var r,i,o=e.length/2,a=+("x"!==n),s=0,l=-1,u=0;u<o;u++)if(!(isNaN(i=e[2*u+a])||isNaN(e[2*u+1-a]))){if(0===u){r=i;continue}if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}return{range:[s,l],t:(t-r)/(i-r)}}(u,y,w),S=_.range,C=S[1]-S[0],M=void 0;if(C>=1){if(C>1&&!d){var A=Iy(u,S[0]);s.attr({x:A[0]+x,y:A[1]+b}),i&&(M=c.getRawValue(S[0]))}else{var A=l.getPointOn(y,w);A&&s.attr({x:A[0]+x,y:A[1]+b});var T=c.getRawValue(S[0]),I=c.getRawValue(S[1]);i&&(M=vQ(n,h,T,I,_.t))}r.lastFrameIndex=S[0]}else{var k=1===e||r.lastFrameIndex>0?S[0]:0,A=Iy(u,k);i&&(M=c.getRawValue(k)),s.attr({x:A[0]+x,y:A[1]+b})}if(i){var D=Si(s);"function"==typeof D.setLabelText&&D.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,o){for(var a,s=(a=[],t.diff(e).add(function(e){a.push({cmd:"+",idx:e})}).update(function(e,t){a.push({cmd:"=",idx:t,idx1:e})}).remove(function(e){a.push({cmd:"-",idx:e})}).execute(),a),l=[],u=[],c=[],d=[],h=[],p=[],f=[],g=Ir(i,t,o),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],b=!0,w=void 0,_=void 0;switch(x.cmd){case"=":w=2*x.idx,_=2*x.idx1;var S=m[w],C=m[w+1],M=v[_],A=v[_+1];(isNaN(S)||isNaN(C))&&(S=M,C=A),l.push(S,C),u.push(M,A),c.push(n[w],n[w+1]),d.push(r[_],r[_+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var T=x.idx,I=g.dataDimsForPoint,k=i.dataToPoint([t.get(I[0],T),t.get(I[1],T)]);_=2*T,l.push(k[0],k[1]),u.push(v[_],v[_+1]);var D=Ii(g,i,t,T);c.push(D[0],D[1]),d.push(r[_],r[_+1]),f.push(t.getRawIndex(T));break;case"-":b=!1}b&&(h.push(x),p.push(p.length))}p.sort(function(e,t){return f[e]-f[t]});for(var O=l.length,P=y_(O),R=y_(O),E=y_(O),L=y_(O),N=[],y=0;y<p.length;y++){var z=p[y],F=2*y,B=2*z;P[F]=l[B],P[F+1]=l[B+1],R[F]=u[B],R[F+1]=u[B+1],E[F]=c[B],E[F+1]=c[B+1],L[F]=d[B],L[F+1]=d[B+1],N[y]=h[z]}return{current:P,next:R,stackedOnCurrent:E,stackedOnNext:L,status:N}}(this._data,e,this._stackedOnPoints,t,this._coordSys,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(i&&(d=Iv(c.current,n,i,a),h=Iv(c.stackedOnCurrent,n,i,a),p=Iv(c.next,n,i,a),f=Iv(c.stackedOnNext,n,i,a)),Ig(d,p)>3e3||l&&Ig(h,f)>3e3){s.stopAnimation(),s.setShape({points:p}),l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f}));return}s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:p}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),_X(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),_X(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++)if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}s.animators&&s.animators.length&&s.animators[0].during(function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(Tx);function I_(e,t){return{seriesType:e,plan:yx(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=m$(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");yv(n,a[0])&&(a[0]=l),yv(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=o&&y_(n*s),a=[],l=[],h=e.start,p=0;h<e.end;h++){var f=void 0;if(1===s){var g=u.get(c,h);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,h),a[1]=u.get(d,h),f=r.dataToPoint(a,null,l);o?(i[p++]=f[0],i[p++]=f[1]):t.setItemLayout(h,f.slice())}o&&t.setLayout("points",i)}}}}}}var IS=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},IC=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return yN(t,e),t.prototype.getDefaultShape=function(){return new IS},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,o=t.width,a=t.angle,s=t.x-n(a)*o*(o>=i/3?1:2),l=t.y-r(a)*o*(o>=i/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*o,t.y+r(a)*o),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(a)*o,t.y-r(a)*o),e.lineTo(s,l)},t}(wz);function IM(e,t){var n=null==e?"":e+"";return t&&(mJ(t)?n=t.replace("{value}",n):mQ(t)&&(n=t(e))),n}var IA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r,i,o=e.get(["axisLine","lineStyle","color"]),a=(r=e.get("center"),i=Math.min(n.getWidth(),n.getHeight()),{cx:vg(r[0],n.getWidth()),cy:vg(r[1],n.getHeight()),r:vg(e.get("radius"),i/2)});this._renderMain(e,t,n,o,a),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var o=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap")?Tm:Al,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[s,l];w_(f,!a),s=f[0];for(var g=(l=f[1])-s,m=s,v=[],y=0;d&&y<r.length;y++){var x=new c({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(r[y][0],0),1),cx:i.cx,cy:i.cy,clockwise:a,r0:i.r-p,r:i.r},silent:!0});x.setStyle({fill:r[y][1]}),x.setStyle(h.getLineStyle(["color","width"])),v.push(x),m=l}v.reverse(),mG(v,function(e){return o.add(e)});var b=function(e){var t;if(e<=0)return r[0][1];for(t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,b,i,s,l,a,p),this._renderTitleAndDetail(e,t,n,b,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,b,i,s,l,a,p)},t.prototype._renderTicks=function(e,t,n,r,i,o,a,s,l){for(var u,c,d=this.group,h=i.cx,p=i.cy,f=i.r,g=+e.get("min"),m=+e.get("max"),v=e.getModel("splitLine"),y=e.getModel("axisTick"),x=e.getModel("axisLabel"),b=e.get("splitNumber"),w=y.get("splitNumber"),_=vg(v.get("length"),f),S=vg(y.get("length"),f),C=o,M=(a-o)/b,A=M/w,T=v.getModel("lineStyle").getLineStyle(),I=y.getModel("lineStyle").getLineStyle(),k=v.get("distance"),D=0;D<=b;D++){if(u=Math.cos(C),c=Math.sin(C),v.get("show")){var O=k?k+l:l,P=new A_({shape:{x1:u*(f-O)+h,y1:c*(f-O)+p,x2:u*(f-_-O)+h,y2:c*(f-_-O)+p},style:T,silent:!0});"auto"===T.stroke&&P.setStyle({stroke:r(D/b)}),d.add(P)}if(x.get("show")){var O=x.get("distance")+k,R=IM(vm(D/b*(m-g)+g),x.get("formatter")),E=r(D/b),L=u*(f-_-O)+h,N=c*(f-_-O)+p,z=x.get("rotate"),F=0;"radial"===z?(F=-C+2*Math.PI)>Math.PI/2&&(F+=Math.PI):"tangential"===z?F=-C-Math.PI/2:m1(z)&&(F=z*Math.PI/180),0===F?d.add(new _t({style:_9(x,{text:R,x:L,y:N,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:E}),silent:!0})):d.add(new _t({style:_9(x,{text:R,x:L,y:N,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:L,originY:N,rotation:F}))}if(y.get("show")&&D!==b){var O=y.get("distance");O=O?O+l:l;for(var B=0;B<=w;B++){var j=new A_({shape:{x1:(u=Math.cos(C))*(f-O)+h,y1:(c=Math.sin(C))*(f-O)+p,x2:u*(f-S-O)+h,y2:c*(f-S-O)+p},silent:!0,style:I});"auto"===I.stroke&&j.setStyle({stroke:r((D+B/w)/b)}),d.add(j),C+=A}C-=A}else C+=M}},t.prototype._renderPointer=function(e,t,n,r,i,o,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),g=f.get("show"),m=e.getData(),v=m.mapDimension("value"),y=+e.get("min"),x=+e.get("max"),b=[y,x],w=[o,a];function _(t,n){var r,o=m.getItemModel(t).getModel("pointer"),a=vg(o.get("width"),i.r),s=vg(o.get("length"),i.r),l=e.get(["pointer","icon"]),u=o.get("offsetCenter"),c=vg(u[0],i.r),d=vg(u[1],i.r),h=o.get("keepAspect");return(r=l?T5(l,c-a/2,d-s,a,s,null,h):new IC({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),r.x=i.cx,r.y=i.cy,r}function S(e,t){var n=f.get("roundCap")?Tm:Al,r=f.get("overlap"),a=r?f.get("width"):l/m.count(),u=r?i.r-a:i.r-(e+1)*a,c=r?i.r:i.r-e*a,d=new n({shape:{startAngle:o,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:u,r:c}});return r&&(d.z2=x-m.get(v,e)%x),d}(g||p)&&(m.diff(c).add(function(t){var n=m.get(v,t);if(p){var r=_(t,o);_q(r,{rotation:-((isNaN(+n)?w[0]:vf(n,b,w,!0))+Math.PI/2)},e),u.add(r),m.setItemGraphicEl(t,r)}if(g){var i=S(t,o);_q(i,{shape:{endAngle:vf(n,b,w,f.get("clip"))}},e),u.add(i),_r(e.seriesIndex,m.dataType,t,i),h[t]=i}}).update(function(t,n){var r=m.get(v,t);if(p){var i=c.getItemGraphicEl(n),a=i?i.rotation:o,s=_(t,a);s.rotation=a,_X(s,{rotation:-((isNaN(+r)?w[0]:vf(r,b,w,!0))+Math.PI/2)},e),u.add(s),m.setItemGraphicEl(t,s)}if(g){var l=d[n],y=S(t,l?l.shape.endAngle:o);_X(y,{shape:{endAngle:vf(r,b,w,f.get("clip"))}},e),u.add(y),_r(e.seriesIndex,m.dataType,t,y),h[t]=y}}).execute(),m.each(function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),i=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),u=l.fill;if(s instanceof wW){var c=s.style;s.useStyle(mB({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r(vf(m.get(v,e),b,[0,1],!0))),s.z2EmphasisLift=0,_V(s,t),_F(s,i,o,a)}if(g){var d=h[e];d.useStyle(m.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,_V(d,t),_F(d,i,o,a)}}),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),i=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=T5(i,t.cx-r/2+vg(o[0],t.r),t.cy-r/2+vg(o[1],t.r),r,r,null,a);s.z2=+!!n.get("showAbove"),s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var o=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new ML,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){d[e]=new _t({silent:!0}),h[e]=new _t({silent:!0})}).update(function(e,t){d[e]=o._titleEls[t],h[e]=o._detailEls[t]}).execute(),a.each(function(t){var n=a.getItemModel(t),o=a.get(s,t),g=new ML,m=r(vf(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),x=i.cx+vg(y[0],i.r),b=i.cy+vg(y[1],i.r),w=d[t];w.attr({z2:2*!f,style:_9(v,{x:x,y:b,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(w)}var _=n.getModel("detail");if(_.get("show")){var S=_.get("offsetCenter"),C=i.cx+vg(S[0],i.r),M=i.cy+vg(S[1],i.r),A=vg(_.get("width"),i.r),T=vg(_.get("height"),i.r),I=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:m,w=h[t],k=_.get("formatter");w.attr({z2:2*!f,style:_9(_,{x:C,y:M,text:IM(o,k),width:isNaN(A)?null:A,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:I})}),So(w,{normal:_},o,function(e){return IM(e,k)}),p&&function(e,t,n,r,i){var o=Si(e);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=m8(o.interpolatedValue,o.prevValue),l=o.value;e.percent=0,(null==o.prevValue?_q:_X)(e,{percent:1},r,t,null,function(r){var u=vQ(n,o.precision,s,l,r);o.interpolatedValue=1===r?null:u,_5(e,_3({labelDataIndex:t,labelFetcher:i,defaultText:a?a(u):u+""},o.statesModels,u))})}}(w,t,a,e,{getFormattedLabel:function(e,t,n,r,i,a){return IM(a?a.interpolatedValue:o,k)}}),g.add(w)}c.add(g)}),this.group.add(c),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(Tx);function IT(e,t,n){t=mK(t)&&{coordDimensions:t}||mB({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=new MC(MM(r,t).dimensions,e);return i.initData(r,n),i}var II=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return yN(t,e),t.prototype.getInitialData=function(e,t){return IT(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Ma);function Ik(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=vW(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:mK(u)?l.getName(u[0]):l.getName(u),selected:mJ(r)?r:mB({},r)})}})}var ID=2*Math.PI,IO=Math.PI/180;function IP(e,t){return Ci(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function IR(e,t){var n,r,i=IP(e,t),o=e.get("center"),a=e.get("radius");mK(a)||(a=[0,a]);var s=vg(i.width,t.getWidth()),l=vg(i.height,t.getHeight()),u=Math.min(s,l),c=vg(a[0],u/2),d=vg(a[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(o);n=p[0]||0,r=p[1]||0}else mK(o)||(o=[o,o]),n=vg(o[0],s)+i.x,r=vg(o[1],l)+i.y;return{cx:n,cy:r,r0:c,r:d}}function IE(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),r=t.mapDimension("value"),i=IP(e,n),o=IR(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*IO,d=e.get("endAngle"),h=e.get("padAngle")*IO;d="auto"===d?c-ID:-d*IO;var p=e.get("minAngle")*IO+h,f=0;t.each(r,function(e){!isNaN(e)&&f++});var g=t.getSum(r),m=Math.PI/(g||f)*2,v=e.get("clockwise"),y=e.get("roseType"),x=e.get("stillShowZeroSum"),b=t.getDataExtent(r);b[0]=0;var w=v?1:-1,_=[c,d],S=w*h/2;w_(_,!v),c=_[0];var C=Math.abs((d=_[1])-c),M=C,A=0,T=c;if(t.setLayout({viewRect:i,r:l}),t.each(r,function(e,n){if(isNaN(e))return void t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});(r="area"!==y?0===g&&x?m:e*m:C/f)<p?(r=p,M-=p):A+=e;var r,i=T+w*r,o=0,c=0;h>r?c=o=T+w*r/2:(o=T+S,c=i-S),t.setItemLayout(n,{angle:r,startAngle:o,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?vf(e,b,[u,l]):l}),T=i}),M<ID&&f)if(M<=.001){var I=C/f;t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n);r.angle=I;var i=0,o=0;I<h?o=i=c+w*(n+.5)*I:(i=c+w*n*I+S,o=c+w*(n+1)*I-S),r.startAngle=i,r.endAngle=o}})}else m=M/A,T=c,t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n),i=r.angle===p?p:e*m,o=0,a=0;i<h?a=o=T+w*i/2:(o=T+S,a=T+w*i-S),r.startAngle=o,r.endAngle=a,T+=w*i}})})}function IL(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=Math.sqrt(l*l+u*u),d=((i-e)*(l/=c)+(o-t)*(u/=c))/c;s&&(d=Math.min(Math.max(d,0),1)),d*=c;var h=a[0]=e+d*l,p=a[1]=t+d*u;return Math.sqrt((h-i)*(h-i)+(p-o)*(p-o))}wS.CMD;var IN=new xe,Iz=new xe,IF=new xe,IB=new xe,Ij=new xe,IV=[],IH=new xe;function IW(e,t,n,r){var i="normal"===n,o=i?e:e.ensureState(n);o.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?e.useStyle(s):o.style=s}function IG(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=xR(r[0],r[1]),o=xR(r[1],r[2]);if(!i||!o){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var a=Math.min(i,o)*n,s=xL([],r[1],r[0],a/i),l=xL([],r[1],r[2],a/o),u=xL([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c<r.length;c++)e.lineTo(r[c][0],r[c][1])}var I$=Math.PI/180;function IU(e,t,n,r,i,o,a,s,l,u){if(!(e.length<2)){for(var c=e.length,d=0;d<c;d++)if("outer"===e[d].position&&"labelLine"===e[d].labelAlignTo){var h=e[d].label.x-u;e[d].linePoints[1][0]+=h,e[d].label.x=u}(function(e,t,n,r,i){var o,a,s,l=e.length;if(!(l<2)){e.sort(function(e,t){return e.rect.y-t.rect.y});for(var u=0,c=!1,d=[],h=0,p=0;p<l;p++){var f=e[p],g=f.rect;(o=g.y-u)<0&&(g.y-=o,f.label.y-=o,c=!0);var m=Math.max(-o,0);d.push(m),h+=m,u=g.y+g[t]}h>0&&i&&w(-h/l,0,l);var v=e[0],y=e[l-1];return x(),a<0&&_(-a,.8),s<0&&_(s,.8),x(),b(a,s,1),b(s,a,-1),x(),a<0&&S(-a),s<0&&S(s),c}function x(){a=v.rect.y-n,s=r-y.rect.y-y.rect[t]}function b(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){w(r*n,0,l);var i=r+e;i<0&&_(-i*n,1)}else _(-e*n,1)}}function w(t,n,r){0!==t&&(c=!0);for(var i=n;i<r;i++){var o=e[i],a=o.rect;a.y+=t,o.label.y+=t}}function _(n,r){for(var i=[],o=0,a=1;a<l;a++){var s=e[a-1].rect,u=Math.max(e[a].rect.y-s.y-s[t],0);i.push(u),o+=u}if(o){var c=Math.min(Math.abs(n)/o,r);if(n>0)for(var a=0;a<l-1;a++){var d=i[a]*c;w(d,0,a+1)}else for(var a=l-1;a>0;a--){var d=i[a-1]*c;w(-d,a,l)}}}function S(e){for(var t=e<0?-1:1,n=Math.ceil((e=Math.abs(e))/(l-1)),r=0;r<l-1;r++)if(t>0?w(n,0,r+1):w(-n,l-r-1,l),(e-=n)<=0)return}})(e,"height",l,l+a,void 0)&&function(e){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;s<e.length;s++)if("none"===e[s].labelAlignTo){var l=e[s],u=l.label.y>n?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*i,h=r+l.len;u.rB=Math.abs(d)<h?Math.sqrt(c*c/(1-d*d/h/h)):h,u.maxY=c}u.list.push(l)}p(o),p(a)}(e)}function p(e){for(var o=e.rB,a=o*o,s=0;s<e.list.length;s++){var l=e.list[s],u=Math.abs(l.label.y-n),c=r+l.len,d=t+(Math.sqrt(c*c*(1-Math.abs(u*u/a)))+l.len2)*i,h=d-l.label.x,p=l.targetTextWidth-h*i;IZ(l,p,!0),l.label.x=d}}}function IZ(e,t,n){if(void 0===n&&(n=!1),null==e.labelStyleWidth){var r=e.label,i=r.style,o=e.rect,a=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=o.width+(a?0:l);if(t<c||n){var d=o.height;if(u&&u.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-l);var h=r.getBoundingRect();r.setStyle("width",Math.ceil(h.width)),r.setStyle("backgroundColor",a)}else{var p=t-l,f=t<c?p:n?p>e.unconstrainedWidth?null:p:null;r.setStyle("width",f)}var g=r.getBoundingRect();o.width=g.width;var m=(r.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-d)/2}}}function IY(e){return"center"===e.position}var IX=function(e){function t(t,n,r){var i=e.call(this)||this;i.z2=2;var o=new _t;return i.setTextContent(o),i.updateData(t,n,r,!0),i}return yN(t,e),t.prototype.updateData=function(e,t,n,r){var i=e.hostModel,o=e.getItemModel(t),a=o.getModel("emphasis"),s=e.getItemLayout(t),l=mB(TD(o.getModel("itemStyle"),s,!0),s);if(isNaN(l.startAngle))return void this.setShape(l);if(r){this.setShape(l);var u=i.getShallow("animationType");i.ecModel.ssr?(_q(this,{scaleX:0,scaleY:0},i,{dataIndex:t,isFrom:!0}),this.originX=l.cx,this.originY=l.cy):"scale"===u?(this.shape.r=s.r0,_q(this,{shape:{r:s.r}},i,t)):null!=n?(this.setShape({startAngle:n,endAngle:n}),_q(this,{shape:{startAngle:s.startAngle,endAngle:s.endAngle}},i,t)):(this.shape.endAngle=s.startAngle,_X(this,{shape:{endAngle:s.endAngle}},i,t))}else _1(this),_X(this,{shape:l},i,t);this.useStyle(e.getItemVisual(t,"style")),_V(this,o);var c=(s.startAngle+s.endAngle)/2,d=i.get("selectedOffset"),h=Math.cos(c)*d,p=Math.sin(c)*d,f=o.getShallow("cursor");f&&this.attr("cursor",f),this._updateLabel(i,e,t),this.ensureState("emphasis").shape=mB({r:s.r+(a.get("scale")&&a.get("scaleSize")||0)},TD(a.getModel("itemStyle"),s)),mB(this.ensureState("select"),{x:h,y:p,shape:TD(o.getModel(["select","itemStyle"]),s)}),mB(this.ensureState("blur"),{shape:TD(o.getModel(["blur","itemStyle"]),s)});var g=this.getTextGuideLine(),m=this.getTextContent();g&&mB(g.ensureState("select"),{x:h,y:p}),mB(m.ensureState("select"),{x:h,y:p}),_F(this,a.get("focus"),a.get("blurScope"),a.get("disabled"))},t.prototype._updateLabel=function(e,t,n){var r=t.getItemModel(n),i=r.getModel("labelLine"),o=t.getItemVisual(n,"style"),a=o&&o.fill,s=o&&o.opacity;_4(this,_6(r),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:s,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var l=this.getTextContent();this.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=e.get(["label","position"]);if("outside"!==u&&"outer"!==u)this.removeTextGuideLine();else{var c=this.getTextGuideLine();c||(c=new Ay,this.setTextGuideLine(c)),function(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var o=t.normal,a=o.get("show"),s=i.ignore,l=0;l<_u.length;l++){var u=_u[l],c=t[u],d="normal"===u;if(c){var h=c.get("show");if((d?s:m8(i.states[u]&&i.states[u].ignore,s))||!m8(h,a)){var p=d?r:r&&r.states[u];p&&(p.ignore=!0),r&&IW(r,!0,u,c);continue}!r&&(r=new Ay,e.setTextGuideLine(r),d||!s&&a||IW(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),IW(r,!1,u,c)}}if(r){mj(r.style,n),r.style.fill=null;var f=o.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,r.buildPath=IG}}(this,function(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<_l.length;r++){var i=_l[r];n[i]=e.getModel([i,t])}return n}(r),{stroke:a,opacity:m7(i.get(["lineStyle","opacity"]),s,1)})}},t}(Al),Iq=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return yN(t,e),t.prototype.render=function(e,t,n,r){var i,o=e.getData(),a=this._data,s=this.group;if(!a&&o.count()>0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<o.count();++u)l=o.getItemLayout(u);l&&(i=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===o.count()&&e.get("showEmptyCircle")){var c=new Al({shape:IR(e,n)});c.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=c,s.add(c)}o.diff(a).add(function(e){var t=new IX(o,e,i);o.setItemGraphicEl(e,t),s.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(o,e,i),n.off("click"),s.add(n),o.setItemGraphicEl(e,n)}).remove(function(t){_0(a.getItemGraphicEl(t),e,t)}).execute(),function(e){var t,n,r=e.getData(),i=[],o=!1,a=(e.get("minShowLabelAngle")||0)*I$,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function p(e){e.ignore=!0}r.each(function(e){var s,d,h,f,g=r.getItemGraphicEl(e),m=g.shape,v=g.getTextContent(),y=g.getTextGuideLine(),x=r.getItemModel(e),b=x.getModel("label"),w=b.get("position")||x.get(["emphasis","label","position"]),_=b.get("distanceToLabelLine"),S=b.get("alignTo"),C=vg(b.get("edgeDistance"),u),M=b.get("bleedMargin"),A=x.getModel("labelLine"),T=A.get("length");T=vg(T,u);var I=A.get("length2");if(I=vg(I,u),Math.abs(m.endAngle-m.startAngle)<a){mG(v.states,p),v.ignore=!0,y&&(mG(y.states,p),y.ignore=!0);return}if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(v)){var k=(m.startAngle+m.endAngle)/2,D=Math.cos(k),O=Math.sin(k);t=m.cx,n=m.cy;var P="inside"===w||"inner"===w;if("center"===w)s=m.cx,d=m.cy,f="center";else{var R=(P?(m.r+m.r0)/2*D:m.r*D)+t,E=(P?(m.r+m.r0)/2*O:m.r*O)+n;if(s=R+3*D,d=E+3*O,!P){var L=R+D*(T+l-m.r),N=E+O*(T+l-m.r),z=L+(D<0?-1:1)*I;s="edge"===S?D<0?c+C:c+u-C:z+(D<0?-_:_),d=N,h=[[R,E],[L,N],[z,N]]}f=P?"center":"edge"===S?D>0?"right":"left":D>0?"left":"right"}var F=Math.PI,B=0,j=b.get("rotate");if(m1(j))B=F/180*j;else if("center"===w)B=0;else if("radial"===j||!0===j)B=D<0?-k+F:-k;else if("tangential"===j&&"outside"!==w&&"outer"!==w){var V=Math.atan2(D,O);V<0&&(V=2*F+V),O>0&&(V=F+V),B=V-F}if(o=!!B,v.x=s,v.y=d,v.rotation=B,v.setStyle({verticalAlign:"middle"}),P){v.setStyle({align:f});var H=v.states.select;H&&(H.x+=v.x,H.y+=v.y)}else{var W=v.getBoundingRect().clone();W.applyTransform(v.getComputedTransform());var G=(v.style.margin||0)+2.1;W.y-=G/2,W.height+=G,i.push({label:v,labelLine:y,position:w,len:T,len2:I,minTurnAngle:A.get("minTurnAngle"),maxSurfaceAngle:A.get("maxSurfaceAngle"),surfaceNormal:new xe(D,O),linePoints:h,textAlign:f,labelDistance:_,labelAlignTo:S,edgeDistance:C,bleedMargin:M,rect:W,unconstrainedWidth:W.width,labelStyleWidth:v.style.width})}g.setTextConfig({inside:P})}}),!o&&e.get("avoidLabelOverlap")&&function(e,t,n,r,i,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<e.length;h++){var p=e[h].label;IY(e[h])||(p.x<t?(c=Math.min(c,p.x),l.push(e[h])):(d=Math.max(d,p.x),u.push(e[h])))}for(var h=0;h<e.length;h++){var f=e[h];if(!IY(f)&&f.linePoints){if(null!=f.labelStyleWidth)continue;var p=f.label,g=f.linePoints,m=void 0;m="edge"===f.labelAlignTo?p.x<t?g[2][0]-f.labelDistance-a-f.edgeDistance:a+i-f.edgeDistance-g[2][0]-f.labelDistance:"labelLine"===f.labelAlignTo?p.x<t?c-a-f.bleedMargin:a+i-d-f.bleedMargin:p.x<t?p.x-a-f.bleedMargin:a+i-p.x-f.bleedMargin,f.targetTextWidth=m,IZ(f,m)}}IU(u,t,n,r,1,i,o,a,s,d),IU(l,t,n,r,-1,i,o,a,s,c);for(var h=0;h<e.length;h++){var f=e[h];if(!IY(f)&&f.linePoints){var p=f.label,g=f.linePoints,v="edge"===f.labelAlignTo,y=p.style.padding,x=y?y[1]+y[3]:0,b=p.style.backgroundColor?0:x,w=f.rect.width+b,_=g[1][0]-g[2][0];v?p.x<t?g[2][0]=a+f.edgeDistance+w+f.labelDistance:g[2][0]=a+i-f.edgeDistance-w-f.labelDistance:(p.x<t?g[2][0]=p.x+f.labelDistance:g[2][0]=p.x-f.labelDistance,g[1][0]=g[2][0]+_),g[1][1]=g[2][1]=p.y}}}(i,t,n,l,u,h,c,d);for(var f=0;f<i.length;f++){var g=i[f],m=g.label,v=g.labelLine,y=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),y&&(mG(m.states,p),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(v){var b=g.linePoints;y||!b?(mG(v.states,p),v.ignore=!0):(!function(e,t){if(t<=180&&t>0){t=t/180*Math.PI,IN.fromArray(e[0]),Iz.fromArray(e[1]),IF.fromArray(e[2]),xe.sub(IB,IN,Iz),xe.sub(Ij,IF,Iz);var n=IB.len(),r=Ij.len();if(!(n<.001)&&!(r<.001)&&(IB.scale(1/n),Ij.scale(1/r),Math.cos(t)<IB.dot(Ij))){var i=IL(Iz.x,Iz.y,IF.x,IF.y,IN.x,IN.y,IV,!1);IH.fromArray(IV),IH.scaleAndAdd(Ij,i/Math.tan(Math.PI-t));var o=IF.x!==Iz.x?(IH.x-Iz.x)/(IF.x-Iz.x):(IH.y-Iz.y)/(IF.y-Iz.y);if(isNaN(o))return;o<0?xe.copy(IH,Iz):o>1&&xe.copy(IH,IF),IH.toArray(e[1])}}}(b,g.minTurnAngle),function(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,IN.fromArray(e[0]),Iz.fromArray(e[1]),IF.fromArray(e[2]),xe.sub(IB,Iz,IN),xe.sub(Ij,IF,Iz);var r=IB.len(),i=Ij.len();if(!(r<.001)&&!(i<.001)&&(IB.scale(1/r),Ij.scale(1/i),IB.dot(t)<Math.cos(n))){var o=IL(Iz.x,Iz.y,IF.x,IF.y,IN.x,IN.y,IV,!1);IH.fromArray(IV);var a=Math.PI/2,s=a+Math.acos(Ij.dot(t))-n;if(s>=a)xe.copy(IH,IF);else{IH.scaleAndAdd(Ij,o/Math.tan(Math.PI/2-s));var l=IF.x!==Iz.x?(IH.x-Iz.x)/(IF.x-Iz.x):(IH.y-Iz.y)/(IF.y-Iz.y);if(isNaN(l))return;l<0?xe.copy(IH,Iz):l>1&&xe.copy(IH,IF)}IH.toArray(e[1])}}}(b,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new xe(b[0][0],b[0][1])})}}}(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,o=Math.sqrt(r*r+i*i);return o<=n.r&&o>=n.r0}},t.type="pie",t}(Tx),IK=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),IQ=vG(),IJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new IK(mX(this.getData,this),mX(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return IT(this,{coordDimensions:["value"],encodeDefaulter:mq(v7,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=IQ(n),i=r.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(e){o.push(e)}),i=r.seats=function(e,t){var n=mU(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var r=Math.pow(10,t),i=m$(e,function(e){return(isNaN(e)?0:e)/n*r*100}),o=100*r,a=m$(i,function(e){return Math.floor(e)}),s=mU(a,function(e,t){return e+t},0),l=m$(i,function(e,t){return e-a[t]});s<o;){for(var u=-1/0,c=null,d=0,h=l.length;d<h;++d)l[d]>u&&(u=l[d],c=d);++a[c],l[c]=0,++s}return m$(a,function(e){return e/r})}(o,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=i[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){vL(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Ma),I0=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},I1=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new I0(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,t.drift(i,o,e),this.handler.dispatchToElement(new I0(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new I0(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new I0(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new I0(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new I0(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),I2=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,I5=[],I3=vO.browser.firefox&&39>+vO.browser.version.split(".")[0];function I4(e,t,n,r){return n=n||{},r?I6(e,t,n):I3&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):I6(e,t,n),n}function I6(e,t,n){if(vO.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(SA(e)){var o=e.getBoundingClientRect();n.zrX=r-o.left,n.zrY=i-o.top;return}if(SM(I5,e,r,i)){n.zrX=I5[0],n.zrY=I5[1];return}}n.zrX=n.zrY=0}function I9(e){return e||window.event}function I8(e,t,n){if(null!=(t=I9(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&I4(e,i,t,n)}else{I4(e,t,t,n);var o=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;return null==n||null==r?t:3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&I2.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function I7(e,t,n,r){e.addEventListener(t,n,r)}var ke=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function kt(e){return 2===e.which||3===e.which}var kn=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o<a;o++){var s=r[o],l=I4(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in ki)if(ki.hasOwnProperty(t)){var n=ki[t](this._track,e);if(n)return n}},e}();function kr(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var ki={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var o=kr(r)/kr(i);isFinite(o)||(o=1),t.pinchScale=o;var a=[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=a[0],t.pinchY=a[1],{type:"pinch",target:e[0].target,event:t}}}}},ko="silent";function ka(){ke(this.event)}var ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return yq(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(bN),kl=function(e,t){this.x=e,this.y=t},ku=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],kc=new xu(0,0,0,0),kd=function(e){function t(t,n,r,i,o){var a=e.call(this)||this;return a._hovered=new kl(0,0),a.storage=t,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new ks,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new I1(a),a}return yq(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(mG(ku,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=kp(this,t,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new kl(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==o&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new kl(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i,o="on"+t,a={type:t,event:n,target:(i=e).target,topTarget:i.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ka};r&&(r[o]&&(a.cancelBubble=!!r[o].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););!a.cancelBubble&&(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[o]&&e[o].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new kl(e,t);if(kh(r,i,e,t,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new xu(e-s,t-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(kc.copy(c.getBoundingRect()),c.transform&&kc.applyTransform(c.transform),kc.intersect(l)&&o.push(c))}if(o.length){for(var d=Math.PI/12,h=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<h;f+=d)if(kh(o,i,e+p*Math.cos(f),t+p*Math.sin(f),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new kn);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var o=new kl;o.target=r.target,this.dispatchToElement(o,i,r.event)}},t}(bN);function kh(e,t,n,r,i){for(var o=e.length-1;o>=0;o--){var a=e[o],s=void 0;if(a!==i&&!a.ignore&&(s=function(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1}r.silent&&(i=!0),r=r.__hostTarget||r.parent}return!i||ko}return!1}(a,n,r))&&(t.topTarget||(t.topTarget=a),s!==ko)){t.target=a;break}}}function kp(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}function kf(e,t,n,r){var i=t+1;if(i===n)return 1;if(0>r(e[i++],e[t])){for(;i<n&&0>r(e[i],e[i-1]);)i++;var o=e,a=t,s=i;for(s--;a<s;){var l=o[a];o[a++]=o[s],o[s--]=l}}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function kg(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var o,a=e[r],s=t,l=r;s<l;)0>i(a,e[o=s+l>>>1])?l=o:s=o+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function km(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])>0){for(s=r-i;l<s&&o(e,t[n+i+l])>0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&0>=o(e,t[n+i-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])>0?a=c+1:l=c}return l}function kv(e,t,n,r,i,o){var a=0,s=0,l=1;if(0>o(e,t[n+i])){for(s=i+1;l<s&&0>o(e,t[n+i-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(e,t[n+i+l])>=0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var c=a+(l-a>>>1);0>o(e,t[n+c])?l=c:a=c+1}return l}function ky(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var o=0;if(i<32){o=kf(e,n,r,t),kg(e,n,r,n+o,t);return}var a=function(e,t){var n,r,i=7,o=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var h=kv(e[c],e,l,u,0,t);l+=h,0==(u-=h)||0!==(d=km(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,o,s){var l,u,c,d=0;for(d=0;d<r;d++)a[d]=e[n+d];var h=0,p=o,f=n;if(e[f++]=e[p++],0==--s){for(d=0;d<r;d++)e[f+d]=a[h+d];return}if(1===r){for(d=0;d<s;d++)e[f+d]=e[p+d];e[f+s]=a[h];return}for(var g=i;;){l=0,u=0,c=!1;do if(0>t(e[p],a[h])){if(e[f++]=e[p++],u++,l=0,0==--s){c=!0;break}}else if(e[f++]=a[h++],l++,u=0,1==--r){c=!0;break}while((l|u)<g);if(c)break;do{if(0!==(l=kv(e[p],a,h,r,0,t))){for(d=0;d<l;d++)e[f+d]=a[h+d];if(f+=l,h+=l,(r-=l)<=1){c=!0;break}}if(e[f++]=e[p++],0==--s){c=!0;break}if(0!==(u=km(a[h],e,p,s,0,t))){for(d=0;d<u;d++)e[f+d]=e[p+d];if(f+=u,p+=u,0==(s-=u)){c=!0;break}}if(e[f++]=a[h++],1==--r){c=!0;break}g--}while(l>=7||u>=7);if(c)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(d=0;d<s;d++)e[f+d]=e[p+d];e[f+s]=a[h]}else if(0===r)throw Error();else for(d=0;d<r;d++)e[f+d]=a[h+d]}(l,u,c,d):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=e[o+l];var u=n+r-1,c=s-1,d=o+s-1,h=0,p=0;if(e[d--]=e[u--],0==--r){for(l=0,h=d-(s-1);l<s;l++)e[h+l]=a[l];return}if(1===s){for(d-=r,u-=r,p=d+1,h=u+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c];return}for(var f=i;;){var g=0,m=0,v=!1;do if(0>t(a[c],e[u])){if(e[d--]=e[u--],g++,m=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],m++,g=0,1==--s){v=!0;break}while((g|m)<f);if(v)break;do{if(0!=(g=r-kv(a[c],e,n,r,r-1,t))){for(d-=g,u-=g,r-=g,p=d+1,h=u+1,l=g-1;l>=0;l--)e[p+l]=e[h+l];if(0===r){v=!0;break}}if(e[d--]=a[c--],1==--s){v=!0;break}if(0!=(m=s-km(e[u],a,0,s,s-1,t))){for(d-=m,c-=m,s-=m,p=d+1,h=c+1,l=0;l<m;l++)e[p+l]=a[h+l];if(s<=1){v=!0;break}}if(e[d--]=e[u--],0==--r){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}if((i=f)<1&&(i=1),1===s){for(d-=r,u-=r,p=d+1,h=u+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c]}else if(0===s)throw Error();else for(l=0,h=d-(s-1);l<s;l++)e[h+l]=a[l]}(l,u,c,d))}return n=[],r=[],{mergeRuns:function(){for(;o>1;){var e=o-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;o>1;){var e=o-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,r[o]=t,o+=1}}}(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((o=kf(e,n,r,t))<s){var l=i;l>s&&(l=s),kg(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}mG(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){kd.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=kp(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||xR(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});var kx=!1;function kb(){kx||(kx=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function kw(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var k_=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=kw}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,ky(n,kw)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=1),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else t&&t.length?e.__clipPaths=t:e.__clipPaths&&e.__clipPaths.length>0&&(e.__clipPaths=[]),isNaN(e.z)&&(kb(),e.z=0),isNaN(e.z2)&&(kb(),e.z2=0),isNaN(e.zlevel)&&(kb(),e.zlevel=0),this._displayList[this._displayListLen++]=e;var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=mV(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();function kS(){return new Date().getTime()}j=vO.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var kC=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,n.stage=(t=t||{}).stage||{},n}return yq(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=kS()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),r=i}this._time=t,!e&&(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,j(function t(){e._running&&(j(t),e._paused||e.update())})},t.prototype.start=function(){this._running||(this._time=kS(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=kS(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=kS()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new bL(e,t.loop);return this.addAnimator(n),n},t}(bN),kM=vO.domSupported,kA=(_={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},S=m$(w=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],function(e){var t=e.replace("mouse","pointer");return _.hasOwnProperty(t)?t:e}),{mouse:w,touch:["touchstart","touchend","touchmove"],pointer:S}),kT=["mousemove","mouseup"],kI=["pointermove","pointerup"],kk=!1;function kD(e){var t=e.pointerType;return"pen"===t||"touch"===t}function kO(e){e&&(e.zrByTouch=!0)}function kP(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var kR=function(e,t){this.stopPropagation=vh,this.stopImmediatePropagation=vh,this.preventDefault=vh,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},kE={mousedown:function(e){e=I8(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=I8(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=I8(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){kP(this,(e=I8(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){kk=!0,e=I8(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){kk||(e=I8(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){kO(e=I8(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),kE.mousemove.call(this,e),kE.mousedown.call(this,e)},touchmove:function(e){kO(e=I8(this.dom,e)),this.handler.processGesture(e,"change"),kE.mousemove.call(this,e)},touchend:function(e){kO(e=I8(this.dom,e)),this.handler.processGesture(e,"end"),kE.mouseup.call(this,e),new Date-this.__lastTouchMoment<300&&kE.click.call(this,e)},pointerdown:function(e){kE.mousedown.call(this,e)},pointermove:function(e){kD(e)||kE.mousemove.call(this,e)},pointerup:function(e){kE.mouseup.call(this,e)},pointerout:function(e){kD(e)||kE.mouseout.call(this,e)}};mG(["click","dblclick","contextmenu"],function(e){kE[e]=function(t){t=I8(this.dom,t),this.trigger(e,t)}});var kL={pointermove:function(e){kD(e)||kL.mousemove.call(this,e)},pointerup:function(e){kL.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function kN(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,I7(e.domTarget,t,n,r)}function kz(e){var t,n,r,i=e.mounted;for(var o in i)i.hasOwnProperty(o)&&(t=e.domTarget,n=i[o],r=e.listenerOpts[o],t.removeEventListener(o,n,r));e.mounted={}}var kF=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},kB=function(e){function t(t,n){var r,i,o=e.call(this)||this;return o.__pointerCapturing=!1,o.dom=t,o.painterRoot=n,o._localHandlerScope=new kF(t,kE),kM&&(o._globalHandlerScope=new kF(document,kL)),i=(r=o._localHandlerScope).domHandlers,vO.pointerEventsSupported?mG(kA.pointer,function(e){kN(r,e,function(t){i[e].call(o,t)})}):(vO.touchEventsSupported&&mG(kA.touch,function(e){kN(r,e,function(t){i[e].call(o,t),r.touching=!0,null!=r.touchTimer&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)})}),mG(kA.mouse,function(e){kN(r,e,function(t){t=I9(t),r.touching||i[e].call(o,t)})})),o}return yq(t,e),t.prototype.dispose=function(){kz(this._localHandlerScope),kM&&kz(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,kM&&this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?function(e,t){vO.pointerEventsSupported?mG(kI,n):vO.touchEventsSupported||mG(kT,n);function n(n){kN(t,n,function(r){if(!kP(e,(r=I9(r)).target)){var i;i=r,r=I8(e.dom,new kR(e,i),!0),t.domHandlers[n].call(e,r)}},{capture:!0})}}(this,t):kz(t)}},t}(bN),kj={},kV={},kH=function(){function e(e,t,n){var r,i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var o=new k_,a=n.renderer||"canvas";kj[a]||(a=mY(kj)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new kj[a](t,o,n,e),l=n.ssr||s.ssrOnly;this.storage=o,this.painter=s;var u=vO.node||vO.worker||l?null:new kB(s.getViewportRoot(),s.root),c=n.useCoarsePointer;(null==c||"auto"===c?vO.touchEventsSupported:!!c)&&(r=m8(n.pointerSize,44)),this.handler=new kd(o,s,u,s.root,r),this.animation=new kC({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return .4>b_(e,1);if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=b_(t[i].color,1);return(n/=r)<.4}return!1}(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=kS();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=kS();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){!this._disposed&&(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof ML&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){if(!this._disposed){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,e=this.id,delete kV[e]}},e}();function kW(e,t){var n=new kH(mL++,e,t);return kV[n.id]=n,n}var kG="";"u">typeof navigator&&(kG=navigator.platform||"");var k$="rgba(0, 0, 0, 0.2)";let kU={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:k$,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:k$,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:k$,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:k$,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:k$,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:k$,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:kG.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var kZ=vl(),kY="\0_ec_inner",kX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new Sm(r),this._locale=new Sm(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=kQ(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,kQ(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):W(this,i),n=!0}if(("timeline"===e||"media"===e)&&this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&mG(a,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=vl(),s=t&&t.replaceMergeMainTypeMap;v9(this).datasetMap=vl(),mG(e,function(e,t){null!=e&&(Cc.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?mz(e):mF(n[t],e,!0))}),s&&s.each(function(e,t){Cc.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))}),Cc.topologicalTravel(o,Cc.getAllClassMainTypes(),function(t){var o,a,l,u,c,d,h,p,f,g,m,v,y,x,b,w,_,S,C,M,A=function(e,t,n){var r=kZ.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,vE(e[t])),T=r.get(t),I=T?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",k=(y=T,x=A,b="normalMerge"===I,w="replaceMerge"===I,_="replaceAll"===I,y=y||[],x=(x||[]).slice(),S=vl(),mG(x,function(e,t){if(!m2(e)){x[t]=null;return}}),C=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||vH(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(y,S,I),(b||w)&&(o=C,a=y,l=S,mG(u=x,function(e,t){if(e&&null!=e.id){var n=vB(e.id),r=l.get(n);if(null!=r){var i=o[r];vn(!i.newOption,'Duplicated option on id "'+n+'".'),i.newOption=e,i.existing=a[r],u[t]=null}}})),b&&(c=C,mG(d=x,function(e,t){if(e&&null!=e.name)for(var n=0;n<c.length;n++){var r=c[n].existing;if(!c[n].newOption&&r&&(null==r.id||null==e.id)&&!vH(e)&&!vH(r)&&vF("name",r,e)){c[n].newOption=e,d[t]=null;return}}})),b||w?(h=C,p=x,f=w,mG(p,function(e){if(e){for(var t,n=0;(t=h[n])&&(t.newOption||vH(t.existing)||t.existing&&null!=e.id&&!vF("id",e,t.existing));)n++;t?(t.newOption=e,t.brandNew=f):h.push({newOption:e,brandNew:f,existing:null,keyInfo:null}),n++}})):_&&(g=C,mG(x,function(e){g.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})),m=C,v=vl(),mG(m,function(e){var t=e.existing;t&&v.set(t.id,e)}),mG(m,function(e){var t=e.newOption;vn(!t||null==t.id||!v.get(t.id)||v.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&v.set(t.id,e),e.keyInfo||(e.keyInfo={})}),mG(m,function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(m2(r)){if(i.name=null!=r.name?vB(r.name):n?n.name:vP+t,n)i.id=vB(n.id);else if(null!=r.id)i.id=vB(r.id);else{var o=0;do i.id="\0"+i.name+"\0"+o++;while(v.get(i.id))}v.set(i.id,e)}}),C);mG(k,function(e){var n,r,i,o,a=e.newOption;m2(a)&&(e.keyInfo.mainType=t,e.keyInfo.subType=(n=t,r=a,i=e.existing,o=Cc,r.type?r.type:i?i.subType:o.determineSubType(n,r)))}),n[t]=null,r.set(t,null),i.set(t,0);var D=[],O=[],P=0;mG(k,function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=Cc.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(M)return;M=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=mB({componentIndex:n},e.keyInfo);mB(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(D.push(r.option),O.push(r),P++):(D.push(void 0),O.push(void 0))},this),n[t]=D,r.set(t,O),i.set(t,P),"series"===t&&V(this)},this),this._seriesIndices||V(this)},t.prototype.getOption=function(){var e=mz(this.option);return mG(e,function(t,n){if(Cc.hasClass(n)){for(var r=vE(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!vH(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}}),delete e[kY],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t,n=e.mainType;if(!n)return[];var r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(n);return a&&a.length?(null!=r?(t=[],mG(vE(r),function(e){a[e]&&t.push(a[e])})):t=null!=i?kq("id",i,a):null!=o?kq("name",o,a):mZ(a,function(e){return!!e}),kK(t,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(t=a,n=s+"Index",r=s+"Id",i=s+"Name",t&&(null!=t[n]||null!=t[r]||null!=t[i])?{mainType:s,index:t[n],id:t[r],name:t[i]}:null);return o=kK(l?this.queryComponents(l):mZ(this._componentsMap.get(s),function(e){return!!e}),e),e.filter?mZ(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(mQ(e))r.each(function(n,r){for(var i=0;n&&i<n.length;i++){var o=n[i];o&&e.call(t,r,o,o.componentIndex)}});else for(var i=mJ(e)?r.get(e):m2(e)?this.findComponents(e):null,o=0;i&&o<i.length;o++){var a=i[o];a&&t.call(n,a,a.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=vj(e,null);return mZ(this._componentsMap.get("series"),function(e){return!!e&&null!=t&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return mZ(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return mZ(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){H(this),mG(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){mG(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){H(this),mG(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return mG(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return H(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){H(this);var n=[];mG(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=vl(n)},t.prototype.restoreData=function(e){V(this);var t=this._componentsMap,n=[];t.each(function(e,t){Cc.hasClass(t)&&n.push(t)}),Cc.topologicalTravel(n,Cc.getAllClassMainTypes(),function(n){mG(t.get(n),function(t){t&&("series"!==n||!function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e))&&t.restoreData()})})},t.internalField=void(V=function(e){var t=e._seriesIndices=[];mG(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=vl(t)},H=function(e){},W=function(e,t){e.option={},e.option[kY]=1,e._componentsMap=vl({series:[]}),e._componentsCount=vl();var n,r,i,o=t.aria;m2(o)&&null==o.enabled&&(o.enabled=!0),n=t,r=e._theme.option,i=n.color&&!n.colorLayer,mG(r,function(e,t){("colorLayer"!==t||!i)&&(Cc.hasClass(t)||("object"==typeof e?n[t]=n[t]?mF(n[t],e,!1):mz(e):null==n[t]&&(n[t]=e)))}),mF(t,kU,!1),e._mergeOption(t,null)}),t}(Sm);function kq(e,t,n){if(mK(t)){var r=vl();return mG(t,function(e){null!=e&&null!=vj(e,null)&&r.set(e,!0)}),mZ(n,function(t){return t&&r.get(t[e])})}var i=vj(t,null);return mZ(n,function(t){return t&&null!=i&&t[e]===i})}function kK(e,t){return t.hasOwnProperty("subType")?mZ(e,function(e){return e&&e.subType===t.subType}):e}function kQ(e){var t=vl();return e&&mG(vE(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}mH(kX,Cf);var kJ=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];let k0=function(e){mG(kJ,function(t){this[t]=mX(e[t],e)},this)};var k1=/^(min|max)?(.+)$/,k2=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(mG(vE(e.series),function(e){e&&e.data&&m3(e.data)&&(e.data[vi]=!0)}),mG(vE(e.dataset),function(e){e&&e.source&&m3(e.source)&&(e.source[vi]=!0)})),e=mz(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);function h(e){mG(t,function(t){t(e,n)})}return a?(i=a).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e),c&&mK(u)&&mG(u,function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}),h(i),mG(l,function(e){return h(e)}),mG(o,function(e){return h(e.option)}),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],mz(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=mz(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)(function(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return mG(e,function(e,t){var n=t.match(k1);if(n&&n[1]&&n[2]){var o,a,s,l=n[1];o=r[n[2].toLowerCase()],a=e,("min"===(s=l)?o>=a:"max"===s?o<=a:o===a)||(i=!1)}}),i})(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=m$(s,function(e){return mz(-1===e?a.option:o[e].option)})),this._currentMediaIndices=s,l},e}(),k5=m2,k3=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function k4(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=k3.length;n<r;n++){var i=k3[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?mF(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?mF(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function k6(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,mj(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function k9(e){k6(e,"itemStyle"),k6(e,"lineStyle"),k6(e,"areaStyle"),k6(e,"label"),k6(e,"labelLine"),k6(e,"upperLabel"),k6(e,"edgeLabel")}function k8(e,t){var n=k5(e)&&e[t],r=k5(n)&&n.textStyle;if(r)for(var i=0,o=vN.length;i<o;i++){var a=vN[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function k7(e){e&&(k9(e),k8(e,"label"),e.emphasis&&k8(e.emphasis,"label"))}function De(e){return mK(e)?e:e?[e]:[]}function Dt(e){return(mK(e)?e[0]:e)||{}}function Dn(e){e&&mG(Dr,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Dr=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Di=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Do=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Da(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<Do.length;n++){var r=Do[n][1],i=Do[n][0];null!=t[r]&&(t[i]=t[r])}}function Ds(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function Dl(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function Du(e,t){var n;mG(De(e.series),function(e){k5(e)&&function(e){if(k5(e)){k4(e),k9(e),k8(e,"label"),k8(e,"upperLabel"),k8(e,"edgeLabel"),e.emphasis&&(k8(e.emphasis,"label"),k8(e.emphasis,"upperLabel"),k8(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(k4(t),k7(t));var n=e.markLine;n&&(k4(n),k7(n));var r=e.markArea;r&&k7(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!m3(o))for(var a=0;a<o.length;a++)k7(o[a]);mG(e.categories,function(e){k9(e)})}if(i&&!m3(i))for(var a=0;a<i.length;a++)k7(i[a]);if((t=e.markPoint)&&t.data)for(var s=t.data,a=0;a<s.length;a++)k7(s[a]);if((n=e.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)mK(l[a])?(k7(l[a][0]),k7(l[a][1])):k7(l[a]);"gauge"===e.type?(k8(e,"axisLabel"),k8(e,"title"),k8(e,"detail")):"treemap"===e.type?(k6(e.breadcrumb,"itemStyle"),mG(e.levels,function(e){k9(e)})):"tree"===e.type&&k9(e.leaves)}}(e)}),n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"],t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),mG(n,function(t){mG(De(e[t]),function(e){e&&(k8(e,"axisLabel"),k8(e.axisPointer,"label"))})}),mG(De(e.parallel),function(e){var t=e&&e.parallelAxisDefault;k8(t,"axisLabel"),k8(t&&t.axisPointer,"label")}),mG(De(e.calendar),function(e){k6(e,"itemStyle"),k8(e,"dayLabel"),k8(e,"monthLabel"),k8(e,"yearLabel")}),mG(De(e.radar),function(e){k8(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),mG(De(e.geo),function(e){k5(e)&&(k7(e),mG(De(e.regions),function(e){k7(e)}))}),mG(De(e.timeline),function(e){k7(e),k6(e,"label"),k6(e,"itemStyle"),k6(e,"controlStyle",!0);var t=e.data;mK(t)&&mG(t,function(e){m2(e)&&(k6(e,"label"),k6(e,"itemStyle"))})}),mG(De(e.toolbox),function(e){k6(e,"iconStyle"),mG(e.feature,function(e){k6(e,"iconStyle")})}),k8(Dt(e.axisPointer),"label"),k8(Dt(e.tooltip).axisPointer,"label"),e.series=vE(e.series),mG(e.series,function(e){if(m2(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){null!=e.clockWise&&(e.clockwise=e.clockWise),Ds(e.label);var n=e.data;if(n&&!m3(n))for(var r=0;r<n.length;r++)Ds(n[r]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},e.emphasis.scaleSize=null)}else if("gauge"===t){var i=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=i&&function(e,t,n){for(var r,i=t.split(","),o=e,a=0;a<i.length-1;a++)null==o[r=i[a]]&&(o[r]={}),o=o[r];null==o[i[a]]&&(o[i[a]]=n)}(e,"itemStyle.color",i)}else if("bar"===t){Da(e),Da(e.backgroundStyle),Da(e.emphasis);var n=e.data;if(n&&!m3(n))for(var r=0;r<n.length;r++)"object"==typeof n[r]&&(Da(n[r]),Da(n[r]&&n[r].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o)),Dl(e),function e(t,n){if(t)for(var r=0;r<t.length;r++)n(t[r]),t[r]&&e(t[r].children,n)}(e.data,Dl)}else"graph"===t||"sankey"===t?e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency")):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&mj(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),Dn(e)}}),e.dataRange&&(e.visualMap=e.dataRange),mG(Di,function(t){var n=e[t];n&&(mK(n)||(n=[n]),mG(n,function(e){Dn(e)}))})}function Dc(e){mG(e,function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(o,u,c){var d,h,p=a.get(t.stackedDimension,c);if(isNaN(p))return i;s?h=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(h=m.data.rawIndexOf(m.stackedByDimension,d)),h>=0){var v=m.data.getByRawIndex(m.stackResultDimension,h);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=function(e,t){var n=Math.max(vy(e),vy(t)),r=e+t;return n>20?r:vm(r,n)}(p,v),f=v;break}}}return r[0]=p,r[1]=f,r})})}var Dd=function(){function e(){this.group=new ML,this.uid=Sy("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();yj(Dd),y$(Dd);var Dh=vG(),Dp={itemStyle:yU(Sp,!0),lineStyle:yU(Sc,!0)},Df={lineStyle:"stroke",itemStyle:"fill"};function Dg(e,t){var n=e.visualStyleMapper||Dp[t];return n||(console.warn("Unknown style type '"+t+"'."),Dp.itemStyle)}function Dm(e,t){var n=e.visualDrawType||Df[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var Dv=new Sm,Dy=Math.PI,Dx=function(){function e(e,t,n,r){this._stageTaskMap=vl(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount,a=null!=o?Math.ceil(o/i):null;return{step:i,modBy:a,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=vl();e.eachSeries(function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;mG(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});vn(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}mG(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each(function(e){a(r,e)&&(e.dirty(),d=!0)}),d&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,r.block);h.each(function(e){e.perform(p)}),c.perform(p)&&(i=!0)}else u&&u.each(function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)})}}),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=vl(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||CT({plan:DC,reset:DM,count:DI}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||CT({reset:Db});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=vl(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function h(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,CT({reset:Dw,onDirty:DS})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}vn(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):u?u(n,r).each(h):(c=!1,mG(n.getSeries(),h)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);r.head||(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return mQ(e)&&(e={overallReset:e,seriesType:function(e){G=null;try{e(Dk,DD)}catch(e){}return G}(e)}),e.uid=Sy("stageHandler"),t&&(e.visualType=t),e},e}();function Db(e){e.overallReset(e.ecModel,e.api,e.payload)}function Dw(e){return e.overallProgress&&D_}function D_(){this.agent.dirty(),this.getDownstream().dirty()}function DS(){this.agent&&this.agent.dirty()}function DC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function DM(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=vE(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?m$(t,function(e,t){return DT(t)}):DA}var DA=DT(0);function DT(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function DI(e){return e.data.count()}var Dk={},DD={};function DO(e,t){for(var n in t.prototype)e[n]=vh}DO(Dk,kX),DO(DD,k0),Dk.eachSeriesByType=Dk.eachRawSeriesByType=function(e){G=e},Dk.eachComponent=function(e){"series"===e.mainType&&e.subType&&(G=e.subType)};var DP=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],DR="#B9B8CE",DE="#100C2A",DL=function(){return{axisLine:{lineStyle:{color:DR}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},DN=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Dz={darkMode:!0,color:DN,backgroundColor:DE,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:DR}},textStyle:{color:DR},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:DR}},dataZoom:{borderColor:"#71708A",textStyle:{color:DR},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:DR}},timeline:{lineStyle:{color:DR},label:{color:DR},controlStyle:{color:DR,borderColor:DR}},calendar:{itemStyle:{color:DE},dayLabel:{color:DR},monthLabel:{color:DR},yearLabel:{color:DR}},timeAxis:DL(),logAxis:DL(),valueAxis:DL(),categoryAxis:DL(),line:{symbol:"circle"},graph:{color:DN},gauge:{title:{color:DR},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:DR},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Dz.categoryAxis.splitLine.show=!1;var DF=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(mJ(e)){var i=yB(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};mG(e,function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),DB=["symbol","symbolSize","symbolRotate","symbolOffset"],Dj=DB.concat(["symbolKeepAspect"]);function DV(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function DH(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}function DW(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var DG=Math.round(9*Math.random()),D$="function"==typeof Object.defineProperty,DU=function(){function e(){this._id="__ec_inner_"+DG++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return D$?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}();function DZ(e){return isFinite(e)}function DY(e,t,n){for(var r,i,o,a,s,l,u,c,d,h,p="radial"===t.type?(o=Math.min(r=n.width,i=n.height),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r,t.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=DZ(a)?a:.5,s=DZ(s)?s:.5,l=l>=0&&DZ(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)):(u=null==t.x?0:t.x,c=null==t.x2?1:t.x2,d=null==t.y?0:t.y,h=null==t.y2?0:t.y2,t.global||(u=u*n.width+n.x,c=c*n.width+n.x,d=d*n.height+n.y,h=h*n.height+n.y),u=DZ(u)?u:0,c=DZ(c)?c:1,d=DZ(d)?d:0,h=DZ(h)?h:0,e.createLinearGradient(u,d,c,h)),f=t.colorStops,g=0;g<f.length;g++)p.addColorStop(f[g].offset,f[g].color);return p}function DX(e){return parseInt(e,10)}function Dq(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||DX(s[r])||DX(e.style[r]))-(DX(s[o])||0)-(DX(s[a])||0)|0}function DK(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:m1(t)?[t]:mK(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=m$(i,function(e){return e/a}),o/=a)}return[i,o]}var DQ=new wS(!0);function DJ(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}function D0(e){return"string"==typeof e&&"none"!==e}function D1(e){var t=e.fill;return null!=t&&"none"!==t}function D2(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function D5(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function D3(e,t,n){var r=y1(t.image,t.__image,n);if(y5(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*vp),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var D4=["shadowBlur","shadowOffsetX","shadowOffsetY"],D6=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function D9(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){Oe(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?bq.opacity:a}(r||t.blend!==n.blend)&&(o||(Oe(e,i),o=!0),e.globalCompositeOperation=t.blend||bq.blend);for(var s=0;s<D4.length;s++){var l=D4[s];(r||t[l]!==n[l])&&(o||(Oe(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(Oe(e,i),o=!0),e.shadowColor=t.shadowColor||bq.shadowColor),o}function D8(e,t,n,r,i){var o=Ot(t,i.inHover),a=r?null:n&&Ot(n,i.inHover)||{};if(o===a)return!1;var s=D9(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(Oe(e,i),s=!0),D0(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(Oe(e,i),s=!0),D0(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(Oe(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(Oe(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<D6.length;u++){var c=D6[u],d=c[0];(r||o[d]!==a[d])&&(s||(Oe(e,i),s=!0),e[d]=o[d]||c[1])}return s}function D7(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function Oe(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function Ot(e,t){return t&&e.__hoverStyle||e.style}function On(e,t){Or(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Or(e,t,n,r){var i,o=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var a=t.__clipPaths,s=n.prevElClipPaths,l=!1,u=!1;if(!s||function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(a,s)){if(s&&s.length&&(Oe(e,n),e.restore(),u=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length){Oe(e,n),e.save();for(var c=!1,d=0;d<a.length;d++){var h=a[d];c=c||h.isZeroArea(),D7(e,h),e.beginPath(),h.buildPath(e,h.shape),e.clip()}n.allClipped=c,l=!0}n.prevElClipPaths=a}if(n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var p=n.prevEl;p||(u=l=!0);var f=t instanceof wz&&t.autoBatch&&(v=D1(m=t.style),y=DJ(m),!(m.lineDash||!(v^y)||v&&"string"!=typeof m.fill||y&&"string"!=typeof m.stroke||m.strokePercent<1||m.strokeOpacity<1||m.fillOpacity<1));!l&&(x=p.transform,o&&x?o[0]===x[0]&&o[1]===x[1]&&o[2]===x[2]&&o[3]===x[3]&&o[4]===x[4]&&o[5]===x[5]:+(!o&&!x))?f||Oe(e,n):(Oe(e,n),D7(e,t));var g=Ot(t,n.inHover);if(t instanceof wz)1!==n.lastDrawType&&(u=!0,n.lastDrawType=1),D8(e,t,p,u,n),f&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o,a,s=DJ(n),l=D1(n),u=n.strokePercent,c=u<1,d=!t.path;(!t.silent||c)&&d&&t.createPathProxy();var h=t.path||DQ,p=t.__dirty;if(!r){var f=n.fill,g=n.stroke,m=l&&!!f.colorStops,v=s&&!!g.colorStops,y=l&&!!f.image,x=s&&!!g.image,b=void 0,w=void 0,_=void 0,S=void 0,C=void 0;(m||v)&&(C=t.getBoundingRect()),m&&(b=p?DY(e,f,C):t.__canvasFillGradient,t.__canvasFillGradient=b),v&&(w=p?DY(e,g,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=w),y&&(_=p||!t.__canvasFillPattern?D3(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=_),x&&(S=p||!t.__canvasStrokePattern?D3(e,g,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),m?e.fillStyle=b:y&&(_?e.fillStyle=_:l=!1),v?e.strokeStyle=w:x&&(S?e.strokeStyle=S:s=!1)}var M=t.getGlobalScale();h.setScale(M[0],M[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(o=(i=DK(t))[0],a=i[1]);var A=!0;(d||4&p)&&(h.setDPR(e.dpr),c?h.setContext(null):(h.setContext(e),A=!1),h.reset(),t.buildPath(h,t.shape,r),h.toStatic(),t.pathUpdated()),A&&h.rebuildPath(e,c?u:1),o&&(e.setLineDash(o),e.lineDashOffset=a),!r&&(n.strokeFirst?(s&&D5(e,n),l&&D2(e,n)):(l&&D2(e,n),s&&D5(e,n))),o&&e.setLineDash([])}(e,t,g,f),f&&(n.batchFill=g.fill||"",n.batchStroke=g.stroke||"");else if(t instanceof wB){3!==n.lastDrawType&&(u=!0,n.lastDrawType=3),D8(e,t,p,u,n);var m,v,y,x,b,w=g.text;if(null!=w&&(w+=""),w){e.font=g.font||mw,e.textAlign=g.textAlign,e.textBaseline=g.textBaseline;var _=void 0,S=void 0;e.setLineDash&&g.lineDash&&(_=(b=DK(t))[0],S=b[1]),_&&(e.setLineDash(_),e.lineDashOffset=S),g.strokeFirst?(DJ(g)&&e.strokeText(w,g.x,g.y),D1(g)&&e.fillText(w,g.x,g.y)):(D1(g)&&e.fillText(w,g.x,g.y),DJ(g)&&e.strokeText(w,g.x,g.y)),_&&e.setLineDash([])}}else t instanceof wW?(2!==n.lastDrawType&&(u=!0,n.lastDrawType=2),i=u,D9(e,Ot(t,n.inHover),p&&Ot(p,n.inHover),i,n),function(e,t,n){var r=t.__image=y1(n.image,t.__image,t,t.onload);if(r&&y5(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var u=n.sx,c=n.sy,d=a-u,h=s-c;e.drawImage(r,u,c,d,h,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,g)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(u=!0,n.lastDrawType=4),function(e,t,n){var r,i,o=t.getDisplayables(),a=t.getTemporalDisplayables();e.save();var s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(r=t.getCursor(),i=o.length;r<i;r++){var l=o[r];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Or(e,l,s,r===i-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Or(e,l,s,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n));f&&r&&Oe(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}var Oi=new DU,Oo=new yJ(100),Oa=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Os(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&Oi.delete(e);var o=Oi.get(e);if(o)return o;var a=mj(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o,s=[n],l=!0,u=0;u<Oa.length;++u){var c=a[Oa[u]];if(null!=c&&!mK(c)&&!mJ(c)&&!m1(c)&&"boolean"!=typeof c){l=!1;break}s.push(c)}if(l){t=s.join(",")+(i?"-svg":"");var d=Oo.get(t);d&&(i?e.svgElement=d:e.image=d)}var h=function e(t){if(!t||0===t.length)return[[0,0]];if(m1(t)){var n=Math.ceil(t);return[[n,n]]}for(var r=!0,i=0;i<t.length;++i)if(!m1(t[i])){r=!1;break}if(r)return e([t]);for(var o=[],i=0;i<t.length;++i)if(m1(t[i])){var n=Math.ceil(t[i]);o.push([n,n])}else{var n=m$(t[i],function(e){return Math.ceil(e)});n.length%2==1?o.push(n.concat(n)):o.push(n)}return o}(a.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(m1(e)){var t=Math.ceil(e);return[t,t]}var n=m$(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),f=function e(t){if(!t||0===t.length)return[["rect"]];if(mJ(t))return[[t]];for(var n=!0,r=0;r<t.length;++r)if(!mJ(t[r])){n=!1;break}if(n)return e([t]);for(var i=[],r=0;r<t.length;++r)mJ(t[r])?i.push([t[r]]):i.push(t[r]);return i}(a.symbol),g=m$(h,function(e){return Ol(e)}),m=Ol(p),v=!i&&mS.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=vk(e,g[t]);for(var r=1,t=0,n=f.length;t<n;++t)r=vk(r,f[t].length);e*=r;var i=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();v&&(v.width=x.width*n,v.height=x.height*n,o=v.getContext("2d")),function(){o&&(o.clearRect(0,0,v.width,v.height),a.backgroundColor&&(o.fillStyle=a.backgroundColor,o.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(!(e<=0))for(var s=-m,l=0,u=0,c=0;s<x.height;){if(l%2==0){for(var d=u/2%f.length,g=0,b=0,w=0;g<2*x.width;){for(var _=0,t=0;t<h[c].length;++t)_+=h[c][t];if(_<=0)break;if(b%2==0){var S=(1-a.symbolSize)*.5,C=g+h[c][b]*S,M=s+p[l]*S,A=h[c][b]*a.symbolSize,T=p[l]*a.symbolSize,I=w/2%f[d].length;!function(e,t,s,l,u){var c=i?1:n,d=T5(u,e*c,t*c,s*c,l*c,a.color,a.symbolKeepAspect);if(i){var h=r.painter.renderOneToVNode(d);h&&y.children.push(h)}else On(o,d)}(C,M,A,T,f[d][I])}g+=h[c][b],++w,++b===h[c].length&&(b=0)}++c===h.length&&(c=0)}s+=p[l],++u,++l===p.length&&(l=0)}}(),l&&Oo.put(t,v||y),e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,Oi.set(e,s),e.dirty=!1,s}function Ol(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var Ou=new bN,Oc={},Od="__flagInMainProcess",Oh="__pendingUpdate",Op="__needsUpdateStatus",Of=/^[a-zA-Z0-9_]+$/,Og="__connectUpdateStatus";function Om(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.isDisposed()?void this.id:Oy(this,e,t)}}function Ov(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Oy(this,e,t)}}function Oy(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),bN.prototype[t].apply(e,n)}var Ox=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t}(bN),Ob=Ox.prototype;Ob.on=Ov("on"),Ob.off=Ov("off");var Ow=function(e){function t(t,n,r){var i=e.call(this,new DF)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},mJ(n)&&(n=Ok[n]),i._dom=t,r.ssr;var o=i._zr=kW(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:m8(r.useDirtyRect,!1),useCoarsePointer:m8(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=Tu(mX(o.flush,o),17),(n=mz(n))&&Du(n,!0),i._theme=n,i._locale=function(e){if(!mJ(e))return mF(mz(e),mz(SD.EN),!1);var t=SD[e.toUpperCase()]||{};return"ZH"===e||"EN"===e?mz(t):mF(mz(t),mz(SD.EN),!1)}(r.locale||SP),i._coordSysMgr=new MT;var a=i._api=eo(i);function s(e,t){return e.__prio-t.__prio}return ky(OI,s),ky(OA,s),i._scheduler=new Dx(i,a,OA,OI),i._messageCenter=new Ox,i._initEvents(),i.resize=mX(i.resize,i),o.animation.on("frame",i._onframe,i),ee(o,i),et(o,i),i[vi]=!0,i}return yN(t,e),t.prototype._onframe=function(){if(!this._disposed){el(this);var e=this._scheduler;if(this[Oh]){var t=this[Oh].silent;this[Od]=!0;try{$(this),Y.update.call(this,null,this[Oh].updateParams)}catch(e){throw this[Od]=!1,this[Oh]=null,e}this._zr.flush(),this[Od]=!1,this[Oh]=null,Q.call(this,t),J.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),q(this,r),e.performVisualTasks(r),ei(this,this._model,i,"remain",{}),n-=new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[Od]){if(this._disposed)return void this.id;if(m2(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[Od]=!0,!this._model||t){var r,i,o,a=new k2(this._api),s=this._theme,l=this._model=new kX;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},OT);var u={seriesTransition:o,optionChanged:!0};if(n)this[Oh]={silent:r,updateParams:u},this[Od]=!1,this.getZr().wakeUp();else{try{$(this),Y.update.call(this,null,u)}catch(e){throw this[Oh]=null,this[Od]=!1,e}this._ssr||this._zr.flush(),this[Oh]=null,this[Od]=!1,Q.call(this,r),J.call(this,r)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||vO.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(vO.svgSupported){var e=this._zr;return mG(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed)return void this.id;var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;mG(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return mG(r,function(e){e.group.ignore=!1}),o},t.prototype.getConnectedDataURL=function(e){if(this._disposed)return void this.id;var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(!OP[n])return this.getDataURL(e);var a=o,s=o,l=-o,u=-o,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();mG(OO,function(o,d){if(o.group===n){var h=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(mz(e)),p=o.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=i(p.right,l),u=i(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}}),a*=d,s*=d,l*=d,u*=d;var h=l-a,p=u-s,f=mS.createCanvas(),g=kW(f,{renderer:t?"svg":"canvas"});if(g.resize({width:h,height:p}),!t)return e.connectedBackgroundColor&&g.add(new wK({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),mG(c,function(e){var t=new wW({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"));var m="";return mG(c,function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()},t.prototype.convertToPixel=function(e,t){return X(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return X(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;return this._disposed?void this.id:(mG(vU(this._model,e),function(e,r){r.indexOf("Models")>=0&&mG(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}},this)},this),!!n)},t.prototype.getVisual=function(e,t){var n=vU(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?DV(r,i,t):DH(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;mG(OS,function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&DW(o,function(e){var t=_n(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=mB({},t.eventData),!0},!0),n){var a=n.componentType,s=n.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)}),mG(OM,function(e,t){r._messageCenter.on(t,function(e){this.trigger(t,e)},r)}),mG(["selectchanged"],function(e){r._messageCenter.on(e,function(t){this.trigger(e,t)},r)}),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",function(e){var r=n.getModel();e.isFromClick?(Ik("map","selectchanged",t,r,e),Ik("pie","selectchanged",t,r,e)):"select"===e.fromAction?(Ik("map","selected",t,r,e),Ik("pie","selected",t,r,e)):"unselect"===e.fromAction&&(Ik("map","unselected",t,r,e),Ik("pie","unselected",t,r,e))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)return void this.id;this._disposed=!0,this.getDom()&&vK(this.getDom(),OL,"");var e=this._api,t=this._model;mG(this._componentsViews,function(n){n.dispose(t,e)}),mG(this._chartsViews,function(n){n.dispose(t,e)}),this._zr.dispose(),this._dom=this._model=this._chartsMap=this._componentsMap=this._chartsViews=this._componentsViews=this._scheduler=this._api=this._zr=this._throttledZrFlush=this._theme=this._coordSysMgr=this._messageCenter=null,delete OO[this.id]},t.prototype.resize=function(e){if(!this[Od]){if(this._disposed)return void this.id;this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[Oh]&&(null==r&&(r=this[Oh].silent),n=!0,this[Oh]=null),this[Od]=!0;try{n&&$(this),Y.update.call(this,{type:"resize",animation:mB({duration:0},e&&e.animation)})}catch(e){throw this[Od]=!1,e}this[Od]=!1,Q.call(this,r),J.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)return void this.id;if(m2(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),OD[e]){var n=OD[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=mB({},e);return t.type=OM[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)return void this.id;if((m2(t)||(t={silent:!!t}),OC[e.type])&&this._model){if(this[Od])return void this._pendingActions.push(e);var n=t.silent;K.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&vO.browser.weChat&&this._throttledZrFlush(),Q.call(this,n),J.call(this,n)}},t.prototype.updateLabelLayout=function(){Ou.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)return void this.id;var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,r=e.get("zlevel")||0;t.eachRendered(function(e){return function e(t,n,r,i){var o=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)i=Math.max(e(s[l],n,r,i),i);else t.z=n,t.zlevel=r,i=Math.max(t.z2,i);if(o&&(o.z=n,o.zlevel=r,isFinite(i)&&(o.z2=i+2)),a){var u=t.textGuideLineConfig;a.z=n,a.zlevel=r,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}(e,n,r,-1/0),!0})}}function r(e,t){t.eachRendered(function(e){if(!_K(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function i(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered(function(e){if(e.states&&e.states.emphasis&&!_K(e)){if(e instanceof wz&&((n=_a(e)).normalFill=e.style.fill,n.normalStroke=e.style.stroke,n.selectFill=(r=e.states.select||{}).style&&r.style.fill||null,n.selectStroke=r.style&&r.style.stroke||null),e.__dirty){var n,r,o=e.prevStates;o&&e.useStates(o)}if(i){e.stateTransition=a;var s=e.getTextContent(),l=e.getTextGuideLine();s&&(s.stateTransition=a),l&&(l.stateTransition=a)}e.__dirty&&t(e)}})}$=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),U(e,!0),U(e,!1),t.plan()},U=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=yB(e.type);(c=new(t?Dd.getClass(d.main,d.sub):Tx.getClass(d.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},t||r.prepareView(c,e,n,s)}t?n.eachComponent(function(e,t){"series"!==e&&u(t)}):n.eachSeries(u);for(var l=0;l<i.length;){var c=i[l];c.__alive?l++:(t||c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},Z=function(e,t,n,r,i){var o,a=e._model;if(a.setUpdatePayload(n),!r)return void mG([].concat(e._componentsViews).concat(e._chartsViews),c);var s={};s[r+"Id"]=n[r+"Id"],s[r+"Index"]=n[r+"Index"],s[r+"Name"]=n[r+"Name"];var l={mainType:r,query:s};i&&(l.subType=i);var u=n.excludeSeriesId;function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}null!=u&&(o=vl(),mG(vE(u),function(e){var t=vj(e,null);null!=t&&o.set(t,!0)})),a&&a.eachComponent(l,function(t){if(!(o&&null!=o.get(t.id))){if(_$(n))if(t instanceof Ma)n.type!==_c||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=vW(i,t);o=(mK(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=_n(a);_R(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&_R(r,c,d,n)}}}(t,n,e._api);else{var r=_L(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===_c&&i&&!n.notBlur&&_E(t.mainType,t.componentIndex,e._api),a&&mG(a,function(e){n.type===_c?_k(e):_D(e)})}else if(_G(n)&&t instanceof Ma){if(e._api,_G(n)){var s=n.dataType,l=vW(t.getData(s),n);mK(l)||(l=[l]),t[n.type===_f?"toggleSelect":n.type===_h?"select":"unselect"](l,s)}_N(t),es(e)}}},e),a&&a.eachComponent(l,function(t){o&&null!=o.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)},Y={prepareAndUpdate:function(e){$(this),Y.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),q(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),en(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),Ou.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent(function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}});var a=vl();r.eachSeries(function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)}),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),ei(this,r,i,t,{},a),Ou.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),Tx.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),en(this,n,this._api,t,{}),Ou.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries(function(e){e.getData().clearAllVisual()}),Tx.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent(function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}}),r.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)}),Ou.trigger("afterupdate",r,this._api))},updateLayout:function(e){Y.update.call(this,e)}},X=function(e,t,n,r){if(e._disposed)return void e.id;for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=vU(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},q=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},K=function(e,t){var n,r=this,i=this.getModel(),o=e.type,a=e.escapeConnect,s=OC[o],l=s.actionInfo,u=(l.update||"update").split(":"),c=u.pop(),d=null!=u[0]&&yB(u[0]);this[Od]=!0;var h=[e],p=!1;e.batch&&(p=!0,h=m$(e.batch,function(t){return(t=mj(mB({},t),e)).batch=null,t}));var f=[],g=_G(e),m=_$(e);if(m&&_P(this._api),mG(h,function(t){if((n=(n=s.action(t,r._model,r._api))||mB({},t)).type=l.event||n.type,f.push(n),m){var i=vZ(e),o=i.queryOptionMap;Z(r,c,t,i.mainTypeSpecified?o.keys()[0]:"series"),es(r)}else g?(Z(r,c,t,"series"),es(r)):d&&Z(r,c,t,d.main,d.sub)}),"none"!==c&&!m&&!g&&!d)try{this[Oh]?($(this),Y.update.call(this,e),this[Oh]=null):Y[c].call(this,e)}catch(e){throw this[Od]=!1,e}if(n=p?{type:l.event||o,escapeConnect:a,batch:f}:f[0],this[Od]=!1,!t){var v=this._messageCenter;if(v.trigger(n.type,n),g){var y,x={type:"selectchanged",escapeConnect:a,selected:(y=[],i.eachSeries(function(e){mG(e.getAllData(),function(t){t.data;var n=t.type,r=e.getSelectedDataIndices();if(r.length>0){var i={dataIndex:r,seriesIndex:e.seriesIndex};null!=n&&(i.dataType=n),y.push(i)}})}),y),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(x.type,x)}}},Q=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();K.call(this,n,e)}},J=function(e){e||this.trigger("updated")},ee=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[Oh]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},et=function(e,t){e.on("mouseover",function(e){var n,r,i,o,a,s=DW(e.target,_W);s&&(n=t._api,o=(i=_L((r=_n(s)).componentMainType,r.componentIndex,r.componentHighDownName,n)).dispatchers,a=i.focusSelf,o?(a&&_E(r.componentMainType,r.componentIndex,n),mG(o,function(t){return _T(t,e)})):(_R(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&_E(r.componentMainType,r.componentIndex,n),_T(s,e)),es(t))}).on("mouseout",function(e){var n,r,i,o=DW(e.target,_W);o&&(_P(n=t._api),(i=_L((r=_n(o)).componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers)?mG(i,function(t){return _I(t,e)}):_I(o,e),es(t))}).on("click",function(e){var n=DW(e.target,function(e){return null!=_n(e).dataIndex},!0);if(n){var r=n.selected?"unselect":"select",i=_n(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}})},en=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})}),r){var i,o,a=t.concat(n);ky(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),mG(a,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)})}}(t),er(e,t,n,r,i),mG(e._chartsViews,function(e){e.__alive=!1}),ei(e,t,n,r,i),mG(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},er=function(e,t,o,a,s,l){mG(l||e._componentsViews,function(e){var s=e.__model;r(s,e),e.render(s,t,o,a),n(s,e),i(s,e)})},ei=function(e,t,o,a,s,l){var u,c,d,h,p=e._scheduler;s=mB(s||{},{updatedSeries:t.getSeries()}),Ou.trigger("series:beforeupdate",t,o,s);var f=!1;t.eachSeries(function(t){var n,i,o,s=e._chartsMap[t.__viewId];s.__alive=!0;var u=s.renderTask;p.updatePayload(u,a),r(t,s),l&&l.get(t.uid)&&u.dirty(),u.perform(p.getPerformArgs(u))&&(f=!0),s.group.silent=!!t.get("silent"),n=t,i=s,o=n.get("blendMode")||null,i.eachRendered(function(e){e.isGroup||(e.style.blend=o)}),_N(t)}),p.unfinished=f||p.unfinished,Ou.trigger("series:layoutlabels",t,o,s),Ou.trigger("series:transition",t,o,s),t.eachSeries(function(t){var r=e._chartsMap[t.__viewId];n(t,r),i(t,r)}),u=e,c=t,d=u._zr.storage,h=0,d.traverse(function(e){!e.isGroup&&h++}),!(h>c.get("hoverLayerThreshold"))||vO.node||vO.worker||c.eachSeries(function(e){if(!e.preventUsingHoverLayer){var t=u._chartsMap[e.__viewId];t.__alive&&t.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}}),Ou.trigger("series:afterupdate",t,o,s)},es=function(e){e[Op]=!0,e.getZr().wakeUp()},el=function(e){e[Op]&&(e.getZr().storage.traverse(function(e){_K(e)||t(e)}),e[Op]=!1)},eo=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return yN(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){_k(t,n),es(e)},n.prototype.leaveEmphasis=function(t,n){_D(t,n),es(e)},n.prototype.enterBlur=function(t){_S(t,_x),es(e)},n.prototype.leaveBlur=function(t){_S(t,_b),es(e)},n.prototype.enterSelect=function(t){_S(t,_w),es(e)},n.prototype.leaveSelect=function(t){_S(t,__),es(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(k0))(e)},ea=function(e){function t(e,t){for(var n=0;n<e.length;n++)e[n][Og]=t}mG(OM,function(n,r){e._messageCenter.on(r,function(n){if(OP[e.group]&&0!==e[Og]&&(!n||!n.escapeConnect)){var r=e.makeActionFromEvent(n),i=[];mG(OO,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,0),mG(i,function(e){1!==e[Og]&&e.dispatchAction(r)}),t(i,2)}})})}}(),t}(bN),O_=Ow.prototype;O_.on=Om("on"),O_.off=Om("off"),O_.one=function(e,t,n){var r=this;this.on.call(this,e,function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)},n)};var OS=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],OC={},OM={},OA=[],OT=[],OI=[],Ok={},OD={},OO={},OP={},OR=new Date-0,OE=new Date-0,OL="_echarts_instance_";function ON(e){0>mV(OT,e)&&OT.push(e)}function Oz(e,t){OH(OA,e,t,2e3)}function OF(e,t){Ou.on(e,t)}function OB(e,t,n){mQ(t)&&(n=t,t="");var r=m2(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),OM[t=e.event]||(vn(Of.test(r)&&Of.test(t)),OC[r]||(OC[r]={action:n,actionInfo:e}),OM[t]=r)}function Oj(e,t){OH(OI,e,t,3e3,"visual")}var OV=[];function OH(e,t,n,r,i){if((mQ(t)||m2(t))&&(n=t,t=r),!(mV(OV,n)>=0)){OV.push(n);var o=Dx.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}Oj(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=Dg(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Dm(e,r),l=o[s],u=mQ(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||mQ(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||mQ(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=mB({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}}),Oj(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=Dg(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Dv.option=n[r];var a=i(Dv);mB(e.ensureUniqueItemVisual(t,"style"),a),Dv.option.decal&&(e.setItemVisual(t,"decal",Dv.option.decal),Dv.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}}),Oj(4500,{performRawSeries:!0,overallReset:function(e){var t=vl();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),Dh(e).scope=i}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),r={},i=t.getData(),o=Dh(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=Dm(t,a);i.each(function(e){r[i.getRawIndex(e)]=e}),n.each(function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}})}})}}),Oj(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<DB.length;a++){var s=DB[a],l=e.get(s);mQ(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(mB({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=mY(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}}),Oj(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<Dj.length;r++){var i=Dj[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}}),Oj(7e3,function(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=Os(n,t))});var i=r.getVisual("decal");i&&(r.getVisual("style").decal=Os(i,t))}})}),ON(Du),Oz(900,function(e){var t=vl();e.eachSeries(function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}}),t.each(Dc)}),OD.default=function(e,t){mj(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n,r=new ML,i=new wK({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(i);var o=new _t({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new wK({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return r.add(a),t.showSpinner&&((n=new AD({shape:{startAngle:-Dy/2,endAngle:-Dy/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Dy/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Dy/2}).delay(300).start("circularInOut"),r.add(n)),r.resize=function(){var r=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&r?10:0)-r)/2-(t.showSpinner&&r?0:5+r/2)+(t.showSpinner?0:r/2)+(r?0:s),u=e.getHeight()/2;t.showSpinner&&n.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r},OB({type:_c,event:_c,update:_c},vh),OB({type:_d,event:_d,update:_d},vh),OB({type:_h,event:_h,update:_h},vh),OB({type:_p,event:_p,update:_p},vh),OB({type:_f,event:_f,update:_f},vh),Ok.light={color:DP,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],DP]},Ok.dark=Dz;var OW=[],OG={registerPreprocessor:ON,registerProcessor:Oz,registerPostInit:function(e){OF("afterinit",e)},registerPostUpdate:function(e){OF("afterupdate",e)},registerUpdateLifecycle:OF,registerAction:OB,registerCoordinateSystem:function(e,t){MT.register(e,t)},registerLayout:function(e,t){OH(OI,e,t,1e3,"layout")},registerVisual:Oj,registerTransform:function(e){var t=(e=mz(e)).type;t||CD("");var n=t.split(":");2!==n.length&&CD("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,CB.set(t,e)},registerLoading:function(e,t){OD[e]=t},registerMap:function(e,t,n){var r=Oc.registerMap;r&&r(e,t,n)},registerImpl:function(e,t){Oc[e]=t},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:Cc,ComponentView:Dd,SeriesModel:Ma,ChartView:Tx,registerComponentModel:function(e){Cc.registerClass(e)},registerComponentView:function(e){Dd.registerClass(e)},registerSeriesModel:function(e){Ma.registerClass(e)},registerChartView:function(e){Tx.registerClass(e)},registerSubTypeDefaulter:function(e,t){Cc.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){kj[e]=t}};function O$(e){mK(e)?mG(e,function(e){O$(e)}):mV(OW,e)>=0||(OW.push(e),mQ(e)&&(e={install:e}),e.install(OG))}var OU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return yN(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(Ma),OZ=function(){},OY=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return yN(t,e),t.prototype.getDefaultShape=function(){return new OZ},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,i=t.size,o=this.symbolProxy,a=o.shape,s=e.getContext?e.getContext():e,l=s&&i[0]<4,u=this.softClipShape;if(l){this._ctx=s;return}for(this._ctx=null,n=this._off;n<r.length;){var c=r[n++],d=r[n++];!(isNaN(c)||isNaN(d))&&(!u||u.contain(c,d))&&(a.x=c-i[0]/2,a.y=d-i[1]/2,a.width=i[0],a.height=i[1],o.buildPath(e,a,!0))}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.afterBrush=function(){var e,t=this.shape,n=t.points,r=t.size,i=this._ctx,o=this.softClipShape;if(i){for(e=this._off;e<n.length;){var a=n[e++],s=n[e++];!(isNaN(a)||isNaN(s))&&(!o||o.contain(a,s))&&i.fillRect(a-r[0]/2,s-r[1]/2,r[0],r[1])}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,o=Math.max(i[0],4),a=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var l=2*s,u=r[l]-o/2,c=r[l+1]-a/2;if(e>=u&&t>=c&&e<=u+o&&t<=c+a)return s}return -1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return(e=n[0],t=n[1],r.contain(e,t))?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],o=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c<n.length;){var d=n[c++],h=n[c++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(h,s),u=Math.max(h,u)}e=this._rect=new xu(a-i/2,s-o/2,l-a+i,u-s+o)}return e},t}(wz),OX=function(){function e(){this.group=new ML}return e.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(e){if(null!=e.startIndex){var n=(e.endIndex-e.startIndex)*2,r=4*e.startIndex*2;t=new Float32Array(t.buffer,r,n)}e.setShape("points",t),e.reset()})},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var r=this._newAdded[0],i=t.getLayout("points"),o=r&&r.shape.points;if(o&&o.length<2e4){var a=o.length,s=new Float32Array(a+i.length);s.set(o),s.set(i,a),r.endIndex=e.end,r.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=!0,l.setShape({points:i}),this._setCommon(l,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new OY({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=T5(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("style"),s=a&&a.fill;s&&e.setColor(s);var l=_n(e);l.seriesIndex=r.seriesIndex,e.on("mousemove",function(t){l.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(l.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Oq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var i=I_("").reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new OX:new In,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Tx),OK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(Cc),OQ=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),OJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",vY).models[0]},t.type="cartesian2dAxis",t}(Cc);mH(OJ,OQ);var O0={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},O1=mF({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},O0),O2=mF({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},O0),O5=mF({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},O2),O3=mj({logBase:10},O2);let O4={category:O1,value:O2,time:O5,log:O3};var O6=0,O9=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++O6}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&m$(r,O8);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!mJ(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=vl(this.categories))},e}();function O8(e){return m2(e)&&null!=e.value?e.value:e+""}var O7={value:1,category:1,time:1,log:1};function Pe(e,t,n,r){mG(O7,function(i,o){var a=mF(mF({},O4[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return yN(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ca(this),r=n?Cl(e):{};mF(e,t.getTheme().get(o+"Axis")),mF(e,this.getDefaultOption()),e.type=Pt(e),n&&Cs(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=O9.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",Pt)}function Pt(e){return e.type||(e.data?"category":"value")}var Pn=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();function Pr(e){return"interval"===e.type||"log"===e.type}function Pi(e){var t=Math.pow(10,vC(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,vm(n*t)}y$(Pn);function Po(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function Pa(e,t){return e>=t[0]&&e<=t[1]}function Ps(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Pl(e,t){return e*(t[1]-t[0])+t[0]}var Pu=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new O9({})),mK(r)&&(r=new O9({categories:m$(r,function(e){return m2(e)?e.value:e})})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return yN(t,e),t.prototype.parse=function(e){return null==e?NaN:mJ(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Pa(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return Ps(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(Pl(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null==e){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Pn);Pn.registerClass(Pu);var Pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return yN(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Pa(e,this._extent)},t.prototype.normalize=function(e){return Ps(e,this._extent)},t.prototype.scale=function(e){return Pl(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=vy(e)+2},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:vm(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=vm(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:vm(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=vm(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=vy(e.value)||0:"auto"===n&&(n=this._intervalPrecision),S5(vm(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o,a,s,l,u,c,d=(s=e,u=(l={}).interval=vM((r[1]-r[0])/s,!0),null!=t&&u<t&&(u=l.interval=t),null!=n&&u>n&&(u=l.interval=n),c=l.intervalPrecision=vy(u)+2,o=l.niceTickExtent=[vm(Math.ceil(r[0]/u)*u,c),vm(Math.floor(r[1]/u)*u,c)],a=r,isFinite(o[0])||(o[0]=a[0]),isFinite(o[1])||(o[1]=a[1]),Po(o,0,a),Po(o,1,a),o[0]>o[1]&&(o[0]=o[1]),l);this._intervalPrecision=d.intervalPrecision,this._interval=d.interval,this._niceExtent=d.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;isFinite(t[1]-t[0])||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var r=this._interval;e.fixMin||(t[0]=vm(Math.floor(t[0]/r)*r)),e.fixMax||(t[1]=vm(Math.ceil(t[1]/r)*r))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(Pn);Pn.registerClass(Pc);var Pd=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},Ph=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return yN(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return SV(e.value,SN[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Sj(this._minLevelUnit))]||SN.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(mJ(n))o=n;else if(mQ(n))o=n(e.value,t,{level:e.level});else{var a=mB({},SE);if(e.level>0)for(var s=0;s<Sz.length;++s)a[Sz[s]]="{primary|"+a[Sz[s]]+"}";var l=n?!1===n.inherit?n:mj(n,a):a,u=SH(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(var c=SF.indexOf(u),s=c-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(mK(o)){var d=null==e.level?0:e.level>=0?e.level:o.length+e.level;d=Math.min(d,o.length-1),o=o[d]}}return SV(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){for(var i=0,o=[],a=[],s=0,l=0,u=0;u<SF.length&&i++<1e4;++u){var c,d=Sj(SF[u]);if((c=SF[u])===Sj(c)&&(!function(e,i,o){var a=[],s=!i.length;if(!function(e,t,n,r){var i=vS(t),o=vS(n),a=function(e){return SW(i,e,r)===SW(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},h=function(){return d()&&a("second")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return h();case"millisecond":return h()&&a("millisecond")}}(Sj(e),r[0],r[1],n)){s&&(i=[{value:function(e,t,n){var r=new Date(e);switch(Sj(t)){case"year":case"month":r[SK(n)](0);case"day":r[SQ(n)](1);case"hour":r[SJ(n)](0);case"minute":r[S0(n)](0);case"second":r[S1(n)](0),r[S2(n)](0)}return r.getTime()}(new Date(r[0]),e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,c=i[l+1].value;if(u!==c){var d,h,p,f=void 0,g=void 0,m=void 0;switch(e){case"year":f=Math.max(1,Math.round(t/864e5/365)),g=SG(n),m=n?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":f=(d=t/2592e6)>6?6:d>3?3:d>2?2:1,g=S$(n),m=SK(n);break;case"week":case"half-week":case"day":f=(h=t/864e5)>16?16:h>7.5?7:h>3.5?4:h>1.5?2:1,g=SU(n),m=SQ(n);break;case"half-day":case"quarter-day":case"hour":f=(p=t/36e5)>12?12:p>6?6:p>3.5?4:p>2?2:1,g=SZ(n),m=SJ(n);break;case"minute":f=Pf(t,!0),g=SY(n),m=S0(n);break;case"second":f=Pf(t,!1),g=SX(n),m=S1(n);break;case"millisecond":f=vM(t,!0),g=Sq(n),m=S2(n)}!function(e,t,n,i,o,a){for(var s=new Date(t),l=t,u=s[i]();l<n&&l<=r[1];)a.push({value:l}),u+=e,s[o](u),l=s.getTime();a.push({value:l,notAdd:!0})}(f,u,c,g,m,a),"year"===e&&o.length>1&&0===l&&o.unshift({value:o[0].value-f})}}for(var l=0;l<a.length;l++)o.push(a[l])}}(SF[u],o[o.length-1]||[],a),d!==(SF[u+1]?Sj(SF[u+1]):null))){if(a.length){l=s,a.sort(function(e,t){return e.value-t.value});for(var h=[],p=0;p<a.length;++p){var f=a[p].value;(0===p||a[p-1].value!==f)&&(h.push(a[p]),f>=r[0]&&f<=r[1]&&s++)}var g=(r[1]-r[0])/t;if(s>1.5*g&&l>g/1.5||(o.push(h),s>g||e===SF[u]))break}a=[]}}for(var m=mZ(m$(o,function(e){return mZ(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),v=[],y=m.length-1,u=0;u<m.length;++u)for(var x=m[u],b=0;b<x.length;++b)v.push({value:x[b].value,level:y-u});v.sort(function(e,t){return e.value-t.value});for(var w=[],u=0;u<v.length;++u)(0===u||v[u].value!==v[u-1].value)&&w.push(v[u]);return w}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=864e5,t[1]+=864e5),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-864e5}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=Pp.length,a=Math.min(Pd(Pp,this._approxInterval,0,o),o-1);this._interval=Pp[a][1],this._minLevelUnit=Pp[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return m1(e)?e:+vS(e)},t.prototype.contain=function(e){return Pa(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Ps(this.parse(e),this._extent)},t.prototype.scale=function(e){return Pl(e,this._extent)},t.type="time",t}(Pc),Pp=[["second",1e3],["minute",6e4],["hour",36e5],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",15768e6],["year",31536e6]];function Pf(e,t){return(e/=t?6e4:1e3)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}Pn.registerClass(Ph);var Pg=Pn.prototype,Pm=Pc.prototype,Pv=Math.floor,Py=Math.ceil,Px=Math.pow,Pb=Math.log,Pw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Pc,t._interval=0,t}return yN(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return m$(Pm.getTicks.call(this,e),function(e){var t=e.value,i=vm(Px(this.base,t));return i=t===n[0]&&this._fixMin?vm(i,vy(r[0])):i,{value:i=t===n[1]&&this._fixMax?vm(i,vy(r[1])):i}},this)},t.prototype.setExtent=function(e,t){var n=Pb(this.base);e=Pb(Math.max(0,e))/n,t=Pb(Math.max(0,t))/n,Pm.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e,t,n=this.base,r=Pg.getExtent.call(this);r[0]=Px(n,r[0]),r[1]=Px(n,r[1]);var i=this._originalScale.getExtent();return this._fixMin&&(r[0]=(e=r[0],vm(e,vy(i[0])))),this._fixMax&&(r[1]=(t=r[1],vm(t,vy(i[1])))),r},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=Pb(e[0])/Pb(t),e[1]=Pb(e[1])/Pb(t),Pg.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(n!==1/0&&!(n<=0)){var r=Math.pow(10,vC(n));for(e/n*r<=.5&&(r*=10);!isNaN(r)&&1>Math.abs(r)&&Math.abs(r)>0;)r*=10;var i=[vm(Py(t[0]/r)*r),vm(Pv(t[1]/r)*r)];this._interval=r,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){Pm.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Pa(e=Pb(e)/Pb(this.base),this._extent)},t.prototype.normalize=function(e){return Ps(e=Pb(e)/Pb(this.base),this._extent)},t.prototype.scale=function(e){return e=Pl(e,this._extent),Px(this.base,e)},t.type="log",t}(Pn),P_=Pw.prototype;P_.getMinorTicks=Pm.getMinorTicks,P_.getLabel=Pm.getLabel,Pn.registerClass(Pw);var PS=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);mQ(i)?this._modelMinNum=PT(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=PT(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(mQ(o)?this._modelMaxNum=PT(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=PT(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=mK(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[xv(s[0],1),xv(s[1],1)]}},e.prototype.calculate=function(){var e,t,n=this._isOrdinal,r=this._dataMin,i=this._dataMax,o=this._axisDataLen,a=this._boundaryGapInner,s=n?null:i-r||Math.abs(r),l="dataMin"===this._modelMinRaw?r:this._modelMinNum,u="dataMax"===this._modelMaxRaw?i:this._modelMaxNum,c=null!=l,d=null!=u;null==l&&(l=n?o?0:NaN:r-a[0]*s),null==u&&(u=n?o?o-1:NaN:i+a[1]*s),null!=l&&isFinite(l)||(l=NaN),null!=u&&isFinite(u)||(u=NaN);var h=(e=l)!=e||(t=u)!=t||n&&!o;this._needCrossZero&&(l>0&&u>0&&!c&&(l=0),l<0&&u<0&&!d&&(u=0));var p=this._determinedMin,f=this._determinedMax;return null!=p&&(l=p,c=!0),null!=f&&(u=f,d=!0),{min:l,max:u,minFixed:c,maxFixed:d,isBlank:h}},e.prototype.modifyDataMinMax=function(e,t){this[PM[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[PC[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),PC={min:"_determinedMin",max:"_determinedMax"},PM={min:"_dataMin",max:"_dataMax"};function PA(e,t,n){var r=e.rawExtentInfo;return r||(r=new PS(e,t,n),e.rawExtentInfo=r),r}function PT(e,t){return null==t?null:t!=t?NaN:e.parse(t)}function PI(e,t){var n=e.type,r=PA(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=yA("bar",a),l=!1;if(mG(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var u=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t){if(e&&t)return e[yM(t)]}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;mG(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;mG(a,function(e){l=Math.max(e.offset+e.width,l)});var u=(s=Math.abs(s))+(l=Math.abs(l)),c=t-e,d=c/(1-(s+l)/o)-c;return t+=l/u*d,{min:e-=s/u*d,max:t}}(i,o,t,yT(s));i=u.min,o=u.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function Pk(e,t){var n=PI(e,t),r=n.extent,i=t.get("splitNumber");e instanceof Pw&&(e.base=t.get("logBase"));var o=e.type,a=t.get("interval"),s="interval"===o||"time"===o;e.setExtent(r[0],r[1]),e.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:s?t.get("minInterval"):null,maxInterval:s?t.get("maxInterval"):null}),null!=a&&e.setInterval&&e.setInterval(a)}function PD(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(n,r){return e.scale.getFormattedLabel(n,r,t)}:mJ(t)?function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}:mQ(t)?function(r,i){return null!=n&&(i=r.value-n),t(PO(e,r),i,null!=r.level?{level:r.level}:null)}:function(t){return e.scale.getLabel(t)}}function PO(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function PP(e){var t=e.get("interval");return null==t?"auto":t}function PR(e){return"category"===e.type&&0===PP(e.getLabelModel())}function PE(e,t){var n={};return mG(e.mapDimensionsAll(t),function(t){n[yy(e,t)]=!0}),mY(n)}var PL=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return m$(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),mZ(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),PN=["x","y"];function Pz(e){return"interval"===e.type||"time"===e.type}var PF=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=PN,t}return yN(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(Pz(e)&&Pz(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=y7([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new xu(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return xN(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return xN(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e,o=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-i+e;return new xu(r,i,o,a)},t}(PL),PB=vG();function Pj(e,t){var n,r,i,o,a=PV(e,"labels"),s=PP(t),l=PH(a,s);return l||(mQ(s)?i=P$(e,s):(o="auto"===s?null!=(r=PB(n=e).autoInterval)?r:PB(n).autoInterval=n.calculateCategoryInterval():s,i=PG(e,o)),PW(a,s,{labels:i,labelCategoryInterval:o}))}function PV(e,t){return PB(e)[t]||(PB(e)[t]=[])}function PH(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function PW(e,t,n){return e.push({key:t,value:n}),n}function PG(e,t,n){var r=PD(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=PR(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return p&&f-l!==o[1]&&g(o[1]),s}function P$(e,t,n){var r=e.scale,i=PD(e),o=[];return mG(r.getTicks(),function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})}),o}var PU=[0,1];function PZ(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var PY=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return yN(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[+("x"!==this.dim)]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return vx(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&PZ(n=n.slice(),r.count()),vf(e,PU,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&PZ(n=n.slice(),r.count());var i=vf(e,n,PU,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=("category"===this.type?function(e,t){var n,r,i=PV(e,"ticks"),o=PP(t),a=PH(i,o);if(a)return a;if((!t.get("show")||e.scale.isBlank())&&(n=[]),mQ(o))n=P$(e,o,!0);else if("auto"===o){var s=Pj(e,e.getLabelModel());r=s.labelCategoryInterval,n=m$(s.labels,function(e){return e.tickValue})}else n=PG(e,r=o,!0);return PW(i,o,{ticks:n,tickCategoryInterval:r})}(this,t):{ticks:m$(this.scale.getTicks(),function(e){return e.value})}).ticks,r=m$(n,function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this);return function(e,t,n,r){var i,o,a=t.length;if(e.onBand&&!n&&a){var s=e.getExtent();if(1===a)t[0].coord=s[0],i=t[1]={coord:s[1]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;mG(t,function(e){e.coord-=u/2}),o=1+e.scale.getExtent()[1]-t[a-1].tickValue,i={coord:t[a-1].coord+u*o},t.push(i)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift()),r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]}),d(s[1],i.coord)&&(r?i.coord=s[1]:t.pop()),r&&d(i.coord,s[1])&&t.push({coord:s[1]})}function d(e,t){return e=vm(e),t=vm(t),c?e>t:e<t}}(this,r,t.get("alignWithLabel"),e.clamp),r},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),m$(this.scale.getMinorTicks(e),function(e){return m$(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){var e,t,n,r,i,o;return("category"===this.type?(e=this,t=e.getLabelModel(),n=Pj(e,t),!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n):(r=this,i=r.scale.getTicks(),o=PD(r),{labels:m$(i,function(e,t){return{level:e.level,formattedLabel:o(e,t),rawLabel:r.scale.getLabel(e),tickValue:e.value}})})).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+ +!!this.onBand;return 0===n&&(n=1),Math.abs(Math.abs(e[1]-e[0]))/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t,n,r=(n=(t=e).getLabelModel(),{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}),i=PD(e),o=(r.axisRotate-r.labelRotate)/180*Math.PI,a=e.scale,s=a.getExtent(),l=a.count();if(s[1]-s[0]<1)return 0;var u=1;l>40&&(u=Math.max(1,Math.floor(l/40)));for(var c=s[0],d=e.dataToCoord(c+1)-e.dataToCoord(c),h=Math.abs(d*Math.cos(o)),p=Math.abs(d*Math.sin(o)),f=0,g=0;c<=s[1];c+=u){var m=0,v=0,y=xp(i({value:c}),r.font,"center","top");m=1.3*y.width,v=1.3*y.height,f=Math.max(f,m,7),g=Math.max(g,v,7)}var x=f/h,b=g/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),_=PB(e.model),S=e.getExtent(),C=_.lastAutoInterval,M=_.lastTickCount;return null!=C&&null!=M&&1>=Math.abs(C-w)&&1>=Math.abs(M-l)&&C>w&&_.axisExtent0===S[0]&&_.axisExtent1===S[1]?w=C:(_.lastTickCount=l,_.lastAutoInterval=w,_.axisExtent0=S[0],_.axisExtent1=S[1]),w}(this)},e}());function PX(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],o.rotation=Math.PI/2*("x"!==u),o.labelDirection=o.tickDirection=o.nameDirection=({top:-1,bottom:1,left:-1,right:1})[s],o.labelOffset=a?f[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),m9(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function Pq(e){return"cartesian2d"===e.get("coordinateSystem")}function PK(e){var t={xAxisModel:null,yAxisModel:null};return mG(t,function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,vY).models[0];t[r]=o}),t}var PQ=Math.log,PJ=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=PN,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=mY(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;Pr(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(Pk(l,s),Pr(l)&&(t=a))}i.length&&(t||Pk((t=i.pop()).scale,t.model),mG(i,function(e){!function(e,t,n){var r=Pc.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=PI(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=PQ(e.base);u=[PQ(u[0])/h,PQ(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=r.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=Pi(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=Pi(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=Pi(f));var v=f*a;(g=vm((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=vm(v)):m>0&&u[1]<=0&&(m=0,g=-vm(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};mG(n.x,function(e){P1(n,"y",e,i)}),mG(n.y,function(e){P1(n,"x",e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=Ci(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){mG(a,function(e){var t,n,r,i,a=e.isHorizontal(),s=a?[0,o.width]:[0,o.height],l=+!!e.inverse;e.setExtent(s[l],s[1-l]),t=e,n=a?o.x:o.y,i=(r=t.getExtent())[0]+r[1],t.toGlobalCoord="x"===t.dim?function(e){return e+n}:function(e){return i-e+n},t.toLocalCoord="x"===t.dim?function(e){return e-n}:function(e){return i-e+n}})}s(),i&&(mG(a,function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t,n,r,i=e.model,o=e.scale;if(!(!i.get(["axisLabel","show"])||o.isBlank())){var a=o.getExtent();n=o instanceof Pu?o.count():(t=o.getTicks()).length;var s=e.getLabelModel(),l=PD(e),u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;c<n;c+=u){var d=l(t?t[c]:{value:a[0]+c},c),h=function(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new xu(e.x,e.y,o,a)}(s.getTextRect(d),s.get("rotate")||0);r?r.union(h):r=h}return r}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}}),s()),mG(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}m2(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",vY).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",vY).models[0],a=e.gridModel,s=this._coordsList;return r?0>mV(s,t=r.coordinateSystem)&&(t=null):i&&o?t=this.getCartesian(i.componentIndex,o.componentIndex):i?n=this.getAxis("x",i.componentIndex):o?n=this.getAxis("y",o.componentIndex):a&&a.coordinateSystem===this&&(t=this._coordsList[0]),{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}function l(t){return function(n,r){if(P0(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new PY(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Pu({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Ph({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Pn.getClass(t)||Pc)}}(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,mG(a.x,function(t,n){mG(a.y,function(i,o){var a="x"+n+"y"+o,s=new PF(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})})},e.prototype._updateScale=function(e,t){function n(e,t){mG(PE(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}mG(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(Pq(e)){var r=PK(e),i=r.xAxisModel,o=r.yAxisModel;if(P0(i,t)&&P0(o,t)){var a=this.getCartesian(i.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}},this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return mG(this.getCartesians(),function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);0>mV(t,i)&&t.push(i),0>mV(n,o)&&n.push(o)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)}),t.eachSeries(function(e){if(Pq(e)){var t=PK(e),n=t.xAxisModel,r=t.yAxisModel;e.coordinateSystem=n.getCoordSysModel().coordinateSystem.getCartesian(n.componentIndex,r.componentIndex)}}),r},e.dimensions=PN,e}();function P0(e,t){return e.getCoordSysModel()===t}function P1(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)P2(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&P2(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function P2(e){var t,n,r;return e&&"category"!==e.type&&"time"!==e.type&&(n=(t=e.scale.getExtent())[0],r=t[1],!(n>0&&r>0||n<0&&r<0))}var P5=Math.PI,P3=function(){function e(e,t){this.group=new ML,this.opt=t,this.axisModel=e,mj(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new ML({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!P4[e]},e.prototype.add=function(e){P4[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=vb(t-e);return vw(o)?(i=n>0?"top":"bottom",r="center"):vw(o-P5)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<P5?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),P4={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(xN(s,s,a),xN(l,l,a));var c=mB({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new A_({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});A1(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);mJ(h)&&(h=[h,h]),(mJ(p)||m1(p))&&(p=[p,p]);var f=T4(t.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];mG([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(t,r){if("none"!==h[r]&&null!=h[r]){var i=T5(h[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}})}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");if("auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick")),!(!a||i.scale.isBlank())){for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=P7(i.getTicksCoords(),t.transform,l,mj(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}}(n,r,t,e),o=function(e,t,n,r){var i=n.axis;if(!(!m9(r.axisLabelShow,n.get(["axisLabel","show"]))||i.scale.isBlank())){var o=n.getModel("axisLabel"),a=o.get("margin"),s=i.getViewLabels(),l=(m9(r.labelRotate,o.get("rotate"))||0)*P5/180,u=P3.innerTextLayout(r.rotation,l,r.labelDirection),c=n.getCategories&&n.getCategories(!0),d=[],h=P3.isLabelSilent(n),p=n.get("triggerEvent");return mG(s,function(l,f){var g="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(l.tickValue):l.tickValue,m=l.formattedLabel,v=l.rawLabel,y=o;if(c&&c[g]){var x=c[g];m2(x)&&x.textStyle&&(y=new Sm(x.textStyle,o,n.ecModel))}var b=y.getTextColor()||n.get(["axisLine","lineStyle","color"]),w=i.dataToCoord(g),_=y.getShallow("align",!0)||u.textAlign,S=m8(y.getShallow("alignMinLabel",!0),_),C=m8(y.getShallow("alignMaxLabel",!0),_),M=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||u.textVerticalAlign,A=m8(y.getShallow("verticalAlignMinLabel",!0),M),T=m8(y.getShallow("verticalAlignMaxLabel",!0),M),I=new _t({x:w,y:r.labelOffset+r.labelDirection*a,rotation:u.rotation,silent:h,z2:10+(l.level||0),style:_9(y,{text:m,align:0===f?S:f===s.length-1?C:_,verticalAlign:0===f?A:f===s.length-1?T:M,fill:mQ(b)?b("category"===i.type?v:"value"===i.type?g+"":g,f):b})});if(I.anid="label_"+g,p){var k=P3.makeAxisEventDataBase(n);k.targetType="axisLabel",k.value=v,k.tickIndex=f,"category"===i.type&&(k.dataIndex=g),_n(I).eventData=k}t.add(I),I.updateTransform(),d.push(I),e.add(I),I.decomposeTransform()}),d}}(n,r,t,e);(function(e,t,n){if(!PR(e.axis)){var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);n=n||[];var o=(t=t||[])[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],h=n[n.length-2];!1===r?(P6(o),P6(u)):P9(o,a)&&(r?(P6(a),P6(c)):(P6(o),P6(u))),!1===i?(P6(s),P6(d)):P9(l,s)&&(i?(P6(l),P6(h)):(P6(s),P6(d)))}})(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!(!o.get("show")||i.scale.isBlank())){var a=i.getMinorTicksCoords();if(a.length)for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=mj(s.getLineStyle(),mj(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=P7(a[c],t.transform,l,u,"minorticks_"+c),h=0;h<d.length;h++)e.add(d[h])}}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])&&function(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new xu(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,h=!1,p=0;p<t.length;p++){var f=t[p];if(n.intersect(f.rect)&&(a&&f.axisAligned||(f.obb||(f.obb=new AB(f.localRect,f.transform)),d||(d=new AB(s,l)),d.intersect(f.obb)))){h=!0;break}}h?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new AB(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(m$(o,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,r){var i,o,a=m9(e.axisName,t.get("name"));if(a){var s,l,u,c,d,h,p,f,g,m=t.get("nameLocation"),v=e.nameDirection,y=t.getModel("nameTextStyle"),x=t.get("nameGap")||0,b=t.axis.getExtent(),w=b[0]>b[1]?-1:1,_=["start"===m?b[0]-w*x:"end"===m?b[1]+w*x:(b[0]+b[1])/2,P8(m)?e.labelOffset+v*x:0],S=t.get("nameRotate");null!=S&&(S=S*P5/180),P8(m)?i=P3.innerTextLayout(e.rotation,null!=S?S:e.rotation,v):(s=e.rotation,l=m,u=S||0,c=b,p=vb(u-s),f=c[0]>c[1],g="start"===l&&!f||"start"!==l&&f,vw(p-P5/2)?(h=g?"bottom":"top",d="center"):vw(p-1.5*P5)?(h=g?"top":"bottom",d="center"):(h="middle",d=p<1.5*P5&&p>P5/2?g?"left":"right":g?"right":"left"),i={rotation:p,textAlign:d,textVerticalAlign:h},null!=(o=e.axisNameAvailableWidth)&&(isFinite(o=Math.abs(o/Math.sin(i.rotation)))||(o=null)));var C=y.getFont(),M=t.get("nameTruncate",!0)||{},A=M.ellipsis,T=m9(e.nameTruncateMaxWidth,M.maxWidth,o),I=new _t({x:_[0],y:_[1],rotation:i.rotation,silent:P3.isLabelSilent(t),style:_9(y,{text:a,font:C,overflow:"truncate",width:T,ellipsis:A,fill:y.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:y.get("align")||i.textAlign,verticalAlign:y.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(Tr({el:I,componentModel:t,itemName:a}),I.__fullText=a,I.anid="name",t.get("triggerEvent")){var k=P3.makeAxisEventDataBase(t);k.targetType="axisName",k.name=a,_n(I).eventData=k}r.add(I),I.updateTransform(),n.add(I),I.decomposeTransform()}}};function P6(e){e&&(e.ignore=!0)}function P9(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=y4([]);return y8(i,i,-e.rotation),n.applyTransform(y6([],i,e.getLocalTransform())),r.applyTransform(y6([],i,t.getLocalTransform())),n.intersect(r)}}function P8(e){return"middle"===e||"center"===e}function P7(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(xN(a,a,t),xN(s,s,t));var c=new A_({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});A1(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}function Re(e,t){return"all"===e||mK(e)&&mV(e,t)>=0||e===t}function Rt(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Rr(e)]}function Rn(e){return!!e.get(["handle","show"])}function Rr(e){return e.type+"||"+e.id}var Ri={},Ro=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=Rt(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=Rn(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o,a=(o=Rt(e))&&o.axisPointerModel;a?(this._axisPointer||(this._axisPointer=new i)).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){Ri[e]=t},t.getAxisPointerClass=function(e){return e&&Ri[e]},t.type="axis",t}(Dd),Ra=vG(),Rs=["axisLine","axisTickLabel","axisName"],Rl=["splitArea","splitLine","minorSplitLine"],Ru=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return yN(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ML,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=PX(a,t),l=new P3(t,mB({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(Pr(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));mG(Rs,l.add,l),this._axisGroup.add(l.getGroup()),mG(Rl,function(e){t.get([e,"show"])&&Rc[e](this,this._axisGroup,t,a)},this),i&&"changeAxisOrder"===i.type&&i.isInitSort||A9(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){Ra(this).splitAreaColors=null},t.type="cartesianAxis",t}(Ro),Rc={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=mK(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),h=[],p=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=i.toGlobalCoord(d[g].coord);u?(h[0]=m,h[1]=l.y,p[0]=m,p[1]=l.y+l.height):(h[0]=l.x,h[1]=m,p[0]=l.x+l.width,p[1]=m);var v=c++%s.length,y=new A_({anid:null!=d[g].tickValue?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:mj({stroke:s[v]},f),silent:!0});A1(y.shape,f.lineWidth),t.add(y)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),h=0;h<l.length;h++)for(var p=0;p<l[h].length;p++){var f=i.toGlobalCoord(l[h][p].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new A_({anid:"minor_line_"+l[h][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});A1(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=Ra(e).splitAreaColors,h=vl(),p=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){p=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();s=mK(s)?s:[s];for(var f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,b=void 0,w=void 0,_=void 0;i.isHorizontal()?(x=m,b=l.y,w=y-x,_=l.height,m=x+w):(x=l.x,b=m,w=l.width,_=y-b,m=b+_);var S=u[f-1].tickValue;null!=S&&h.set(S,p),t.add(new wK({anid:null!=S?"area_"+S:null,shape:{x:x,y:b,width:w,height:_},style:mj({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%c}Ra(e).splitAreaColors=h}}}(e,t,n,r)}},Rd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.type="xAxis",t}(Ru),Rh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=Rd.type,t}return yN(t,e),t.type="yAxis",t}(Ru),Rp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return yN(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new wK({shape:e.coordinateSystem.getRect(),style:mj({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Dd),Rf={offset:0};function Rg(e){e.registerComponentView(Rp),e.registerComponentModel(OK),e.registerCoordinateSystem("cartesian2d",PJ),Pe(e,"x",OJ,Rf),Pe(e,"y",OJ,Rf),e.registerComponentView(Rd),e.registerComponentView(Rh),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var Rm={color:"fill",borderColor:"stroke"},Rv={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ry=vG(),Rx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return MO(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=Ry(r).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Ma);function Rb(e,t){return t=t||[0,0],m$(["x","y"],function(n,r){var i=this.getAxis(n),o=t[r],a=e[r]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a))},this)}function Rw(e,t){return t=t||[0,0],m$([0,1],function(n){var r=t[n],i=e[n]/2,o=[],a=[];return o[n]=r-i,a[n]=r+i,o[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])},this)}function R_(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function RS(e,t){return t=t||[0,0],m$(["Radius","Angle"],function(n,r){var i=this["get"+n+"Axis"](),o=t[r],a=e[r]/2,s="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function RC(e,t){t&&(t.font=t.textFont||t.font,vd(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),vd(t,"textAlign")&&(e.align=t.textAlign),vd(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),vd(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),vd(t,"textWidth")&&(e.width=t.textWidth),vd(t,"textHeight")&&(e.height=t.textHeight),vd(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),vd(t,"textPadding")&&(e.padding=t.textPadding),vd(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),vd(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),vd(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),vd(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),vd(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),vd(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),vd(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function RM(e,t,n){e.textPosition=e.textPosition||n.position||"inside",null!=n.offset&&(e.textOffset=n.offset),null!=n.rotation&&(e.textRotation=n.rotation),null!=n.distance&&(e.textDistance=n.distance);var r=e.textPosition.indexOf("inside")>=0,i=e.fill||"#000";RA(e,t);var o=null==e.textFill;return r?o&&(e.textFill=n.insideFill||"#fff",!e.textStroke&&n.insideStroke&&(e.textStroke=n.insideStroke),e.textStroke||(e.textStroke=i),null==e.textStrokeWidth&&(e.textStrokeWidth=2)):(o&&(e.textFill=e.fill||n.outsideFill||"#000"),!e.textStroke&&n.outsideStroke&&(e.textStroke=n.outsideStroke)),e.text=t.text,e.rich=t.rich,mG(t.rich,function(e){RA(e,e)}),e}function RA(e,t){t&&(vd(t,"fill")&&(e.textFill=t.fill),vd(t,"stroke")&&(e.textStroke=t.fill),vd(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),vd(t,"font")&&(e.font=t.font),vd(t,"fontStyle")&&(e.fontStyle=t.fontStyle),vd(t,"fontWeight")&&(e.fontWeight=t.fontWeight),vd(t,"fontSize")&&(e.fontSize=t.fontSize),vd(t,"fontFamily")&&(e.fontFamily=t.fontFamily),vd(t,"align")&&(e.textAlign=t.align),vd(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),vd(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),vd(t,"width")&&(e.textWidth=t.width),vd(t,"height")&&(e.textHeight=t.height),vd(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),vd(t,"padding")&&(e.textPadding=t.padding),vd(t,"borderColor")&&(e.textBorderColor=t.borderColor),vd(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),vd(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),vd(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),vd(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),vd(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),vd(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),vd(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),vd(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),vd(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),vd(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var RT={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},RI=mY(RT);mU(x$,function(e,t){return e[t]=1,e},{}),x$.join(", ");var Rk=["","style","shape","extra"],RD=vG();function RO(e,t,n,r,i){var o=e+"Animation",a=_Z(e,r,i)||{},s=RD(t).userDuring;return a.duration>0&&(a.during=s?mX(RN,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),mB(a,n[o]),a}function RP(e,t,n,r){if(e){var i=e.parent,o=RD(e).leaveToProps;if(o){var a=RO("update",e,t,n,0);a.done=function(){i.remove(e),r&&r()},e.animateTo(o,a)}else i.remove(e),r&&r()}}function RR(e){return"all"===e}var RE={},RL={setTransform:function(e,t){return RE.el[e]=t,this},getTransform:function(e){return RE.el[e]},setShape:function(e,t){var n=RE.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=RE.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=RE.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=RE.el.style;if(t)return t[e]},setExtra:function(e,t){return(RE.el.extra||(RE.el.extra={}))[e]=t,this},getExtra:function(e){var t=RE.el.extra;if(t)return t[e]}};function RN(){var e=this.el;if(e){var t=RD(e).userDuring,n=this.userDuring;if(t!==n){this.el=this.userDuring=null;return}RE.el=e,n(RL)}}function Rz(e,t,n,r){var i,o=n[e];if(o){var a=t[e];if(a){var s=n.transition,l=o.transition;if(l)if(i||(i=r[e]={}),RR(l))mB(i,a);else for(var u=vE(l),c=0;c<u.length;c++){var d=u[c],h=a[d];i[d]=h}else if(RR(s)||mV(s,e)>=0){i||(i=r[e]={});for(var p=mY(a),c=0;c<p.length;c++){var f,g,d=p[c],h=a[d];f=o[d],g=h,(mW(f)?f!==g:null!=f&&isFinite(f))&&(i[d]=h)}}}}}function RF(e,t,n){var r=t[e];if(r)for(var i=n[e]={},o=mY(r),a=0;a<o.length;a++){var s=o[a];i[s]=bk(r[s])}}var RB=vG(),Rj=["percent","easing","shape","style","extra"],RV="emphasis",RH="normal",RW="blur",RG="select",R$=[RH,RV,RW,RG],RU={normal:["itemStyle"],emphasis:[RV,"itemStyle"],blur:[RW,"itemStyle"],select:[RG,"itemStyle"]},RZ={normal:["label"],emphasis:[RV,"label"],blur:[RW,"label"],select:[RG,"label"]},RY=["x","y"],RX={normal:{},emphasis:{},blur:{},select:{}},Rq={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:mX(Rb,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:mX(Rw,e)}}},single:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:mX(R_,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),o=n.dataToAngle(r[1]),a=e.coordToPoint([i,o]);return a.push(i,o*Math.PI/180),a},size:mX(RS,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function RK(e){return e instanceof wz}function RQ(e){return e instanceof b0}var RJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,o=e.getData(),a=this.group,s=R5(e,o,t,n);i||a.removeAll(),o.diff(i).add(function(t){R3(n,null,t,s(t,r),e,a,o)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&RP(n,Ry(n).option,e)}).update(function(t,l){R3(n,i.getItemGraphicEl(l),t,s(t,r),e,a,o)}).execute();var l=e.get("clip",!0)?Tf(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var o=t.getData(),a=R5(t,o,n,r),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u<e.end;u++){var c=R3(null,null,u,a(u,i),t,this.group,o);c&&(c.traverse(l),s.push(c))}},t.prototype.eachRendered=function(e){To(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(null==i||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type="custom",t}(Tx);function R0(e){var t,n=e.type;if("path"===n){var r=e.shape,i=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=Er(r);Ry(t=Aq(o,null,i,r.layout||"center")).customPathData=o}else if("image"===n)Ry(t=new wW({})).customImagePath=e.style.image;else if("text"===n)t=new _t({});else if("group"===n)t=new ML;else if("compoundPath"===n)throw Error('"compoundPath" is not supported yet.');else{var a=AX(n);a||CD(""),t=new a}return Ry(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function R1(e,t,n,r,i,o,a){t.stopAnimation("keyframe"),t.attr(RB(t));var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&null==r.transition&&(r.transition=RY);var l=r&&r.style;if(l){"text"===t.type&&(vd(l,"textFill")&&(l.fill=l.textFill),vd(l,"textStroke")&&(l.stroke=l.textStroke));var u=void 0,c=RK(t)?l.decal:null;e&&c&&(c.dirty=!0,u=Os(c,e)),l.__decalPattern=u}if(RQ(t)&&l){var u=l.__decalPattern;u&&(l.decal=u)}!function(e,t,n,r){var i,o,a=(r=r||{}).dataIndex,s=r.isInit,l=r.clearStyle,u=n.isAnimationEnabled(),c=RD(e),d=t.style;c.userDuring=t.during;var h={},p={};if(function(e,t){for(var n=0;n<RI.length;n++){var r=RI[n],i=RT[r],o=e[r];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<x$.length;n++){var a=x$[n];null!=e[a]&&(t[a]=e[a])}}(t,p),RF("shape",t,p),RF("extra",t,p),!s&&u&&(function(e,t,n){for(var r=t.transition,i=RR(r)?x$:vE(r||[]),o=0;o<i.length;o++){var a=i[o];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=e[a];n[a]=s}}}(e,t,h),Rz("shape",e,t,h),Rz("extra",e,t,h),function(e,t,n,r){if(n){var i,o=e.style;if(o){var a=n.transition,s=t.transition;if(a&&!RR(a)){var l=vE(a);i||(i=r.style={});for(var u=0;u<l.length;u++){var c=l[u],d=o[c];i[c]=d}}else if(e.getAnimationStyleProps&&(RR(s)||RR(a)||mV(s,"style")>=0)){var h=e.getAnimationStyleProps(),p=h?h.style:null;if(p){i||(i=r.style={});for(var f=mY(n),u=0;u<f.length;u++){var c=f[u];if(p[c]){var d=o[c];i[c]=d}}}}}}}(e,t,d,h)),p.style=d,function(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,o=0;o<i.length;o++){var a=i[o];"style"===a.targetName&&a.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}(e,p,l),i=e,vd(o=t,"silent")&&(i.silent=o.silent),vd(o,"ignore")&&(i.ignore=o.ignore),i instanceof b0&&vd(o,"invisible")&&(i.invisible=o.invisible),i instanceof wz&&vd(o,"autoBatch")&&(i.autoBatch=o.autoBatch),u)if(s){var f={};mG(Rk,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(f[e]=f[e]||{}),mB(e?f[e]:f,n.enterFrom))});var g=RO("enter",e,t,n,a);g.duration>0&&e.animateFrom(f,g)}else{var m=e,v=t,y=a||0,x=n,b=h;if(b){var w=RO("update",m,v,x,y);w.duration>0&&m.animateFrom(b,w)}}(function(e,t){for(var n=RD(e).leaveToProps,r=0;r<Rk.length;r++){var i=Rk[r],o=i?t[i]:t;o&&o.leaveTo&&(n||(n=RD(e).leaveToProps={}),i&&(n[i]=n[i]||{}),mB(i?n[i]:n,o.leaveTo))}})(e,t),d?e.dirty():e.markRedraw()}(t,r,o,{dataIndex:n,isInit:a,clearStyle:!0}),function e(t,n,r){if(r.isAnimationEnabled()&&n){if(mK(n))return void mG(n,function(n){e(t,n,r)});var i=n.keyframes,o=n.duration;if(r&&null==o){var a=_Z("enter",r,0);o=a&&a.duration}if(i&&o){var s=RB(t);mG(Rk,function(e){var r;e&&!t[e]||(i.sort(function(e,t){return e.percent-t.percent}),mG(i,function(i){var a=t.animators,l=e?i[e]:i;if(l){var u=mY(l);if(e||(u=mZ(u,function(e){return 0>mV(Rj,e)})),u.length){r||((r=t.animate(e,n.loop,!0)).scope="keyframe");for(var c=0;c<a.length;c++)a[c]!==r&&a[c].targetName===r.targetName&&a[c].stopTracks(u);e&&(s[e]=s[e]||{});var d=e?s[e]:s;mG(u,function(n){d[n]=((e?t[e]:t)||{})[n]}),r.whenWithKeys(o*i.percent,l,u,i.easing)}}}),r&&r.delay(n.delay||0).duration(o).start(n.easing))})}}}(t,r.keyframeAnimation,o)}function R2(e,t,n,r,i){var o=t.isGroup?null:t,a=i&&i[e].cfg;if(o){var s=o.ensureState(e);if(!1===r){var l=o.getState(e);l&&(l.style=null)}else s.style=r||null;a&&(s.textConfig=a),_A(o)}}function R5(e,t,n,r){var i,o,a,s,l=e.get("renderItem"),u=e.coordinateSystem,c={};u&&(c=u.prepareCustoms?u.prepareCustoms(u):Rq[u.type](u));for(var d=mj({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:function(e,n){return null==n&&(n=a),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,r){null==r&&(r=a);var i=t.getItemVisual(r,"style"),o=i&&i.fill,s=i&&i.opacity,l=b(r,RH).getItemStyle();null!=o&&(l.fill=o),null!=s&&(l.opacity=s);var u={inheritColor:mJ(o)?o:"#000"},c=w(r,RH),d=_9(c,null,u,!1,!0);d.text=c.getShallow("show")?m8(e.getFormattedLabel(r,RH),TA(t,r)):null;var h=_8(c,u,!1);return S(n,l),l=RM(l,d,h),n&&_(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=a),e=e||0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var o=t.get(r.name,n),s=r&&r.ordinalMeta;return s?s.categories[o]:o},styleEmphasis:function(n,r){null==r&&(r=a);var i=b(r,RV).getItemStyle(),o=w(r,RV),s=_9(o,null,null,!0,!0);s.text=o.getShallow("show")?m7(e.getFormattedLabel(r,RV),e.getFormattedLabel(r,RH),TA(t,r)):null;var l=_8(o,null,!0);return S(n,i),i=RM(i,s,l),n&&_(i,n),i.legacy=!0,i},visual:function(e,n){if(null==n&&(n=a),vd(Rm,e)){var r=t.getItemVisual(n,"style");return r?r[Rm[e]]:null}if(vd(Rv,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===u.type)return function(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<e.count||0;o++)t.push(mj({bandWidth:i,axisKey:r,stackId:yS+o},e));for(var a=yI(t),s=[],o=0;o<e.count;o++){var l=a[r][yS+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(mj({axis:u.getBaseAxis()},e))},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return Sr(e,n)}},c.api||{}),h={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:c.coordSys,dataInsideLength:t.count(),encode:(i=e.getData(),o={},mG(i.dimensions,function(e){var t=i.getDimensionInfo(e);if(!t.isExtraCoord){var n=t.coordDim;(o[n]=o[n]||[])[t.coordDimIndex]=i.getDimensionIndex(e)}}),o)},p={},f={},g={},m={},v=0;v<R$.length;v++){var y=R$[v];g[y]=e.getModel(RU[y]),m[y]=e.getModel(RZ[y])}function x(e){return e===a?s||(s=t.getItemModel(e)):t.getItemModel(e)}function b(e,n){return t.hasItemOption?e===a?p[n]||(p[n]=x(e).getModel(RU[n])):x(e).getModel(RU[n]):g[n]}function w(e,n){return t.hasItemOption?e===a?f[n]||(f[n]=x(e).getModel(RZ[n])):x(e).getModel(RZ[n]):m[n]}return function(e,n){return a=e,s=null,p={},f={},l&&l(mj({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},h),d)};function _(e,t){for(var n in t)vd(t,n)&&(e[n]=t[n])}function S(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function R3(e,t,n,r,i,o,a){if(!r)return void o.remove(t);var s=R4(e,t,n,r,i,o);return s&&a.setItemGraphicEl(n,s),s&&_F(s,r.focus,r.blurScope,r.emphasisDisabled),s}function R4(e,t,n,r,i,o){var a,s=-1,l=t;t&&R6(t,r,i)&&(s=mV(o.childrenRef(),t),t=null);var u=!t,c=t;c?c.clearStates():(c=R0(r),l&&((a=c).copyTransform(l),RQ(a)&&RQ(l)&&(a.setStyle(l.style),a.z=l.z,a.z2=l.z2,a.zlevel=l.zlevel,a.invisible=l.invisible,a.ignore=l.ignore,RK(a)&&RK(l)&&a.setShape(l.shape)))),!1===r.morph?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),RX.normal.cfg=RX.normal.conOpt=RX.emphasis.cfg=RX.emphasis.conOpt=RX.blur.cfg=RX.blur.conOpt=RX.select.cfg=RX.select.conOpt=null,RX.isLegacy=!1,function(e,t,n,r,i,o){if(!e.isGroup){R9(n,null,o),R9(n,RV,o);var a=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=e.getTextContent();if(!1===a)c&&e.removeTextContent();else{a=o.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=R0(a),e.setTextContent(c)),R1(null,c,t,a,null,r,i);for(var d=a&&a.style,h=0;h<R$.length;h++){var p=R$[h];if(p!==RH){var f=o[p].conOpt;R2(p,c,f,R7(a,f,p),null)}}d?c.dirty():c.markRedraw()}}}}(c,n,r,i,u,RX),function(e,t,n,r,i){var o=n.clipPath;if(!1===o)e&&e.getClipPath()&&e.removeClipPath();else if(o){var a=e.getClipPath();a&&R6(a,o,r)&&(a=null),a||(a=R0(o),e.setClipPath(a)),R1(null,a,t,o,null,r,i)}}(c,n,r,i,u),R1(e,c,n,r,RX,i,u),vd(r,"info")&&(Ry(c).info=r.info);for(var d=0;d<R$.length;d++){var h=R$[d];if(h!==RH){var p=R8(r,h),f=R7(r,p,h);R2(h,c,p,f,RX)}}var g=c;if(!g.isGroup){var m=i.currentZ,v=i.currentZLevel;g.z=m,g.zlevel=v;var y=r.z2;null!=y&&(g.z2=y||0);for(var x=0;x<R$.length;x++)!function(e,t,n){var r=n===RH,i=r?t:R8(t,n),o=i?i.z2:null;null!=o&&((r?e:e.ensureState(n)).z2=o||0)}(g,r,R$[x])}return"group"===r.type&&function(e,t,n,r,i){var o=r.children,a=o?o.length:0,s=r.$mergeChildren,l="byName"===s||r.diffChildrenByName,u=!1===s;if(a||l||u){if(l){return new Mm((f={api:e,oldChildren:t.children()||[],newChildren:o||[],dataIndex:n,seriesModel:i,group:t}).oldChildren,f.newChildren,Ee,Ee,f).add(Et).update(Et).remove(En).execute()}u&&t.removeAll();for(var c=0;c<a;c++){var d=o[c],h=t.childAt(c);d?(null==d.ignore&&(d.ignore=!1),R4(e,h,n,d,i,t)):h.ignore=!0}for(var p=t.childCount()-1;p>=c;p--){var f,g,m,v,y=t.childAt(p);g=t,m=y,v=i,m&&RP(m,Ry(g).option,v)}}}(e,c,n,r,i),s>=0?o.replaceAt(c,s):o.add(c),c}function R6(e,t,n){var r,i=Ry(e),o=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==i.customGraphicType||"path"===o&&(r=a)&&(vd(r,"pathData")||vd(r,"d"))&&Er(a)!==i.customPathData||"image"===o&&vd(s,"image")&&s.image!==i.customImagePath}function R9(e,t,n){var r,i,o=t?R8(e,t):e,a=t?R7(e,o,RV):e.style,s=e.type,l=o?o.textConfig:null,u=e.textContent,c=u?t?R8(u,t):u:null;if(a&&(n.isLegacy||(r=!!l,i=!!c,a&&(a.legacy||!1!==a.legacy&&!r&&!i&&"tspan"!==s&&("text"===s||vd(a,"text")))))){n.isLegacy=!0;var d=function(e,t,n){var r,i,o;if("text"===t)o=e;else{o={},vd(e,"text")&&(o.text=e.text),vd(e,"rich")&&(o.rich=e.rich),vd(e,"textFill")&&(o.fill=e.textFill),vd(e,"textStroke")&&(o.stroke=e.textStroke),vd(e,"fontFamily")&&(o.fontFamily=e.fontFamily),vd(e,"fontSize")&&(o.fontSize=e.fontSize),vd(e,"fontStyle")&&(o.fontStyle=e.fontStyle),vd(e,"fontWeight")&&(o.fontWeight=e.fontWeight),i={type:"text",style:o,silent:!0},r={};var a=vd(e,"textPosition");n?r.position=a?e.textPosition:"inside":a&&(r.position=e.textPosition),vd(e,"textPosition")&&(r.position=e.textPosition),vd(e,"textOffset")&&(r.offset=e.textOffset),vd(e,"textRotation")&&(r.rotation=e.textRotation),vd(e,"textDistance")&&(r.distance=e.textDistance)}return RC(o,e),mG(o.rich,function(e){RC(e,e)}),{textConfig:r,textContent:i}}(a,s,!t);!l&&d.textConfig&&(l=d.textConfig),!c&&d.textContent&&(c=d.textContent)}if(!t&&c){var h=c;h.type||(h.type="text")}var p=t?n[t]:n.normal;p.cfg=l,p.conOpt=c}function R8(e,t){return t?e?e[t]:null:e}function R7(e,t,n){var r=t&&t.style;return null==r&&n===RV&&e&&(r=e.styleEmphasis),r}function Ee(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function Et(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,i=null!=t?n.oldChildren[t]:null;R4(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function En(e){var t=this.context,n=t.oldChildren[e];n&&RP(n,Ry(n).option,t.seriesModel)}function Er(e){return e&&(e.pathData||e.d)}var Ei=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=mS.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,o){var a=this._getBrush(),s=this._getGradient(i,"inRange"),l=this._getGradient(i,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p<h;++p){var f=e[p],g=f[0],m=f[1],v=r(f[2]);d.globalAlpha=v,d.drawImage(a,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=d.getImageData(0,0,c.width,c.height),x=y.data,b=0,w=x.length,_=this.minOpacity,S=this.maxOpacity-_;b<w;){var v=x[b+3]/256,C=4*Math.floor(255*v);if(v>0){var M=o(v)?s:l;v>0&&(v=v*S+_),x[b++]=M[C],x[b++]=M[C+1],x[b++]=M[C+2],x[b++]=M[C+3]*v*256}else b+=4}return d.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=mS.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,a=0;a<256;a++)e[t](a/255,!0,i),r[o++]=i[0],r[o++]=i[1],r[o++]=i[2],r[o++]=i[3];return r},e}();function Eo(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var Ea=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(e,t,n){t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var r,i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):Eo(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(Eo(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){To(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,i){var o,a,s,l,u=e.coordinateSystem,c=TM(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");o=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),m=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),x=_6(e),b=e.getModel("emphasis"),w=b.get("focus"),_=b.get("blurScope"),S=b.get("disabled"),C=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;M<r;M++){var A=void 0,T=f.getItemVisual(M,"style");if(c){var I=f.get(C[0],M),k=f.get(C[1],M);if(isNaN(f.get(C[2],M))||isNaN(I)||isNaN(k)||I<s[0]||I>s[1]||k<l[0]||k>l[1])continue;var D=u.dataToPoint([I,k]);A=new wK({shape:{x:D[0]-o/2,y:D[1]-a/2,width:o,height:a},style:T})}else{if(isNaN(f.get(C[1],M)))continue;A=new wK({z2:1,shape:u.dataToRect([f.get(C[0],M)]).contentShape,style:T})}if(f.hasItemOption){var O=f.getItemModel(M),P=O.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),m=O.getModel(["blur","itemStyle"]).getItemStyle(),v=O.getModel(["select","itemStyle"]).getItemStyle(),y=O.get(["itemStyle","borderRadius"]),w=P.get("focus"),_=P.get("blurScope"),S=P.get("disabled"),x=_6(O)}A.shape.r=y;var R=e.getRawValue(M),E="-";R&&null!=R[2]&&(E=R[2]+""),_4(A,x,{labelFetcher:e,labelDataIndex:M,defaultOpacity:T.opacity,defaultText:E}),A.ensureState("emphasis").style=g,A.ensureState("blur").style=m,A.ensureState("select").style=v,_F(A,w,_,S),A.incremental=i,i&&(A.states.emphasis.hoverLayer=!0),p.add(A),f.setItemGraphicEl(M,A),this._progressiveEls&&this._progressiveEls.push(A)}},t.prototype._renderOnGeo=function(e,t,n,r){var i,o,a,s,l,u,c,d=n.targetVisuals.inRange,h=n.targetVisuals.outOfRange,p=t.getData(),f=this._hmLayer||this._hmLayer||new Ei;f.blurSize=t.get("blurSize"),f.pointSize=t.get("pointSize"),f.minOpacity=t.get("minOpacity"),f.maxOpacity=t.get("maxOpacity");var g=e.getViewRect().clone(),m=e.getRoamTransform();g.applyTransform(m);var v=Math.max(g.x,0),y=Math.max(g.y,0),x=Math.min(g.width+g.x,r.getWidth()),b=Math.min(g.height+g.y,r.getHeight()),w=x-v,_=b-y,S=[p.mapDimension("lng"),p.mapDimension("lat"),p.mapDimension("value")],C=p.mapArray(S,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=v,i[1]-=y,i.push(r),i}),M=n.getExtent(),A="visualMap.continuous"===n.type?(i=n.option.range,o=M[1]-M[0],i=[(i[0]-M[0])/o,(i[1]-M[0])/o],function(e){return e>=i[0]&&e<=i[1]}):(a=n.getPieceList(),s=n.option.selected,l=M[1]-M[0],u=(a=m$(a,function(e){return{interval:[(e.interval[0]-M[0])/l,(e.interval[1]-M[0])/l]}})).length,c=0,function(e){var t;for(t=c;t<u;t++){var n=a[t].interval;if(n[0]<=e&&e<=n[1]){c=t;break}}if(t===u)for(t=c-1;t>=0;t--){var n=a[t].interval;if(n[0]<=e&&e<=n[1]){c=t;break}}return t>=0&&t<u&&s[t]});f.update(C,w,_,d.color.getNormalizer(),{inRange:d.color.getColorMapper(),outOfRange:h.color.getColorMapper()},A);var T=new wW({style:{width:w,height:_,x:v,y:y,image:f.canvas},silent:!0});this.group.add(T)},t.type="heatmap",t}(Tx),Es=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=MT.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(Ma),El=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return yN(t,e),t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new CK(this),CQ(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),CQ(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:v6},t}(Cc),Eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return yN(t,e),t.type="dataset",t}(Dd),Ec=["x","y","radius","angle","single"],Ed=["cartesian2d","polar","singleAxis"];function Eh(e){return e+"Axis"}function Ep(e){var t=e.ecModel,n={infoList:[],infoMap:vl()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(Eh(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}}),n}var Ef=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),Eg=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return yN(t,e),t.prototype.init=function(e,t,n){var r=Em(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=Em(e);mF(this.option,e,!0),mF(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;mG([["start","startValue"],["end","endValue"]],function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=vl();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return mG(Ec,function(n){var r=this.getReferringComponents(Eh(n),vX);if(r.specified){t=!0;var i=new Ef;mG(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0,i="vertical"===t?"y":"x",o=n.findComponents({mainType:i+"Axis"});if(a(o,i),r){var o=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});a(o,"single")}function a(t,n){var i=t[0];if(i){var o=new Ef;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",vY).models[0];a&&mG(t,function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",vY).models[0]&&o.add(e.componentIndex)})}}}r&&mG(Ec,function(t){if(r){var i=n.findComponents({mainType:Eh(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new Ef;o.add(i[0].componentIndex),e.set(t,o),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e||(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");mG([["start","startValue"],["end","endValue"]],function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(Eh(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){mG(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(Eh(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;mG([["start","startValue"],["end","endValue"]],function(r){(null!=e[r[0]]||null!=e[r[1]])&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;mG(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Cc);function Em(e){var t={};return mG(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Ev=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.type="dataZoom.inside",t.defaultOption=Sx(Eg.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Eg),Ey=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(Dd);function Ex(e,t,n,r,i,o){e=e||0;var a,s=n[1]-n[0];if(null!=i&&(i=Ew(i,[0,s])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var l=Math.abs(t[1]-t[0]);l=Ew(l,[0,s]),i=o=Ew(l,[i,o]),r=0}t[0]=Ew(t[0],n),t[1]=Ew(t[1],n);var u=Eb(t,r);t[r]+=e;var c=i||0,d=n.slice();return u.sign<0?d[0]+=c:d[1]-=c,t[r]=Ew(t[r],d),a=Eb(t,r),null!=i&&(a.sign!==u.sign||a.span<i)&&(t[1-r]=t[r]+u.sign*i),a=Eb(t,r),null!=o&&a.span>o&&(t[1-r]=t[r]+a.sign*o),t}function Eb(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function Ew(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var E_="\0_ec_interaction_mutex";function ES(e){return e[E_]||(e[E_]={})}OB({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},vh);var EC=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=mX(n._mousedownHandler,n),i=mX(n._mousemoveHandler,n),o=mX(n._mouseupHandler,n),a=mX(n._mousewheelHandler,n),s=mX(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=mj(mz(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),(!0===e||"move"===e||"pan"===e)&&(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),(!0===e||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return yN(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!kt(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!ET("moveOnMouseMove",e,this._opt)||"pinch"===e.gestureEvent||ES(this._zr).globalPan)){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&ke(e.event),EA(this,"pan","moveOnMouseMove",e,{dx:t-r,dy:n-i,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){kt(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=ET("zoomOnMouseWheel",e,this._opt),n=ET("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;EM(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);EM(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!ES(this._zr).globalPan){var t=e.pinchScale>1?1.1:1/1.1;EM(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(bN);function EM(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(ke(r.event),EA(e,t,n,r,i))}function EA(e,t,n,r,i){i.isAvailableBehavior=mX(ET,null,n,r),e.trigger(t,i)}function ET(e,t,n){var r=n[e];return!e||r&&(!mJ(r)||t.event[r+"Key"])}var EI=vG();function Ek(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function ED(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function EO(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}var EP=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return yN(t,e),t.prototype.render=function(t,n,r){var i;(e.prototype.render.apply(this,arguments),t.noTarget())?this._clear():(this.range=t.getPercentRange(),i={pan:mX(ER.pan,this),zoom:mX(ER.zoom,this),scrollMove:mX(ER.scrollMove,this)},EI(r).coordSysRecordMap.each(function(e){var n=e.dataZoomInfoMap.get(t.uid);n&&(n.getRange=i)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=EI(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||Ek(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Ey),ER={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=EL[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Ex(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}},pan:EE(function(e,t,n,r,i,o){var a=EL[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:EE(function(e,t,n,r,i,o){return EL[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta})};function EE(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s&&(Ex(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]))return a}}var EL={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},EN=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(mV(Ed,t.get("coordinateSystem"))>=0){var n=Eh(this._dimName),r=t.getReferringComponents(n,vY).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return mz(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];mG(["start","end"],function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(vf(c,o,n))):(t=!0,c=vf(d=null==d?n[u]:r.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c}),vv(s),vv(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";Ex(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=vf(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t,n,r,i,o,a=this.getTargetSeriesModels();this._dataExtent=(t=this,n=this._dimName,r=[1/0,-1/0],mG(a,function(e){var t;t=e.getData(),t&&mG(PE(t,n),function(e){var n=t.getApproximateExtent(e);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}),[(o=PA((i=t.getAxisModel()).axis.scale,i,r).calculate()).min,o.max]),this._updateMinMaxSpan();var s=this.calculateDataWindow(e.settledOption);this._valueWindow=s.valueWindow,this._percentWindow=s.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&mG(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=m$(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],h=u>o[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(t=!0),h&&(n=!0)}return i&&t&&n})}else mG(r,function(n){if("empty"===i)e.setData(t=t.map(n,function(e){var t;return(t=e)>=o[0]&&t<=o[1]?e:NaN}));else{var r={};r[n]=o,t.selectRange(r)}});mG(r,function(e){t.setApproximateExtent(o,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;mG(["min","max"],function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=vf(n[0]+o,n,[0,100],!0):null!=i&&(o=vf(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=vx(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();let Ez={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(r,i){var o=e.getComponent(Eh(r),i);t(r,i,o,n)})})}t(function(e,t,n,r){n.__dzAxisProxy=null});var n=[];t(function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new EN(t,r,o,e),n.push(i.__dzAxisProxy))});var r=vl();return mG(n,function(e){mG(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}})}};var EF=!1;function EB(e){EF||(EF=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Ez),e.registerAction("dataZoom",function(e,t){mG(function(e,t){var n,r=vl(),i=[],o=vl();e.eachComponent({mainType:"dataZoom",query:t},function(e){o.get(e.uid)||s(e)});do n=!1,e.eachComponent("dataZoom",a);while(n);function a(e){var t;!o.get(e.uid)&&(t=!1,e.eachTargetAxis(function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)}),t)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis(function(e,t){(r.get(e)||r.set(e,[]))[t]=!0})}return i}(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Ej(e){EB(e),e.registerComponentModel(Ev),e.registerComponentView(EP),e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=EI(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=vl());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){mG(Ep(e).infoList,function(n){var i,o,a,s=n.model.uid,l=r.get(s)||r.set(s,(a=(o={model:i=n.model,containsPoint:mq(EO,i),dispatchAction:mq(ED,t),dataZoomInfoMap:null,controller:null}).controller=new EC(t.getZr()),mG(["pan","zoom","scrollMove"],function(e){a.on(e,function(t){var n=[];o.dataZoomInfoMap.each(function(r){if(t.isAvailableBehavior(r.model.option)){var i=(r.getRange||{})[e],a=i&&i(r.dzReferCoordSysInfo,o.model.mainType,o.controller,t);!r.model.get("disabled",!0)&&a&&n.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}}),n.length&&o.dispatchAction(n)})}),o));(l.dataZoomInfoMap||(l.dataZoomInfoMap=vl())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var t,n,i,o,a,s=e.controller,l=e.dataZoomInfoMap;if(l){var u=l.keys()[0];null!=u&&(a=l.get(u))}if(!a)return void Ek(r,e);var c=(n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,l.each(function(e){var r=e.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");i[n+a]>i[n+t]&&(t=a),o=o&&r.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}});s.enable(c.controlType,c.opt),s.setPointerChecker(e.containsPoint),Tc(e,"dispatchAction",a.model.get("throttle",!0),"fixRate")})})}var EV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Sx(Eg.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Eg),EH="horizontal",EW="vertical",EG=["line","bar","candlestick","scatter"],E$={easing:"cubicOut",duration:100,delay:0},EU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return yN(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=mX(this._onBrush,this),this._onBrushEnd=mX(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Tc(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show"))return void this.group.removeAll();if(t.noTarget()){this._clear(),this.group.removeAll();return}i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Td(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new ML;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect"),r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===EH?{right:i.width-r.x-r.width,top:i.height-30-7-7*!!n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=Cl(e.option);mG(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=o[e])});var s=Ci(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===EW&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==EH||i?n===EH&&i?{scaleY:a?1:-1,scaleX:-1}:n!==EW||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new wK({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new wK({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:mX(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u,c=i.getDataExtent(a),d=(c[1]-c[0])*.3;c=[c[0]-d,c[1]+d];var h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=p[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],function(e,t){if(y>0&&t%y){v+=m;return}var n=null==e||isNaN(e)||""===e,r=n?0:vf(e,c,h,!0);n&&!u&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&u&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,u=n}),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,b=0;b<3;b++){var w=function(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new ML,r=new Ag({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new Ay({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}(1===b);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}},t.prototype._prepareDataShadowInfo=function(){var e,t=this.dataZoomModel,n=t.get("showDataShadow");if(!1!==n){var r=this.ecModel;return t.eachTargetAxis(function(i,o){mG(t.getAxisProxy(i,o).getTargetSeriesModels(),function(t){if(!e&&!(!0!==n&&0>mV(EG,t.get("type")))){var a,s=r.getComponent(Eh(i),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[i],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),e={thisAxis:s,series:t,thisDim:i,otherDim:l,otherAxisInverse:a}}},this)},this),e}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new wK({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new wK({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),mG([0,1],function(t){var o=a.get("handleIcon");!T0[o]&&0>o.indexOf("path://")&&0>o.indexOf("image://")&&(o="path://"+o);var s=T5(o,-1,0,2,2,null,!0);s.attr({cursor:EZ(this._orient),draggable:!0,drift:mX(this._onDragMove,this,t),ondragend:mX(this._onDragEnd,this),onmouseover:mX(this._showDataInfo,this,!0),onmouseout:mX(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=vg(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),_z(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new _t({silent:!0,invisible:!0,style:_9(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=c;if(u){var h=vg(a.get("moveHandleSize"),o[1]),p=t.moveHandle=new wK({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:h}}),f=.8*h,g=t.moveHandleIcon=T5(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(h,10));(d=t.moveZone=new wK({invisible:!0,shape:{y:o[1]-m,height:h+m}})).on("mouseover",function(){s.enterEmphasis(p)}).on("mouseout",function(){s.leaveEmphasis(p)}),i.add(p),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:EZ(this._orient),drift:mX(this._onDragMove,this,"all"),ondragstart:mX(this._showDataInfo,this,!0),ondragend:mX(this._onDragEnd,this),onmouseover:mX(this._showDataInfo,this,!0),onmouseout:mX(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[vf(e[0],[0,100],t,!0),vf(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];Ex(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?vf(o.minSpan,a,i,!0):null,null!=o.maxSpan?vf(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=vv([vf(r[0],i,a,!0),vf(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=vv(n.slice()),i=this._size;mG([0,1],function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new wK,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=vv(this._handleEnds.slice());function d(e){var t=A3(n.handles[e].parent,this.group),a=A6(0===e?"right":"left",t),s=this._handleWidth/2+5,l=A4([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===EH?"middle":a,align:i===EH?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");(null==i||"auto"===i)&&(i=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return mQ(r)?r(e,o):mJ(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,ke(r.event);var i=A4([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0)&&!(n[0]>t[0])&&!(n[1]<0)&&!(n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new xe(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(new Date-this._brushStartTime<200&&5>Math.abs(n.width))){var r=this._getViewExtent(),i=[0,100];this._range=vv([vf(n.x,r,i,!0),vf(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(ke(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new wK({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?E$:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Ep(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(Ey);function EZ(e){return"vertical"===e?"ns-resize":"ew-resize"}function EY(e){e.registerComponentModel(EV),e.registerComponentView(EU),EB(e)}var EX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return yN(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),mK(t)&&mG(t,function(e,r){var i;mJ(e)&&(e={type:e}),t[r]=mF(e,"all"===(i=e.type)?{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])}:"inverse"===i?{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}:void 0)})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}t||this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&vV(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get("data")||t,i=vl(),o=m$(r,function(e){return((mJ(e)||m1(e))&&(e={name:e}),i.get(e.name))?null:(i.set(e.name,!0),new Sm(e,this,this.ecModel))},this);this._data=mZ(o,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&mG(this._data,function(e){t[e.get("name")]=!1}),t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;mG(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;mG(e,function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&mV(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Cc);function Eq(e,t){var n=vt(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new wK({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}var EK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return yN(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new ML),this.group.add(this._selectorGroup=new ML),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);a&&(!s||"auto"===s)&&(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Ci(l,u,c),h=this.layoutInner(e,i,d,r,a,s),p=Ci(mj({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Eq(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=vl(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){e.get("legendHoverLink")||c.push(e.id)}),mG(t.getData(),function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new ML;d.newline=!0,s.add(d);return}var h=n.getSeriesByName(a)[0];if(!l.get(a))if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(h,a,o,i,t,e,f,m,g,u,r);v.on("click",mq(EQ,a,null,r,c)).on("mouseover",mq(E0,h.name,null,r,c)).on("mouseout",mq(E1,h.name,null,r,c)),n.ssr&&v.eachChild(function(e){var t=_n(e);t.seriesIndex=h.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}else n.eachRawSeries(function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(d.containName(a)){var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),g=bg(p.fill);g&&0===g[3]&&(g[3]=.2,p=mB(mB({},p),{fill:bw(g,"rgba")}));var m=this._createItem(s,a,o,i,t,e,{},p,f,u,r);m.on("click",mq(EQ,null,a,r,c)).on("mouseover",mq(E0,null,a,r,c)).on("mouseout",mq(E1,null,a,r,c)),n.ssr&&m.eachChild(function(e){var t=_n(e);t.seriesIndex=s.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}}},this)},this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();mG(e,function(e){var r=e.type,i=new _t({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),_4(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),_z(i)})},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,h=i.get("itemWidth"),p=i.get("itemHeight"),f=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=2*(t.lineWidth>0)),mG(e,function(n,r){"inherit"===e[r]&&(e[r]=t[r])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?Os(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]),"inherit"===u.stroke&&(u.stroke=r[c]),"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity),s(u,r);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new ML,b=r.getModel("textStyle");if(mQ(e.getLegendIcon)&&(!v||"inherit"===v))x.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));else{var w,_,S,C="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(((S=T5(_=(w={itemWidth:h,itemHeight:p,icon:l,iconRotate:C,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}).icon||"roundRect",0,0,w.itemWidth,w.itemHeight,w.itemStyle.fill,w.symbolKeepAspect)).setStyle(w.itemStyle),S.rotation=(w.iconRotate||0)*Math.PI/180,S.setOrigin([w.itemWidth/2,w.itemHeight/2]),_.indexOf("empty")>-1&&(S.style.stroke=S.style.fill,S.style.fill="#fff",S.style.lineWidth=2),S))}var M=i.get("formatter"),A=t;mJ(M)&&M?A=M.replace("{name}",null!=t?t:""):mQ(M)&&(A=M(t));var T=f?b.getTextColor():r.get("inactiveColor");x.add(new _t({style:_9(b,{text:A,x:"left"===o?h+5:-5,y:p/2,fill:T,align:o,verticalAlign:"middle"},{inheritColor:T})}));var I=new wK({shape:x.getBoundingRect(),style:{fill:"transparent"}}),k=r.getModel("tooltip");return k.get("show")&&Tr({el:I,componentModel:i,itemName:t,itemTooltipOption:k.option}),x.add(I),x.eachChild(function(e){e.silent=!0}),I.silent=!u,this.getContentGroup().add(x),_z(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Cr(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),!i)return a.x=u[0],a.y=u[1],this.group.getBoundingRect();Cr("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+h+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-p]),v},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Dd);function EQ(e,t,n,r){E1(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),E0(e,t,n,r)}function EJ(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function E0(e,t,n,r){EJ(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function E1(e,t,n,r){EJ(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}function E2(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function E5(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),mG(n.getData(),function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}})}),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function E3(e){e.registerComponentModel(EX),e.registerComponentView(EK),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,E2),e.registerSubTypeDefaulter("legend",function(){return"plain"}),e.registerAction("legendToggleSelect","legendselectchanged",mq(E5,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",mq(E5,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",mq(E5,"inverseSelect")),e.registerAction("legendSelect","legendselected",mq(E5,"select")),e.registerAction("legendUnSelect","legendunselected",mq(E5,"unSelect"))}var E4=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Cl(t);e.prototype.init.call(this,t,n,r),E6(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),E6(this,this.option,t)},t.type="legend.scroll",t.defaultOption=Sx(EX.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(EX);function E6(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,Cs(t,n,{type:"box",ignoreSize:!!i})}var E9=["width","height"],E8=["x","y"],E7=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return yN(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new ML),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ML)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=mK(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var r=Te(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:mX(l._pageGo,l,e+"DataIndex",n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});r.name=e,u.add(r)}u.add(new _t({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=E9[s],u=E8[s],c=E9[1-s],d=E8[1-s];i&&Cr("horizontal",a,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=mz(n);i&&(g[l]=n[l]-p[l]-h);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+h;else{var v=p[l]+h;f[s]-=v,m[u]-=v}m[l]+=p[l]+h,f[1-s]+=m[d]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[d]=Math.min(m[d],p[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;Cr(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),Cr("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-h.x,-h.y],v=m8(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-h[i]:g[r]+=h[i]+v),m[1-r]+=d[o]/2-h[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=p?n[i]:d[i],y[o]=Math.max(d[o],h[o]),y[a]=Math.min(0,h[a]+m[1-r]),u.__rectSize=n[i],p){var x={x:0,y:0};x[i]=Math.max(n[i]-h[i]-v,0),x[o]=y[o],u.setClipPath(new wK({shape:x})),u.__rectSize=x[i]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return null!=b.pageIndex&&_X(l,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;mG(["pagePrev","pageNext"],function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")});var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",mJ(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=E9[i],a=E8[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=+!!c,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[i]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),m=v;for(var f=s-1,g=p,m=p,v=null;f>=-1;--f)(!(v=y(l[f]))||!x(m,v.s))&&g.i<m.i&&(m=g,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=g.i),++h.pageCount,++h.pageIndex),g=v;return h;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){var t,n;return this._showController?(this.getContentGroup().eachChild(function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)}),null!=t?t:n):0},t.type="legend.scroll",t}(EK);function Le(e){O$(E3),e.registerComponentModel(E4),e.registerComponentView(E7),e.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(e){e.setScrollDataIndex(n)})})}var Lt=vG();function Ln(e,t,n,r){!function e(t,n){if(!(m2(t)&&m2(n)))return t===n;var r=!0;return mG(n,function(n,i){r=r&&e(t[i],n)}),!!r}(Lt(n).lastProp,r)&&(Lt(n).lastProp=r,t?_X(n,r,e):(n.stopAnimation(),n.attr(r)))}function Lr(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Li(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Lo(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)})}function La(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:PO(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};mG(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),mJ(a)?o=a.replace("{value}",o):mQ(a)&&(o=a(s))}return o}function Ls(e,t,n){var r=y3();return y8(r,r,n.rotation),y9(r,r,n.position),A4([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var Ll=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o,a,s,l,u,c,d,h,p,f,g,m,v,y,x,b,w,_,S,C=n.axis,M=C.grid,A=r.get("type"),T=Lu(M,C).getOtherAxis(C).getGlobalExtent(),I=C.toGlobalCoord(C.dataToCoord(t,!0));if(A&&"none"!==A){var k,D,O,P=(D=r.get("type"),O=r.getModel(D+"Style"),"line"===D?(k=O.getLineStyle()).fill=null:"shadow"===D&&((k=O.getAreaStyle()).stroke=null),k),R=Lc[A](C,I,T);R.style=P,e.graphicKey=R.type,e.pointer=R}var E=PX(M.model,n);d=P3.innerTextLayout(E.rotation,0,E.labelDirection),E.labelMargin=r.get(["label","margin"]),h={position:Ls(n.axis,t,E),align:d.textAlign,verticalAlign:d.textVerticalAlign},p=La(r.get("value"),n.axis,n.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),g=vt((f=r.getModel("label")).get("padding")||0),v=xp(p,m=f.getFont()),y=h.position,x=v.width+g[1]+g[3],b=v.height+g[0]+g[2],"right"===(w=h.align)&&(y[0]-=x),"center"===w&&(y[0]-=x/2),"bottom"===(_=h.verticalAlign)&&(y[1]-=b),"middle"===_&&(y[1]-=b/2),o=y,a=x,s=b,u=(l=i).getWidth(),c=l.getHeight(),o[0]=Math.min(o[0]+a,u)-a,o[1]=Math.min(o[1]+s,c)-s,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),(S=f.get("backgroundColor"))&&"auto"!==S||(S=n.get(["axisLine","lineStyle","color"])),e.label={x:y[0],y:y[1],style:_9(f,{text:p,font:m,fill:f.getTextColor(),padding:g,backgroundColor:S}),z2:10}},t.prototype.getHandleTransform=function(e,t,n){var r=PX(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=Ls(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=Lu(o,i).getOtherAxis(i).getGlobalExtent(),l=+("x"!==i.dim),u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];return d[l]=u[l],{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o){a&&a.hide(),s&&s.hide();return}a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=mq(Ln,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new ML,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);Lo(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=Rt(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=Lt(e).pointerEl=new eu[i.type](mz(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Lt(e).labelEl=new _t(mz(t.label));e.add(i),Lr(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Lt(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=Lt(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),Lr(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a){i&&r.remove(i),this._handle=null;return}this._handle||(t=!0,i=this._handle=Te(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){ke(e.event)},onmousedown:mX(this._onHandleDragMove,this,0,0),drift:mX(this._onHandleDragMove,this),ondragend:mX(this._onHandleDragEnd,this)}),r.add(i)),Lo(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");mK(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,Tc(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){Ln(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Li(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Li(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Li(r)),Lt(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Td(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}());function Lu(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var Lc={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],{x1:r[o=(o=Ld(e))||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],{x:r[o=(o=Ld(e))||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function Ld(e){return+("x"!==e.dim)}var Lh=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(Cc),Lp=vG();function Lf(e,t,n){if(!vO.node){var r=t.getZr();Lp(r).records||(Lp(r).records={}),function(e,t){Lp(e).initialized||(Lp(e).initialized=!0,n("click",mq(Lm,"click")),n("mousemove",mq(Lm,"mousemove")),n("globalout",Lg));function n(n,r){e.on(n,function(n){var i,o,a,s,l,u,c,d,h=(i=t,o={showTip:[],hideTip:[]},{dispatchAction:a=function(e){var t=o[e.type];t?t.push(e):(e.dispatchAction=a,i.dispatchAction(e))},pendings:o});mG(Lp(e).records,function(e){e&&r(e,n,h.dispatchAction)}),s=h.pendings,l=t,c=s.showTip.length,d=s.hideTip.length,c?u=s.showTip[c-1]:d&&(u=s.hideTip[d-1]),u&&(u.dispatchAction=null,l.dispatchAction(u))})}}(r,t),(Lp(r).records[e]||(Lp(r).records[e]={})).handler=n}}function Lg(e,t,n){e.handler("leave",null,n)}function Lm(e,t,n,r){t.handler(e,n,r)}function Lv(e,t){if(!vO.node){var n=t.getZr();(Lp(n).records||{})[e]&&(Lp(n).records[e]=null)}}var Ly=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";Lf("axisPointer",n,function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){Lv("axisPointer",t)},t.prototype.dispose=function(e,t){Lv("axisPointer",t)},t.type="axisPointer",t}(Dd);function Lx(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=vW(o,e);if(null==a||a<0||mK(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,h=+("x"===c||"radius"===c),p=o.mapDimension(d),f=[];f[h]=o.get(p,a),f[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(m$(l.dimensions,function(e){return o.mapDimension(e)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var Lb=vG();function Lw(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e.dispatchAction||mX(n.dispatchAction,n),a=t.getComponent("axisPointer").coordSysAxesInfo;if(a){LA(i)&&(i=Lx({seriesIndex:e.seriesIndex,dataIndex:e.dataIndex},t).point);var s,l,u,c,d,h,p,f,g,m,v,y=LA(i),x=e.axesInfo,b=a.axesInfo,w="leave"===r||LA(i),_={},S={},C={list:[],map:{}},M={showPointer:mq(LS,S),showTooltip:mq(LC,C)};mG(a.coordSysMap,function(e,t){var n=y||e.containPoint(i);mG(a.coordSysAxesInfo[t],function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(x,e);if(!w&&n&&(!x||o)){var a=o&&o.value;null!=a||y||(a=r.pointToData(i)),null!=a&&L_(e,a,M,!1,_)}})});var A={};return mG(b,function(e,t){var n=e.linkGroup;n&&!S[t]&&mG(n.axesInfo,function(t,r){var i=S[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,LM(t),LM(e)))),A[e.key]=o}})}),mG(A,function(e,t){L_(b[t],e,M,!0,_)}),s=S,l=b,u=_.axesInfo=[],mG(l,function(e,t){var n=e.axisPointerModel.option,r=s[t];r?(e.useHandle||(n.status="show"),n.value=r.value,n.seriesDataIndices=(r.payloadBatch||[]).slice()):e.useHandle||(n.status="hide"),"show"===n.status&&u.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:n.value})}),function(e,t,n,r){if(LA(t)||!e.list.length)return r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(C,i,e,o),c=b,h=(d=n).getZr(),p="axisPointerLastHighlights",f=Lb(h)[p]||{},g=Lb(h)[p]={},mG(c,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&mG(n.seriesDataIndices,function(e){g[e.seriesIndex+" | "+e.dataIndex]=e})}),m=[],v=[],mG(f,function(e,t){g[t]||v.push(e)}),mG(g,function(e,t){f[t]||m.push(e)}),v.length&&d.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:v}),m.length&&d.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:m}),_}}function L_(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t)){if(!e.involveSeries)return void n.showPointer(e,t);var a,s,l,u,c,d,h,p,f=(a=t,u=(l=(s=e).axis).dim,c=a,d=[],h=Number.MAX_VALUE,p=-1,mG(s.seriesModels,function(e,t){var n,r,i=e.getData().mapDimensionsAll(u);if(e.getAxisTooltipData){var o=e.getAxisTooltipData(i,a,l);r=o.dataIndices,n=o.nestestValue}else{if(!(r=e.getData().indicesOfNearest(i[0],a,"category"===l.type?.5:null)).length)return;n=e.getData().get(i[0],r[0])}if(null!=n&&isFinite(n)){var s=a-n,f=Math.abs(s);f<=h&&((f<h||s>=0&&p<0)&&(h=f,p=s,c=n,d.length=0),mG(r,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:d,snapToValue:c}),g=f.payloadBatch,m=f.snapToValue;g[0]&&null==i.seriesIndex&&mB(i,g[0]),!r&&e.snap&&o.containData(m)&&null!=m&&(t=m),n.showPointer(e,t,g),n.showTooltip(e,f,m)}}function LS(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function LC(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=Rr(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function LM(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function LA(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function LT(e){Ro.registerAxisPointerClass("CartesianAxisPointer",Ll),e.registerComponentModel(Lh),e.registerComponentView(Ly),e.registerPreprocessor(function(e){if(e){e.axisPointer&&0!==e.axisPointer.length||(e.axisPointer={});var t=e.axisPointer.link;t&&!mK(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){var n,r,i,o,a,s,l,u,c;e.getComponent("axisPointer").coordSysAxesInfo=(r=n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}},i=e,o=t,a=i.getComponent("tooltip"),l=(s=i.getComponent("axisPointer")).get("link",!0)||[],u=[],mG(o.getCoordinateSystems(),function(e){if(e.axisPointerEnabled){var t=Rr(e.model),n=r.coordSysAxesInfo[t]={};r.coordSysMap[t]=e;var o=e.model.getModel("tooltip",a);if(mG(e.getAxes(),mq(p,!1,null)),e.getTooltipAxes&&a&&o.get("show")){var c="axis"===o.get("trigger"),d="cross"===o.get(["axisPointer","type"]),h=e.getTooltipAxes(o.get(["axisPointer","axis"]));(c||d)&&mG(h.baseAxes,mq(p,!d||"cross",c)),d&&mG(h.otherAxes,mq(p,"cross",!1))}}function p(t,a,c){var d=c.model.getModel("axisPointer",s),h=d.get("show");if(h&&("auto"!==h||t||Rn(d))){null==a&&(a=d.get("triggerTooltip"));var p=(d=t?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};mG(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=mz(a.get(e))}),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&mj(l,c.textStyle)}}return e.model.getModel("axisPointer",new Sm(s,n,r))}(c,o,s,i,t,a):d).get("snap"),f=d.get("triggerEmphasis"),g=Rr(c.model),m=a||p||"category"===c.type,v=r.axesInfo[g]={key:g,axis:c,coordSys:e,axisPointerModel:d,triggerTooltip:a,triggerEmphasis:f,involveSeries:m,snap:p,useHandle:Rn(d),seriesModels:[],linkGroup:null};n[g]=v,r.seriesInvolved=r.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(Re(o[r+"AxisId"],n.id)||Re(o[r+"AxisIndex"],n.componentIndex)||Re(o[r+"AxisName"],n.name))return i}}(l,c);if(null!=y){var x=u[y]||(u[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=l[y].mapper,v.linkGroup=x}}}}),n.seriesInvolved&&(c=n,e.eachSeries(function(e){var t=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),r=e.get(["tooltip","show"],!0);t&&"none"!==n&&!1!==n&&"item"!==n&&!1!==r&&!1!==e.get(["axisPointer","show"],!0)&&mG(c.coordSysAxesInfo[Rr(t.model)],function(n){var r=n.axis;t.getAxis(r.dim)===r&&(n.seriesModels.push(e),null==n.seriesDataCount&&(n.seriesDataCount=0),n.seriesDataCount+=e.getData().count())})})),n)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Lw)}var LI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return yN(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Cc),Lk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=m8(e.get("textBaseline"),e.get("textVerticalAlign")),l=new _t({style:_9(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new _t({style:_9(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",function(){Ce(h,"_"+e.get("target"))}),p&&d.on("click",function(){Ce(p,"_"+e.get("subtarget"))}),_n(l).eventData=_n(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Ci(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var w=new wK({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});r.add(w)}},t.type="title",t}(Dd),LD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.type="dataZoom.select",t}(Eg),LO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.type="dataZoom.select",t}(Ey);function LP(e){e.registerComponentModel(LD),e.registerComponentView(LO),EB(e)}var LR=function(){},LE={},LL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;mG(this.option.feature,function(e,n){var r=LE[n];r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),mF(e,r.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(Cc),LN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),e.get("show")){var o,a,s,l,u=+e.get("itemSize"),c="vertical"===e.get("orient"),d=e.get("feature")||{},h=this._features||(this._features={}),p=[];mG(d,function(e,t){p.push(t)}),new Mm(this._featureNames||[],p).add(f).update(f).remove(mq(f,null)).execute(),this._featureNames=p,o=e.getBoxLayoutParams(),a=e.get("padding"),l=Ci(o,s={width:n.getWidth(),height:n.getHeight()},a),Cr(e.get("orient"),i,e.get("itemGap"),l.width,l.height),Co(i,o,s,a),i.add(Eq(i.getBoundingRect(),e)),c||i.eachChild(function(e){var t=e.__title,r=e.ensureState("emphasis"),o=r.textConfig||(r.textConfig={}),a=e.getTextContent(),s=a&&a.ensureState("emphasis");if(s&&!mQ(s)&&t){var l=s.style||(s.style={}),c=xp(t,_t.makeFont(l)),d=e.x+i.x,h=e.y+i.y+u,p=!1;h+c.height>n.getHeight()&&(o.position="top",p=!0);var f=p?-5-c.height:u+10;d+c.width/2>n.getWidth()?(o.position=["100%",f],l.align="right"):d-c.width/2<0&&(o.position=[0,f],l.align="left")}})}function f(o,a){var s,l,f,g,m,v,y,x,b,w,_,S=p[o],C=p[a],M=d[S],A=new Sm(M,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===S&&(M.title=r.newTitle),S&&!C){if(0===S.indexOf("my"))_={onclick:A.option.onclick,featureName:S};else{var T=LE[S];if(!T)return;_=new T}h[S]=_}else if(!(_=h[C]))return;_.uid=Sy("toolbox-feature"),_.model=A,_.ecModel=t,_.api=n;var I=_ instanceof LR;if(!S&&C){I&&_.dispose&&_.dispose(t,n);return}if(!A.get("show")||I&&_.unusable){I&&_.remove&&_.remove(t,n);return}s=A,l=_,f=S,v=s.getModel("iconStyle"),y=s.getModel(["emphasis","iconStyle"]),x=l instanceof LR&&l.getIcons?l.getIcons():s.get("icon"),b=s.get("title")||{},mJ(x)?(g={})[f]=x:g=x,mJ(b)?(m={})[f]=b:m=b,w=s.iconPaths={},mG(g,function(r,o){var a=Te(r,{},{x:-u/2,y:-u/2,width:u,height:u});a.setStyle(v.getItemStyle()),a.ensureState("emphasis").style=y.getItemStyle();var d=new _t({style:{text:m[o],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:Sr({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},t)},ignore:!0});a.setTextContent(d),Tr({el:a,componentModel:e,itemName:o,formatterParamsExtra:{title:m[o]}}),a.__title=m[o],a.on("mouseover",function(){var t=y.getItemStyle(),r=c?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";d.setStyle({fill:y.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),a.setTextConfig({position:y.get("textPosition")||r}),d.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==s.get(["iconStatus",o])&&n.leaveEmphasis(this),d.hide()}),("emphasis"===s.get(["iconStatus",o])?_k:_D)(a),i.add(a),a.on("click",mX(l.onclick,l,t,n,o)),w[o]=a}),A.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?_k:_D)(r[e])},_ instanceof LR&&_.render&&_.render(A,t,n,r)}},t.prototype.updateView=function(e,t,n,r){mG(this._features,function(e){e instanceof LR&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.remove=function(e,t){mG(this._features,function(n){n instanceof LR&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){mG(this._features,function(n){n instanceof LR&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(Dd),Lz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),o=i?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=vO.browser;if(mQ(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=r+"."+o,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||i){var c=a.split(","),d=c[0].indexOf("base64")>-1,h=i?decodeURIComponent(c[1]):c[1];d&&(h=window.atob(h));var p=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var f=h.length,g=new Uint8Array(f);f--;)g[f]=h.charCodeAt(f);var m=new Blob([g]);window.navigator.msSaveOrOpenBlob(m,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var y=v.contentWindow,x=y.document;x.open("image/svg+xml","replace"),x.write(h),x.close(),y.focus(),x.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var b=n.get("lang"),w='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',_=window.open();_.document.write(w),_.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(LR),LF="__ec_magicType_stack__",LB=[["line","bar"],["stack"]],Lj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return mG(e.get("type"),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r,i=this.model,o=i.get(["seriesIndex",n]);if(LV[n]){var a={series:[]};mG(LB,function(e){mV(e,n)>=0&&mG(e,function(e){i.setIconStatus(e,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var t=e.subType,r=e.id,o=LV[n](t,r,e,i);o&&(mj(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,vY).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var s=n;"stack"===n&&(r=mF({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:r,featureName:"magicType"})}},t}(LR),LV={line:function(e,t,n,r){if("bar"===e)return mF({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return mF({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i=n.get("stack")===LF;if("line"===e||"bar"===e)return r.setIconStatus("stack",i?"normal":"emphasis"),mF({id:t,stack:i?"":LF},r.get(["option","stack"])||{},!0)}};OB({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var LH=Array(60).join("-");function LW(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var LG=RegExp("[ ]+","g"),L$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:"hideTip"})});var n,r,i,o,a,s,l=t.getDom(),u=this.model;this._dom&&l.removeChild(this._dom);var c=document.createElement("div");c.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",c.style.backgroundColor=u.get("backgroundColor")||"#fff";var d=document.createElement("h4"),h=u.get("lang")||[];d.innerHTML=h[0]||u.get("title"),d.style.cssText="margin:10px 20px",d.style.color=u.get("textColor");var p=document.createElement("div"),f=document.createElement("textarea");p.style.cssText="overflow:auto";var g=u.get("optionToContent"),m=u.get("contentToOption"),v={value:mZ([(o=(s=(n={},r=[],i=[],e.eachRawSeries(function(e){var t=e.coordinateSystem;if(t&&("cartesian2d"===t.type||"polar"===t.type)){var o=t.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;n[a]||(n[a]={categoryAxis:o,valueAxis:t.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),n[a].series.push(e)}else r.push(e)}else r.push(e)}),{seriesGroupByCategoryAxis:n,other:r,meta:i})).seriesGroupByCategoryAxis,a=[],mG(o,function(e,t){var n=e.categoryAxis,r=e.valueAxis.dim,i=[" "].concat(m$(e.series,function(e){return e.name})),o=[n.model.getCategories()];mG(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(r),function(e){return e}))});for(var s=[i.join(" ")],l=0;l<o[0].length;l++){for(var u=[],c=0;c<o.length;c++)u.push(o[c][l]);s.push(u.join(" "))}a.push(s.join("\n"))}),a.join("\n\n"+LH+"\n\n")),m$(s.other,function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,function(){for(var e=arguments.length,i=arguments[e-1],o=t.getName(i),a=0;a<e-1;a++)r[a]=arguments[a];n.push((o?o+" ":"")+r.join(" "))}),n.join("\n")}).join("\n\n"+LH+"\n\n")],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+LH+"\n\n"),meta:s.meta};if(mQ(g)){var y=g(t.getOption());mJ(y)?p.innerHTML=y:m4(y)&&p.appendChild(y)}else{f.readOnly=u.get("readOnly");var x=f.style;x.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",x.color=u.get("textColor"),x.borderColor=u.get("textareaBorderColor"),x.backgroundColor=u.get("textareaColor"),f.value=v.value,p.appendChild(f)}var b=v.meta,w=document.createElement("div");w.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",S=document.createElement("div"),C=document.createElement("div");_+=";background-color:"+u.get("buttonColor")+";color:"+u.get("buttonTextColor");var M=this;function A(){l.removeChild(c),M._dom=null}I7(S,"click",A),I7(C,"click",function(){var e,n,r,i;if(null==m&&null!=g||null!=m&&null==g)return void A();try{mQ(m)?e=m(p,t.getOption()):(n=f.value,r=n.split(RegExp("\n*"+LH+"\n*","g")),i={series:[]},mG(r,function(e,t){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(" ")>=0)return!0}(e)){var n=function(e){for(var t=e.split(/\n+/g),n=LW(t.shift()).split(LG),r=[],i=m$(n,function(e){return{name:e,data:[]}}),o=0;o<t.length;o++){var a=LW(t[o]).split(LG);r.push(a.shift());for(var s=0;s<a.length;s++)i[s]&&(i[s].data[o]=a[s])}return{series:i,categories:r}}(e),r=b[t],o=r.axisDim+"Axis";r&&(i[o]=i[o]||[],i[o][r.axisIndex]={data:n.categories},i.series=i.series.concat(n.series))}else{var n=function(e){for(var t=e.split(/\n+/g),n=LW(t.shift()),r=[],i=0;i<t.length;i++){var o=LW(t[i]);if(o){var a=o.split(LG),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),r[i]={name:s,value:[]},l=r[i].value):l=r[i]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?r[i].value=l[0]:r[i]=l[0])}}return{name:n,data:r}}(e);i.series.push(n)}}),e=i)}catch(e){throw A(),Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),A()}),S.innerHTML=h[1],C.innerHTML=h[2],C.style.cssText=S.style.cssText=_,u.get("readOnly")||w.appendChild(C),w.appendChild(S),c.appendChild(d),c.appendChild(p),c.appendChild(w),p.style.height=l.clientHeight-80+"px",l.appendChild(c),this._dom=c},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},t}(LR);OB({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];mG(e.newOption.series,function(e){var r=t.getSeriesByName(e.name)[0];if(r){var i,o=r.get("data");n.push({name:e.name,data:(i=e.data,m$(i,function(e,t){var n=o&&o[t];if(!m2(n)||mK(n))return e;m2(e)&&!mK(e)||(e={value:e});var r=null!=n.name&&null==e.name;return e=mj(e,n),r&&delete e.name,e}))})}else n.push(mB({type:"scatter"},e))}),t.mergeOption(mj({series:n},e.newOption))});var LU=vG();function LZ(e){var t=LU(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var LY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.onclick=function(e,t){LU(e).snapshots=null,t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(LR);OB({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var LX=Math.min,Lq=Math.max,LK=Math.pow,LQ="globalPan",LJ={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},L0={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},L1={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},L2=0,L5=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new ML,n._uid="brushController_"+L2++,mG(Nb,function(e,t){this._handlers[t]=mX(e,this)},n),n}return yN(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t,n=this._zr;this._enableGlobalPan||(t=this._uid,ES(n)[LQ]=t),mG(this._handlers,function(e,t){n.on(t,e)}),this._brushType=e.brushType,this._brushOption=mF(mz(L1),e,!0)},t.prototype._doDisableBrush=function(){var e,t,n=this._zr;e=this._uid,(t=ES(n))[LQ]===e&&(t[LQ]=null),mG(this._handlers,function(e,t){n.off(t,e)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};mG(e,function(e){t[e.panelId]=mz(e)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=m$(e,function(e){return mF(mz(L1),e,!0)});var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new Mm(t,e,function(e,t){return o(e.__brushOption,t)},o).add(a).update(a).remove(function(e){t[e]!==i&&r.group.remove(t[e])}).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):L4(r,L3(r,s));L8(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),Nn(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(bN);function L3(e,t){var n=N_[t.brushType].createCover(e,t);return n.__brushOption=t,L9(n,t),e.group.add(n),n}function L4(e,t){var n=L7(t);return n.endCreating&&(n.endCreating(e,t),L9(t,t.__brushOption)),t}function L6(e,t){var n=t.__brushOption;L7(t).updateCoverShape(e,t,n.range,n)}function L9(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function L8(e,t){L7(t).updateCommon(e,t),L6(e,t)}function L7(e){return N_[e.__brushOption.brushType]}function Ne(e,t,n){var r,i=e._panels;if(!i)return!0;var o=e._transform;return mG(i,function(e){e.isTargetByCursor(t,n,o)&&(r=e)}),r}function Nt(e,t){var n=e._panels;if(!n)return!0;var r=t.__brushOption.panelId;return null==r||n[r]}function Nn(e){var t=e._covers,n=t.length;return mG(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function Nr(e,t){var n=m$(e._covers,function(e){var t=e.__brushOption,n=mz(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function Ni(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function No(e,t,n,r){var i=new ML;return i.add(new wK({name:"main",style:Nu(n),silent:!0,draggable:!0,cursor:"move",drift:mq(Nh,e,t,i,["n","s","w","e"]),ondragend:mq(Nr,t,{isEnd:!0})})),mG(r,function(n){i.add(new wK({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:mq(Nh,e,t,i,n),ondragend:mq(Nr,t,{isEnd:!0})}))}),i}function Na(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=Lq(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],h=c-o+i/2,p=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;Nl(e,t,"main",a,s,f,g),r.transformable&&(Nl(e,t,"w",l,u,o,v),Nl(e,t,"e",h,u,o,v),Nl(e,t,"n",l,u,m,o),Nl(e,t,"s",l,p,m,o),Nl(e,t,"nw",l,u,o,o),Nl(e,t,"ne",h,u,o,o),Nl(e,t,"sw",l,p,o,o),Nl(e,t,"se",h,p,o,o))}function Ns(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(Nu(n)),i.attr({silent:!r,cursor:r?"move":"default"}),mG([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var i,o,a,s=t.childOfName(n.join("")),l=1===n.length?Nd(e,n[0]):(("e"===(a=[Nd(i=e,(o=n)[0]),Nd(i,o[1])])[0]||"w"===a[0])&&a.reverse(),a.join(""));s&&s.attr({silent:!r,invisible:!r,cursor:r?L0[l]+"-resize":null})})}function Nl(e,t,n,r,i,o,a){var s,l,u,c=t.childOfName(n);c&&c.setShape((l=LX((s=Ng(e,t,[[r,i],[r+o,i+a]]))[0][0],s[1][0]),{x:l,y:u=LX(s[0][1],s[1][1]),width:Lq(s[0][0],s[1][0])-l,height:Lq(s[0][1],s[1][1])-u}))}function Nu(e){return mj({strokeNoScale:!0},e.brushStyle)}function Nc(e,t,n,r){var i=[LX(e,n),LX(t,r)],o=[Lq(e,n),Lq(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function Nd(e,t){return({left:"w",right:"e",top:"n",bottom:"s"})[A6({w:"left",e:"right",n:"top",s:"bottom"}[t],A3(e.group))]}function Nh(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=Nf(t,i,o);mG(r,function(e){var t=LJ[e];s[t[0]][t[1]]+=l[t[0]]}),a.range=e.fromRectRange(Nc(s[0][0],s[1][0],s[0][1],s[1][1])),L8(t,n),Nr(t,{isEnd:!1})}function Np(e,t,n,r){var i=t.__brushOption.range,o=Nf(e,n,r);mG(i,function(e){e[0]+=o[0],e[1]+=o[1]}),L8(e,t),Nr(e,{isEnd:!1})}function Nf(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function Ng(e,t,n){var r=Nt(e,t);return r&&!0!==r?r.clipPath(n,e._transform):mz(n)}function Nm(e){var t=e.event;t.preventDefault&&t.preventDefault()}function Nv(e,t,n){return e.childOfName("main").contain(t,n)}function Ny(e,t,n,r){var i,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return LK(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&Nn(e);var l=mz(s);l.brushType=Nx(l.brushType,a),l.panelId=!0===a?null:a.panelId,o=e._creatingCover=L3(e,l),e._covers.push(o)}if(o){var u=N_[Nx(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(Ng(e,o,e._track)),r&&(L4(e,o),u.updateCommon(e,o)),L6(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&Ne(e,t,n)&&Nn(e)&&(i={isEnd:r,removeOnClick:!0});return i}function Nx(e,t){return"auto"===e?t.defaultBrushType:e}var Nb={mousedown:function(e){if(this._dragging)Nw(this,e);else if(!e.target||!e.target.draggable){Nm(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=Ne(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(!function(e,t,n){if(!(!e._brushType||(r=e,i=t.offsetX,o=t.offsetY,a=r._zr,i<0||i>a.getWidth()||o<0||o>a.getHeight()))){var r,i,o,a,s=e._zr,l=e._covers,u=Ne(e,t,n);if(!e._dragging)for(var c=0;c<l.length;c++){var d=l[c].__brushOption;if(u&&(!0===u||d.panelId===u.panelId)&&N_[d.brushType].contain(l[c],n[0],n[1]))return}u&&s.setCursorStyle("crosshair")}}(this,e,r),this._dragging){Nm(e);var i=Ny(this,e,r,!1);i&&Nr(this,i)}},mouseup:function(e){Nw(this,e)}};function Nw(e,t){if(e._dragging){Nm(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=Ny(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&Nr(e,o)}}var N_={lineX:NS(0),lineY:NS(1),rect:{createCover:function(e,t){function n(e){return e}return No({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=Ni(e);return Nc(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){Na(e,t,n,r)},updateCommon:Ns,contain:Nv},polygon:{createCover:function(e,t){var n=new ML;return n.add(new Ay({name:"main",style:Nu(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Ag({name:"main",draggable:!0,drift:mq(Np,e,t),ondragend:mq(Nr,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:Ng(e,t,n)})},updateCommon:Ns,contain:Nv}};function NS(e){return{createCover:function(t,n){return No({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=Ni(t);return[LX(n[0][e],n[1][e]),Lq(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=Nt(t,n);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),Na(t,n,l,i)},updateCommon:Ns,contain:Nv}}var NC={axisPointer:1,tooltip:1,brush:1};function NM(e){return xu.create(e)}var NA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],NT=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=Nk(t,e);mG(ND,function(e,t){(!n||!n.include||mV(n.include,t)>=0)&&e(i,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=NR[e.brushType](0,n,t);e.__rangeOffset={offset:NL[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){mG(e,function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&mG(r.coordSyses,function(r){var i=NR[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){mG(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r,i,o,a,s,l=NR[e.brushType](0,n.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?NL[e.brushType](l.values,u.offset,(r=l.xyMinMax,i=u.xyMinMax,o=Nz(r),a=Nz(i),isNaN((s=[o[0]/a[0],o[1]/a[1]])[0])&&(s[0]=1),isNaN(s[1])&&(s[1]=1),s)):l.values}},this)},e.prototype.makePanelOpts=function(e,t){return m$(this._targetInfoList,function(n){var r,i,o,a,s=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:(r=NM(r=s),function(e){return A8(e,r)}),isTargetByCursor:(i=n.coordSysModel,o=NM(s),function(t,n){var r,a;return o.contain(n[0],n[1])&&(a=(r=e.getComponentByElement(t.topTarget))&&r.coordinateSystem,!r||r===i||!!NC.hasOwnProperty(r.mainType)||!a||a.model===i)}),getLinearBrushOtherExtent:(a=NM(a=s),function(e){var t=e?a.width:a.height,n=e?a.x:a.y;return[n,n+(t||0)]})}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&mV(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=Nk(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<NO.length;s++)if(NO[s](r,o))return o}return!0},e}();function NI(e){return e[0]>e[1]&&e.reverse(),e}function Nk(e,t){return vU(e,t,{includeMainTypes:NA})}var ND={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=vl(),a={},s={};(n||r||i)&&(mG(n,function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0}),mG(r,function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0}),mG(i,function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0}),o.each(function(e){var i=e.coordinateSystem,o=[];mG(i.getCartesians(),function(e,t){(mV(n,e.getAxis("x").model)>=0||mV(r,e.getAxis("y").model)>=0)&&o.push(e)}),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:NP.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){mG(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:NP.geo})})}},NO=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],NP={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(A3(e)),t}},NR={lineX:mq(NE,0),lineY:mq(NE,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[NI([i[0],o[0]]),NI([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:m$(n,function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o}),xyMinMax:i}}};function NE(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=NI(m$([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var NL={lineX:mq(NN,0),lineY:mq(NN,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return m$(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function NN(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function Nz(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var NF=vR+"toolbox-dataZoom_",NB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yN(t,e),t.prototype.render=function(e,t,n,r){var i,o,a,s,l,u,c,d,h;this._brushController||(this._brushController=new L5(n.getZr()),this._brushController.on("brush",mX(this._onBrush,this)).mount()),i=e,o=t,a=this,s=r,l=n,u=a._isZoomActive,s&&"takeGlobalCursor"===s.type&&(u="dataZoomSelect"===s.key&&s.dataZoomSelectActive),a._isZoomActive=u,i.setIconStatus("zoom",u?"emphasis":"normal"),c=new NT(NV(i),o,{include:["grid"]}).makePanelOpts(l,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}),a._brushController.setPanels(c).enableBrush(!!u&&!!c.length&&{brushType:"auto",brushStyle:i.getModel("brushStyle").getItemStyle()}),d=e,h=t,d.setIconStatus("back",LZ(h).length>1?"emphasis":"normal")},t.prototype.onclick=function(e,t,n){Nj[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n,r,i,o={},a=this.ecModel;this._brushController.updateCovers([]),new NT(NV(this.model),a,{include:["grid"]}).matchOutputRanges(t,a,function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(s("x",n,t[0]),s("y",n,t[1])):s({lineX:"x",lineY:"y"}[r],n,t)}}),n=a,r=o,i=LZ(n),mG(r,function(e,t){for(var r=i.length-1;r>=0&&!i[r][t];r--);if(r<0){var o=n.queryComponents({mainType:"dataZoom",subType:"select",id:t})[0];if(o){var a=o.getPercentRange();i[0][t]={dataZoomId:t,start:a[0],end:a[1]}}}}),i.push(r),this._dispatchZoomAction(o)}function s(e,t,n){var r,i,s,l=t.getAxis(e),u=l.model,c=(r=e,i=u,a.eachComponent({mainType:"dataZoom",subType:"select"},function(e){e.getAxisModel(r,i.componentIndex)&&(s=e)}),s),d=c.findRepresentativeAxisProxy(u).getMinMaxSpan();(null!=d.minValueSpan||null!=d.maxValueSpan)&&(n=Ex(0,n.slice(),l.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),c&&(o[c.id]={dataZoomId:c.id,startValue:n[0],endValue:n[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];mG(e,function(e,n){t.push(mz(e))}),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(LR),Nj={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){var e,t,n;this._dispatchZoomAction((t=(e=LZ(this.ecModel))[e.length-1],e.length>1&&e.pop(),n={},mG(t,function(t,r){for(var i=e.length-1;i>=0;i--)if(t=e[i][r]){n[r]=t;break}}),n))}};function NV(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}C=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),i=[],o=vU(e,NV(r));return mG(o.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),mG(o.yAxisModels,function(e){return a(e,"yAxis","yAxisIndex")}),i}function a(e,t,n){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:NF+t+o};a[n]=o,i.push(a)}},vn(null==kZ.get("dataZoom")&&C),kZ.set("dataZoom",C);var NH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(Cc);function NW(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function NG(e){if(vO.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var N$=NG(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function NU(e,t){if(!e)return t;t=S3(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var NZ=NU(NG(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),NY=NU(N$,"transform"),NX="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(vO.transform3dSupported?"will-change:transform;":"");function Nq(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!vO.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=vO.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+NY+":"+a+";":[["top",0],["left",0],[N$,a]]}function NK(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&SM(SC,a,r,i,!0)&&SM(e,n,SC[0],SC[1])}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var NQ=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,vO.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,o=i&&(mJ(i)?document.querySelector(i):m4(i)?i:mQ(i)&&i(e.getDom()));NK(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=r.handler;I8(r.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t,n,r=this._api.getDom(),i=(t="position",(n=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r))?t?n[t]:n:null),o=r.style;"absolute"!==o.position&&"absolute"!==i&&(o.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n,r,i,o,a,s,l,u,c,d,h,p,f,g,m,v,y,x,b,w,_,S=this.el,C=S.style,M=this._styleCoord;S.innerHTML?C.cssText=NX+(n=!this._firstShow,r=this._longHide,i=[],o=e.get("transitionDuration"),a=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),d=e.getModel("textStyle"),h=Mn(e,"html"),p=u+"px "+c+"px "+s+"px "+l,i.push("box-shadow:"+p),n&&o&&i.push((g="opacity"+(f=" "+o/2+"s cubic-bezier(0.23,1,0.32,1)")+",visibility"+f,r||(f=" "+o+"s cubic-bezier(0.23,1,0.32,1)",g+=vO.transformSupported?","+NY+f:",left"+f+",top"+f),NZ+":"+g)),a&&i.push("background-color:"+a),mG(["width","color","radius"],function(t){var n="border-"+t,r=S3(n),o=e.get(r);null!=o&&i.push(n+":"+o+("color"===t?"":"px"))}),i.push((m=[],v=d.get("fontSize"),(y=d.getTextColor())&&m.push("color:"+y),m.push("font:"+d.getFont()),v&&m.push("line-height:"+Math.round(3*v/2)+"px"),x=d.get("textShadowColor"),b=d.get("textShadowBlur")||0,w=d.get("textShadowOffsetX")||0,_=d.get("textShadowOffsetY")||0,x&&b&&m.push("text-shadow:"+w+"px "+_+"px "+b+"px "+x),mG(["decoration","align"],function(e){var t=d.get(e);t&&m.push("text-"+e+":"+t)}),m.join(";"))),null!=h&&i.push("padding:"+vt(h).join("px ")+"px"),i.join(";")+";")+Nq(M[0],M[1],!0)+"border-color:"+S7(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):C.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null==e){o.innerHTML="";return}var a="";if(mJ(i)&&"item"===n.get("trigger")&&!NW(n)&&(a=function(e,t,n){if(!mJ(n)||"inside"===n)return"";var r,i,o=e.get("backgroundColor"),a=e.get("borderWidth");t=S7(t);var s=r="left"===(r=n)?"right":"right"===r?"left":"top"===r?"bottom":"top",l=Math.max(1.5*Math.round(a),6),u="",c=NY+":";mV(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(i="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(i="top"===s?225:45)+"deg)");var d=i*Math.PI/180,h=l+a,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d));u+=";"+s+":-"+Math.round(((p-Math.SQRT2*a)/2+Math.SQRT2*a-(p-h)/2)*100)/100+"px";var f=t+" solid "+a+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",u+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+o+";"].join("")+'"></div>'}(n,r,i)),mJ(e))o.innerHTML=e+a;else if(e){o.innerHTML="",mK(e)||(e=[e]);for(var s=0;s<e.length;s++)m4(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if(NK(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;mG(Nq(n[0],n[1]),function(e){r[e[0]]=e[1]})}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",vO.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(mX(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}(),NJ=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),N2(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;m2(e)&&CD(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new _t({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Mn(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),mG(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){o.el.style[e]=n.get(e)}),mG(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){o.el.style[e]=a.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=N1(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;N2(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=N0(i.borderWidth||0),a=N1(i);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(mX(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function N0(e){return Math.max(0,e)}function N1(e){var t=N0(e.shadowBlur||0),n=N0(e.shadowOffsetX||0),r=N0(e.shadowOffsetY||0);return{left:N0(t-n),right:N0(t+n),top:N0(t-r),bottom:N0(t+r)}}function N2(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var N5=new wK({shape:{x:-1,y:-1,width:2,height:2}}),N3=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.init=function(e,t){if(!vO.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?vO.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new NJ(t):new NQ(t,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!vO.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?Tc(this,"_updatePosition",50,"fixRate"):Td(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");Lf("itemTooltip",this._api,mX(function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.isDisposed()||i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!vO.node&&n.getDom()){var i=N6(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r,i=vZ(e).queryOptionMap,o=i.keys()[0];if(o&&"series"!==o){var a=vq(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a&&(n.getViewOfComponentModel(a).group.traverse(function(t){var n=_n(t).tooltipConfig;if(n&&n.name===e.name)return r=t,!0}),r))return{componentMainType:o,componentIndex:a.componentIndex,el:r}}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y)N5.x=r.x,N5.y=r.y,N5.update(),_n(N5).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:N5},i);else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=Lx(r,t),u=l.point[0],c=l.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,target:l.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(N6(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s&&"axis"===N4([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r,i,o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){if("legend"===_n(n).ssrType)return;this._lastDataByCoordSys=null,DW(n,function(e){return null!=_n(e).dataIndex?(r=e,!0):null!=_n(e).tooltipConfig?(i=e,!0):void 0},!0),r?this._showSeriesItemTooltip(e,r,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=mX(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=N4([t.tooltipOption],r),a=this._renderMode,s=[],l=C4("section",{blocks:[],noHeader:!0}),u=[],c=new Mr;mG(e,function(e){mG(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=La(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=C4("section",{header:o,noHeader:!vr(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),mG(e.seriesDataIndices,function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=PO(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",S7(f.color),a);var g=CA(h.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=N4([h],r).get("valueFormatter");d.blocks.push(v?mB({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var d=t.position,h=C7(l,c,a,o.get("order"),n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var p="richText"===a?"\n\n":"<br/>",f=u.join(p);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,f,s,Math.random()+"",i[0],i[1],d,null,c)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=_n(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,h=e.positionDefault,p=N4([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new Mr;g.marker=m.makeTooltipMarker("item",S7(g.color),d);var v=CA(s.formatTooltip(l,!1,u)),y=p.get("order"),x=p.get("valueFormatter"),b=v.frag,w=b?C7(x?mB({valueFormatter:x},b):b,m,d,y,r.get("useUTC"),p.get("textStyle")):v.text,_="item_"+s.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,w,g,_,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=_n(t),i=r.tooltipConfig.option||{};if(mJ(i)){var o=i;i={content:o,formatter:o}}var a=[i],s=this._ecModel.getComponent(r.componentMainType,r.componentIndex);s&&a.push(s),a.push({formatter:i.content});var l=e.positionDefault,u=N4(a,this._tooltipModel,l?{position:l}:null),c=u.get("content"),d=Math.random()+"",h=new Mr;this._showOrMove(u,function(){var n=mz(u.get("formatterParams")||{});this._showTooltipContent(u,c,n,d,e.offsetX,e.offsetY,e.position,t,h)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,h=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(mJ(c)){var p=e.ecModel.get("useUTC"),f=mK(n)?n[0]:n,g=f&&f.axisType&&f.axisType.indexOf("time")>=0;d=c,g&&(d=SV(f.axisValue,d,p)),d=S8(d,n,!0)}else if(mQ(c)){var m=mX(function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,a),this._updatePosition(e,a,i,o,u,n,s))},this);this._ticket=r,d=c(n,r,m)}else d=c;u.setContent(d,l,e,h,a),u.show(e,h),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||mK(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:mK(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),mQ(t)&&(t=t([n,r],o,i.el,h,{viewSize:[s,l],contentSize:u.slice()})),mK(t))n=vg(t[0],s),r=vg(t[1],l);else if(m2(t)){var p=t;p.width=u[0],p.height=u[1];var f=Ci(p,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(mJ(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,h,u,e.get("borderWidth"));n=g[0],r=g[1]}else{var m,v,y,x,b,w,_,S,C,M,g=(m=n,v=r,y=i,x=s,b=l,w=c?null:20,_=d?null:20,C=(S=y.getSize())[0],M=S[1],null!=w&&(m+C+w+2>x?m-=C+w:m+=w),null!=_&&(v+M+_>b?v-=M+_:v+=_),[m,v]);n=g[0],r=g[1]}if(c&&(n-=N9(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=N9(d)?u[1]/2:"bottom"===d?u[1]:0),NW(e)){var A,T,I,k,D,O,P,R,g=(A=n,T=r,I=i,k=s,D=l,P=(O=I.getSize())[0],R=O[1],A=Math.min(A+P,k)-P,T=Math.min(T+R,D)-R,[A=Math.max(A,0),T=Math.max(T,0)]);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&mG(n,function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&mG(a,function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&mG(a,function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&mG(e.seriesDataIndices,function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!vO.node&&t.getDom()&&(Td(this,"_updatePosition"),this._tooltipContent.dispose(),Lv("itemTooltip",t))},t.type="tooltip",t}(Dd);function N4(e,t,n){var r,i=t.ecModel;n?(r=new Sm(n,i,i),r=new Sm(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof Sm&&(a=a.get("tooltip",!0)),mJ(a)&&(a={formatter:a}),a&&(r=new Sm(a,r,i)))}return r}function N6(e,t){return e.dispatchAction||mX(t.dispatchAction,t)}function N9(e){return"center"===e||"middle"===e}var N8={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};let N7=function(e,t,n){var r=mz((N8[e]||{})[t]);return n&&mK(r)?r[r.length-1]:r};var ze=function(){function e(t){var n,r,i=t.mappingMethod,o=t.type,a=this.option=mz(t);this.type=o,this.mappingMethod=i,this._normalizeData=zc[i];var s=e.visualHandlers[o];this.applyVisual=s.applyVisual,this.getColorMapper=s.getColorMapper,this._normalizedToVisual=s._normalizedToVisual[i],"piecewise"===i?(zt(a),r=(n=a).pieceList,n.hasSpecialVisual=!1,mG(r,function(e,t){e.originIndex=t,null!=e.visual&&(n.hasSpecialVisual=!0)})):"category"===i?a.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(mG(t,function(e,t){n[e]=t}),!mK(r)){var i=[];m2(r)?mG(r,function(e,t){var r=n[t];i[null!=r?r:-1]=e}):i[-1]=r,r=zu(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(a):zt(a,!0):(vn("linear"!==i||a.dataExtent),zt(a))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return mX(this._normalizeData,this)},e.listVisualTypes=function(){return mY(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){m2(e)?mG(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=mK(t)?[]:m2(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a}),o},e.retrieveVisuals=function(t){var n,r={};return t&&mG(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)}),n?r:null},e.prepareVisualTypes=function(e){if(mK(e))e=e.slice();else{if(!m2(e))return[];var t=[];mG(e,function(e,n){t.push(n)}),e=t}return e.sort(function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1}),e},e.dependsOn=function(e,t){return"color"===t?!!(e&&0===e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||mJ(s)&&s===e+"")return o;n&&S(s,o)}}for(var o=0,a=t.length;o<a;o++){var l,u,c,d,h,p,f,g,m,v,y,x,b=t[o],w=b.interval,_=b.close;if(w){if(w[0]===-1/0){if(l=_[1],u=e,c=w[1],l?u<=c:u<c)return o}else if(w[1]===1/0){if(d=_[0],h=w[0],p=e,d?h<=p:h<p)return o}else{if(f=_[0],g=w[0],m=e,(f?g<=m:g<m)&&(v=_[1],y=e,x=w[1],v?y<=x:y<x))return o}n&&S(w[0],o),n&&S(w[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function S(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:zi("color"),getColorMapper:function(){var e=this.option;return mX("category"===e.mappingMethod?function(e,t){return t||(e=this._normalizeData(e)),zo.call(this,e)}:function(t,n,r){var i=!!r;return n||(t=this._normalizeData(t)),r=by(t,e.parsedVisual,r),i?r:bw(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return bw(by(e,this.option.parsedVisual),"rgba")},category:zo,piecewise:function(e,t){var n=zl.call(this,t);return null==n&&(n=bw(by(e,this.option.parsedVisual),"rgba")),n},fixed:za}},colorHue:zn(function(e,t){return bx(e,t)}),colorSaturation:zn(function(e,t){return bx(e,null,t)}),colorLightness:zn(function(e,t){return bx(e,null,null,t)}),colorAlpha:zn(function(e,t){return bb(e,t)}),decal:{applyVisual:zi("decal"),_normalizedToVisual:{linear:null,category:zo,piecewise:null,fixed:null}},opacity:{applyVisual:zi("opacity"),_normalizedToVisual:zs([0,1])},liftZ:{applyVisual:zi("liftZ"),_normalizedToVisual:{linear:za,category:za,piecewise:za,fixed:za}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:zr,category:zo,piecewise:function(e,t){var n=zl.call(this,t);return null==n&&(n=zr.call(this,e)),n},fixed:za}},symbolSize:{applyVisual:zi("symbolSize"),_normalizedToVisual:zs([0,1])}},e}();function zt(e,t){var n=e.visual,r=[];m2(n)?mG(n,function(e){r.push(e)}):null!=n&&r.push(n),t||1!==r.length||({color:1,symbol:1}).hasOwnProperty(e.type)||(r[1]=r[0]),zu(e,r)}function zn(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:zs([0,1])}}function zr(e){var t=this.option.visual;return t[Math.round(vf(e,[0,1],[0,t.length-1],!0))]||{}}function zi(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function zo(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function za(){return this.option.visual[0]}function zs(e){return{linear:function(t){return vf(t,e,this.option.visual,!0)},category:zo,piecewise:function(t,n){var r=zl.call(this,n);return null==r&&(r=vf(t,e,this.option.visual,!0)),r},fixed:za}}function zl(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=ze.findPieceIndex(e,n),i=n[r];if(i&&i.visual)return i.visual[this.type]}}function zu(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=m$(t,function(e){return bg(e)||[0,0,0,1]})),t}var zc={linear:function(e){return vf(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=ze.findPieceIndex(e,t,!0);if(null!=n)return vf(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:vh};function zd(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function zh(e,t,n){var r={};return mG(t,function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);mG(e[t],function(e,r){if(ze.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new ze(i),"opacity"===r&&((i=mz(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new ze(i))}})}),r}var zp=ze.mapVisual,zf=ze.eachVisual,zg=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return yN(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n,r,i=this.option;t||(mG(n=this.replacableOptionKeys,function(t){e.hasOwnProperty(t)&&zd(e[t])&&(r=!0)}),r&&mG(n,function(t){e.hasOwnProperty(t)&&zd(e[t])?i[t]=mz(e[t]):delete i[t]})),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=mX(e,this),this.controllerVisuals=zh(this.option.controller,t,e),this.targetVisuals=zh(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries(function(e,n){t.push(n)}):t=vE(e),t},t.prototype.eachTargetSeries=function(e,t){mG(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r,i=this.option,o=i.precision,a=this.dataBound,s=i.formatter;n=n||["<",">"],mK(e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);if(mJ(s))return s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l);if(mQ(s))return r?s(e[0],e[1]):s(e);if(!r)return l;if(e[0]===a[0])return n[0]+" "+l[1];if(e[1]===a[1])return n[1]+" "+l[0];return l[0]+" - "+l[1];function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,t=vv([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var i=n[r],o=e.getDimensionInfo(i);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),i=t.controller||(t.controller={});mF(r,n),mF(i,n);var o=this.isCategory();function a(n){mK(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,i),(function(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},mG(r,function(e,t){if(ze.isValidType(t)){var n=N7(t,"inactive",o);null!=n&&(i[t]=n,"color"!==t||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}}))}).call(this,r,"inRange","outOfRange"),(function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),i=this.getItemSymbol()||"roundRect";mG(this.stateList,function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:o?r:[r]}),null==l.symbol&&(l.symbol=t&&mz(t)||(o?i:[i])),null==l.symbolSize&&(l.symbolSize=n&&mz(n)||(o?s[0]:[s[0],s[0]])),l.symbol=zp(l.symbol,function(e){return"none"===e?i:e});var u=l.symbolSize;if(null!=u){var c=-1/0;zf(u,function(e){e>c&&(c=e)}),l.symbolSize=zp(u,function(e){return vf(e,[0,c],[0,s[0]],!0)})}},this)}).call(this,i)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Cc),zm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=20),(null==t[1]||isNaN(t[1]))&&(t[1]=140)},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):mK(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),mG(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=vv((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=zv(this,"outOfRange",this.getExtent()),n=zv(this,"inRange",this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var o=0,a=0,s=n.length,l=t.length;a<l&&(!n.length||t[a]<=n[0]);a++)t[a]<n[o]&&i(t[a],"outOfRange");for(var u=1;o<s;o++,u=0)u&&r.length&&i(n[o],"outOfRange"),i(n[o],"inRange");for(var u=1;a<l;a++)(!n.length||n[n.length-1]<t[a])&&(u&&(r.length&&i(r[r.length-1].value,"outOfRange"),u=0),i(t[a],"outOfRange"));var c=r.length;return{stops:r,outerColors:[c?r[0].color:"transparent",c?r[c-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Sx(zg.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(zg);function zv(e,t,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,i=n[0],o=[],a=0;a<=200&&i<n[1];a++)o.push(i),i+=r;return o.push(n[1]),o}var zy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return yN(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){(this.visualMapModel=e,!1===e.get("show"))?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=vt(t.get("padding")||0),r=e.getBoundingRect();e.add(new wK({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,n){var r=(n=n||{}).forceState,i=this.visualMapModel,o={};function a(e){return o[e]}function s(e,t){o[e]=t}"color"===t&&(o.color=i.get("contentColor"));var l=i.controllerVisuals[r||i.getValueState(e)];return mG(ze.prepareVisualTypes(l),function(r){var i=l[r];n.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",i=l.__alphaForOpacity),ze.dependsOn(r,t)&&i&&i.applyVisual(e,a,s)}),o[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;Co(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,r){},t.type="visualMap",t}(Dd),zx=[["left","right","width"],["top","bottom","height"]];function zb(e,t,n){var r=e.option,i=r.align;if(null!=i&&"auto"!==i)return i;for(var o={width:t.getWidth(),height:t.getHeight()},a=+("horizontal"===r.orient),s=zx[a],l=[0,null,10],u={},c=0;c<3;c++)u[zx[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:r[s[c]];var d=[["x","width",3],["y","height",0]][a],h=Ci(u,o,r.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+.5*h[d[1]]<.5*o[d[1]]?0:1]}function zw(e,t){return mG(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var z_=Math.min,zS=Math.max,zC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return yN(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=mX(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=mX(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=null!=r?r+"":"";var i=this.visualMapModel,o=i.get("textGap"),a=i.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-o:a[1]+o],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new _t({style:_9(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,o=this._useHandle,a=zb(t,this.api,r),s=n.mainGroup=this._createBarGroup(a),l=new ML;s.add(l),l.add(n.outOfRange=zM()),l.add(n.inRange=zM(null,o?zT(this._orient):null,mX(this._dragHandle,this,"all",!1),mX(this._dragHandle,this,"all",!0))),l.setClipPath(new wK({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var u=t.textStyleModel.getTextRect("国"),c=zS(u.width,u.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,c,i),this._createHandle(t,s,1,r,c,i)),this._createIndicator(t,s,r,c,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,o){var a=mX(this._dragHandle,this,n,!1),s=mX(this._dragHandle,this,n,!0),l=xv(e.get("handleSize"),r[0]),u=T5(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=zT(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){ke(e.event)}}),u.x=r[0]/2,u.useStyle(e.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),_H(u,!0),t.add(u);var d=new _t({cursor:c,draggable:!0,drift:a,onmousemove:function(e){ke(e.event)},ondragend:s,style:_9(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var h=[l,0],p=this._shapes;p.handleThumbs[n]=u,p.handleLabelPoints[n]=h,p.handleLabels[n]=d},t.prototype._createIndicator=function(e,t,n,r,i){var o=xv(e.get("indicatorSize"),n[0]),a=T5(e.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel("indicatorStyle").getItemStyle();if(a instanceof wW){var l=a.style;a.useStyle(mB({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);t.add(a);var u=new _t({silent:!0,invisible:!0,style:_9(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});this.group.add(u);var c=[("horizontal"===i?r/2:6)+n[0]/2,0],d=this._shapes;d.indicator=a,d.indicatorLabel=u,d.indicatorLabelPoint=c,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}!this.visualMapModel.get("realtime")===t&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?this._hovering||this._clearHoverLinkToSeries():zA(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[vf(t[0],n,r,!0),vf(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];Ex(t,r,i,e,0);var o=n.getExtent();this._dataInterval=[vf(r[0],i,o,!0),vf(r[1],i,o,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],o=e?i:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,o,"inRange"),s=this._createBarVisual(n,n,i,"outOfRange");r.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(o,a)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},o=this._makeColorGradient(e,i),a=[this.getControllerVisual(e[0],"symbolSize",i),this.getControllerVisual(e[1],"symbolSize",i)],s=this._createBarPoints(n,a);return{barColor:new AR(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],r=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var i=1;i<100;i++){var o=e[0]+r*i;if(o>e[1])break;n.push({color:this.getControllerVisual(o,"color",t),offset:i/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new ML("horizontal"===t&&!n?{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2}:"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"===t&&!n?{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"left"===e?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,o=n.handleLabels,a=r.itemSize,s=r.getExtent();mG([0,1],function(l){var u=i[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=vf(e[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var h=A4(n.handleLabelPoints[l],A3(u,this.group));o[l].setStyle({x:h[0],y:h[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,o=i.getExtent(),a=i.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=vf(e,o,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=A4(l.indicatorLabelPoint,A3(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+i.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var x={x:p,y:h,style:{fill:c}},b={style:{x:g[0],y:g[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,w),m.animateTo(b,w)}else u.attr(x),m.attr(b);this._firstShowIndicator=!1;var _=this._shapes.handleLabels;if(_)for(var S=0;S<_.length;S++)this.api.enterBlur(_[S])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=z_(zS(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,e._dragging||e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i,o,a,s,l,u=[0,r[1]],c=n.getExtent();e=z_(zS(u[0],e),u[1]);var d=(i=n,o=c,a=u,s=6,(l=i.get("hoverLinkDataSize"))&&(s=vf(l,o,a,!0)/2),s),h=[e-d,e+d],p=vf(e,u,c,!0),f=[vf(h[0],u,c,!0),vf(h[1],u,c,!0)];h[0]<u[0]&&(f[0]=-1/0),h[1]>u[1]&&(f[1]=1/0),t&&(f[0]===-1/0?this._showIndicator(p,f[1],"< ",d):f[1]===1/0?this._showIndicator(p,f[0],"> ",d):this._showIndicator(p,p,"≈ ",d));var g=this._hoverLinkDataIndices,m=[];(t||zA(n))&&(m=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var v=function(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[o(n),o(r)];function i(e,t,n){for(var r=0,i=e.length;r<i;r++){var o=vj(e[r].seriesId,null);if(null==o)return;for(var a=vE(e[r].dataIndex),s=n&&n[o],l=0,u=a.length;l<u;l++){var c=a[l];s&&s[c]?s[c]=null:(t[o]||(t[o]={}))[c]=1}}}function o(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&null!=e[r])if(t)n.push(+r);else{var i=o(e[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}return n}}(g,m);this._dispatchHighDown("downplay",zw(v[0],n)),this._dispatchHighDown("highlight",zw(v[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){if(DW(e.target,function(e){var n=_n(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var t,n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),o=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",zw(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=A3(t,r?null:this.group);return mK(e)?A4(e,i,n):A6(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(zy);function zM(e,t,n,r){return new Ag({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){ke(e.event)},ondragend:r})}function zA(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function zT(e){return"vertical"===e?"ns-resize":"ew-resize"}var zI={type:"selectDataRange",event:"dataRangeSelected",update:"update"},zk=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},zD=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(t){var r,i,o,a,s,l=e.pipelineContext;!t.isTargetSeries(e)||l&&l.large||n.push((r=t.stateList,i=t.targetVisuals,o=mX(t.getValueState,t),a=t.getDataDimensionIndex(e.getData()),s={},mG(r,function(e){var t=ze.prepareVisualTypes(i[e]);s[e]=t}),{progress:function(e,t){function n(e){return DV(t,u,e)}function r(e,n){var r=u;switch(e){case"color":t.ensureUniqueItemVisual(r,"style")[t.getVisual("drawType")]=n,t.setItemVisual(r,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(r,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(r,e,n)}}null!=a&&(l=t.getDimensionIndex(a));for(var l,u,c=t.getStore();null!=(u=e.next());){var d=t.getRawDataItem(u);if(!d||!1!==d.visualMap)for(var h=null!=a?c.get(l,u):u,p=o(h),f=i[p],g=s[p],m=0,v=g.length;m<v;m++){var y=g[m];f[y]&&f[y].applyVisual(h,n,r)}}}}))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(mX(zO,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimensionIndex(n);o>=0&&(i.dimension=o,r.push(i))}}),e.getData().setVisual("visualMeta",r)}}];function zO(e,t,n,r){for(var i=t.targetVisuals[r],o=ze.prepareVisualTypes(i),a={color:DH(e.getData(),"color")},s=0,l=o.length;s<l;s++){var u=o[s],c=i["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,h)}return a.color;function d(e){return a[e]}function h(e,t){a[e]=t}}function zP(e){var t=e&&e.visualMap;mK(t)||(t=t?[t]:[]),mG(t,function(e){if(e){zR(e,"splitList")&&!zR(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&mK(t)&&mG(t,function(e){m2(e)&&(zR(e,"start")&&!zR(e,"min")&&(e.min=e.start),zR(e,"end")&&!zR(e,"max")&&(e.max=e.end))})}})}function zR(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var zE=!1;function zL(e){zE||(zE=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(zI,zk),mG(zD,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(zP))}function zN(e){e.registerComponentModel(zm),e.registerComponentView(zC),zL(e)}var zz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return yN(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],zF[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=mz(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=m$(this._pieceList,function(e){return e=mz(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=ze.listVisualTypes(),i=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}mG(t.pieces,function(e){mG(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),mG(n,function(e,n){var r=!1;mG(this.stateList,function(e){r=r||o(t,e,n)||o(t.target,e,n)},this),r||mG(this.stateList,function(e){(t[e]||(t[e]={}))[n]=N7(n,"inRange"===e?"active":"inactive",i)})},this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,mG(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),"single"===n.selectedMode){var o=!1;mG(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(o?i[n]=!1:o=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=mz(e)},t.prototype.getValueState=function(e){var t=ze.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],o=r.getData();o.each(this.getDataDimensionIndex(o),function(t,r){ze.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,i=this._pieceList.slice();if(i.length){var o=i[0].interval[0];o!==-1/0&&i.unshift({interval:[-1/0,o]}),(o=i[i.length-1].interval[1])!==1/0&&i.push({interval:[o,1/0]})}else i.push({interval:[-1/0,1/0]});var a=-1/0;return mG(i,function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])},this),{stops:t,outerColors:n}}function s(i,o){var a=r.getRepresentValue({interval:i});o||(o=r.getValueState(a));var s=e(a,o);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=Sx(zg.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(zg),zF={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;t.splitNumber=i=Math.max(parseInt(i,10),1);for(var o=(r[1]-r[0])/i;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a<i;s+=o,a++){var l=a===i-1?r[1]:s+o;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),vA(e),mG(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;mG(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),zB(t,e)},pieces:function(e){var t=this.option;mG(t.pieces,function(t,n){m2(t)||(t={value:t});var r={text:"",index:n};if(null!=t.label&&(r.text=t.label),t.hasOwnProperty("value")){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var o=r.interval=[],a=r.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var d=[["gte","gt","min"],["lte","lt","max"]][c],h=0;h<3&&null==o[c];h++)o[c]=t[d[h]],a[c]=s[h],u[c]=2===h;null==o[c]&&(o[c]=l[c])}u[0]&&o[1]===1/0&&(a[0]=0),u[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(r.value=o[0])}r.visual=ze.retrieveVisuals(t),e.push(r)},this),zB(t,e),vA(e),mG(e,function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)},this)}};function zB(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var zj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,i=r.getFont(),o=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=m9(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),mG(l.viewPieceList,function(r){var l=r.piece,u=new ML;u.onclick=mX(this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var d=t.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),c){var h=this.visualMapModel.getValueState(d);u.add(new _t({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:i,fill:o,opacity:"outOfRange"===h?.5:1}}))}e.add(u)},this),u&&this._renderEndsText(e,u[1],s,c,a),Cr(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",function(){return r("highlight")}).on("mouseout",function(){return r("downplay")});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:zw(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return zb(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var o=new ML,a=this.visualMapModel.textStyleModel;o.add(new _t({style:_9(a,{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?i:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=m$(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get("text"),r=e.get("orient"),i=e.get("inverse");return("horizontal"===r?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(T5(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=mz(n.selected),o=t.getSelectedMapKey(e);"single"===r||!0===r?(i[o]=!0,mG(i,function(e,t){i[t]=t===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type="visualMap.piecewise",t}(zy);function zV(e){e.registerComponentModel(zz),e.registerComponentView(zj),zL(e)}function zH(e,t){if(!e)return!1;for(var n=mK(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function zW(e){vL(e,"label",["show"])}var zG=vG(),z$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return yN(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(vO.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),o=zG(e)[i];if(!n||!n.data){zG(e)[i]=null;return}o?o._mergeOption(n,t,!0):(r&&zW(n),mG(n.data,function(e){e instanceof Array?(zW(e[0]),zW(e[1])):zW(e)}),mB(o=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),zG(e)[i]=o},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),o=r.getName(e);return C4("section",{header:this.name,blocks:[C4("nameValue",{name:o,value:i,noName:!o,noValue:null==i})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.getMarkerModelFromSeries=function(e,t){return zG(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Cc);mH(z$,CM.prototype);var zU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(z$);function zZ(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function zY(e,t,n,r,i,o){var a=[],s=yv(t,r)?t.getCalculationInfo("stackResultDimension"):r,l=z0(t,s,e),u=t.indicesOfNearest(s,l)[0];a[i]=t.get(n,u),a[o]=t.get(s,u);var c=t.get(r,u),d=vy(t.get(r,u));return(d=Math.min(d,20))>=0&&(a[o]=+a[o].toFixed(d)),[a,c]}var zX={min:mq(zY,"min"),max:mq(zY,"max"),average:mq(zY,"average"),median:mq(zY,"median")};function zq(e,t){if(t){var n,r=e.getData(),i=e.coordinateSystem,o=i&&i.dimensions;if(!(!isNaN(parseFloat((n=t).x))&&!isNaN(parseFloat(n.y)))&&!mK(t.coord)&&mK(o)){var a=zK(t,r,i,e);if((t=mz(t)).type&&zX[t.type]&&a.baseAxis&&a.valueAxis){var s=mV(o,a.baseAxis.dim),l=mV(o,a.valueAxis.dim),u=zX[t.type](r,a.baseDataDim,a.valueDataDim,s,l);t.coord=u[0],t.value=u[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&mK(o))for(var c=t.coord,d=0;d<2;d++)zX[c[d]]&&(c[d]=z0(r,r.mapDimension(o[d]),c[d]));else t.coord=[];return t}}function zK(e,t,n,r){var i,o,a,s={};return null!=e.valueIndex||null!=e.valueDim?(s.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,s.valueAxis=n.getAxis((i=r,o=s.valueDataDim,(a=i.getData().getDimensionInfo(o))&&a.coordDim)),s.baseAxis=n.getOtherAxis(s.valueAxis),s.baseDataDim=t.mapDimension(s.baseAxis.dim)):(s.baseAxis=r.getBaseAxis(),s.valueAxis=n.getOtherAxis(s.baseAxis),s.baseDataDim=t.mapDimension(s.baseAxis.dim),s.valueDataDim=t.mapDimension(s.valueAxis.dim)),s}function zQ(e,t){return!e||!e.containData||!t.coord||!!zZ(t)||e.containData(t.coord)}function zJ(e,t){return e?function(e,n,r,i){return CO(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return CO(e.value,t[i])}}function z0(e,t,n){if("average"===n){var r=0,i=0;return e.each(t,function(e,t){!isNaN(e)&&(r+=e,i++)}),r/i}return"median"===n?e.getMedian(t):e.getDataExtent(t)[+("max"===n)]}var z1=vG(),z2=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.init=function(){this.markerGroupMap=vl()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){z1(e).keep=!1}),t.eachSeries(function(e){var i=z$.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){z1(e).keep||r.group.remove(e.group)})},t.prototype.markKeep=function(e){z1(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;mG(e,function(e){var r=z$.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?_S(e,_x):_S(e,_b))})})},t.type="marker",t}(Dd),z5=vG(),z3=function(e,t,n,r){var i=r[0],o=r[1];if(i&&o){var a=zq(e,i),s=zq(e,o),l=a.coord,u=s.coord;l[0]=m9(l[0],-1/0),l[1]=m9(l[1],-1/0),u[0]=m9(u[0],1/0),u[1]=m9(u[1],1/0);var c=function(e){for(var t=e[0],n=1,r=e.length;n<r;n++)t=mF(t,e[n],void 0);return t}([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function z4(e){return!isNaN(e)&&!isFinite(e)}function z6(e,t,n,r){var i=1-e;return z4(t[i])&&z4(n[i])}function z9(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},o={coord:r,x:t.x1,y:t.y1};if(TM(e,"cartesian2d"))return!!(n&&r&&(z6(1,n,r,e)||z6(0,n,r,e)))||!e||!e.containZone||!i.coord||!o.coord||!!zZ(i)||!!zZ(o)||e.containZone(i.coord,o.coord);return zQ(e,i)||zQ(e,o)}function z8(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=vg(s.get(n[0]),i.getWidth()),u=vg(s.get(n[1]),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition){var c=e.getValues(["x0","y0"],t),d=e.getValues(["x1","y1"],t),h=a.clampData(c),p=a.clampData(d),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],o=r.getMarkerPosition(f,n,!0)}else{var g=e.get(n[0],t),m=e.get(n[1],t),v=[g,m];a.clampData&&a.clampData(v,v),o=a.dataToPoint(v,!0)}if(TM(a,"cartesian2d")){var y=a.getAxis("x"),x=a.getAxis("y"),g=e.get(n[0],t),m=e.get(n[1],t);z4(g)?o[0]=y.toGlobalCoord(y.getExtent()[+("x0"!==n[0])]):z4(m)&&(o[1]=x.toGlobalCoord(x.getExtent()[+("y0"!==n[1])]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var z7=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Fe=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=z$.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each(function(t){var i=m$(z7,function(i){return z8(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape("points",i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new ML});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){if(e){var r,i,o=m$(e&&e.dimensions,function(e){var n=t.getData();return mB(mB({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});r=new MC(i=m$(["x0","y0","x1","y1"],function(e,t){return{name:e,type:o[t%2].type}}),n)}else r=new MC(i=[{name:"value",type:"float"}],n);var a=m$(n.get("data"),mq(z3,t,e,n));e&&(a=mZ(a,mq(z9,e)));var s=e?function(e,t,n,r){return CO(e.coord[Math.floor(r/2)][r%2],i[r])}:function(e,t,n,r){return CO(e.value,i[r])};return r.initData(a,null,s),r.hasItemOption=!0,r}(i,e,t);t.setData(u),u.each(function(t){var n=m$(z7,function(n){return z8(u,t,n,e,r)}),o=i.getAxis("x").scale,s=i.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),d=[o.parse(u.get("x0",t)),o.parse(u.get("x1",t))],h=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];vv(d),vv(h);var p=!(l[0]>d[1]||l[1]<d[0]||c[0]>h[1]||c[1]<h[0]);u.setItemLayout(t,{points:n,allClipped:!p});var f=u.getItemModel(t).getModel("itemStyle").getItemStyle(),g=DH(a,"color");!f.fill&&(f.fill=g,mJ(f.fill)&&(f.fill=bb(f.fill,.4))),f.stroke||(f.stroke=g),u.setItemVisual(t,"style",f)}),u.diff(z5(l).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new Ag({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}}).update(function(e,n){var r=z5(l).data.getItemGraphicEl(n),i=u.getItemLayout(e);i.allClipped?r&&l.group.remove(r):(r?_X(r,{shape:{points:i.points}},t,e):r=new Ag({shape:{points:i.points}}),u.setItemGraphicEl(e,r),l.group.add(r))}).remove(function(e){var t=z5(l).data.getItemGraphicEl(e);l.group.remove(t)}).execute(),u.eachItemGraphicEl(function(e,n){var r=u.getItemModel(n),i=u.getItemVisual(n,"style");e.useStyle(u.getItemVisual(n,"style")),_4(e,_6(r),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:mJ(i.fill)?bb(i.fill,1):"#000"}),_V(e,r),_F(e,null,null,r.get(["emphasis","disabled"])),_n(e).dataModel=t}),z5(l).data=u,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(z2),Ft=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(z$),Fn=A_.prototype,Fr=AT.prototype,Fi=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function Fo(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}yN(function(){return null!==M&&M.apply(this,arguments)||this},M=Fi);var Fa=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return yN(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Fi},t.prototype.buildPath=function(e,t){Fo(t)?Fn.buildPath.call(this,e,t):Fr.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return Fo(this.shape)?Fn.pointAt.call(this,e):Fr.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=Fo(t)?[t.x2-t.x1,t.y2-t.y1]:Fr.tangentAt.call(this,e);return xP(n,n)},t}(wz),Fs=["fromSymbol","toSymbol"];function Fl(e){return"_"+e+"Type"}function Fu(e,t,n){var r=t.getItemVisual(n,e);if(!r||"none"===r)return r;var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=T3(i),u=T4(a||0,l);return r+l+u+(o||"")+(s||"")}function Fc(e,t,n){var r=t.getItemVisual(n,e);if(r&&"none"!==r){var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=T3(i),u=T4(a||0,l),c=T5(r,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=null==o||isNaN(o)?void 0:o*Math.PI/180||0,c.name=e,c}}function Fd(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var Fh=function(e){function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return yN(t,e),t.prototype._createLine=function(e,t,n){var r,i,o=e.hostModel,a=(r=e.getItemLayout(t),Fd((i=new Fa({name:"line",subPixelOptimize:!0})).shape,r),i);a.shape.percent=0,_q(a,{shape:{percent:1}},o,t),this.add(a),mG(Fs,function(n){var r=Fc(n,e,t);this.add(r),this[Fl(n)]=Fu(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName("line"),o=e.getItemLayout(t),a={shape:{}};Fd(a.shape,o),_X(i,a,r,t),mG(Fs,function(n){var r=Fu(n,e,t),i=Fl(n);if(this[i]!==r){this.remove(this.childOfName(n));var o=Fc(n,e,t);this.add(o)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName("line"),o=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,u=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var h=e.getItemModel(t),p=h.getModel("emphasis");o=p.getModel("lineStyle").getLineStyle(),a=h.getModel(["blur","lineStyle"]).getLineStyle(),s=h.getModel(["select","lineStyle"]).getLineStyle(),u=p.get("disabled"),c=p.get("focus"),d=p.get("blurScope"),l=_6(h)}var f=e.getItemVisual(t,"style"),g=f.stroke;i.useStyle(f),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=o,i.ensureState("blur").style=a,i.ensureState("select").style=s,mG(Fs,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<_l.length;n++){var r=_l[n],o=i.getState(r);if(o){var a=o.style||{},s=t.ensureState(r),l=s.style||(s.style={});null!=a.stroke&&(l[t.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}t.markRedraw()}},this);var m=r.getRawValue(t);_4(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:g||"#000",defaultOpacity:f.opacity,defaultText:(null==m?e.getName(t):isFinite(m)?vm(m):m)+""});var v=this.getTextContent();if(v){var y=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=y.get("position")||"middle";var x=y.get("distance");mK(x)||(x=[x,x]),v.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),_F(this,c,d,u)},t.prototype.highlight=function(){_k(this)},t.prototype.downplay=function(){_D(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");Fd(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),n=this.getTextContent();if(e||t||n&&!n.ignore){for(var r=1,i=this.parent;i;)i.scaleX&&(r/=i.scaleX),i=i.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var a=o.shape.percent,s=o.pointAt(0),l=o.pointAt(a),u=xD([],l,s);if(xP(u,u),e&&(e.setPosition(s),_(e,0),e.scaleX=e.scaleY=r*a,e.markRedraw()),t&&(t.setPosition(l),_(t,1),t.scaleX=t.scaleY=r*a,t.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var c=void 0,d=void 0,h=n.__labelDistance,p=h[0]*r,f=h[1]*r,g=a/2,m=o.tangentAt(g),v=[m[1],-m[0]],y=o.pointAt(g);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]);var x=m[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var b=-Math.atan2(m[1],m[0]);l[0]<s[0]&&(b=Math.PI+b),n.rotation=b}var w=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-f,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=f,d="top";break;default:w=0,d="middle"}switch(n.__position){case"end":n.x=u[0]*p+l[0],n.y=u[1]*f+l[1],c=u[0]>.8?"left":u[0]<-.8?"right":"center",d=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":n.x=-u[0]*p+s[0],n.y=-u[1]*f+s[1],c=u[0]>.8?"right":u[0]<-.8?"left":"center",d=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=p*x+s[0],n.y=s[1]+w,c=m[0]<0?"right":"left",n.originX=-p*x,n.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=y[0],n.y=y[1]+w,c="center",n.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-p*x+l[0],n.y=l[1]+w,c=m[0]>=0?"right":"left",n.originX=p*x,n.originY=-w}n.scaleX=n.scaleY=r,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||c})}}}function _(e,t){var n=e.__specifiedRotation;if(null==n){var r=o.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(ML),Fp=function(){function e(e){this.group=new ML,this._LineCtor=e||Fh}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this.group,r=this._lineData;this._lineData=e,r||n.removeAll();var i=Ff(e);e.diff(r).add(function(n){t._doAdd(e,n,i)}).update(function(n,o){t._doUpdate(r,e,o,n,i)}).remove(function(e){n.remove(r.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Ff(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){var t;e.isGroup||(t=e).animators&&t.animators.length>0||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r<e.end;r++)if(Fm(t.getItemLayout(r))){var i=new this._LineCtor(t,r,this._seriesScope);i.traverse(n),this.group.add(i),t.setItemGraphicEl(r,i),this._progressiveEls.push(i)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){To(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(Fm(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var o=e.getItemGraphicEl(n);Fm(t.getItemLayout(r))?(o?o.updateData(t,r,i):o=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,o),this.group.add(o)):this.group.remove(o)},e}();function Ff(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:_6(t)}}function Fg(e){return isNaN(e[0])||isNaN(e[1])}function Fm(e){return e&&!Fg(e[0])&&!Fg(e[1])}var Fv=vG(),Fy=function(e,t,n,r){var i,o=e.getData();if(mK(r))i=r;else{var a=r.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=r.xAxis||null!=r.yAxis){var s=void 0,l=void 0;if(null!=r.yAxis||null!=r.xAxis)s=t.getAxis(null!=r.yAxis?"y":"x"),l=m9(r.yAxis,r.xAxis);else{var u=zK(r,o,t,e);s=u.valueAxis;var c=yy(o,u.valueDataDim);l=z0(o,c,a)}var d=+("x"!==s.dim),h=1-d,p=mz(r),f={coord:[]};p.type=null,p.coord=[],p.coord[h]=-1/0,f.coord[h]=1/0;var g=n.get("precision");g>=0&&m1(l)&&(l=+l.toFixed(Math.min(g,20))),p.coord[d]=f.coord[d]=l,i=[p,f,{type:a,valueIndex:r.valueIndex,value:l}]}else i=[]}var m=[zq(e,i[0]),zq(e,i[1]),mB({},i[2])];return m[2].type=m[2].type||null,mF(m[2],m[0]),mF(m[2],m[1]),m};function Fx(e){return!isNaN(e)&&!isFinite(e)}function Fb(e,t,n,r){var i=1-e,o=r.dimensions[e];return Fx(t[i])&&Fx(n[i])&&t[e]===n[e]&&r.getAxis(o).containData(t[e])}function Fw(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(Fb(1,n,r,e)||Fb(0,n,r,e)))return!0}return zQ(e,t[0])&&zQ(e,t[1])}function F_(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=vg(s.get("x"),i.getWidth()),u=vg(s.get("y"),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);o=a.dataToPoint([d,h])}if(TM(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y"),c=a.dimensions;Fx(e.get(c[0],t))?o[0]=p.toGlobalCoord(p.getExtent()[+!n]):Fx(e.get(c[1],t))&&(o[1]=f.toGlobalCoord(f.getExtent()[+!n]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];e.setItemLayout(t,o)}var FS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=z$.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),i=Fv(t).from,o=Fv(t).to;i.each(function(t){F_(i,t,!0,e,n),F_(o,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),o.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i,o,a,s,l,u,c,d,h,p=e.coordinateSystem,f=e.id,g=e.getData(),m=this.markerGroupMap,v=m.get(f)||m.set(f,new Fp);this.group.add(v.group);var y=(i=p,o=e,a=t,l=new MC(s=i?m$(i&&i.dimensions,function(e){return mB(mB({},o.getData().getDimensionInfo(o.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],a),u=new MC(s,a),c=new MC([],a),d=m$(a.get("data"),mq(Fy,o,i,a)),i&&(d=mZ(d,mq(Fw,i))),h=zJ(!!i,s),l.initData(m$(d,function(e){return e[0]}),null,h),u.initData(m$(d,function(e){return e[1]}),null,h),c.initData(m$(d,function(e){return e[2]})),c.hasItemOption=!0,{from:l,to:u,line:c}),x=y.from,b=y.to,w=y.line;Fv(t).from=x,Fv(t).to=b,t.setData(w);var _=t.get("symbol"),S=t.get("symbolSize"),C=t.get("symbolRotate"),M=t.get("symbolOffset");function A(t,n,i){var o=t.getItemModel(n);F_(t,n,i,e,r);var a=o.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=DH(g,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:m8(o.get("symbolOffset",!0),M[+!i]),symbolRotate:m8(o.get("symbolRotate",!0),C[+!i]),symbolSize:m8(o.get("symbolSize"),S[+!i]),symbol:m8(o.get("symbol",!0),_[+!i]),style:a})}mK(_)||(_=[_,_]),mK(S)||(S=[S,S]),mK(C)||(C=[C,C]),mK(M)||(M=[M,M]),y.from.each(function(e){A(x,e,!0),A(b,e,!1)}),w.each(function(e){var t=w.getItemModel(e).getModel("lineStyle").getLineStyle();w.setItemLayout(e,[x.getItemLayout(e),b.getItemLayout(e)]),null==t.stroke&&(t.stroke=x.getItemVisual(e,"style").fill),w.setItemVisual(e,{fromSymbolKeepAspect:x.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:x.getItemVisual(e,"symbolOffset"),fromSymbolRotate:x.getItemVisual(e,"symbolRotate"),fromSymbolSize:x.getItemVisual(e,"symbolSize"),fromSymbol:x.getItemVisual(e,"symbol"),toSymbolKeepAspect:b.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:b.getItemVisual(e,"symbolOffset"),toSymbolRotate:b.getItemVisual(e,"symbolRotate"),toSymbolSize:b.getItemVisual(e,"symbolSize"),toSymbol:b.getItemVisual(e,"symbol"),style:t})}),v.updateData(w),y.line.eachItemGraphicEl(function(e){_n(e).dataModel=t,e.traverse(function(e){_n(e).dataModel=t})}),this.markKeep(v),v.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(z2),FC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(z$);function FM(e,t,n){var r=t.coordinateSystem;e.each(function(i){var o,a=e.getItemModel(i),s=vg(a.get("x"),n.getWidth()),l=vg(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(r){var u=e.get(r.dimensions[0],i),c=e.get(r.dimensions[1],i);o=r.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)})}var FA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return yN(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=z$.getMarkerModelFromSeries(e,"markPoint");t&&(FM(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i,o,a,s,l,u,c,d=e.coordinateSystem,h=e.id,p=e.getData(),f=this.markerGroupMap,g=f.get(h)||f.set(h,new In),m=(i=d,o=e,a=t,l=new MC(s=i?m$(i&&i.dimensions,function(e){return mB(mB({},o.getData().getDimensionInfo(o.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],a),u=m$(a.get("data"),mq(zq,o)),i&&(u=mZ(u,mq(zQ,i))),c=zJ(!!i,s),l.initData(u,null,c),l);t.setData(m),FM(t.getData(),e,r),m.each(function(e){var n=m.getItemModel(e),r=n.getShallow("symbol"),i=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),s=n.getShallow("symbolKeepAspect");if(mQ(r)||mQ(i)||mQ(o)||mQ(a)){var l=t.getRawValue(e),u=t.getDataParams(e);mQ(r)&&(r=r(l,u)),mQ(i)&&(i=i(l,u)),mQ(o)&&(o=o(l,u)),mQ(a)&&(a=a(l,u))}var c=n.getModel("itemStyle").getItemStyle(),d=DH(p,"color");c.fill||(c.fill=d),m.setItemVisual(e,{symbol:r,symbolSize:i,symbolRotate:o,symbolOffset:a,symbolKeepAspect:s,style:c})}),g.updateData(m),this.group.add(g.group),m.eachItemGraphicEl(function(e){e.traverse(function(e){_n(e).dataModel=t})}),this.markKeep(g),g.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(z2);function FT(e,t,n){var r=mS.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var FI=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||bF,"string"==typeof t?i=FT(t,n,r):m2(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(vc(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return yq(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=FT("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new xu(0,0,0,0);function u(e){if(!(!e.isFinite()||e.isZero()))if(0===o.length){var t=new xu(0,0,0,0);t.copy(e),o.push(t)}else{for(var n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new xu(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var h=e.width*e.height,p=c.width*c.height,f=l.width*l.height-h-p;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n){var t=new xu(0,0,0,0);t.copy(e),o.push(t)}s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var d=e[c];if(d){var h=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(1&d.__dirty||!h)?d.getPrevPaintRect():null;p&&u(p);var f=h&&(1&d.__dirty||!d.__isRendered)?d.getPaintRect():null;f&&u(f)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var d=t[c],h=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!h||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&u(p)}}do{i=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var d=this.domBack;function h(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;m6(t)?(a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||DY(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o):null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=D3(i,t,{dirty:function(){c.setUnpainted(),c.painter.refresh()}})),i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,o),i.restore())}!n||s?h(0,0,o,a):n.length&&mG(n,function(e){h(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(bN),Fk=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=mB({},n||{}),this.dpr=n.devicePixelRatio||bF,this._singleCanvas=i,this.root=e,e.style&&(vc(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new FI(e,this,this.dpr);u.__builtin__=!0,u.initContext(),a[314159]=u,u.zlevel=314159,o.push(314159),this._domRoot=e}else{this._width=Dq(e,0,n),this._height=Dq(e,1,n);var c,d,h,p=this._domRoot=(c=this._width,d=this._height,(h=document.createElement("div")).style.cssText=["position:relative","width:"+c+"px","height:"+d+"px","padding:0;margin:0;border-width:0"].join(";")+";",h);e.appendChild(p)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t,n=e.length,r=this._hoverlayer;if(r&&r.clear(),n){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<n;o++){var a=e[o];a.__inHover&&(r||(r=this._hoverlayer=this.getLayer(1e5)),t||(t=r.ctx).save(),Or(t,a,i,o===n-1))}t&&t.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(1e5)},e.prototype.paintOne=function(e,t){On(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;j(function(){s._paintList(e,t,n,r)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,d=this,h=0;h<i.length;h++)!function(a){var s,l=i[a],h=l.ctx,p=o&&l.createRepaintRects(e,t,d._width,d._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,p);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,p)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g&&Date.now()-m>15)break}n.prevElClipPaths&&h.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var b=d.dpr,w=0;w<p.length;++w){var _=p[w];h.save(),h.beginPath(),h.rect(_.x*b,_.y*b,_.width*b,_.height*b),h.clip(),x(_),h.restore()}else h.save(),x(),h.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)}(h);return vO.wxa&&mG(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(Or(a,e,i,o),e.setPrevPaintRect(s))}else Or(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new FI("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?mF(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&mF(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]){if(t&&(t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh&&1)){if(i>0&&e>r[0]){for(s=0;s<i-1&&(!(r[s]<e)||!(r[s+1]>e));s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__endIndex=e)}if(this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1}),this._singleCanvas)for(var n,r,i=1;i<e.length;i++){var o=e[i];if(o.zlevel!==e[i-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0;for(r=0;r<e.length;r++){var o=e[r],l=o.zlevel,u=void 0;n!==l&&(n=l,s=0),o.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,s=1):u=this.getLayer(l+.01*(s>0),this._needsManuallyCompositing),u.__builtin__||mN("ZLevel "+l+" has been used by unkown layer "+u.id),u!==a&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,t(r),a=u),1&o.__dirty&&!o.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}t(r),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,mG(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?mF(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];(i===e||i===e+.01)&&mF(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(mV(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=Dq(i,0,r),t=Dq(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new FI("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer(function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++)Or(n,a[s],o,s===l-1);return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();O$([function(e){e.registerComponentModel(El),e.registerComponentView(Eu)},function(e){O$(Ej),O$(EY)},function(e){O$(E3),O$(Le)},function(e){e.registerChartView(TR),e.registerSeriesModel(MR),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,mq(yk,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,{seriesType:"bar",plan:yx(),reset:function(e){if(yD(e)){var t,n=e.getData(),r=e.coordinateSystem,i=r.getBaseAxis(),o=r.getOtherAxis(i),a=n.getDimensionIndex(n.mapDimension(o.dim)),s=n.getDimensionIndex(n.mapDimension(i.dim)),l=e.get("showBackground",!0),u=n.mapDimension(o.dim),c=n.getCalculationInfo("stackResultDimension"),d=yv(n,u)&&!!n.getCalculationInfo("stackedOnSeries"),h=o.isHorizontal(),p=(t=o).toGlobalCoord(t.dataToCoord(+("log"===t.type))),f=yO(e),g=e.get("barMinHeight")||0,m=c&&n.getDimensionIndex(c),v=n.getLayout("size"),y=n.getLayout("offset");return{progress:function(e,t){for(var n,i=e.count,o=f&&y_(3*i),u=f&&l&&y_(3*i),c=f&&y_(i),x=r.master.getRect(),b=h?x.width:x.height,w=t.getStore(),_=0;null!=(n=e.next());){var S=w.get(d?m:a,n),C=w.get(s,n),M=p,A=void 0;d&&(A=S-w.get(a,n));var T=void 0,I=void 0,k=void 0,D=void 0;if(h){var O=r.dataToPoint([S,C]);if(d){var P=r.dataToPoint([A,C]);M=P[0]}T=M,I=O[1]+y,k=O[0]-M,D=v,Math.abs(k)<g&&(k=(k<0?-1:1)*g)}else{var O=r.dataToPoint([C,S]);if(d){var P=r.dataToPoint([C,A]);M=P[1]}T=O[0]+y,I=M,k=v,Math.abs(D=O[1]-M)<g&&(D=(D<=0?-1:1)*g)}f?(o[_]=T,o[_+1]=I,o[_+2]=h?k:D,u&&(u[_]=h?x.x:T,u[_+1]=h?I:x.y,u[_+2]=b),c[n]=n):t.setItemLayout(n,{x:T,y:I,width:k,height:D}),_+=3}f&&t.setLayout({largePoints:o,largeDataIndices:c,largeBackgroundPoints:u,valueAxisHorizontal:h})}}}}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,yE("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})},function(e){e.registerChartView(Iw),e.registerSeriesModel(T6),e.registerLayout(I_("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,yE("line"))},function(e){e.registerChartView(IA),e.registerSeriesModel(II)},function(e){var t;e.registerChartView(Iq),e.registerSeriesModel(IJ),t=e.registerAction,mG([["pieToggleSelect","toggleSelect"],["pieSelect","select"],["pieUnSelect","unselect"]],function(e){t(e[0],function(t,n,r){var i,o;t=mB({},t),r.dispatchAction(mB(t,{type:e[1],seriesIndex:(i=t,o=[],n.eachComponent({mainType:"series",subType:"pie",query:i},function(e){o.push(e.seriesIndex)}),o)}))})}),e.registerLayout(mq(IE,"pie")),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension("value"),r=n.get(t,e);return!m1(r)||!!isNaN(r)||!(r<0)})}})},function(e){O$(Rg),e.registerSeriesModel(OU),e.registerChartView(Oq),e.registerLayout(I_("scatter"))},function(e){e.registerChartView(RJ),e.registerSeriesModel(Rx)},function(e){e.registerChartView(Ea),e.registerSeriesModel(Es)},function(e){O$(Rg),O$(LT)},function(e){e.registerComponentModel(LI),e.registerComponentView(Lk)},function(e){e.registerComponentModel(LL),e.registerComponentView(LN),LE.saveAsImage=Lz,LE.magicType=Lj,LE.dataView=L$,LE.dataZoom=NB,LE.restore=LY,O$(LP)},function(e){O$(LT),e.registerComponentModel(NH),e.registerComponentView(N3),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},vh),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},vh)},function(e){e.registerPainter("canvas",Fk)},function(e){O$(zN),O$(zV)},function(e){e.registerComponentModel(zU),e.registerComponentView(Fe),e.registerPreprocessor(function(e){zH(e.series,"markArea")&&(e.markArea=e.markArea||{})})},function(e){e.registerComponentModel(Ft),e.registerComponentView(FS),e.registerPreprocessor(function(e){zH(e.series,"markLine")&&(e.markLine=e.markLine||{})})},function(e){e.registerComponentModel(FC),e.registerComponentView(FA),e.registerPreprocessor(function(e){zH(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}]);let FD=["click","dblclick","mousedown","mousemove","mouseup","mouseover","mouseout","globalout","contextmenu"],FO=["datazoom","downplay","highlight"],FP=(0,ed.memo)(function({option:e,theme:t,renderer:n,sx:r,style:i,onEvents:o,_instance:a,syncGroup:s,onChartInitialized:l}){let u=(0,ed.useRef)(e),c=(0,ed.useRef)(e),d=(0,ed.useRef)(null),h=(0,ed.useRef)(null);return(0,ed.useLayoutEffect)(()=>{if(null!==d.current&&null===h.current&&(h.current=function(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return OO[e.getAttribute?e.getAttribute(OL):e[OL]]}(e);if(i)return i}var o=new Ow(e,t,n);return o.id="ec_"+OR++,OO[o.id]=o,r&&vK(e,OL,o.id),ea(o),Ou.trigger("afterinit",o),o}(d.current,t,{renderer:n??"canvas"}),void 0!==h.current))return h.current.setOption(u.current,!0),l?.(h.current),void 0!==a&&(a.current=h.current),()=>{null!==h.current&&(h.current.dispose(),h.current=null)}},[a,l,t,n]),(0,ed.useEffect)(()=>{h.current&&s&&(h.current.group=s,function(e){if(mK(e)){var t=e;e=null,mG(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+OE++,mG(t,function(t){t.group=e})}OP[e]=!0}([h.current]))},[s,h]),(0,ed.useEffect)(()=>{void 0===c.current||i7(c.current,e)||h.current&&(h.current.setOption(e,!0),c.current=e)},[e]),(0,ed.useLayoutEffect)(()=>{let e=fI(()=>{h.current&&h.current.resize()},200);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,ed.useEffect)(()=>{let e=h.current;if(e&&void 0!==o)return function(e,t){if(void 0!==t){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n]??null;r&&function(t,n){var r,i;"function"==typeof n&&((r=t,FD.includes(r))?e.on(t,t=>n(t,e)):(i=t,FO.includes(i))?e.on(t,e=>n(e)):e.on(t,()=>n(null,e)))}(n,r)}}}(e,o),()=>{if(void 0!==e&&!0!==e.isDisposed())for(let t in o)e.off(t)}},[o]),(0,ed.useEffect)(()=>{fI(()=>{h.current&&h.current.resize()},200,{leading:!0})()},[r,i]),(0,ec.jsx)(ud.A,{ref:d,sx:r,style:i})});var FR=n(17157);function FE(e,t){return function(n){let r=new Date(Number(n));return e>15768e7?(0,FR.formatWithTimeZone)(r,"yyyy",t):e>15552e6?(0,FR.formatWithTimeZone)(r,"MMM yyyy",t):e>864e6?(0,FR.formatWithTimeZone)(r,"dd.MM",t):e>1728e5?(0,FR.formatWithTimeZone)(r,"dd.MM HH:mm",t):(0,FR.formatWithTimeZone)(r,"HH:mm",t)}}var FL=n(34007);function FN(e){let{error:t}=e;return(0,ec.jsx)(FL.A,{severity:"error",children:t.message})}var Fz=n(77440);let FF=[{id:"default",label:"Default",value:void 0},{id:"12",label:"12",value:12},{id:"14",label:"14",value:14},{id:"16",label:"16",value:16},{id:"20",label:"20",value:20},{id:"24",label:"24",value:24},{id:"28",label:"28",value:28},{id:"32",label:"32",value:32},{id:"36",label:"36",value:36},{id:"40",label:"40",value:40},{id:"48",label:"48",value:48},{id:"56",label:"56",value:56},{id:"64",label:"64",value:64},{id:"72",label:"72",value:72},{id:"96",label:"96",value:96},{id:"128",label:"128",value:128},{id:"160",label:"160",value:160},{id:"192",label:"192",value:192}];function FB({value:e,onChange:t}){return(0,ec.jsx)(f8,{label:"Font Size",control:(0,ec.jsx)(gr,{value:FF.find(t=>t.value===e),options:FF,getOptionLabel:e=>e.label,onChange:(e,{value:n})=>{t(n)},disableClearable:!0})})}function Fj({action:e,submitText:t="Save",cancelText:n="Cancel",isReadonly:r,isValid:i,onActionChange:o,onSubmit:a,onDelete:s,onCancel:l,...u}){return(0,ec.jsx)(eP.A,{direction:"row",gap:1,sx:{marginLeft:"auto"},...u,children:"read"===e?(0,ec.jsxs)(ec.Fragment,{children:[o&&(0,ec.jsx)(eD.A,{disabled:r,variant:"contained",onClick:()=>o("update"),children:"Edit"}),s&&(0,ec.jsx)(eD.A,{color:"error",disabled:r,variant:"outlined",onClick:s,children:"Delete"}),l&&(a||s)&&(0,ec.jsx)(fv.A,{orientation:"vertical",flexItem:!0,sx:{borderColor:e=>e.palette.grey["500"],"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),l&&(0,ec.jsx)(eD.A,{color:"secondary",variant:"outlined",onClick:l,children:n})]}):(0,ec.jsxs)(ec.Fragment,{children:[a&&(0,ec.jsx)(eD.A,{variant:"contained",disabled:!i,onClick:a,children:t}),l&&(0,ec.jsx)(eD.A,{color:"secondary",variant:"outlined",onClick:l,children:n})]})})}var FV=n(17203);class FH{constructor(e,t,n,r,i,o,a,s,l,u=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=o,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new FH(e,[],t,n,n,0,[],0,r?new FW(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=i.dynamicPrecedence(r);if(a&&(this.score+=a),0==n){r<i.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(r,this.reducePos);return}let s=this.stack.length-(n-1)*3-(262144&e?6:0),l=s?this.stack[s-2]:this.p.ranges[0].from;r<i.minRepeatTerm&&l==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let u=this.reducePos-l;u>=2e3&&!(null==(t=this.p.parser.nodeSet.types[r])?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=u));let c=s?this.stack[s-1]:0,d=this.bufferBase+this.buffer.length-c;if(r<i.minRepeatTerm||131072&e){let e=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,e,d+4,!0)}if(262144&e)this.state=this.stack[s];else{let e=this.stack[s-3];this.state=i.getGoto(e,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&0==this.buffer[e-4]&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&(0!=this.buffer[i-4]||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:i}=this.p;this.pos=r;let o=i.stateFlag(e,1);!o&&(r>n||t<=i.maxNode)&&(this.reducePos=r),this.pushState(e,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&0==e.buffer[t-4]&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new FH(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new FG(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if((65536&n)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((65536&t)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=65535&t,i=this.stack.length-3*n;if(i<0||0>e.getGoto(this.stack[i],r,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(null!=e)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new FW(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return!(e<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class FW{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class FG{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=n}}class F${constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new F$(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new F$(this.stack,this.pos,this.index)}}function FU(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r<e.length;){let o=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(126==t){o=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}class FZ{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let FY=new FZ;class FX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FY,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(null==t)return -1;if((n=t)>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FY,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class Fq{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;FK(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}function FK(e,t,n,r,i,o){let a=0,s=1<<r,{dialect:l}=n.p.parser;r:for(;(s&e[a])!=0;){let n=e[a+1];for(let r=a+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||function(e,t,n,r){let i=FQ(n,r,t);return i<0||FQ(n,r,e)<i}(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=t.next,u=0,c=e[a+2];if(t.next<0&&c>u&&65535==e[n+3*c-3]){a=e[n+3*c-1];continue}for(;u<c;){let i=u+c>>1,o=n+i+(i<<1),s=e[o],l=e[o+1]||65536;if(r<s)c=i;else if(r>=l)u=i+1;else{a=e[o+2],t.advance();continue r}}break}}function FQ(e,t,n){for(let r=t,i;65535!=(i=e[r]);r++)if(i==n)return r-t;return -1}Fq.prototype.contextual=Fq.prototype.fallback=Fq.prototype.extend=!1,(class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?FU(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(FK(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!n&&r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}).prototype.contextual=Fq.prototype.fallback=Fq.prototype.extend=!1;let FJ="u">typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),F0=null;function F1(e,t,n){let r=e.cursor(FV.Qj.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class F2{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?F1(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?F1(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],o=this.start[t]+n.positions[r];if(o>e)return this.nextStart=o,null;if(i instanceof FV.PH){if(o==e){if(o<this.safeFrom)return null;let e=o+i.length;if(e<=this.safeTo){let t=i.prop(FV.uY.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,o+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+i.length}}}class F5{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new FZ)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if((1<<r&o)==0)continue;let l=i[r],u=this.tokens[r];if((!n||l.fallback)&&((l.contextual||u.start!=e.pos||u.mask!=o||u.context!=a)&&(this.updateCachedToken(u,l,e),u.mask=o,u.context=a),u.lookAhead>u.end+25&&(s=Math.max(u.lookAhead,s)),0!=u.value)){let r=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(n=u,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||((n=new FZ).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new FZ,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){(1&i)==0?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:o}=e.p,{data:a}=o;for(let e=0;e<2;e++)for(let s=o.stateSlot(i,e?2:1);;s+=3){if(65535==a[s])if(1==a[s+1])s=F8(a,s+2);else{0==r&&2==a[s+1]&&(r=this.putAction(F8(a,s+2),t,n,r));break}a[s]==t&&(r=this.putAction(F8(a,s+1),t,n,r))}return r}}class F3{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new FX(t,r),this.tokens=new F5(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[FH.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>4*e.bufferLength?new F2(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<n.length;o++){let a=n[o];for(;;){if(this.tokens.mainToken=null,a.pos>r)i.push(a);else{if(this.advanceStack(a,i,n))continue;e||(e=[],t=[]),e.push(a);let r=this.tokens.getMainToken(a);t.push(r.value,r.end)}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return FJ&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw FJ&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return FJ&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){n:for(let e=0;e<i.length-1;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let r=i[n];if(t.sameState(r)||t.buffer.length>500&&r.buffer.length>500)if((t.score-r.score||t.buffer.length-r.buffer.length)>0)i.splice(n--,1);else{i.splice(e--,1);continue n}}}i.length>12&&(i.sort((e,t)=>t.score-e.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let e=1;e<i.length;e++)i[e].pos<this.minStackPos&&(this.minStackPos=i[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,o=FJ?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?i.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop(FV.uY.contextHash)||0)==n))return e.useNode(a,r),FJ&&console.log(o+this.stackID(e)+` (via reuse of ${i.getName(a.type.id)})`),!0;if(!(a instanceof FV.PH)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(s instanceof FV.PH&&0==a.positions[0])a=s;else break}}let a=i.stateSlot(e.state,4);if(a>0)return e.reduce(a),FJ&&console.log(o+this.stackID(e)+` (via always-reduce ${i.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let a=0;a<s.length;){let l=s[a++],u=s[a++],c=s[a++],d=a==s.length||!n,h=d?e:e.split(),p=this.tokens.mainToken;if(h.apply(l,u,p?p.start:h.pos,c),FJ&&console.log(o+this.stackID(h)+` (via ${(65536&l)==0?"shift":`reduce of ${i.getName(65535&l)}`} for ${i.getName(u)} @ ${r}${h==e?"":", split"})`),d)return!0;h.pos>r?t.push(h):n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return F4(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o<e.length;o++){let a=e[o],s=t[o<<1],l=t[(o<<1)+1],u=FJ?this.stackID(a)+" -> ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),FJ&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let c=a.split(),d=u;for(let e=0;e<10&&c.forceReduce()&&(FJ&&console.log(d+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,n));e++)FJ&&(d=this.stackID(c)+" -> ");for(let e of a.recoverByInsert(s))FJ&&console.log(u+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),FJ&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),F4(a,n)):(!r||r.score<c.score)&&(r=c)}return r}stackToTree(e){return e.close(),FV.PH.build({buffer:F$.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(F0||(F0=new WeakMap)).get(e);return t||F0.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function F4(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class F6{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}class F9 extends FV.iX{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=FV.uY[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let o=t[n+-r];for(let a=-r;a>0;a--)i(t[n++],e,o);n++}}}this.nodeSet=new FV.fI(t.map((t,i)=>FV.Z6.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=FU(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(F7),this.states=FU(e.states,Uint32Array),this.data=FU(e.stateData),this.goto=FU(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new Fq(o,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new F3(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return -1;for(let i=r[t+1];;){let t=r[i++],o=1&t,a=r[i++];if(o&&n)return a;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return a;if(o)return -1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),o;;i+=3){if(65535==(o=n[i]))if(1==n[i+1])o=n[i=F8(n,i+2)];else if(2==n[i+1])return F8(n,i+2);else break;if(o==t||0==o)return F8(n,i+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n])if(1==this.data[n+1])n=F8(this.data,n+2);else break;r=t(F8(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n])if(1==this.data[n+1])n=F8(this.data,n+2);else break;if((1&this.data[n+2])==0){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(F9.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=F7(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;65535!=(i=this.data[n++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[i]=1;return new F6(e,n,r)}static deserialize(e){return new F9(e)}}function F8(e,t){return e[t]|e[t+1]<<16}function F7(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var Be=n(31650);let Bt=(0,Be.pn)({String:Be._A.string,Number:Be._A.number,"True False":Be._A.bool,PropertyName:Be._A.propertyName,Null:Be._A.null,", :":Be._A.separator,"[ ]":Be._A.squareBracket,"{ }":Be._A.brace}),Bn=F9.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[Bt],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var Br=n(63960);let Bi=Br.bj.define({name:"json",parser:Bn.configure({props:[Br.Oh.add({Object:(0,Br.mz)({except:/^\s*\}/}),Array:(0,Br.mz)({except:/^\s*\]/})}),Br.b_.add({"Object Array":Br.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});var Bo=n(13313),Ba=n(29068);function Bs(e){let t=(0,uc.A)(),n="dark"===t.palette.mode,[r,i]=(0,ed.useState)(()=>JSON.stringify(e.value,null,2)),[o,a]=(0,ed.useState)(r);return(0,ec.jsx)(Ba.Ay,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:n?"dark":"light",extensions:[new Br.Yy(Bi),(0,Bo.bu)(e=>{try{JSON.parse(e.state.doc.toString())}catch(i){var t;let n;if(!(i instanceof SyntaxError))throw i;let r=(t=e.state.doc,(n=i.message.match(/at position (\d+)/))?Math.min(+n[1],t.length):(n=i.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+n[1]).from+ +n[2]-1,t.length):0);return[{from:r,message:i.message,severity:"error",to:r}]}return[]}),(0,Bo.pJ)()],value:r,onChange:t=>{i(t),e.onChange&&e.onChange(t)},onBlur:()=>{o!==r&&void 0!==e.onChange&&(e.onChange(r),a(r))},placeholder:e.placeholder})}var Bl=n(10740);let Bu=e=>{let{mode:t,url:n,name:r,newTabOpen:i,renderVariables:o,tooltip:a}=e;return(0,ec.jsxs)(eP.A,{direction:"column",gap:2,flexGrow:1,children:[(0,ec.jsx)(fk,{label:n.label,error:n.error?.hasError,helperText:n.error?.helperText,onChange:n.onChange,placeholder:n.placeholder,multiline:!0,maxRows:5,required:!0,fullWidth:!0,value:n.value}),(r||a)&&(0,ec.jsxs)(eP.A,{gap:1,direction:"inline"===t?"row":"column",children:[r&&(0,ec.jsx)(fk,{sx:{flexGrow:"1"},label:r.label,onChange:r?.onChange,placeholder:r?.placeholder,value:r?.value}),a&&(0,ec.jsx)(fk,{sx:{flexGrow:"1"},label:a.label,onChange:a?.onChange,placeholder:a?.placeholder,value:a?.value})]}),(0,ec.jsxs)(eP.A,{direction:"row",gap:1,children:[o&&(0,ec.jsx)(Bl.A,{label:o.label,control:(0,ec.jsx)(pS.A,{checked:o.value,onChange:e=>{o?.onChange(e.target.checked)}})}),(0,ec.jsx)(Bl.A,{label:i.label,control:(0,ec.jsx)(pS.A,{checked:i.value,onChange:e=>{i?.onChange(e.target.checked)}})})]})]})},Bc=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function Bd({disablePercentageMode:e,onChange:t,value:n="value"}){return(0,ec.jsx)(f8,{label:"Mode",control:(0,ec.jsx)(gr,{value:Bc.find(e=>e.id===n),options:Bc,getOptionLabel:e=>e.label,getOptionDisabled:t=>"percentage"===t.id&&e,onChange:(e,{id:n})=>{t(n)},disableClearable:!0})})}var Bh=n(33313);function Bp(e){let{message:t}=e;return(0,ec.jsx)(eP.A,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,ec.jsx)(fc.A,{children:t})})}function Bf(e){let{resource:t}=e;return(0,ec.jsx)(Bp,{message:`No ${t}`})}function Bg(e){let{variant:t="rounded"}=e;return(0,ec.jsx)(eP.A,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,ec.jsx)(Bh.A,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}let Bm=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function Bv({onChange:e,value:t="desc"}){return(0,ec.jsx)(f8,{label:"Sort",control:(0,ec.jsx)(gr,{value:Bm.find(e=>e.id===t),options:Bm,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function By({onChange:e,value:t,...n}){let r=t=>{e(t)};return(0,ec.jsxs)(ek,{"aria-label":"Sort",...n,children:[(0,ec.jsx)(eD.A,{onClick:()=>r(void 0),variant:void 0===t?"contained":"outlined",children:"None"}),(0,ec.jsx)(eD.A,{onClick:()=>r("asc"),variant:"asc"===t?"contained":"outlined",children:"Asc"}),(0,ec.jsx)(eD.A,{onClick:()=>r("desc"),variant:"desc"===t?"contained":"outlined",children:"Desc"})]})}var Bx=n(61375),Bb=n(31729);let Bw=(0,n(68335).A)();var B_=n(86742),BS=n(86067);function BC({inputRef:e,label:t,color:n,value:r,mode:i,onChange:o,onColorChange:a,onBlur:s,onDelete:l}){let[u,c]=(0,ed.useState)(0);return(0,ec.jsxs)(eP.A,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,ec.jsx)(ul,{label:t,color:n,onColorChange:a}),(0,ec.jsx)(f2.A,{htmlFor:t,children:t}),(0,ec.jsx)(eE.A,{id:t,inputRef:e,type:"number",value:0===r?"":r,placeholder:"0",onChange:o,onBlur:s,onKeyDown:e=>{"Enter"===e.key&&(s(),c(u+1))},InputProps:{endAdornment:"percent"===i?(0,ec.jsx)(ud.A,{paddingX:1,children:"%"}):void 0}},u),(0,ec.jsx)(eR.A,{"aria-label":`delete threshold ${t}`,size:"small",onClick:l,children:(0,ec.jsx)(BS,{})})]})}function BM({thresholds:e,onChange:t,hideDefault:n,disablePercentMode:r}){let{thresholds:{defaultColor:i,palette:o}}=tl(),a=e?.defaultColor??i,s=e?.steps,l=(0,ed.useRef)(null),u=(0,ed.useRef)(!1);(0,ed.useEffect)(()=>{l.current&&u.current&&(l.current?.focus(),u.current=!1)},[s?.length]);let c=()=>{if(void 0!==s){let n=[...s];n.sort((e,t)=>e.value-t.value),void 0!==e&&t((0,uh.jM)(e,e=>{e.steps=n}))}};return(0,ec.jsxs)(ge,{title:"Thresholds",icon:(0,ec.jsx)(f4,{description:"Add threshold",children:(0,ec.jsx)(eR.A,{size:"small","aria-label":"add threshold",onClick:()=>{u.current=!0,void 0===e?t({steps:[{value:10}]}):e&&void 0===e.steps?t((0,uh.jM)(e,e=>{e.steps=[{value:10}]})):t((0,uh.jM)(e,e=>{let t=e.steps;if(t?.length){let e=t[t.length-1],n=o[t.length]??BA();t.push({color:n,value:(e?.value??0)+10})}else t&&t.push({value:10})}))},children:(0,ec.jsx)(B_,{})})}),children:[(0,ec.jsx)(f8,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,ec.jsxs)(Bx.A,{exclusive:!0,disabled:r,value:e?.mode??"absolute",onChange:(n,r)=>{let i="percent"===r?"percent":void 0;void 0!==e?t((0,uh.jM)(e,e=>{e.mode=i})):t({mode:i})},sx:{height:"36px",marginLeft:"auto"},children:[(0,ec.jsx)(Bb.A,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,ec.jsx)(Bb.A,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),s&&s.map((n,r)=>(0,ec.jsx)(BC,{inputRef:r===s.length-1?l:void 0,label:`T${r+1}`,color:n.color??o[r]??a,value:n.value,mode:e?.mode,onColorChange:n=>{void 0!==e&&t((0,uh.jM)(e,e=>{if(void 0!==e.steps){let t=e.steps[r];t&&(t.color=n)}}))},onChange:n=>{void 0!==e&&t((0,uh.jM)(e,e=>{let t=e.steps?.[r];t&&(t.value=Number(n.target.value))}))},onDelete:()=>{void 0!==e&&t((0,uh.jM)(e,e=>{e.steps&&e.steps.splice(r,1)}))},onBlur:c},r)).reverse(),!n&&(0,ec.jsxs)(Bw,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,ec.jsx)(ul,{label:"default",color:a,onColorChange:n=>{void 0!==e?t((0,uh.jM)(e,e=>{e.defaultColor=n})):t({defaultColor:n})}}),(0,ec.jsx)(fc.A,{children:"Default"})]})]})}let BA=()=>"#"+Math.floor(0x1000000*Math.random()).toString(16).padStart(6,"0");var BT=n(24300),BI=n(26684),Bk=n(49257),BD=n(51327),BO=n(87169),BP=n(93724);function BR({props:e,name:t}){return(0,BD.A)({props:e,name:t,defaultTheme:BO.A,themeId:BP.A})}let BE=["localeText"],BL=ed.createContext(null),BN=function(e){let{localeText:t}=e,n=(0,Bk.A)(e,BE),{utils:r,localeText:i}=ed.useContext(BL)??{utils:void 0,localeText:void 0},{children:o,dateAdapter:a,dateFormats:s,dateLibInstance:l,adapterLocale:u,localeText:c}=BR({props:n,name:"MuiLocalizationProvider"}),d=ed.useMemo(()=>(0,og.A)({},c,i,t),[c,i,t]),h=ed.useMemo(()=>{if(!a)return r||null;let e=new a({locale:u,formats:s,instance:l});if(!e.isMUIAdapter)throw Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
6
+ `));return e},[a,u,s,l,r]),p=ed.useMemo(()=>h?{minDate:h.date("1900-01-01T00:00:00.000"),maxDate:h.date("2099-12-31T00:00:00.000")}:null,[h]),f=ed.useMemo(()=>({utils:h,defaultDates:p,localeText:d}),[p,h,d]);return(0,ec.jsx)(BL.Provider,{value:f,children:o})};var Bz=n(62688),BF=n.n(Bz);let BB={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(null===t||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"};(0,og.A)({},BB);let Bj=()=>{let e=ed.useContext(BL);if(null===e)throw Error("MUI X: Can not find the date and time pickers localization context.\nIt looks like you forgot to wrap your component in LocalizationProvider.\nThis can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package");if(null===e.utils)throw Error("MUI X: Can not find the date and time pickers adapter from its localization context.\nIt looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.");let t=ed.useMemo(()=>(0,og.A)({},BB,e.localeText),[e.localeText]);return ed.useMemo(()=>(0,og.A)({},e,{localeText:t}),[e,t])},BV=e=>{let t=Bj().utils,n=ed.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},BH=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n))},BW=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:o,utils:a,timezone:s})=>{let l=BH(a,a.date(void 0,s),e);n&&a.isBefore(i,l)&&(i=l),t&&a.isAfter(r,l)&&(r=l);let u=e,c=e;for(a.isBefore(e,i)&&(u=i,c=null),a.isAfter(e,r)&&(c&&(c=r),u=null);u||c;){if(u&&a.isAfter(u,r)&&(u=null),c&&a.isBefore(c,i)&&(c=null),u){if(!o(u))return u;u=a.addDays(u,1)}if(c){if(!o(c))return c;c=a.addDays(c,-1)}}return null},BG=(e,t,n)=>null!=t&&e.isValid(t)?t:n,B$=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},BU=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),BZ=(e,t)=>{let n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},BY=["year","month","day"],BX=e=>BY.includes(e);var Bq=n(33868),BK=n(87034),BQ=n(22857);let BJ=(0,pN.A)((0,ec.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),B0=(0,pN.A)((0,ec.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),B1=(0,pN.A)((0,ec.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");(0,pN.A)((0,ec.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),(0,pN.A)((0,ec.jsxs)(ed.Fragment,{children:[(0,ec.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,ec.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");let B2=(0,pN.A)((0,ec.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),B5=(0,pN.A)((0,ec.jsxs)(ed.Fragment,{children:[(0,ec.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,ec.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),B3=(0,pN.A)((0,ec.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function B4(e){return(0,eS.Ay)("MuiDateTimePickerTabs",e)}(0,e_.A)("MuiDateTimePickerTabs",["root"]);let B6=(0,ey.A)(BK.A,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${BQ.A.indicator}`]:{bottom:"auto",top:0}}})),B9=function(e){let t=BR({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,ec.jsx)(B2,{}),onViewChange:r,timeIcon:i=(0,ec.jsx)(B5,{}),view:o,hidden:a="u"<typeof window||window.innerHeight<667,className:s,sx:l}=t,u=Bj().localeText,c=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"]},B4,t)})(t);return a?null:(0,ec.jsxs)(B6,{ownerState:t,variant:"fullWidth",value:BX(o)?"date":"time",onChange:(e,t)=>{r("date"===t?"day":"hours")},className:(0,ep.A)(s,c.root),sx:l,children:[(0,ec.jsx)(Bq.A,{value:"date","aria-label":u.dateTableLabel,icon:(0,ec.jsx)(ed.Fragment,{children:n})}),(0,ec.jsx)(Bq.A,{value:"time","aria-label":u.timeTableLabel,icon:(0,ec.jsx)(ed.Fragment,{children:i})})]})};function B8(e){return(0,eS.Ay)("MuiPickersToolbarText",e)}let B7=(0,e_.A)("MuiPickersToolbarText",["root","selected"]),je=["className","selected","value"],jt=(0,ey.A)(fc.A,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${B7.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${B7.selected}`]:{color:(e.vars||e).palette.text.primary}})),jn=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersToolbarText"}),{className:r,value:i}=n,o=(0,Bk.A)(n,je),a=(e=>{let{classes:t,selected:n}=e;return(0,ef.A)({root:["root",n&&"selected"]},B8,t)})(n);return(0,ec.jsx)(jt,(0,og.A)({ref:t,className:(0,ep.A)(a.root,r),component:"span"},o,{children:i}))});function jr(e){return(0,eS.Ay)("MuiPickersToolbar",e)}let ji=(0,e_.A)("MuiPickersToolbar",["root","content"]),jo=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],ja=(0,ey.A)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),js=(0,ey.A)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),jl=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:o,hidden:a,titleId:s}=n,l=(0,Bk.A)(n,jo),u=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],content:["content"]},jr,t)})(n);return a?null:(0,ec.jsxs)(ja,(0,og.A)({ref:t,className:(0,ep.A)(u.root,i),ownerState:n},l,{children:[(0,ec.jsx)(fc.A,{color:"text.secondary",variant:"overline",id:s,children:o}),(0,ec.jsx)(js,{className:u.content,ownerState:n,children:r})]}))}),ju=["align","className","selected","typographyClassName","value","variant","width"],jc=(0,ey.A)(eD.A,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),jd=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:o,typographyClassName:a,value:s,variant:l,width:u}=n,c=(0,Bk.A)(n,ju),d=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"]},jr,t)})(n);return(0,ec.jsx)(jc,(0,og.A)({variant:"text",ref:t,className:(0,ep.A)(d.root,i)},u?{sx:{width:u}}:{},c,{children:(0,ec.jsx)(jn,{align:r,className:a,variant:l,value:s,selected:o})}))});function jh(e){return(0,eS.Ay)("MuiDateTimePickerToolbar",e)}let jp=(0,e_.A)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),jf=["hours","minutes","seconds"],jg=e=>jf.includes(e),jm=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,jv=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),jy=(e,t)=>(n,r)=>e?t.isAfter(n,r):jv(n,t)>jv(r,t);function jx(e,t,n,r){let i=Bj().utils;return{meridiemMode:e?i.getHours(e)>=12?"pm":"am":null,handleMeridiemChange:ed.useCallback(o=>{var a;let s;n(null==e?null:(a=!!t,s=jm(i.getHours(e),o,a),i.setHours(e,s)),r??"partial")},[t,e,n,r,i])}}let jb=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],jw=(0,ey.A)(jl,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${ji.content} .${B7.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),j_=(0,ey.A)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),jS=(0,ey.A)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&"desktop"!==t,style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&"desktop"!==t&&n,style:{flexDirection:"column-reverse"}}]}),jC=(0,ey.A)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),jM=(0,ey.A)(jn,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),jA=(0,ey.A)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${jp.ampmLabel}`]:t.ampmLabel},{[`&.${jp.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${jp.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function jT(e){let t=BR({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:i,onChange:o,view:a,isLandscape:s,onViewChange:l,toolbarFormat:u,toolbarPlaceholder:c="––",views:d,disabled:h,readOnly:p,toolbarVariant:f="mobile",toolbarTitle:g,className:m}=t,v=(0,Bk.A)(t,jb),y=(0,pR.I)(),x=(0,og.A)({},t,{isRtl:y}),b=Bj().utils,{meridiemMode:w,handleMeridiemChange:_}=jx(i,n,o),S=!!(n&&!r),C="desktop"===f,M=Bj().localeText,A=(e=>{let{classes:t,isLandscape:n,isRtl:r}=e;return(0,ef.A)({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},jh,t)})(x),T=g??M.dateTimePickerToolbarTitle,I=ed.useMemo(()=>i?u?b.formatByString(i,u):b.format(i,"shortDate"):c,[i,u,c,b]);return(0,ec.jsxs)(jw,(0,og.A)({isLandscape:s,className:(0,ep.A)(A.root,m),toolbarTitle:T},v,{ownerState:x,children:[(0,ec.jsxs)(j_,{className:A.dateContainer,ownerState:x,children:[d.includes("year")&&(0,ec.jsx)(jd,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:"year"===a,value:i?b.format(i,"year"):"–"}),d.includes("day")&&(0,ec.jsx)(jd,{tabIndex:-1,variant:C?"h5":"h4",onClick:()=>l("day"),selected:"day"===a,value:I})]}),(0,ec.jsxs)(jS,{className:A.timeContainer,ownerState:x,children:[(0,ec.jsxs)(jC,{className:A.timeDigitsContainer,ownerState:x,children:[d.includes("hours")&&(0,ec.jsxs)(ed.Fragment,{children:[(0,ec.jsx)(jd,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("hours"),selected:"hours"===a,value:i?n?b.format(i,"hours12h"):b.format(i,"hours24h"):"--"}),(0,ec.jsx)(jM,{variant:C?"h5":"h3",value:":",className:A.separator,ownerState:x}),(0,ec.jsx)(jd,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("minutes"),selected:"minutes"===a||!d.includes("minutes")&&"hours"===a,value:i?b.format(i,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&(0,ec.jsxs)(ed.Fragment,{children:[(0,ec.jsx)(jM,{variant:C?"h5":"h3",value:":",className:A.separator,ownerState:x}),(0,ec.jsx)(jd,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("seconds"),selected:"seconds"===a,value:i?b.format(i,"seconds"):"--"})]})]}),S&&!C&&(0,ec.jsxs)(jA,{className:A.ampmSelection,ownerState:x,children:[(0,ec.jsx)(jd,{variant:"subtitle2",selected:"am"===w,typographyClassName:A.ampmLabel,value:BZ(b,"am"),onClick:p?void 0:()=>_("am"),disabled:h}),(0,ec.jsx)(jd,{variant:"subtitle2",selected:"pm"===w,typographyClassName:A.ampmLabel,value:BZ(b,"pm"),onClick:p?void 0:()=>_("pm"),disabled:h})]}),n&&C&&(0,ec.jsx)(jd,{variant:"h5",onClick:()=>l("meridiem"),selected:"meridiem"===a,value:i&&w?BZ(b,w):"--",width:48})]})]}))}var jI=n(54553),jk=n(77893);function jD(e){return(0,eS.Ay)("MuiPickersArrowSwitcher",e)}(0,e_.A)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);let jO=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],jP=["ownerState"],jR=["ownerState"],jE=(0,ey.A)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),jL=(0,ey.A)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),jN=(0,ey.A)(eR.A,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),jz=ed.forwardRef(function(e,t){let n=(0,pR.I)(),r=BR({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:o,slots:a,slotProps:s,isNextDisabled:l,isNextHidden:u,onGoToNext:c,nextLabel:d,isPreviousDisabled:h,isPreviousHidden:p,onGoToPrevious:f,previousLabel:g,labelId:m}=r,v=(0,Bk.A)(r,jO),y=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},jD,t)})(r),x=a?.previousIconButton??jN,b=(0,jk.A)({elementType:x,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:g,"aria-label":g,disabled:h,edge:"end",onClick:f},ownerState:(0,og.A)({},r,{hidden:p}),className:(0,ep.A)(y.button,y.previousIconButton)}),w=a?.nextIconButton??jN,_=(0,jk.A)({elementType:w,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:d,"aria-label":d,disabled:l,edge:"start",onClick:c},ownerState:(0,og.A)({},r,{hidden:u}),className:(0,ep.A)(y.button,y.nextIconButton)}),S=a?.leftArrowIcon??B0,C=(0,jk.A)({elementType:S,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:y.leftArrowIcon}),M=(0,Bk.A)(C,jP),A=a?.rightArrowIcon??B1,T=(0,jk.A)({elementType:A,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:y.rightArrowIcon}),I=(0,Bk.A)(T,jR);return(0,ec.jsxs)(jE,(0,og.A)({ref:t,className:(0,ep.A)(y.root,o),ownerState:r},v,{children:[(0,ec.jsx)(x,(0,og.A)({},b,{children:n?(0,ec.jsx)(A,(0,og.A)({},I)):(0,ec.jsx)(S,(0,og.A)({},M))})),i?(0,ec.jsx)(fc.A,{variant:"subtitle1",component:"span",id:m,children:i}):(0,ec.jsx)(jL,{className:y.spacer,ownerState:r}),(0,ec.jsx)(w,(0,og.A)({},_,{children:n?(0,ec.jsx)(S,(0,og.A)({},M)):(0,ec.jsx)(A,(0,og.A)({},I))}))]}))});var jF=n(83183),jB=n(89369);function jj({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:a,onFocusedViewChange:s}){let l=ed.useRef(n),u=ed.useRef(i),c=ed.useRef(i.includes(n)?n:i[0]),[d,h]=(0,jB.A)({name:"useViews",state:"view",controlled:r,default:c.current}),p=ed.useRef(o?d:null),[f,g]=(0,jB.A)({name:"useViews",state:"focusedView",controlled:a,default:p.current});ed.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(e=>!i.includes(e)))&&(h(i.includes(n)?n:i[0]),u.current=i,l.current=n)},[n,h,d,i]);let m=i.indexOf(d),v=i[m-1]??null,y=i[m+1]??null,x=(0,jF.A)((e,t)=>{t?g(e):g(t=>e===t?null:t),s?.(e,t)}),b=(0,jF.A)(e=>{x(e,!0),e!==d&&(h(e),t&&t(e))}),w=(0,jF.A)(()=>{y&&b(y)}),_=(0,jF.A)((t,n,r)=>{let o="finish"===n,a=r?i.indexOf(r)<i.length-1:!!y;if(e(t,o&&a?"partial":n,r),r&&r!==d){let e=i[i.indexOf(r)+1];e&&b(e)}else o&&w()});return{view:d,setView:b,focusedView:f,setFocusedView:x,nextView:y,previousView:v,defaultView:i.includes(n)?n:i[0],goToNextView:w,setValueAndGoToNextView:_}}let jV=(0,ey.A)("div")({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"});function jH(e){return(0,eS.Ay)("MuiTimeClock",e)}(0,e_.A)("MuiTimeClock",["root","arrowSwitcher"]);var jW=n(31789);function jG(e){return(0,eS.Ay)("MuiClockPointer",e)}(0,e_.A)("MuiClockPointer",["root","thumb"]);let j$=["className","hasSelected","isInner","type","viewValue"],jU=(0,ey.A)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),jZ=(0,ey.A)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function jY(e){let t,n=BR({props:e,name:"MuiClockPointer"}),{className:r,isInner:i,type:o,viewValue:a}=n,s=(0,Bk.A)(n,j$),l=ed.useRef(o);ed.useEffect(()=>{l.current=o},[o]);let u=(0,og.A)({},n,{shouldAnimate:l.current!==o}),c=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],thumb:["thumb"]},jG,t)})(u);return(0,ec.jsx)(jU,(0,og.A)({style:(t=360/("hours"===o?12:60)*a,"hours"===o&&a>12&&(t-=360),{height:Math.round((i?.26:.4)*220),transform:`rotateZ(${t}deg)`}),className:(0,ep.A)(c.root,r),ownerState:u},s,{children:(0,ec.jsx)(jZ,{ownerState:u,className:c.thumb})}))}let jX=110,jq=110,jK=jX,jQ=0,jJ=jK-jX,j0=jQ-jq,j1=(e,t,n)=>{let r=t-jX,i=n-jq,o=180/Math.PI*(Math.atan2(jJ,j0)-Math.atan2(r,i));return{value:Math.floor((o=Math.round(o/e)*e%360)/e)||0,distance:Math.sqrt(r**2+i**2)}};function j2(e){return(0,eS.Ay)("MuiClock",e)}(0,e_.A)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);let j5=(0,ey.A)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),j3=(0,ey.A)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),j4=(0,ey.A)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),j6=(0,ey.A)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),j9=(0,ey.A)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),j8=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),j7=(0,ey.A)(eR.A,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>(0,og.A)({},j8(e,"am"),{position:"absolute",left:8})),Ve=(0,ey.A)(eR.A,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>(0,og.A)({},j8(e,"pm"),{position:"absolute",right:8})),Vt=(0,ey.A)(fc.A,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Vn(e){let t=BR({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:o,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:u,minutesStep:c=1,onChange:d,selectedId:h,type:p,viewValue:f,viewRange:[g,m],disabled:v=!1,readOnly:y,className:x}=t,b=Bj().utils,w=Bj().localeText,_=ed.useRef(!1),S=(e=>{let{classes:t,meridiemMode:n}=e;return(0,ef.A)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]},j2,t)})(t),C=l(f,p),M=!n&&"hours"===p&&(f<1||f>12),A=(e,t)=>{v||y||l(e,p)||d(e,t)},T=(e,t)=>{let{offsetX:r,offsetY:i}=e;if(void 0===r){let t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}A("seconds"===p||"minutes"===p?((e,t,n=1)=>{let{value:r}=j1(6*n,e,t);return r*n%60})(r,i,c):((e,t,n)=>{let{value:r,distance:i}=j1(30,e,t),o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o})(r,i,!!n),t)},I=e=>{_.current=!0,T(e,"shallow")},k=ed.useMemo(()=>"hours"===p||f%5==0,[p,f]),D="minutes"===p?c:1,O=ed.useRef(null);(0,jW.A)(()=>{i&&O.current.focus()},[i]);let P=e=>Math.max(g,Math.min(m,e)),R=e=>(e+(m+1))%(m+1);return(0,ec.jsxs)(j5,{className:(0,ep.A)(S.root,x),children:[(0,ec.jsxs)(j3,{className:S.clock,children:[(0,ec.jsx)(j6,{onTouchMove:I,onTouchStart:I,onTouchEnd:e=>{_.current&&(T(e,"finish"),_.current=!1),e.preventDefault()},onMouseUp:e=>{_.current&&(_.current=!1),T(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&T(e.nativeEvent,"shallow")},ownerState:{disabled:v},className:S.squareMask}),!C&&(0,ec.jsxs)(ed.Fragment,{children:[(0,ec.jsx)(j9,{className:S.pin}),null!=a&&(0,ec.jsx)(jY,{type:p,viewValue:f,isInner:M,hasSelected:k})]}),(0,ec.jsx)(j4,{"aria-activedescendant":h,"aria-label":w.clockLabelText(p,a,b,null==a?null:b.format(a,"fullTime")),ref:O,role:"listbox",onKeyDown:e=>{if(!_.current)switch(e.key){case"Home":A(g,"partial"),e.preventDefault();break;case"End":A(m,"partial"),e.preventDefault();break;case"ArrowUp":A(R(f+D),"partial"),e.preventDefault();break;case"ArrowDown":A(R(f-D),"partial"),e.preventDefault();break;case"PageUp":A(P(f+5),"partial"),e.preventDefault();break;case"PageDown":A(P(f-5),"partial"),e.preventDefault();break;case"Enter":case" ":A(f,"finish"),e.preventDefault()}},tabIndex:0,className:S.wrapper,children:o})]}),n&&r&&(0,ec.jsxs)(ed.Fragment,{children:[(0,ec.jsx)(j7,{onClick:y?void 0:()=>s("am"),disabled:v||null===u,ownerState:t,className:S.amButton,title:BZ(b,"am"),children:(0,ec.jsx)(Vt,{variant:"caption",className:S.meridiemText,children:BZ(b,"am")})}),(0,ec.jsx)(Ve,{disabled:v||null===u,onClick:y?void 0:()=>s("pm"),ownerState:t,className:S.pmButton,title:BZ(b,"pm"),children:(0,ec.jsx)(Vt,{variant:"caption",className:S.meridiemText,children:BZ(b,"pm")})})]})]})}function Vr(e){return(0,eS.Ay)("MuiClockNumber",e)}let Vi=(0,e_.A)("MuiClockNumber",["root","selected","disabled"]),Vo=["className","disabled","index","inner","label","selected"],Va=(0,ey.A)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Vi.disabled}`]:t.disabled},{[`&.${Vi.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${Vi.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${Vi.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:(0,og.A)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function Vs(e){let t=BR({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:o,label:a,selected:s}=t,l=(0,Bk.A)(t,Vo),u=(e=>{let{classes:t,selected:n,disabled:r}=e;return(0,ef.A)({root:["root",n&&"selected",r&&"disabled"]},Vr,t)})(t),c=i%12/12*Math.PI*2-Math.PI/2,d=91*(o?.65:1),h=Math.round(Math.cos(c)*d),p=Math.round(Math.sin(c)*d);return(0,ec.jsx)(Va,(0,og.A)({className:(0,ep.A)(u.root,n),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${h}px, ${p+92}px`},ownerState:t},l,{children:a}))}let Vl=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let o=e.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map(([e,o],a)=>{let s=e===t;return(0,ec.jsx)(Vs,{label:o,id:s?i:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(o)},e)})},Vu=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:i,valueManager:o})=>{let a,s=Bj().utils,l=ed.useRef(n),u=t??l.current??o.emptyValue,c=ed.useMemo(()=>o.getTimezone(s,u),[s,o,u]),d=(0,jF.A)(e=>null==c?e:o.setTimezone(s,c,e));return a=e||c||(r?s.getTimezone(r):"default"),{value:ed.useMemo(()=>o.setTimezone(s,a,u),[o,s,a,u]),handleValueChange:(0,jF.A)((e,...t)=>{let n=d(e);i?.(n,...t)}),timezone:a}},Vc=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:o,valueManager:a})=>{let[s,l]=(0,jB.A)({name:e,state:"value",controlled:n,default:r??a.emptyValue});return Vu({timezone:t,value:s,defaultValue:void 0,referenceDate:i,onChange:(0,jF.A)((e,...t)=>{l(e),o?.(e,...t)}),valueManager:a})},Vd={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Vh=(e,t,n)=>{if(t===Vd.year)return e.startOfYear(n);if(t===Vd.month)return e.startOfMonth(n);if(t===Vd.day)return e.startOfDay(n);let r=n;return t<Vd.minutes&&(r=e.setMinutes(r,0)),t<Vd.seconds&&(r=e.setSeconds(r,0)),t<Vd.milliseconds&&(r=e.setMilliseconds(r,0)),r},Vp=(e,t)=>{let n=e.formatTokenMap[t];if(null==n)throw Error(`MUI X: The token "${t}" is not supported by the Date and Time Pickers.
7
+ Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.`);return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Vf=(e,t)=>{let n=[],r=e.date(void 0,"default"),i=e.startOfWeek(r),o=e.endOfWeek(r),a=i;for(;e.isBefore(a,o);)n.push(a),a=e.addDays(a,1);return n.map(n=>e.formatByString(n,t))},Vg=(e,t,n,r)=>{switch(n){case"month":return B$(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case"weekDay":return Vf(e,r);case"meridiem":{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},Vm=["0","1","2","3","4","5","6","7","8","9"],Vv=(e,t)=>{if("0"===t[0])return e;let n=[],r="";for(let i=0;i<e.length;i+=1){r+=e[i];let o=t.indexOf(r);o>-1&&(n.push(o.toString()),r="")}return n.join("")},Vy=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),Vx=(e,t)=>{let n=Vv(e,t);return" "!==n&&!Number.isNaN(Number(n))},Vb=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},Vw=(e,t,n,r,i)=>{if("day"===i.type&&"digit-with-letter"===i.contentType){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let o=t.toString();return i.hasLeadingZerosInInput&&(o=Vb(o,i.maxLength)),Vy(o,r)},V_=(e,t,n)=>{let r=e.value||e.placeholder,i="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Vv(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!i&&1===r.length&&(r=`${r}\u200e`),"input-rtl"===t&&(r=`\u2068${r}\u2069`),r},VS=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),VC=(e,t,n,r)=>{if("digit"!==t)return!1;let i=e.date(void 0,"default");switch(n){case"year":if("dayjs"===e.lib&&"YY"===r)return!0;return e.formatByString(e.setYear(i,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(i),r).length>1;case"day":return e.formatByString(e.startOfMonth(i),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(i),r).length>1;case"hours":return e.formatByString(e.setHours(i,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(i,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error("Invalid section type")}},VM=(e,t)=>{},VA={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},VT=(e,t,n,r,i)=>[...n].sort((e,t)=>VA[e.type]-VA[t.type]).reduce((n,r)=>!i||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let r=Vf(e,t.format),i=e.formatByString(n,t.format),o=r.indexOf(i),a=r.indexOf(t.value);return e.addDays(n,a-o)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{let t=12>e.getHours(n),i=e.getHours(r);if(t&&i>=12)return e.addHours(r,-12);if(!t&&i<12)return e.addHours(r,12);return r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n,r),VI=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){let n=t.findIndex(t=>t.type===e);return -1===n?null:n}return e},Vk=["value","referenceDate"],VD={emptyValue:null,getTodayValue:BU,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,Bk.A)(e,Vk);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:i})=>{let o=i?i():Vh(t,n,BU(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=Vh(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=Vh(t,n,e.maxDate));let a=jy(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,o)&&(o=Vh(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:BH(t,o,e.minTime))),null!=e.maxTime&&a(o,e.maxTime)&&(o=Vh(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:BH(t,o,e.maxTime))),o})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!(e.isValid(t)||null==t||e.isValid(n))&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},VO={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&n?n:r(t),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{let r=e.map(e=>{let r=V_(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return n?`\u2066${r}\u2069`:r},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},VP=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],VR=(0,ey.A)(jV,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),VE=(0,ey.A)(jz,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),VL=["hours","minutes"],VN=ed.forwardRef(function(e,t){let n=Bj().utils,r=BR({props:e,name:"MuiTimeClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:o=!1,autoFocus:a,slots:s,slotProps:l,value:u,defaultValue:c,referenceDate:d,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:p,minTime:f,disableFuture:g,disablePast:m,minutesStep:v=1,shouldDisableTime:y,showViewSwitcher:x,onChange:b,view:w,views:_=VL,openTo:S,onViewChange:C,focusedView:M,onFocusedViewChange:A,className:T,disabled:I,readOnly:k,timezone:D}=r,O=(0,Bk.A)(r,VP),{value:P,handleValueChange:R,timezone:E}=Vc({name:"TimeClock",timezone:D,value:u,defaultValue:c,referenceDate:d,onChange:b,valueManager:VD}),L=(({value:e,referenceDate:t,utils:n,props:r,timezone:i})=>{let o=ed.useMemo(()=>VD.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Vd.day,timezone:i,getTodayDate:()=>BU(n,i,"date")}),[]);return e??o})({value:P,referenceDate:d,utils:n,props:r,timezone:E}),N=Bj().localeText,z=BV(E),{view:F,setView:B,previousView:j,nextView:V,setValueAndGoToNextView:H}=jj({view:w,views:_,openTo:S,onViewChange:C,onChange:R,focusedView:M,onFocusedViewChange:A}),{meridiemMode:W,handleMeridiemChange:G}=jx(L,i,H),$=ed.useCallback((e,t)=>{let r=jy(h,n),o="hours"===t||"minutes"===t&&_.includes("seconds"),a=({start:e,end:t})=>!(f&&r(f,t)||p&&r(e,p)||g&&r(e,z)||m&&r(z,o?t:e)),s=(e,r=1)=>{if(e%r!=0)return!1;if(y)switch(t){case"hours":return!y(n.setHours(L,e),"hours");case"minutes":return!y(n.setMinutes(L,e),"minutes");case"seconds":return!y(n.setSeconds(L,e),"seconds");default:return!1}return!0};switch(t){case"hours":{let t=jm(e,W,i),r=n.setHours(L,t);if(n.getHours(r)!==t)return!0;return!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{let t=n.setMinutes(L,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,v)}case"seconds":{let t=n.setSeconds(L,e);return!a({start:t,end:t})||!s(e)}default:throw Error("not supported")}},[i,L,h,p,W,f,v,y,n,g,m,z,_]),U=(0,jI.A)(),Z=ed.useMemo(()=>{switch(F){case"hours":{let e,t=(e,t)=>{let r=jm(e,W,i);H(n.setHours(L,r),t,"hours")},r=n.getHours(L);return e=i?r>12?[12,23]:[0,11]:[0,23],{onChange:t,viewValue:r,children:(({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,utils:o})=>{let a=t?o.getHours(t):null,s=[],l=+!!e,u=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=l;t<=u;t+=1){let a=t.toString();0===t&&(a="00");let l=!e&&(0===t||t>12);a=o.formatNumber(a);let u=c(t);s.push((0,ec.jsx)(Vs,{id:u?i:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s})({value:P,utils:n,ampm:i,onChange:t,getClockNumberText:N.hoursClockNumberText,isDisabled:e=>I||$(e,"hours"),selectedId:U}),viewRange:e}}case"minutes":{let e=n.getMinutes(L),t=(e,t)=>{H(n.setMinutes(L,e),t,"minutes")};return{viewValue:e,onChange:t,children:Vl({utils:n,value:e,onChange:t,getClockNumberText:N.minutesClockNumberText,isDisabled:e=>I||$(e,"minutes"),selectedId:U}),viewRange:[0,59]}}case"seconds":{let e=n.getSeconds(L),t=(e,t)=>{H(n.setSeconds(L,e),t,"seconds")};return{viewValue:e,onChange:t,children:Vl({utils:n,value:e,onChange:t,getClockNumberText:N.secondsClockNumberText,isDisabled:e=>I||$(e,"seconds"),selectedId:U}),viewRange:[0,59]}}default:throw Error("You must provide the type for ClockView")}},[F,n,P,i,N.hoursClockNumberText,N.minutesClockNumberText,N.secondsClockNumberText,W,H,L,$,U,I]),Y=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],arrowSwitcher:["arrowSwitcher"]},jH,t)})(r);return(0,ec.jsxs)(VR,(0,og.A)({ref:t,className:(0,ep.A)(Y.root,T),ownerState:r},O,{children:[(0,ec.jsx)(Vn,(0,og.A)({autoFocus:a??!!M,ampmInClock:o&&_.includes("hours"),value:P,type:F,ampm:i,minutesStep:v,isTimeDisabled:$,meridiemMode:W,handleMeridiemChange:G,selectedId:U,disabled:I,readOnly:k},Z)),x&&(0,ec.jsx)(VE,{className:Y.arrowSwitcher,slots:s,slotProps:l,onGoToPrevious:()=>B(j),isPreviousDisabled:!j,previousLabel:N.openPreviousView,onGoToNext:()=>B(V),isNextDisabled:!V,nextLabel:N.openNextView,ownerState:r})]}))}),Vz=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:_,sx:S,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:A,timezone:T})=>(0,ec.jsx)(VN,{view:e,onViewChange:t,focusedView:n&&jg(n)?n:null,onFocusedViewChange:r,views:i.filter(jg),value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:_,sx:S,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:A,timezone:T}),VF=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;let{shouldDisableDate:i,shouldDisableMonth:o,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),c=BG(r.utils,e.minDate,r.defaultDates.minDate),d=BG(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(i&&i(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};VF.valueManager=VD;let VB=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a,timezone:s})=>{let l=Bj();return ed.useCallback(u=>null!==VF({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a}}),[l,e,t,n,r,i,o,a,s])};var Vj=n(44394),VV=n(96313);let VH=e=>(0,eS.Ay)("MuiPickersFadeTransitionGroup",e);(0,e_.A)("MuiPickersFadeTransitionGroup",["root"]);let VW=(0,ey.A)(Vj.A,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function VG(e){let t=BR({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"]},VH,t)})(t),s=(0,uc.A)();return i?n:(0,ec.jsx)(VW,{className:(0,ep.A)(a.root,r),children:(0,ec.jsx)(VV.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},o)})}var V$=n(95591);function VU(e){return(0,eS.Ay)("MuiPickersDay",e)}let VZ=(0,e_.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),VY=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],VX=({theme:e})=>(0,og.A)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eg.X4)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,eg.X4)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${VZ.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${VZ.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${VZ.disabled}:not(.${VZ.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${VZ.disabled}&.${VZ.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${VZ.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Vq=(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},VK=(0,ey.A)(ug.A,{name:"MuiPickersDay",slot:"Root",overridesResolver:Vq})(VX),VQ=(0,ey.A)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Vq})(({theme:e})=>(0,og.A)({},VX({theme:e}),{opacity:0,pointerEvents:"none"})),VJ=()=>{},V0=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:o,disabled:a=!1,disableHighlightToday:s=!1,disableMargin:l=!1,isAnimating:u,onClick:c,onDaySelect:d,onFocus:h=VJ,onBlur:p=VJ,onKeyDown:f=VJ,onMouseDown:g=VJ,onMouseEnter:m=VJ,outsideCurrentMonth:v,selected:y=!1,showDaysOutsideCurrentMonth:x=!1,children:b,today:w=!1}=n,_=(0,Bk.A)(n,VY),S=(0,og.A)({},n,{autoFocus:r,disabled:a,disableHighlightToday:s,disableMargin:l,selected:y,showDaysOutsideCurrentMonth:x,today:w}),C=(e=>{let{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:o,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s;return(0,ef.A)({root:["root",t&&!u&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},VU,l)})(S),M=Bj().utils,A=ed.useRef(null),T=(0,V$.A)(A,t);return((0,jW.A)(()=>{!r||a||u||v||A.current.focus()},[r,a,u,v]),v&&!x)?(0,ec.jsx)(VQ,{className:(0,ep.A)(C.root,C.hiddenDaySpacingFiller,i),ownerState:S,role:_.role}):(0,ec.jsx)(VK,(0,og.A)({className:(0,ep.A)(C.root,i),ref:T,centerRipple:!0,disabled:a,tabIndex:y?0:-1,onKeyDown:e=>f(e,o),onFocus:e=>h(e,o),onBlur:e=>p(e,o),onMouseEnter:e=>m(e,o),onClick:e=>{a||d(o),v&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{g(e),v&&e.preventDefault()}},_,{ownerState:S,children:b||M.format(o,"dayOfMonth")}))}),V1=ed.memo(V0);var V2=n(7490);function V5(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var V3=n(64863),V4=function(e,t){return e&&t&&t.split(" ").forEach(function(t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=V5(e.className,t):e.setAttribute("class",V5(e.className&&e.className.baseVal||"",t))})},V6=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.addClass(i,o?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r&&n?n+"-":"",o=r?""+i+e:n[e],a=r?o+"-active":n[e+"Active"],s=r?o+"-done":n[e+"Done"];return{baseClassName:o,activeClassName:a,doneClassName:s}},t}(0,V2.A)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r,i=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(i+=" "+o),"active"===n&&e&&(0,V3.F)(e),i&&(this.appliedClasses[t][n]=i,r=i,e&&r&&r.split(" ").forEach(function(t){e.classList?e.classList.add(t):(e.classList?t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" "))||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&V4(e,r),i&&V4(e,i),o&&V4(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,Bk.A)(e,["classNames"]));return eh().createElement(mi.Ay,(0,og.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(eh().Component);V6.defaultProps={classNames:""},V6.propTypes={};let V9=e=>(0,eS.Ay)("MuiPickersSlideTransition",e),V8=(0,e_.A)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),V7=["children","className","reduceAnimations","slideDirection","transKey","classes"],He=(0,ey.A)(Vj.A,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${V8["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${V8["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${V8.slideEnterActive}`]:t.slideEnterActive},{[`.${V8.slideExit}`]:t.slideExit},{[`.${V8["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${V8["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{let t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${V8["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${V8["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${V8.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${V8.slideExit}`]:{transform:"translate(0%)"},[`& .${V8["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${V8["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),Ht=e=>(0,eS.Ay)("MuiDayCalendar",e);(0,e_.A)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);let Hn=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Hr=["ownerState"],Hi=(0,ey.A)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ho=(0,ey.A)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Ha=(0,ey.A)(fc.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),Hs=(0,ey.A)(fc.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),Hl=(0,ey.A)(fc.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>(0,og.A)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),Hu=(0,ey.A)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Hc=(0,ey.A)(function(e){let t=BR({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(0,Bk.A)(t,V7),s=(e=>{let{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,ef.A)(r,V9,t)})(t),l=(0,uc.A)();if(i)return(0,ec.jsx)("div",{className:(0,ep.A)(s.root,r),children:n});let u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return(0,ec.jsx)(He,{className:(0,ep.A)(s.root,r),childFactory:e=>ed.cloneElement(e,{classNames:u}),role:"presentation",children:(0,ec.jsx)(V6,(0,og.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},a,{children:n}),o)})},{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Hd=(0,ey.A)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Hh=(0,ey.A)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function Hp(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:i,isDateDisabled:o,currentMonthNumber:a,isViewFocused:s}=e,l=(0,Bk.A)(e,Hn),{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:h,slots:p,slotProps:f,timezone:g}=t,m=Bj().utils,v=BV(g),y=null!==r&&m.isSameDay(n,r),x=i.some(e=>m.isSameDay(e,n)),b=m.isSameDay(n,v),w=p?.day??V1,_=(0,jk.A)({elementType:w,externalSlotProps:f?.day,additionalProps:(0,og.A)({disableHighlightToday:c,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:d,"data-timestamp":m.toJsDate(n).valueOf()},l),ownerState:(0,og.A)({},t,{day:n,selected:x})}),S=(0,Bk.A)(_,Hr),C=ed.useMemo(()=>u||o(n),[u,o,n]),M=ed.useMemo(()=>m.getMonth(n)!==a,[m,n,a]),A=ed.useMemo(()=>{let e=m.startOfMonth(m.setMonth(n,a));return h?m.isSameDay(n,m.startOfWeek(e)):m.isSameDay(n,e)},[a,n,h,m]),T=ed.useMemo(()=>{let e=m.endOfMonth(m.setMonth(n,a));return h?m.isSameDay(n,m.endOfWeek(e)):m.isSameDay(n,e)},[a,n,h,m]);return(0,ec.jsx)(w,(0,og.A)({},S,{day:n,disabled:C,autoFocus:s&&y,today:b,outsideCurrentMonth:M,isFirstVisibleCell:A,isLastVisibleCell:T,selected:x,tabIndex:y?0:-1,"aria-selected":x,"aria-current":b?"date":void 0}))}function Hf(e){let t,n=BR({props:e,name:"MuiDayCalendar"}),r=Bj().utils,{onFocusedDayChange:i,className:o,currentMonth:a,selectedDays:s,focusedDay:l,loading:u,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:d,readOnly:h,reduceAnimations:p,renderLoading:f=()=>(0,ec.jsx)("span",{children:"..."}),slideDirection:g,TransitionProps:m,disablePast:v,disableFuture:y,minDate:x,maxDate:b,shouldDisableDate:w,shouldDisableMonth:_,shouldDisableYear:S,dayOfWeekFormatter:C=e=>r.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:A,gridLabelId:T,displayWeekNumber:I,fixedWeekNumber:k,autoFocus:D,timezone:O}=n,P=BV(O),R=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Ht,t)})(n),E=(0,pR.I)(),L=VB({shouldDisableDate:w,shouldDisableMonth:_,shouldDisableYear:S,minDate:x,maxDate:b,disablePast:v,disableFuture:y,timezone:O}),N=Bj().localeText,[z,F]=(0,jB.A)({name:"DayCalendar",state:"hasFocus",controlled:M,default:D??!1}),[B,j]=ed.useState(()=>l||P),V=(0,jF.A)(e=>{h||c(e)}),H=e=>{L(e)||(i(e),j(e),A?.(!0),F(!0))},W=(0,jF.A)((e,t)=>{switch(e.key){case"ArrowUp":H(r.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":H(r.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{let n=r.addDays(t,E?1:-1),i=r.addMonths(t,E?1:-1);H(BW({utils:r,date:n,minDate:E?n:r.startOfMonth(i),maxDate:E?r.endOfMonth(i):n,isDateDisabled:L,timezone:O})||n),e.preventDefault();break}case"ArrowRight":{let n=r.addDays(t,E?-1:1),i=r.addMonths(t,E?-1:1);H(BW({utils:r,date:n,minDate:E?r.startOfMonth(i):n,maxDate:E?n:r.endOfMonth(i),isDateDisabled:L,timezone:O})||n),e.preventDefault();break}case"Home":H(r.startOfWeek(t)),e.preventDefault();break;case"End":H(r.endOfWeek(t)),e.preventDefault();break;case"PageUp":H(r.addMonths(t,1)),e.preventDefault();break;case"PageDown":H(r.addMonths(t,-1)),e.preventDefault()}}),G=(0,jF.A)((e,t)=>H(t)),$=(0,jF.A)((e,t)=>{z&&r.isSameDay(B,t)&&A?.(!1)}),U=r.getMonth(a),Z=r.getYear(a),Y=ed.useMemo(()=>s.filter(e=>!!e).map(e=>r.startOfDay(e)),[r,s]),X=`${Z}-${U}`,q=ed.useMemo(()=>ed.createRef(),[X]),K=ed.useMemo(()=>{let e=r.startOfMonth(a),t=r.endOfMonth(a);return L(B)||r.isAfterDay(B,t)||r.isBeforeDay(B,e)?BW({utils:r,date:B,minDate:e,maxDate:t,disablePast:v,disableFuture:y,isDateDisabled:L,timezone:O}):B},[a,y,v,B,L,r,O]),Q=ed.useMemo(()=>{let e=r.getWeekArray(a),t=r.addMonths(a,1);for(;k&&e.length<k;){let n=r.getWeekArray(t),i=r.isSameDay(e[e.length-1][0],n[0][0]);n.slice(+!!i).forEach(t=>{e.length<k&&e.push(t)}),t=r.addMonths(t,1)}return e},[a,k,r]);return(0,ec.jsxs)(Hi,{role:"grid","aria-labelledby":T,className:R.root,children:[(0,ec.jsxs)(Ho,{role:"row",className:R.header,children:[I&&(0,ec.jsx)(Hs,{variant:"caption",role:"columnheader","aria-label":N.calendarWeekNumberHeaderLabel,className:R.weekNumberLabel,children:N.calendarWeekNumberHeaderText}),(t=r.startOfWeek(P),[0,1,2,3,4,5,6].map(e=>r.addDays(t,e))).map((e,t)=>(0,ec.jsx)(Ha,{variant:"caption",role:"columnheader","aria-label":r.format(e,"weekday"),className:R.weekDayLabel,children:C(e)},t.toString()))]}),u?(0,ec.jsx)(Hu,{className:R.loadingContainer,children:f()}):(0,ec.jsx)(Hc,(0,og.A)({transKey:X,onExited:d,reduceAnimations:p,slideDirection:g,className:(0,ep.A)(o,R.slideTransition)},m,{nodeRef:q,children:(0,ec.jsx)(Hd,{ref:q,role:"rowgroup",className:R.monthContainer,children:Q.map((e,t)=>(0,ec.jsxs)(Hh,{role:"row",className:R.weekContainer,"aria-rowindex":t+1,children:[I&&(0,ec.jsx)(Hl,{className:R.weekNumber,role:"rowheader","aria-label":N.calendarWeekNumberAriaLabelText(r.getWeekNumber(e[0])),children:N.calendarWeekNumberText(r.getWeekNumber(e[0]))}),e.map((e,t)=>(0,ec.jsx)(Hp,{parentProps:n,day:e,selectedDays:Y,focusableDay:K,onKeyDown:W,onFocus:G,onBlur:$,onDaySelect:V,isDateDisabled:L,currentMonthNumber:U,isViewFocused:z,"aria-colindex":t+1},e.toString()))]},`week-${e[0]}`))})}))]})}function Hg(e){return(0,eS.Ay)("MuiPickersMonth",e)}let Hm=(0,e_.A)("MuiPickersMonth",["root","monthButton","disabled","selected"]),Hv=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Hy=(0,ey.A)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),Hx=(0,ey.A)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${Hm.disabled}`]:t.disabled},{[`&.${Hm.selected}`]:t.selected}]})(({theme:e})=>(0,og.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eg.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eg.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Hm.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Hm.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Hb=ed.memo(function(e){let t=BR({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:d,onBlur:h,"aria-current":p,"aria-label":f,slots:g,slotProps:m}=t,v=(0,Bk.A)(t,Hv),y=ed.useRef(null),x=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,ef.A)({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},Hg,r)})(t);(0,jW.A)(()=>{n&&y.current?.focus()},[n]);let b=g?.monthButton??Hx,w=(0,jk.A)({elementType:b,externalSlotProps:m?.monthButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:y,type:"button",role:"radio","aria-current":p,"aria-checked":a,"aria-label":f,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>d(e,s),onBlur:e=>h(e,s)},ownerState:t,className:x.monthButton});return(0,ec.jsx)(Hy,(0,og.A)({className:(0,ep.A)(x.root,r),ownerState:t},v,{children:(0,ec.jsx)(b,(0,og.A)({},w))}))});function Hw(e){return(0,eS.Ay)("MuiMonthCalendar",e)}(0,e_.A)("MuiMonthCalendar",["root"]);let H_=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],HS=(0,ey.A)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320,boxSizing:"border-box"}),HC=ed.forwardRef(function(e,t){let n,r,i,o=(n=Bj().utils,r=Bj().defaultDates,i=BR({props:e,name:"MuiMonthCalendar"}),(0,og.A)({disableFuture:!1,disablePast:!1},i,{minDate:BG(n,i.minDate,r.minDate),maxDate:BG(n,i.maxDate,r.maxDate)})),{className:a,value:s,defaultValue:l,referenceDate:u,disabled:c,disableFuture:d,disablePast:h,maxDate:p,minDate:f,onChange:g,shouldDisableMonth:m,readOnly:v,autoFocus:y=!1,onMonthFocus:x,hasFocus:b,onFocusedViewChange:w,monthsPerRow:_=3,timezone:S,gridLabelId:C,slots:M,slotProps:A}=o,T=(0,Bk.A)(o,H_),{value:I,handleValueChange:k,timezone:D}=Vc({name:"MonthCalendar",timezone:S,value:s,defaultValue:l,referenceDate:u,onChange:g,valueManager:VD}),O=BV(D),P=(0,pR.I)(),R=Bj().utils,E=ed.useMemo(()=>VD.getInitialReferenceValue({value:I,utils:R,props:o,timezone:D,referenceDate:u,granularity:Vd.month}),[]),L=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"]},Hw,t)})(o),N=ed.useMemo(()=>R.getMonth(O),[R,O]),z=ed.useMemo(()=>null!=I?R.getMonth(I):null,[I,R]),[F,B]=ed.useState(()=>z||R.getMonth(E)),[j,V]=(0,jB.A)({name:"MonthCalendar",state:"hasFocus",controlled:b,default:y??!1}),H=(0,jF.A)(e=>{V(e),w&&w(e)}),W=ed.useCallback(e=>{let t=R.startOfMonth(h&&R.isAfter(O,f)?O:f),n=R.startOfMonth(d&&R.isBefore(O,p)?O:p),r=R.startOfMonth(e);return!!(R.isBefore(r,t)||R.isAfter(r,n))||!!m&&m(r)},[d,h,p,f,O,m,R]),G=(0,jF.A)((e,t)=>{v||k(R.setMonth(I??E,t))}),$=(0,jF.A)(e=>{!W(R.setMonth(I??E,e))&&(B(e),H(!0),x&&x(e))});ed.useEffect(()=>{B(e=>null!==z&&e!==z?z:e)},[z]);let U=(0,jF.A)((e,t)=>{switch(e.key){case"ArrowUp":$((12+t-3)%12),e.preventDefault();break;case"ArrowDown":$((12+t+3)%12),e.preventDefault();break;case"ArrowLeft":$((12+t+(P?1:-1))%12),e.preventDefault();break;case"ArrowRight":$((12+t+(P?-1:1))%12),e.preventDefault()}}),Z=(0,jF.A)((e,t)=>{$(t)}),Y=(0,jF.A)((e,t)=>{F===t&&H(!1)});return(0,ec.jsx)(HS,(0,og.A)({ref:t,className:(0,ep.A)(L.root,a),ownerState:o,role:"radiogroup","aria-labelledby":C},T,{children:B$(R,I??E).map(e=>{let t=R.getMonth(e),n=R.format(e,"monthShort"),r=R.format(e,"month"),i=c||W(e);return(0,ec.jsx)(Hb,{selected:t===z,value:t,onClick:G,onKeyDown:U,autoFocus:j&&t===F,disabled:i,tabIndex:t!==F||i?-1:0,onFocus:Z,onBlur:Y,"aria-current":N===t?"date":void 0,"aria-label":r,monthsPerRow:_,slots:M,slotProps:A,children:n},n)})}))});function HM(e){return(0,eS.Ay)("MuiPickersYear",e)}let HA=(0,e_.A)("MuiPickersYear",["root","yearButton","selected","disabled"]),HT=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],HI=(0,ey.A)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Hk=(0,ey.A)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${HA.disabled}`]:t.disabled},{[`&.${HA.selected}`]:t.selected}]})(({theme:e})=>(0,og.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,eg.X4)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eg.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${HA.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${HA.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),HD=ed.memo(function(e){let t=BR({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:d,onBlur:h,"aria-current":p,slots:f,slotProps:g}=t,m=(0,Bk.A)(t,HT),v=ed.useRef(null),y=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,ef.A)({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},HM,r)})(t);(0,jW.A)(()=>{n&&v.current?.focus()},[n]);let x=f?.yearButton??Hk,b=(0,jk.A)({elementType:x,externalSlotProps:g?.yearButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:v,type:"button",role:"radio","aria-current":p,"aria-checked":a,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>d(e,s),onBlur:e=>h(e,s)},ownerState:t,className:y.yearButton});return(0,ec.jsx)(HI,(0,og.A)({className:(0,ep.A)(y.root,r),ownerState:t},m,{children:(0,ec.jsx)(x,(0,og.A)({},b))}))});function HO(e){return(0,eS.Ay)("MuiYearCalendar",e)}(0,e_.A)("MuiYearCalendar",["root"]);let HP=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],HR=(0,ey.A)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:280,boxSizing:"border-box",position:"relative"}),HE=ed.forwardRef(function(e,t){let n,r,i,o=(n=Bj().utils,r=Bj().defaultDates,i=BR({props:e,name:"MuiYearCalendar"}),(0,og.A)({disablePast:!1,disableFuture:!1},i,{yearsPerRow:i.yearsPerRow??3,minDate:BG(n,i.minDate,r.minDate),maxDate:BG(n,i.maxDate,r.maxDate)})),{autoFocus:a,className:s,value:l,defaultValue:u,referenceDate:c,disabled:d,disableFuture:h,disablePast:p,maxDate:f,minDate:g,onChange:m,readOnly:v,shouldDisableYear:y,onYearFocus:x,hasFocus:b,onFocusedViewChange:w,yearsOrder:_="asc",yearsPerRow:S,timezone:C,gridLabelId:M,slots:A,slotProps:T}=o,I=(0,Bk.A)(o,HP),{value:k,handleValueChange:D,timezone:O}=Vc({name:"YearCalendar",timezone:C,value:l,defaultValue:u,referenceDate:c,onChange:m,valueManager:VD}),P=BV(O),R=(0,pR.I)(),E=Bj().utils,L=ed.useMemo(()=>VD.getInitialReferenceValue({value:k,utils:E,props:o,timezone:O,referenceDate:c,granularity:Vd.year}),[]),N=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"]},HO,t)})(o),z=ed.useMemo(()=>E.getYear(P),[E,P]),F=ed.useMemo(()=>null!=k?E.getYear(k):null,[k,E]),[B,j]=ed.useState(()=>F||E.getYear(L)),[V,H]=(0,jB.A)({name:"YearCalendar",state:"hasFocus",controlled:b,default:a??!1}),W=(0,jF.A)(e=>{H(e),w&&w(e)}),G=ed.useCallback(e=>!!(p&&E.isBeforeYear(e,P)||h&&E.isAfterYear(e,P)||g&&E.isBeforeYear(e,g)||f&&E.isAfterYear(e,f))||!!y&&y(E.startOfYear(e)),[h,p,f,g,P,y,E]),$=(0,jF.A)((e,t)=>{v||D(E.setYear(k??L,t))}),U=(0,jF.A)(e=>{G(E.setYear(k??L,e))||(j(e),W(!0),x?.(e))});ed.useEffect(()=>{j(e=>null!==F&&e!==F?F:e)},[F]);let Z="desc"!==_?+S:-1*S,Y=R&&"asc"===_||!R&&"desc"===_?-1:1,X=(0,jF.A)((e,t)=>{switch(e.key){case"ArrowUp":U(t-Z),e.preventDefault();break;case"ArrowDown":U(t+Z),e.preventDefault();break;case"ArrowLeft":U(t-Y),e.preventDefault();break;case"ArrowRight":U(t+Y),e.preventDefault()}}),q=(0,jF.A)((e,t)=>{U(t)}),K=(0,jF.A)((e,t)=>{B===t&&W(!1)}),Q=ed.useRef(null),J=(0,V$.A)(t,Q);ed.useEffect(()=>{if(a||null===Q.current)return;let e=Q.current.querySelector('[tabindex="0"]');if(!e)return;let t=e.offsetHeight,n=e.offsetTop,r=Q.current.clientHeight,i=Q.current.scrollTop;t>r||n<i||(Q.current.scrollTop=n+t-r/2-t/2)},[a]);let ee=E.getYearRange([g,f]);return"desc"===_&&ee.reverse(),(0,ec.jsx)(HR,(0,og.A)({ref:J,className:(0,ep.A)(N.root,s),ownerState:o,role:"radiogroup","aria-labelledby":M},I,{children:ee.map(e=>{let t=E.getYear(e),n=d||G(e);return(0,ec.jsx)(HD,{selected:t===F,value:t,onClick:$,onKeyDown:X,autoFocus:V&&t===B,disabled:n,tabIndex:t!==B||n?-1:0,onFocus:q,onBlur:K,"aria-current":z===t?"date":void 0,yearsPerRow:S,slots:A,slotProps:T,children:E.format(e,"year")},E.format(e,"year"))})}))}),HL=e=>(0,eS.Ay)("MuiPickersCalendarHeader",e),HN=(0,e_.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Hz=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],HF=["ownerState"],HB=(0,ey.A)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Hj=(0,ey.A)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>(0,og.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),HV=(0,ey.A)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),HH=(0,ey.A)(eR.A,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${HN.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),HW=(0,ey.A)(BJ,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),HG=ed.forwardRef(function(e,t){let n=Bj().localeText,r=Bj().utils,i=BR({props:e,name:"MuiPickersCalendarHeader"}),{slots:o,slotProps:a,currentMonth:s,disabled:l,disableFuture:u,disablePast:c,maxDate:d,minDate:h,onMonthChange:p,onViewChange:f,view:g,reduceAnimations:m,views:v,labelId:y,className:x,timezone:b,format:w=`${r.formats.month} ${r.formats.year}`}=i,_=(0,Bk.A)(i,Hz),S=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},HL,t)})(i),C=o?.switchViewButton??HH,M=(0,jk.A)({elementType:C,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(g)},ownerState:i,className:S.switchViewButton}),A=o?.switchViewIcon??HW,T=(0,jk.A)({elementType:A,externalSlotProps:a?.switchViewIcon,ownerState:i,className:S.switchViewIcon}),I=(0,Bk.A)(T,HF),k=function(e,{disableFuture:t,maxDate:n,timezone:r}){let i=Bj().utils;return ed.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isBefore(o,n)?o:n);return!i.isAfter(a,e)},[t,n,e,i,r])}(s,{disableFuture:u,maxDate:d,timezone:b}),D=function(e,{disablePast:t,minDate:n,timezone:r}){let i=Bj().utils;return ed.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isAfter(o,n)?o:n);return!i.isBefore(a,e)},[t,n,e,i,r])}(s,{disablePast:c,minDate:h,timezone:b});if(1===v.length&&"year"===v[0])return null;let O=r.formatByString(s,w);return(0,ec.jsxs)(HB,(0,og.A)({},_,{ownerState:i,className:(0,ep.A)(S.root,x),ref:t,children:[(0,ec.jsxs)(Hj,{role:"presentation",onClick:()=>{if(1!==v.length&&f&&!l)if(2===v.length)f(v.find(e=>e!==g)||v[0]);else{let e=+(0===v.indexOf(g));f(v[e])}},ownerState:i,"aria-live":"polite",className:S.labelContainer,children:[(0,ec.jsx)(VG,{reduceAnimations:m,transKey:O,children:(0,ec.jsx)(HV,{id:y,ownerState:i,className:S.label,children:O})}),v.length>1&&!l&&(0,ec.jsx)(C,(0,og.A)({},M,{children:(0,ec.jsx)(A,(0,og.A)({},I))}))]}),(0,ec.jsx)(VV.A,{in:"day"===g,appear:!m,enter:!m,children:(0,ec.jsx)(jz,{slots:o,slotProps:a,onGoToPrevious:()=>p(r.addMonths(s,-1),"right"),isPreviousDisabled:D,previousLabel:n.previousMonth,onGoToNext:()=>p(r.addMonths(s,1),"left"),isNextDisabled:k,nextLabel:n.nextMonth})})]}))}),H$="u">typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),HU=H$&&H$[1]?parseInt(H$[1],10):null,HZ=H$&&H$[2]?parseInt(H$[2],10):null,HY=HU&&HU<10||HZ&&HZ<13||!1,HX=e=>(0,eS.Ay)("MuiDateCalendar",e);(0,e_.A)("MuiDateCalendar",["root","viewTransitionContainer"]);let Hq=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],HK=(0,ey.A)(jV,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),HQ=(0,ey.A)(VG,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),HJ=ed.forwardRef(function(e,t){let n,r,i,o,a=Bj().utils,s=(0,jI.A)(),l=(n=Bj().utils,r=Bj().defaultDates,i=(0,mn.A)("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||HY,o=BR({props:e,name:"MuiDateCalendar"}),(0,og.A)({},o,{loading:o.loading??!1,disablePast:o.disablePast??!1,disableFuture:o.disableFuture??!1,openTo:o.openTo??"day",views:o.views??["year","day"],reduceAnimations:o.reduceAnimations??i,renderLoading:o.renderLoading??(()=>(0,ec.jsx)("span",{children:"..."})),minDate:BG(n,o.minDate,r.minDate),maxDate:BG(n,o.maxDate,r.maxDate)})),{autoFocus:u,onViewChange:c,value:d,defaultValue:h,referenceDate:p,disableFuture:f,disablePast:g,onChange:m,onYearChange:v,onMonthChange:y,reduceAnimations:x,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:_,view:S,views:C,openTo:M,className:A,disabled:T,readOnly:I,minDate:k,maxDate:D,disableHighlightToday:O,focusedView:P,onFocusedViewChange:R,showDaysOutsideCurrentMonth:E,fixedWeekNumber:L,dayOfWeekFormatter:N,slots:z,slotProps:F,loading:B,renderLoading:j,displayWeekNumber:V,yearsOrder:H,yearsPerRow:W,monthsPerRow:G,timezone:$}=l,U=(0,Bk.A)(l,Hq),{value:Z,handleValueChange:Y,timezone:X}=Vc({name:"DateCalendar",timezone:$,value:d,defaultValue:h,referenceDate:p,onChange:m,valueManager:VD}),{view:q,setView:K,focusedView:Q,setFocusedView:J,goToNextView:ee,setValueAndGoToNextView:et}=jj({view:S,views:C,openTo:M,onChange:Y,onViewChange:c,autoFocus:u,focusedView:P,onFocusedViewChange:R}),{referenceDate:en,calendarState:er,changeFocusedDay:ei,changeMonth:eo,handleChangeMonth:ea,isDateDisabled:es,onMonthSwitchingAnimationEnd:el}=(e=>{let t,{value:n,referenceDate:r,disableFuture:i,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:s,minDate:l,onMonthChange:u,reduceAnimations:c,shouldDisableDate:d,timezone:h}=e,p=Bj().utils,f=ed.useRef((t=!!c,(e,n)=>{switch(n.type){case"changeMonth":return(0,og.A)({},e,{slideDirection:n.direction,currentMonth:n.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{let t=n.newTimezone;if(p.getTimezone(e.currentMonth)===t)return e;let r=p.setTimezone(e.currentMonth,t);return p.getMonth(r)!==p.getMonth(e.currentMonth)&&(r=p.setMonth(r,p.getMonth(e.currentMonth))),(0,og.A)({},e,{currentMonth:r})}case"finishMonthSwitchingAnimation":return(0,og.A)({},e,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=e.focusedDay&&null!=n.focusedDay&&p.isSameDay(n.focusedDay,e.focusedDay))return e;let r=null!=n.focusedDay&&!a&&!p.isSameMonth(e.currentMonth,n.focusedDay);return(0,og.A)({},e,{focusedDay:n.focusedDay,isMonthSwitchingAnimating:r&&!t&&!n.withoutMonthSwitchingAnimation,currentMonth:r?p.startOfMonth(n.focusedDay):e.currentMonth,slideDirection:null!=n.focusedDay&&p.isAfterDay(n.focusedDay,e.currentMonth)?"left":"right"})}default:throw Error("missing support")}})).current,g=ed.useMemo(()=>VD.getInitialReferenceValue({value:n,utils:p,timezone:h,props:e,referenceDate:r,granularity:Vd.day}),[r,h]),[m,v]=ed.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:g,currentMonth:p.startOfMonth(g),slideDirection:"left"});ed.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:p.getTimezone(g)})},[g,p]);let y=ed.useCallback(e=>{v((0,og.A)({type:"changeMonth"},e)),u&&u(e.newMonth)},[u]),x=ed.useCallback(e=>{p.isSameMonth(e,m.currentMonth)||y({newMonth:p.startOfMonth(e),direction:p.isAfterDay(e,m.currentMonth)?"left":"right"})},[m.currentMonth,y,p]),b=VB({shouldDisableDate:d,minDate:l,maxDate:s,disableFuture:i,disablePast:o,timezone:h}),w=ed.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:g,calendarState:m,changeMonth:x,changeFocusedDay:(0,jF.A)((e,t)=>{b(e)||v({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),isDateDisabled:b,onMonthSwitchingAnimationEnd:w,handleChangeMonth:y}})({value:Z,referenceDate:p,reduceAnimations:x,onMonthChange:y,minDate:k,maxDate:D,shouldDisableDate:b,disablePast:g,disableFuture:f,timezone:X}),eu=T&&Z||k,eh=T&&Z||D,eg=`${s}-grid-label`,em=null!==Q,ev=z?.calendarHeader??HG,ey=(0,jk.A)({elementType:ev,externalSlotProps:F?.calendarHeader,additionalProps:{views:C,view:q,currentMonth:er.currentMonth,onViewChange:K,onMonthChange:(e,t)=>ea({newMonth:e,direction:t}),minDate:eu,maxDate:eh,disabled:T,disablePast:g,disableFuture:f,reduceAnimations:x,timezone:X,labelId:eg},ownerState:l}),ex=(0,jF.A)(e=>{let t=a.startOfMonth(e),n=a.endOfMonth(e),r=es(e)?BW({utils:a,date:e,minDate:a.isBefore(k,t)?t:k,maxDate:a.isAfter(D,n)?n:D,disablePast:g,disableFuture:f,isDateDisabled:es,timezone:X}):e;r?(et(r,"finish"),y?.(t)):(ee(),eo(t)),ei(r,!0)}),eb=(0,jF.A)(e=>{let t=a.startOfYear(e),n=a.endOfYear(e),r=es(e)?BW({utils:a,date:e,minDate:a.isBefore(k,t)?t:k,maxDate:a.isAfter(D,n)?n:D,disablePast:g,disableFuture:f,isDateDisabled:es,timezone:X}):e;r?(et(r,"finish"),v?.(r)):(ee(),eo(t)),ei(r,!0)}),ew=(0,jF.A)(e=>e?Y(BH(a,e,Z??en),"finish",q):Y(e,"finish",q));ed.useEffect(()=>{null!=Z&&a.isValid(Z)&&eo(Z)},[Z]);let e_=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},HX,t)})(l),eS={disablePast:g,disableFuture:f,maxDate:D,minDate:k},eC={disableHighlightToday:O,readOnly:I,disabled:T,timezone:X,gridLabelId:eg,slots:z,slotProps:F},eM=ed.useRef(q);ed.useEffect(()=>{eM.current!==q&&(Q===eM.current&&J(q,!0),eM.current=q)},[Q,J,q]);let eA=ed.useMemo(()=>[Z],[Z]);return(0,ec.jsxs)(HK,(0,og.A)({ref:t,className:(0,ep.A)(e_.root,A),ownerState:l},U,{children:[(0,ec.jsx)(ev,(0,og.A)({},ey,{slots:z,slotProps:F})),(0,ec.jsx)(HQ,{reduceAnimations:x,className:e_.viewTransitionContainer,transKey:q,ownerState:l,children:(0,ec.jsxs)("div",{children:["year"===q&&(0,ec.jsx)(HE,(0,og.A)({},eS,eC,{value:Z,onChange:eb,shouldDisableYear:_,hasFocus:em,onFocusedViewChange:e=>J("year",e),yearsOrder:H,yearsPerRow:W,referenceDate:en})),"month"===q&&(0,ec.jsx)(HC,(0,og.A)({},eS,eC,{hasFocus:em,className:A,value:Z,onChange:ex,shouldDisableMonth:w,onFocusedViewChange:e=>J("month",e),monthsPerRow:G,referenceDate:en})),"day"===q&&(0,ec.jsx)(Hf,(0,og.A)({},er,eS,eC,{onMonthSwitchingAnimationEnd:el,onFocusedDayChange:ei,reduceAnimations:x,selectedDays:eA,onSelectedDaysChange:ew,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:_,hasFocus:em,onFocusedViewChange:e=>J("day",e),showDaysOutsideCurrentMonth:E,fixedWeekNumber:L,dayOfWeekFormatter:N,displayWeekNumber:V,loading:B,renderLoading:j}))]})})]}))}),H0=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:_,yearsPerRow:S,slots:C,slotProps:M,loading:A,renderLoading:T,disableHighlightToday:I,readOnly:k,disabled:D,showDaysOutsideCurrentMonth:O,dayOfWeekFormatter:P,sx:R,autoFocus:E,fixedWeekNumber:L,displayWeekNumber:N,timezone:z})=>(0,ec.jsx)(HJ,{view:e,onViewChange:t,views:n.filter(BX),focusedView:r&&BX(r)?r:null,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:_,yearsPerRow:S,slots:C,slotProps:M,loading:A,renderLoading:T,disableHighlightToday:I,readOnly:k,disabled:D,showDaysOutsideCurrentMonth:O,dayOfWeekFormatter:P,sx:R,autoFocus:E,fixedWeekNumber:L,displayWeekNumber:N,timezone:z});function H1(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,a=Bj(),s=ed.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:i,props:t}),u=n.valueManager.hasError(l);return ed.useEffect(()=>{o&&!n.valueManager.isSameError(l,s.current)&&o(l,r),s.current=l},[n,o,l,r]),{validationError:l,hasValidationError:u,getValidationErrorForNewValue:(0,jF.A)(e=>n({adapter:a,value:e,timezone:i,props:t}))}}let H2=["className","sx"],H5=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?H5(t.shadowRoot):t:null};function H3(){return"u"<typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function H4(e){return(0,eS.Ay)("MuiPickersLayout",e)}let H6=(0,e_.A)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),H9=["onAccept","onClear","onCancel","onSetToday","actions"];function H8(e){let{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:o}=e,a=(0,Bk.A)(e,H9),s=Bj().localeText;if(null==o||0===o.length)return null;let l=o?.map(e=>{switch(e){case"clear":return(0,ec.jsx)(eD.A,{onClick:n,children:s.clearButtonLabel},e);case"cancel":return(0,ec.jsx)(eD.A,{onClick:r,children:s.cancelButtonLabel},e);case"accept":return(0,ec.jsx)(eD.A,{onClick:t,children:s.okButtonLabel},e);case"today":return(0,ec.jsx)(eD.A,{onClick:i,children:s.todayButtonLabel},e);default:return null}});return(0,ec.jsx)(fY.A,(0,og.A)({},a,{children:l}))}var H7=n(76477),We=n(79223),Wt=n(6835);function Wn(e){return(0,eS.Ay)("MuiListItem",e)}function Wr(e){return(0,eS.Ay)("MuiListItemSecondaryAction",e)}(0,e_.A)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]),(0,e_.A)("MuiListItemSecondaryAction",["root","disableGutters"]);let Wi=(0,ey.A)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Wo=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...i}=n,o=ed.useContext(uy.A),a={...n,disableGutters:o.disableGutters},s=(e=>{let{disableGutters:t,classes:n}=e;return(0,ef.A)({root:["root",t&&"disableGutters"]},Wr,n)})(a);return(0,ec.jsx)(Wi,{className:(0,ep.A)(s.root,r),ownerState:a,ref:t,...i})});Wo.muiName="ListItemSecondaryAction";let Wa=(0,ey.A)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})((0,ex.A)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${ub.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),Ws=(0,ey.A)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Wl=ed.forwardRef(function(e,t){let n=(0,ew.b)({props:e,name:"MuiListItem"}),{alignItems:r="center",children:i,className:o,component:a,components:s={},componentsProps:l={},ContainerComponent:u="li",ContainerProps:{className:c,...d}={},dense:h=!1,disableGutters:p=!1,disablePadding:f=!1,divider:g=!1,secondaryAction:m,slotProps:v={},slots:y={},...x}=n,b=ed.useContext(uy.A),w=ed.useMemo(()=>({dense:h||b.dense||!1,alignItems:r,disableGutters:p}),[r,b.dense,h,p]),_=ed.useRef(null),S=ed.Children.toArray(i),C=S.length&&(0,Wt.A)(S[S.length-1],["ListItemSecondaryAction"]),M={...n,alignItems:r,dense:w.dense,disableGutters:p,disablePadding:f,divider:g,hasSecondaryAction:C},A=(e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:o,divider:a,hasSecondaryAction:s}=e;return(0,ef.A)({root:["root",r&&"dense",!i&&"gutters",!o&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Wn,n)})(M),T=(0,uv.A)(_,t),I=y.root||s.Root||Wa,k=v.root||l.root||{},D={className:(0,ep.A)(A.root,k.className,o),...x},O=a||"li";return C?(O=D.component||a?O:"div","li"===u&&("li"===O?O="div":"li"===D.component&&(D.component="div")),(0,ec.jsx)(uy.A.Provider,{value:w,children:(0,ec.jsxs)(Ws,{as:u,className:(0,ep.A)(A.container,c),ref:T,ownerState:M,...d,children:[(0,ec.jsx)(I,{...k,...!(0,We.A)(I)&&{as:O,ownerState:{...M,...k.ownerState}},...D,children:S}),S.pop()]})})):(0,ec.jsx)(uy.A.Provider,{value:w,children:(0,ec.jsxs)(I,{...k,as:O,ref:T,...!(0,We.A)(I)&&{ownerState:{...M,...k.ownerState}},...D,children:[S,m&&(0,ec.jsx)(Wo,{children:m})]})})});var Wu=n(47601);let Wc=["items","changeImportance","isLandscape","onChange","isValid"],Wd=["getValue"];function Wh(e){let{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,o=(0,Bk.A)(e,Wc);if(null==t||0===t.length)return null;let a=t.map(e=>{let{getValue:t}=e,o=(0,Bk.A)(e,Wd),a=t({isValid:i});return(0,og.A)({},o,{label:o.label,onClick:()=>{r(a,n,o)},disabled:!i(a)})});return(0,ec.jsx)(H7.A,(0,og.A)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:a.map(e=>(0,ec.jsx)(Wl,{children:(0,ec.jsx)(Wu.A,(0,og.A)({},e))},e.id??e.label))}))}let Wp=(0,ey.A)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${H6.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${H6.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${H6.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${H6.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${H6.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${H6.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${H6.shortcuts}`]:{gridColumn:3}}}]}),Wf=(0,ey.A)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Wg=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:o,actionBar:a,shortcuts:s}=(e=>{let{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:o,view:a,views:s,onViewChange:l,value:u,onChange:c,onSelectShortcut:d,isValid:h,isLandscape:p,disabled:f,readOnly:g,children:m,slots:v,slotProps:y}=e,x=(e=>{let{classes:t,isLandscape:n}=e;return(0,ef.A)({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},H4,t)})(e),b=v?.actionBar??H8,w=(0,jk.A)({elementType:b,externalSlotProps:y?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:o,actions:"desktop"===t?[]:["cancel","accept"]},className:x.actionBar,ownerState:(0,og.A)({},e,{wrapperVariant:t})}),_=(0,ec.jsx)(b,(0,og.A)({},w)),S=v?.toolbar,C=(0,jk.A)({elementType:S,externalSlotProps:y?.toolbar,additionalProps:{isLandscape:p,onChange:c,value:u,view:a,onViewChange:l,views:s,disabled:f,readOnly:g},className:x.toolbar,ownerState:(0,og.A)({},e,{wrapperVariant:t})}),M=null!==C.view&&S?(0,ec.jsx)(S,(0,og.A)({},C)):null,A=v?.tabs,T=a&&A?(0,ec.jsx)(A,(0,og.A)({view:a,onViewChange:l,className:x.tabs},y?.tabs)):null,I=v?.shortcuts??Wh,k=(0,jk.A)({elementType:I,externalSlotProps:y?.shortcuts,additionalProps:{isValid:h,isLandscape:p,onChange:d},className:x.shortcuts,ownerState:{isValid:h,isLandscape:p,onChange:d,wrapperVariant:t}});return{toolbar:M,content:m,tabs:T,actionBar:_,shortcuts:a&&I?(0,ec.jsx)(I,(0,og.A)({},k)):null}})(n),{sx:l,className:u,isLandscape:c,wrapperVariant:d}=n,h=(e=>{let{isLandscape:t,classes:n}=e;return(0,ef.A)({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},H4,n)})(n);return(0,ec.jsxs)(Wp,{ref:t,sx:l,className:(0,ep.A)(h.root,u),ownerState:n,children:[c?s:r,c?r:s,(0,ec.jsx)(Wf,{className:h.contentWrapper,children:"desktop"===d?(0,ec.jsxs)(ed.Fragment,{children:[i,o]}):(0,ec.jsxs)(ed.Fragment,{children:[o,i]})}),a]})}),Wm=["props","ref"],Wv=(0,ey.A)(Wg)(({theme:e})=>({overflow:"hidden",minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),Wy=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;let{minTime:i,maxTime:o,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:u,disableFuture:c}=r,d=e.utils.date(void 0,n),h=jy(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(i&&h(i,t)):return"minTime";case!!(o&&h(t,o)):return"maxTime";case!!(c&&e.utils.isAfter(t,d)):return"disableFuture";case!!(u&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}};Wy.valueManager=VD;let Wx=({adapter:e,value:t,timezone:n,props:r})=>{let i=VF({adapter:e,value:t,timezone:n,props:r});return null!==i?i:Wy({adapter:e,value:t,timezone:n,props:r})};Wx.valueManager=VD;let Wb=ed.forwardRef(function(e,t){let n,r,i,o,a,s=(n=Bj().utils,r=Bj().defaultDates,o=(i=BR({props:e,name:"MuiStaticDateTimePicker"})).ampm??n.is12HourCycleInCurrentLocale(),a=ed.useMemo(()=>i.localeText?.toolbarTitle==null?i.localeText:(0,og.A)({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle}),[i.localeText]),(0,og.A)({},i,(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i,o=n??r;if(null!=e)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}})({views:i.views,openTo:i.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:o,localeText:a,orientation:i.orientation??"portrait",disableIgnoringDatePartForTimeValidation:i.disableIgnoringDatePartForTimeValidation??!!(i.minDateTime||i.maxDateTime||i.disablePast||i.disableFuture),disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:BG(n,i.minDateTime??i.minDate,r.minDate),maxDate:BG(n,i.maxDateTime??i.maxDate,r.maxDate),minTime:i.minDateTime??i.minTime,maxTime:i.maxDateTime??i.maxTime,slots:(0,og.A)({toolbar:jT,tabs:B9},i.slots),slotProps:(0,og.A)({},i.slotProps,{toolbar:(0,og.A)({ampm:o},i.slotProps?.toolbar)})})),l=s.displayStaticWrapperAs??"mobile",u=s.ampmInClock??"desktop"===l,c=(0,og.A)({day:H0,month:H0,year:H0,hours:Vz,minutes:Vz,seconds:Vz},s.viewRenderers),{renderPicker:d}=(e=>{let{props:t,ref:n}=e,r=(0,Bk.A)(e,Wm),{localeText:i,slots:o,slotProps:a,className:s,sx:l,displayStaticWrapperAs:u,autoFocus:c}=t,{layoutProps:d,renderCurrentView:h}=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:i,validator:o,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{let u=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i})=>{let{onAccept:o,onChange:a,value:s,defaultValue:l,closeOnSelect:u="desktop"===r,timezone:c,referenceDate:d}=e,{current:h}=ed.useRef(l),{current:p}=ed.useRef(void 0!==s),[f,g]=ed.useState(c),m=Bj().utils,v=Bj(),{isOpen:y,setIsOpen:x}=(({open:e,onOpen:t,onClose:n})=>{let r=ed.useRef("boolean"==typeof e).current,[i,o]=ed.useState(!1);return ed.useEffect(()=>{if(r){if("boolean"!=typeof e)throw Error("You must not mix controlling and uncontrolled mode for `open` prop");o(e)}},[r,e]),{isOpen:i,setIsOpen:ed.useCallback(e=>{r||o(e),e&&t&&t(),!e&&n&&n()},[r,t,n])}})(e),{timezone:b,value:w,handleValueChange:_}=Vu({timezone:c,value:s,defaultValue:h,referenceDate:d,onChange:a,valueManager:t}),[S,C]=ed.useState(()=>{let e;return{draft:e=void 0!==w?w:void 0!==h?h:t.emptyValue,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),M=t.getTimezone(m,S.draft);f!==c&&(g(c),c&&M&&c!==M&&C(e=>(0,og.A)({},e,{draft:t.setTimezone(m,c,e.draft)})));let{getValidationErrorForNewValue:A}=H1({props:e,validator:i,timezone:b,value:S.draft,onError:e.onError}),T=(0,jF.A)(e=>{let n={action:e,dateState:S,hasChanged:n=>!t.areValuesEqual(m,e.value,n),isControlled:p,closeOnSelect:u},r=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i}=e,o=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!!(o&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!o||n(r.lastPublishedValue)))})(n),i=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i,closeOnSelect:o}=e,a=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!!(a&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&o?!!a||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(n),a=(e=>{let{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(n);C(t=>(0,og.A)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:i?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let s=null,l=()=>(s||(s={validationError:"setValueFromField"===e.name?e.context.validationError:A(e.value)},"setValueFromShortcut"===e.name&&(s.shortcut=e.shortcut)),s);r&&_(e.value,l()),i&&o&&o(e.value,l()),a&&x(!1)});if(S.lastControlledValue!==s){let e=t.areValuesEqual(m,S.draft,w);C(t=>(0,og.A)({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:w,lastPublishedValue:w,draft:w,hasBeenModifiedSinceMount:!0}))}let I=(0,jF.A)(()=>{T({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),k=(0,jF.A)(()=>{T({value:S.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),D=(0,jF.A)(()=>{T({value:S.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),O=(0,jF.A)(()=>{T({value:S.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),P=(0,jF.A)(()=>{T({value:t.getTodayValue(m,b,n),name:"setValueFromAction",pickerAction:"today"})}),R=(0,jF.A)(e=>{e.preventDefault(),x(!0)}),E=(0,jF.A)(e=>{e?.preventDefault(),x(!1)}),L=(0,jF.A)((e,t="partial")=>T({name:"setValueFromView",value:e,selectionState:t})),N=(0,jF.A)((e,t,n)=>T({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n})),z=(0,jF.A)((e,t)=>T({name:"setValueFromField",value:e,context:t})),F={onClear:I,onAccept:k,onDismiss:D,onCancel:O,onSetToday:P,onOpen:R,onClose:E},B={value:S.draft,onChange:z},j=ed.useMemo(()=>t.cleanValue(m,S.draft),[m,t,S.draft]),V=(0,og.A)({},F,{value:j,onChange:L,onSelectShortcut:N,isValid:n=>{let r=i({adapter:v,value:n,timezone:b,props:e});return!t.hasError(r)}}),H=ed.useMemo(()=>({onOpen:R,onClose:E,open:y}),[y,E,R]);return{open:y,fieldProps:B,viewProps:{value:j,onChange:L,onClose:E,open:y},layoutProps:V,actions:F,contextValue:H}})({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o}),c=(({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:i,fieldRef:o})=>{let{onChange:a,open:s,onClose:l}=t,{view:u,views:c,openTo:d,onViewChange:h,viewRenderers:p,timezone:f}=e,g=(0,Bk.A)(e,H2),{view:m,setView:v,defaultView:y,focusedView:x,setFocusedView:b,setValueAndGoToNextView:w}=jj({view:u,views:c,openTo:d,onChange:a,onViewChange:h,autoFocus:r}),{hasUIView:_,viewModeLookup:S}=ed.useMemo(()=>c.reduce((e,t)=>{let n;return n=null!=p[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e},{hasUIView:!1,viewModeLookup:{}}),[p,c]),C=ed.useMemo(()=>c.reduce((e,t)=>null!=p[t]&&jg(t)?e+1:e,0),[p,c]),M=S[m],A=(0,jF.A)(()=>"UI"===M),[T,I]=ed.useState("UI"===M?m:null);return T!==m&&"UI"===S[m]&&I(m),(0,jW.A)(()=>{"field"===M&&s&&(l(),setTimeout(()=>{o?.current?.setSelectedSections(m),o?.current?.focusField(m)}))},[m]),(0,jW.A)(()=>{if(!s)return;let e=m;"field"===M&&null!=T&&(e=T),e!==y&&"UI"===S[e]&&"UI"===S[y]&&(e=y),e!==m&&v(e),b(e,!0)},[s]),{hasUIView:_,shouldRestoreFocus:A,layoutProps:{views:c,view:T,onViewChange:v},renderCurrentView:()=>{if(null==T)return null;let e=p[T];if(null==e)return null;let r=(0,og.A)({},g,n,t,{views:c,timezone:f,onChange:w,view:T,onViewChange:v,focusedView:x,onFocusedViewChange:b,showViewSwitcher:C>1,timeViewsCount:C});return i?i(p,T,r):e(r)}}})({props:e,additionalViewProps:i,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),d=(({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{let{orientation:i}=e,o=((e,t)=>{var n;let[r,i]=ed.useState(H3);return(0,jW.A)(()=>{let e=()=>{i(H3())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),(Array.isArray(n=["hours","minutes","seconds"])?!n.every(t=>-1!==e.indexOf(t)):-1===e.indexOf(n))&&"landscape"===(t||r)})(n.views,i),a=(0,pR.I)();return{layoutProps:(0,og.A)({},n,t,{isLandscape:o,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),h=function(e){let{props:t,pickerValueResponse:n}=e;return ed.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:u.contextValue,ownerState:h}})((0,og.A)({},r,{props:t,autoFocusView:c??!1,additionalViewProps:{},wrapperVariant:u})),p=o?.layout??Wv;return{renderPicker:()=>(0,ec.jsx)(BN,{localeText:i,children:(0,ec.jsx)(p,(0,og.A)({},d,a?.layout,{slots:o,slotProps:a,sx:[...Array.isArray(l)?l:[l],...Array.isArray(a?.layout?.sx)?a.layout.sx:[a?.layout?.sx]],className:(0,ep.A)(s,a?.layout?.className),ref:n,children:h()}))})}})({props:(0,og.A)({},s,{viewRenderers:c,displayStaticWrapperAs:l,ampmInClock:u,yearsPerRow:s.yearsPerRow??("mobile"===l?3:4),slotProps:(0,og.A)({},s.slotProps,{tabs:(0,og.A)({hidden:"desktop"===l},s.slotProps?.tabs),toolbar:(0,og.A)({hidden:"desktop"===l,ampmInClock:u},s.slotProps?.toolbar)})}),valueManager:VD,valueType:"date-time",validator:Wx,ref:t});return d()});Wb.propTypes={ampm:BF().bool,ampmInClock:BF().bool,autoFocus:BF().bool,className:BF().string,dayOfWeekFormatter:BF().func,defaultValue:BF().object,disabled:BF().bool,disableFuture:BF().bool,disableHighlightToday:BF().bool,disableIgnoringDatePartForTimeValidation:BF().bool,disablePast:BF().bool,displayStaticWrapperAs:BF().oneOf(["desktop","mobile"]),displayWeekNumber:BF().bool,fixedWeekNumber:BF().number,loading:BF().bool,localeText:BF().object,maxDate:BF().object,maxDateTime:BF().object,maxTime:BF().object,minDate:BF().object,minDateTime:BF().object,minTime:BF().object,minutesStep:BF().number,monthsPerRow:BF().oneOf([3,4]),onAccept:BF().func,onChange:BF().func,onClose:BF().func,onError:BF().func,onMonthChange:BF().func,onViewChange:BF().func,onYearChange:BF().func,openTo:BF().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:BF().oneOf(["landscape","portrait"]),readOnly:BF().bool,reduceAnimations:BF().bool,referenceDate:BF().object,renderLoading:BF().func,shouldDisableDate:BF().func,shouldDisableMonth:BF().func,shouldDisableTime:BF().func,shouldDisableYear:BF().func,showDaysOutsideCurrentMonth:BF().bool,slotProps:BF().object,slots:BF().object,sx:BF().oneOfType([BF().arrayOf(BF().oneOfType([BF().func,BF().object,BF().bool])),BF().func,BF().object]),timezone:BF().string,value:BF().object,view:BF().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:BF().shape({day:BF().func,hours:BF().func,minutes:BF().func,month:BF().func,seconds:BF().func,year:BF().func}),views:BF().arrayOf(BF().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:BF().oneOf(["asc","desc"]),yearsPerRow:BF().oneOf([3,4])};let Ww=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:o,token:a,startSeparator:s})=>{if(""===a)throw Error("MUI X: Should not call `commitToken` with an empty token");let l=Vp(e,a),u=VC(e,l.contentType,l.type,a),c=n?u:"digit"===l.contentType,d=null!=t&&e.isValid(t),h=d?e.formatByString(t,a):"",p=null;if(c)if(u)p=""===h?e.formatByString(o,a).length:h.length;else{if(null==l.maxLength)throw Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(h=Vy(Vb(Vv(h,i),p),i))}return(0,og.A)({},l,{format:a,maxLength:p,value:h,placeholder:((e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}})(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},W_=e=>{let t=(({utils:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),(n-=1)<0)throw Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return i})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));let n=(({utils:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,o=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,"g"),a=null;for(;a=o.exec(t);)n.push({start:a.index,end:o.lastIndex-1});return n})((0,og.A)({},e,{expandedFormat:t})),r=(e=>{let{utils:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),o=[],a="",s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),l=/^([a-zA-Z]+)/,u=RegExp(`^(${s.join("|")})*$`),c=RegExp(`^(${s.join("|")})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),h=0;for(;h<n.length;){let t=d(h),r=null!=t,s=l.exec(n.slice(h))?.[1];if(!r&&null!=s&&u.test(s)){let t=s;for(;t.length>0;){let n=c.exec(t)[1];t=t.slice(n.length),o.push(Ww((0,og.A)({},e,{now:i,token:n,startSeparator:a}))),a=""}h+=s.length}else{let e=n[h];r&&t?.start===h||t?.end===h||(0===o.length?a+=e:o[o.length-1].endSeparator+=e),h+=1}}return 0===o.length&&a.length>0&&o.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),o})((0,og.A)({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`\u2069${r}\u2066`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}))((0,og.A)({},e,{sections:r}))},WS=e=>{let{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:i,onClick:o,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:d,applyCharacterEditing:h,resetCharacterQuery:p,setSelectedSections:f,parsedSelectedSections:g,state:m,clearActiveSection:v,clearValue:y,updateSectionValue:x,updateValueFromValueStr:b,sectionOrder:w,areAllSectionsEmpty:_,sectionsValueBoundaries:S}=e,C=ed.useRef(null),M=(0,V$.A)(r,C),A=Bj().localeText,T=Bj().utils,I=(0,jI.A)(),[k,D]=ed.useState(!1),O=ed.useMemo(()=>({syncSelectionToDOM:()=>{let e;if(!C.current)return;let t=document.getSelection();if(!t)return;if(null==g){t.rangeCount>0&&C.current.getRoot().contains(t.getRangeAt(0).startContainer)&&t.removeAllRanges(),k&&C.current.getRoot().blur();return}if(!C.current.getRoot().contains(H5(document)))return;let n=new window.Range;e="all"===g?C.current.getRoot():"empty"===m.sections[g].type?C.current.getSectionContainer(g):C.current.getSectionContent(g),n.selectNodeContents(e),e.focus(),t.removeAllRanges(),t.addRange(n)},getActiveSectionIndexFromDOM:()=>{let e=H5(document);return e&&C.current&&C.current.getRoot().contains(e)?C.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!C.current||null!=O.getActiveSectionIndexFromDOM())return;let t=VI(e,m.sections);D(!0),C.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!C.current)return;let t=VI(e,m.sections);D(null!==("all"===t?0:t)),f(e)},isFieldFocused:()=>{let e=H5(document);return!!C.current&&C.current.getRoot().contains(e)}}),[g,f,m.sections,k]),P=(0,jF.A)(e=>{if(!C.current)return;let t=m.sections[e];C.current.getSectionContent(e).innerHTML=t.value||t.placeholder,O.syncSelectionToDOM()}),R=(0,jF.A)((e,...t)=>{!e.isDefaultPrevented()&&C.current&&(D(!0),o?.(e,...t),"all"===g?setTimeout(()=>{let e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void f(w.startIndex);let t=0,n=0;for(;n<e&&t<m.sections.length;){let e=m.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}f(t-1)}):k?C.current.getRoot().contains(e.target)||f(w.startIndex):(D(!0),f(w.startIndex)))}),E=(0,jF.A)(e=>{if(s?.(e),!C.current||"all"!==g)return;let t=e.target.textContent??"";C.current.getRoot().innerHTML=m.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),O.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(p(),y(),f("all")):t.length>1?b(t):("all"===g&&f(0),h({keyPressed:t,sectionIndex:0}))}),L=(0,jF.A)(e=>{if(l?.(e),n||"all"!==g)return void e.preventDefault();let t=e.clipboardData.getData("text");e.preventDefault(),p(),b(t)}),N=(0,jF.A)((...e)=>{a?.(...e),k||!C.current||(D(!0),null==C.current.getSectionIndexFromDOMElement(H5(document))&&f(w.startIndex))}),z=(0,jF.A)((...e)=>{i?.(...e),setTimeout(()=>{if(!C.current)return;let e=H5(document);C.current.getRoot().contains(e)||(D(!1),f(null))})}),F=(0,jF.A)(e=>t=>{t.isDefaultPrevented()||f(e)}),B=(0,jF.A)(e=>{e.preventDefault()}),j=(0,jF.A)(e=>()=>{f(e)}),V=(0,jF.A)(e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;let r=m.sections[g],i=e.clipboardData.getData("text"),o=/^[a-zA-Z]+$/.test(i),a=/^[0-9]+$/.test(i),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(i);"letter"===r.contentType&&o||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&s?(p(),x({activeSection:r,newSectionValue:i,shouldGoToNextSection:!0})):o||a||(p(),b(i))}),H=(0,jF.A)(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),W=(0,jF.A)(e=>{if(!C.current)return;let t=e.target,r=t.textContent??"",i=C.current.getSectionIndexFromDOMElement(t),o=m.sections[i];if(n||!C.current)return void P(i);if(0===r.length){if(""===o.value)return void P(i);let t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void P(i):(p(),void v())}h({keyPressed:r,sectionIndex:i}),P(i)});(0,jW.A)(()=>{if(k&&C.current){if("all"===g)C.current.getRoot().focus();else if("number"==typeof g){let e=C.current.getSectionContent(g);e&&e.focus()}}},[g,k]);let G=ed.useMemo(()=>m.sections.reduce((e,t)=>(e[t.type]=S[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e),{}),[S,m.sections]),$="all"===g,U=ed.useMemo(()=>m.sections.map((e,r)=>{let i=!$&&!t&&!n;return{container:{"data-sectionindex":r,onClick:F(r)},content:{tabIndex:$||r>0?-1:0,contentEditable:!$&&!t&&!n,role:"spinbutton",id:`${I}-${e.type}`,"aria-labelledby":`${I}-${e.type}`,"aria-readonly":n,"aria-valuenow":((e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);if(n)return+(t.getHours(n)>=12);return}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}})(e,T),"aria-valuemin":G[e.type].minimum,"aria-valuemax":G[e.type].maximum,"aria-valuetext":e.value?((e,t)=>{if(e.value)switch(e.type){case"month":{if("digit"===e.contentType)return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");let n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return"digit"===e.contentType?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;default:return}})(e,T):A.empty,"aria-label":A[e.type],"aria-disabled":t,spellCheck:!i&&void 0,autoCapitalize:i?"off":void 0,autoCorrect:i?"off":void 0,[parseInt(ed.version,10)>=17?"enterKeyHint":"enterkeyhint"]:i?"next":void 0,children:e.value||e.placeholder,onInput:W,onPaste:V,onFocus:j(r),onDragOver:H,onMouseUp:B,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}),[m.sections,j,V,H,W,F,B,t,n,$,A,T,G,I]),Z=(0,jF.A)(e=>{b(e.target.value)}),Y=ed.useMemo(()=>_?"":d.getV7HiddenInputValueFromSections(m.sections),[_,m.sections,d]);return ed.useEffect(()=>{if(null==C.current)throw Error("MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`\nYou probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.\n\nIf you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:\n\n<DatePicker slots={{ textField: MyCustomTextField }} />\n\nLearn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element");c&&C.current&&C.current.getSectionContent(w.startIndex).focus()},[]),{interactions:O,returnedValue:{autoFocus:c,readOnly:n,focused:u??k,sectionListRef:M,onBlur:z,onClick:R,onFocus:N,onInput:E,onPaste:L,enableAccessibleFieldDOMStructure:!0,elements:U,tabIndex:0===g?-1:0,contentEditable:$,value:Y,onChange:Z,areAllSectionsEmpty:_}}},WC=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),WM=e=>{let t=(0,pR.I)(),n=ed.useRef(void 0),r=ed.useRef(void 0),{forwardedProps:{onFocus:i,onClick:o,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:d=!1},parsedSelectedSections:h,activeSectionIndex:p,state:f,fieldValueManager:g,valueManager:m,applyCharacterEditing:v,resetCharacterQuery:y,updateSectionValue:x,updateValueFromValueStr:b,clearActiveSection:w,clearValue:_,setTempAndroidValueStr:S,setSelectedSections:C,getSectionsFromValue:M,areAllSectionsEmpty:A,localizedDigits:T}=e,I=ed.useRef(null),k=(0,V$.A)(l,I),D=ed.useMemo(()=>((e,t,n)=>{let r=0,i=+!!n,o=[];for(let a=0;a<e.length;a+=1){let s=e[a],l=V_(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,c=WC(u).length,d=u.length,h=WC(l),p=i+(""===h?0:l.indexOf(h[0]))+s.startSeparator.length,f=p+h.length;o.push((0,og.A)({},s,{start:r,end:r+c,startInInput:p,endInInput:f})),r+=c,i+=d}return o})(f.sections,T,t),[f.sections,T,t]),O=ed.useMemo(()=>({syncSelectionToDOM:()=>{if(!I.current)return;if(null==h){I.current.scrollLeft&&(I.current.scrollLeft=0);return}if(I.current!==H5(document))return;let e=I.current.scrollTop;if("all"===h)I.current.select();else{let e=D[h],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;(t!==I.current.selectionStart||n!==I.current.selectionEnd)&&I.current===H5(document)&&I.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout(()=>{I.current&&I.current===H5(document)&&I.current.selectionStart===I.current.selectionEnd&&(I.current.selectionStart!==t||I.current.selectionEnd!==n)&&O.syncSelectionToDOM()})}I.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{let e=I.current.selectionStart??0,t=I.current.selectionEnd??0;if(0===e&&0===t)return null;let n=e<=D[0].startInInput?1:D.findIndex(t=>t.startInInput-t.startSeparator.length>e);return -1===n?D.length-1:n-1},focusField:(e=0)=>{H5(document)!==I.current&&(I.current?.focus(),C(e))},setSelectedSections:e=>C(e),isFieldFocused:()=>I.current===H5(document)}),[I,h,D,C]),P=()=>{let e,t=I.current.selectionStart??0;C(-1===(e=t<=D[0].startInInput||t>=D[D.length-1].endInInput?1:D.findIndex(e=>e.startInInput-e.startSeparator.length>t))?D.length-1:e-1)},R=(0,jF.A)((...e)=>{i?.(...e);let t=I.current;clearTimeout(n.current),n.current=setTimeout(()=>{t&&t===I.current&&null==p&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?C("all"):P())})}),E=(0,jF.A)((e,...t)=>{e.isDefaultPrevented()||(o?.(e,...t),P())}),L=(0,jF.A)(e=>{if(a?.(e),e.preventDefault(),c||d)return;let t=e.clipboardData.getData("text");if("number"==typeof h){let e=f.sections[h],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&i){y(),x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});return}if(n||r)return}y(),b(t)}),N=(0,jF.A)((...e)=>{s?.(...e),C(null)}),z=(0,jF.A)(e=>{let n;if(c)return;let r=e.target.value;if(""===r){y(),_();return}let i=e.nativeEvent.data,o=i&&i.length>1,a=o?i:r,s=WC(a);if("all"===h&&C(p),null==p||o)return void b(o?i:s);if("all"===h&&1===s.length)n=s;else{let e=WC(g.getV6InputValueFromSections(D,T,t)),r=-1,i=-1;for(let t=0;t<e.length;t+=1)-1===r&&e[t]!==s[t]&&(r=t),-1===i&&e[e.length-t-1]!==s[s.length-t-1]&&(i=t);let o=D[p];if(r<o.start||e.length-i-1>o.end)return;let a=s.length-e.length+o.end-WC(o.endSeparator||"").length;n=s.slice(o.start+WC(o.startSeparator||"").length,a)}if(0===n.length){navigator.userAgent.toLowerCase().includes("android")&&S(a),y(),w();return}v({keyPressed:n,sectionIndex:p})}),F=ed.useMemo(()=>void 0!==u?u:g.getV6InputValueFromSections(M(m.emptyValue),T,t),[u,g,M,m.emptyValue,T,t]),B=ed.useMemo(()=>f.tempValueStrAndroid??g.getV6InputValueFromSections(f.sections,T,t),[f.sections,g,f.tempValueStrAndroid,T,t]);return ed.useEffect(()=>(I.current&&I.current===H5(document)&&C("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]),{interactions:O,returnedValue:{readOnly:c,onBlur:N,onClick:E,onFocus:R,onPaste:L,inputRef:k,enableAccessibleFieldDOMStructure:!1,placeholder:F,inputMode:ed.useMemo(()=>null==p||"letter"===f.sections[p].contentType?"text":"numeric",[p,f.sections]),autoComplete:"off",value:!(I.current&&I.current===H5(document))&&A?"":B,onChange:z}}},WA=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],WT=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],WI=["minDateTime","maxDateTime"];[...WA,...WT,...WI];let Wk=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],WD=["clearable","onClear","InputProps","sx","slots","slotProps"],WO=["ownerState"];var WP=n(54227),WR=n(75472);function WE(e){return(0,eS.Ay)("MuiPickersTextField",e)}(0,e_.A)("MuiPickersTextField",["root","focused","disabled","error","required"]);var WL=n(42872);function WN(e){return(0,eS.Ay)("MuiPickersInputBase",e)}let Wz=(0,e_.A)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function WF(e){return(0,eS.Ay)("MuiPickersOutlinedInput",e)}let WB=(0,og.A)({},Wz,(0,e_.A)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Wj=["children","className","label","notched","shrink"],WV=(0,ey.A)("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),WH=(0,ey.A)("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),WW=(0,ey.A)("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function WG(e){let{className:t,label:n}=e,r=(0,Bk.A)(e,Wj),i=null!=n&&""!==n,o=(0,og.A)({},e,{withLabel:i});return(0,ec.jsx)(WV,(0,og.A)({"aria-hidden":!0,className:t},r,{ownerState:o,children:(0,ec.jsx)(WW,{ownerState:o,children:i?(0,ec.jsx)(WH,{children:n}):(0,ec.jsx)(WH,{className:"notranslate",children:"​"})})}))}var W$=n(85235);function WU(e){return(0,eS.Ay)("MuiPickersSectionList",e)}let WZ=(0,e_.A)("MuiPickersSectionList",["root","section","sectionContent"]),WY=["slots","slotProps","elements","sectionListRef"],WX=(0,ey.A)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Wq=(0,ey.A)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),WK=(0,ey.A)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),WQ=(0,ey.A)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"});function WJ(e){let{slots:t,slotProps:n,element:r,classes:i}=e,o=t?.section??Wq,a=(0,jk.A)({elementType:o,externalSlotProps:n?.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),s=t?.sectionContent??WQ,l=(0,jk.A)({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),u=t?.sectionSeparator??WK,c=(0,jk.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=(0,jk.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,ec.jsxs)(o,(0,og.A)({},a,{children:[(0,ec.jsx)(u,(0,og.A)({},c)),(0,ec.jsx)(s,(0,og.A)({},l)),(0,ec.jsx)(u,(0,og.A)({},d))]}))}let W0=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:o,sectionListRef:a}=n,s=(0,Bk.A)(n,WY),l=(e=>{let{classes:t}=e;return(0,ef.A)({root:["root"],section:["section"],sectionContent:["sectionContent"]},WU,t)})(n),u=ed.useRef(null),c=(0,V$.A)(t,u),d=e=>{if(!u.current)throw Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return u.current};ed.useImperativeHandle(a,()=>({getRoot:()=>d("getRoot"),getSectionContainer:e=>d("getSectionContainer").querySelector(`.${WZ.section}[data-sectionindex="${e}"]`),getSectionContent:e=>d("getSectionContent").querySelector(`.${WZ.section}[data-sectionindex="${e}"] .${WZ.sectionContent}`),getSectionIndexFromDOMElement(e){let t=d("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return(e.classList.contains(WZ.section)?n=e:e.classList.contains(WZ.sectionContent)&&(n=e.parentElement),null==n)?null:Number(n.dataset.sectionindex)}}));let h=r?.root??WX,p=(0,jk.A)({elementType:h,externalSlotProps:i?.root,externalForwardedProps:s,additionalProps:{ref:c,suppressContentEditableWarning:!0},className:l.root,ownerState:{}});return(0,ec.jsx)(h,(0,og.A)({},p,{children:p.contentEditable?o.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,ec.jsx)(ed.Fragment,{children:o.map((e,t)=>(0,ec.jsx)(WJ,{slots:r,slotProps:i,element:e,classes:l},t))})}))}),W1=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],W2=(0,ey.A)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>(0,og.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Math.round(.15/16*1e5)/1e5}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),W5=(0,ey.A)(WX,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:t,filled:n,label:r})=>!e&&!t&&!n&&null==r,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),W3=(0,ey.A)(Wq,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),W4=(0,ey.A)(WQ,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),W6=(0,ey.A)(WK,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),W9=(0,ey.A)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,og.A)({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),W8=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:a,id:s,endAdornment:l,startAdornment:u,renderSuffix:c,slots:d,slotProps:h,contentEditable:p,tabIndex:f,onInput:g,onPaste:m,onKeyDown:v,name:y,readOnly:x,inputProps:b,inputRef:w,sectionListRef:_}=n,S=(0,Bk.A)(n,W1),C=ed.useRef(null),M=(0,V$.A)(t,C),A=(0,V$.A)(b?.ref,w),T=(0,pR.I)(),I=(0,WL.A)();if(!I)throw Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");ed.useEffect(()=>{I&&I.setAdornedStart(!!u)},[I,u]),ed.useEffect(()=>{I&&(i?I.onEmpty():I.onFilled())},[I,i]);let k=(0,og.A)({},n,I,{isRtl:T}),D=(e=>{let{focused:t,disabled:n,error:r,classes:i,fullWidth:o,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",o&&"fullWidth",`color${(0,W$.A)(s)}`,"small"===l&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,ef.A)(d,WN,i)})(k),O=d?.root||W2,P=(0,jk.A)({elementType:O,externalSlotProps:h?.root,externalForwardedProps:S,additionalProps:{"aria-invalid":I.error,ref:M},className:D.root,ownerState:k}),R=d?.input||W5;return(0,ec.jsxs)(O,(0,og.A)({},P,{children:[u,(0,ec.jsx)(W0,{sectionListRef:_,elements:r,contentEditable:p,tabIndex:f,className:D.sectionsContainer,onFocus:e=>{I.disabled?e.stopPropagation():I.onFocus?.(e)},onBlur:I.onBlur,onInput:g,onPaste:m,onKeyDown:v,slots:{root:R,section:W3,sectionContent:W4,sectionSeparator:W6},slotProps:{root:{ownerState:k},sectionContent:{className:Wz.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?Wz.sectionBefore:Wz.sectionAfter})}}),l,c?c((0,og.A)({},I)):null,(0,ec.jsx)(W9,(0,og.A)({name:y,className:D.input,value:o,onChange:a,id:s,"aria-hidden":"true",tabIndex:-1,readOnly:x,required:I.required,disabled:I.disabled},b,{ref:A}))]}))}),W7=["label","autoFocus","ownerState","notched"],Ge=(0,ey.A)(W2,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${WB.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${WB.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${WB.focused} .${WB.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${WB.disabled}`]:{[`& .${WB.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${WB.error} .${WB.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t]?.main??!1).map(t=>({props:{color:t},style:{[`&.${WB.focused}:not(.${WB.error}) .${WB.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),Gt=(0,ey.A)(W5,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),Gn=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:o}=n,a=(0,Bk.A)(n,W7),s=(0,WL.A)(),l=(0,og.A)({},n,i,s,{color:s?.color||"primary"}),u=(e=>{let{classes:t}=e,n=(0,ef.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},WF,t);return(0,og.A)({},t,n)})(l);return(0,ec.jsx)(W8,(0,og.A)({slots:{root:Ge,input:Gt},renderSuffix:e=>(0,ec.jsx)(WG,{shrink:!!(o||e.adornedStart||e.focused||e.filled),notched:!!(o||e.adornedStart||e.focused||e.filled),className:u.notchedOutline,label:null!=r&&""!==r&&s?.required?(0,ec.jsxs)(ed.Fragment,{children:[r," ","*"]}):r,ownerState:l})},a,{label:r,classes:u,ref:t}))});Gn.muiName="Input";var Gr=n(57867);function Gi(e){return(0,eS.Ay)("MuiPickersFilledInput",e)}let Go=(0,og.A)({},Wz,(0,e_.A)("MuiPickersFilledInput",["root","underline","input"])),Ga=["label","autoFocus","disableUnderline","ownerState"],Gs=(0,ey.A)(W2,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,Gr.MC)(e)&&"disableUnderline"!==e})(({theme:e})=>{let t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${Go.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${Go.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Go.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Go.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)"}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Go.disabled}, .${Go.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Go.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}}),Gl=(0,ey.A)(W5,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Gu=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,Bk.A)(n,Ga),s=(0,WL.A)(),l=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,ef.A)({root:["root",!n&&"underline"],input:["input"]},Gi,t);return(0,og.A)({},t,r)})((0,og.A)({},n,o,s,{color:s?.color||"primary"}));return(0,ec.jsx)(W8,(0,og.A)({slots:{root:Gs,input:Gl},slotProps:{root:{disableUnderline:i}}},a,{label:r,classes:l,ref:t}))});function Gc(e){return(0,eS.Ay)("MuiPickersFilledInput",e)}Gu.muiName="Input";let Gd=(0,og.A)({},Wz,(0,e_.A)("MuiPickersInput",["root","input"])),Gh=["label","autoFocus","disableUnderline","ownerState"],Gp=(0,ey.A)(W2,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Gd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Gd.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Gd.disabled}, .${Gd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Gd.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Gf=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,Bk.A)(n,Gh),s=(0,WL.A)(),l=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,ef.A)({root:["root",!n&&"underline"],input:["input"]},Gc,t);return(0,og.A)({},t,r)})((0,og.A)({},n,o,s,{disableUnderline:i,color:s?.color||"primary"}));return(0,ec.jsx)(W8,(0,og.A)({slots:{root:Gp}},a,{label:r,classes:l,ref:t}))});Gf.muiName="Input";let Gg=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],Gm={standard:Gf,filled:Gu,outlined:Gn},Gv=(0,ey.A)(f1.A,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),Gy=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:o,color:a="primary",disabled:s=!1,error:l=!1,variant:u="outlined",required:c=!1,InputProps:d,inputProps:h,inputRef:p,sectionListRef:f,elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onPaste:b,onInput:w,endAdornment:_,startAdornment:S,tabIndex:C,contentEditable:M,focused:A,value:T,onChange:I,fullWidth:k,id:D,name:O,helperText:P,FormHelperTextProps:R,label:E,InputLabelProps:L}=n,N=(0,Bk.A)(n,Gg),z=ed.useRef(null),F=(0,V$.A)(t,z),B=(0,jI.A)(D),j=P&&B?`${B}-helper-text`:void 0,V=E&&B?`${B}-label`:void 0,H=(0,og.A)({},n,{color:a,disabled:s,error:l,focused:A,required:c,variant:u}),W=(e=>{let{focused:t,disabled:n,classes:r,required:i}=e;return(0,ef.A)({root:["root",t&&!n&&"focused",n&&"disabled",i&&"required"]},WE,r)})(H),G=Gm[u];return(0,ec.jsxs)(Gv,(0,og.A)({className:(0,ep.A)(W.root,o),ref:F,focused:A,onFocus:r,onBlur:i,disabled:s,variant:u,error:l,color:a,fullWidth:k,required:c,ownerState:H},N,{children:[(0,ec.jsx)(WP.A,(0,og.A)({htmlFor:B,id:V},L,{children:E})),(0,ec.jsx)(G,(0,og.A)({elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onInput:w,onPaste:b,endAdornment:_,startAdornment:S,tabIndex:C,contentEditable:M,value:T,onChange:I,id:B,fullWidth:k,inputProps:h,inputRef:p,sectionListRef:f,label:E,name:O,role:"group","aria-labelledby":V,"aria-describedby":j,"aria-live":j?"polite":void 0},d)),P&&(0,ec.jsx)(WR.A,(0,og.A)({id:j},R,{children:P}))]}))}),Gx=["enableAccessibleFieldDOMStructure"],Gb=["InputProps","readOnly"],Gw=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],G_=["slots","slotProps","InputProps","inputProps"],GS=ed.forwardRef(function(e,t){let n=BR({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:i,InputProps:o,inputProps:a}=n,s=(0,Bk.A)(n,G_),l=r?.textField??(e.enableAccessibleFieldDOMStructure?Gy:eE.A),u=(0,jk.A)({elementType:l,externalSlotProps:i?.textField,externalForwardedProps:s,ownerState:n,additionalProps:{ref:t}});u.inputProps=(0,og.A)({},a,u.inputProps),u.InputProps=(0,og.A)({},o,u.InputProps);let c=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,Bk.A)(e,Gx);if(t){let{InputProps:e,readOnly:t}=n,r=(0,Bk.A)(n,Gb);return(0,og.A)({},r,{InputProps:(0,og.A)({},e??{},{readOnly:t})})}let{onPaste:r,onKeyDown:i,inputMode:o,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,Bk.A)(n,Gw);return(0,og.A)({},c,{InputProps:(0,og.A)({},s??{},{readOnly:a}),inputProps:(0,og.A)({},l??{},{inputMode:o,onPaste:r,onKeyDown:i,ref:u})})})((e=>{let t,n,r,i,o,{forwardedProps:a,internalProps:s}=(t=Bj().utils,n=Bj().defaultDates,r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h,i=(0,og.A)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:BG(t,e.minDateTime??e.minDate,n.minDate),maxDate:BG(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),o="date-time",ed.useMemo(()=>{let e=(0,og.A)({},i),t={},n=n=>{e.hasOwnProperty(n)&&(t[n]=e[n],delete e[n])};return Wk.forEach(n),WA.forEach(n),WT.forEach(n),WI.forEach(n),{forwardedProps:e,internalProps:t}},[i,o]));return(e=>{let t=Bj().utils,{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:i,enableAccessibleFieldDOMStructure:o=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:d},fieldValueManager:h,valueManager:p,validator:f}=e,g=(0,pR.I)(),m=(e=>{let t=Bj().utils,n=Bj().localeText,r=Bj(),i=(0,pR.I)(),{valueManager:o,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:d,referenceDate:h,onChange:p,format:f,formatDensity:g="dense",selectedSections:m,onSelectedSectionsChange:v,shouldRespectLeadingZeros:y=!1,timezone:x,enableAccessibleFieldDOMStructure:b=!1}}=e,{timezone:w,value:_,handleValueChange:S}=Vu({timezone:x,value:c,defaultValue:d,referenceDate:h,onChange:p,valueManager:o}),C=ed.useMemo(()=>{let e;return e=t.date(void 0),"0"===t.formatByString(t.setSeconds(e,0),"s")?Vm:Array.from({length:10}).map((n,r)=>t.formatByString(t.setSeconds(e,r),"s"))},[t]),M=ed.useMemo(()=>((e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),o=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=B$(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:4===e.formatByString(e.date(void 0,"system"),t).length?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if("digit"===n){let n=Vf(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(o);return Vv(e.formatByString(e.endOfDay(r),n),t)!==i.toString()?{minimum:1,maximum:Number(Vv(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:i}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,C,w),[t,C,w]),A=ed.useCallback((e,r=null)=>a.getSectionsFromValue(t,e,r,e=>W_({utils:t,localeText:n,localizedDigits:C,format:f,date:e,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:i})),[a,f,n,C,i,y,t,g,b]),[T,I]=ed.useState(()=>{let e=A(_);VM(e,s);let n={sections:e,value:_,referenceValue:o.emptyValue,tempValueStrAndroid:null},r=Math.max(...e.map(e=>Vd[e.type]??1)),i=o.getInitialReferenceValue({referenceDate:h,value:_,utils:t,props:u,granularity:r,timezone:w});return(0,og.A)({},n,{referenceValue:i})}),[k,D]=(0,jB.A)({controlled:m,default:null,name:"useField",state:"selectedSections"}),O=e=>{D(e),v?.(e)},P=ed.useMemo(()=>VI(k,T.sections),[k,T.sections]),R="all"===P?0:P,E=({value:e,referenceValue:n,sections:i})=>{if(I(t=>(0,og.A)({},t,{sections:i,value:e,referenceValue:n,tempValueStrAndroid:null})),o.areValuesEqual(t,T.value,e))return;let a={validationError:l({adapter:r,value:e,timezone:w,props:u})};S(e,a)},L=(e,t)=>{let n=[...T.sections];return n[e]=(0,og.A)({},n[e],{value:t,modified:!0}),n};return ed.useEffect(()=>{let e=A(T.value);VM(e,s),I(t=>(0,og.A)({},t,{sections:e}))},[f,t.locale,i]),ed.useEffect(()=>{o.areValuesEqual(t,T.value,_)&&o.getTimezone(t,T.value)===o.getTimezone(t,_)||I(e=>(0,og.A)({},e,{value:_,referenceValue:a.updateReferenceValue(t,_,e.referenceValue),sections:A(_)}))},[_]),{state:T,activeSectionIndex:R,parsedSelectedSections:P,setSelectedSections:O,clearValue:()=>{E({value:o.emptyValue,referenceValue:T.referenceValue,sections:A(o.emptyValue)})},clearActiveSection:()=>{if(null==R)return;let e=T.sections[R],n=a.getActiveDateManager(t,T,e),r=n.getSections(T.sections).filter(e=>""!==e.value).length===+(""!==e.value),i=L(R,""),o=r?null:t.getInvalidDate(),s=n.getNewValuesFromNewActiveDate(o);E((0,og.A)({},s,{sections:i}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{let i,o;r&&R<T.sections.length-1&&O(R+1);let s=a.getActiveDateManager(t,T,e),l=L(R,n),u=s.getSections(l),c=((e,t,n)=>{let r=t.some(e=>"day"===e.type),i=[],o=[];for(let e=0;e<t.length;e+=1){let a=t[e];r&&"weekDay"===a.type||(i.push(a.format),o.push(V_(a,"non-input",n)))}let a=i.join(" "),s=o.join(" ");return e.parse(s,a)})(t,u,C);if(null!=c&&t.isValid(c)){let e=VT(t,c,u,s.referenceDate,!0);i=s.getNewValuesFromNewActiveDate(e),o=!0}else i=s.getNewValuesFromNewActiveDate(c),o=(null!=c&&!t.isValid(c))!=(null!=s.date&&!t.isValid(s.date));return o?E((0,og.A)({},i,{sections:l})):I(e=>(0,og.A)({},e,i,{sections:l,tempValueStrAndroid:null}))},updateValueFromValueStr:e=>{let r=a.parseValueStr(e,T.referenceValue,(e,r)=>{let o=t.parse(e,f);if(null==o||!t.isValid(o))return null;let a=W_({utils:t,localeText:n,localizedDigits:C,format:f,date:o,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:i});return VT(t,o,a,r,!1)}),o=a.updateReferenceValue(t,r,T.referenceValue);E({value:r,referenceValue:o,sections:A(r,T.sections)})},setTempAndroidValueStr:e=>I(t=>(0,og.A)({},t,{tempValueStrAndroid:e})),getSectionsFromValue:A,sectionsValueBoundaries:M,localizedDigits:C,timezone:w}})(e),{state:v,activeSectionIndex:y,parsedSelectedSections:x,setSelectedSections:b,clearValue:w,clearActiveSection:_,updateSectionValue:S,setTempAndroidValueStr:C,sectionsValueBoundaries:M,localizedDigits:A,timezone:T}=m,I=(({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:i,timezone:o})=>{let a=Bj().utils,[s,l]=ed.useState(null),u=(0,jF.A)(()=>l(null));ed.useEffect(()=>{null!=s&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),ed.useEffect(()=>{if(null!=s){let e=setTimeout(()=>u(),5e3);return()=>{clearTimeout(e)}}return()=>{}},[s,u]);let c=({keyPressed:t,sectionIndex:n},r,i)=>{let o=t.toLowerCase(),a=e[n];if(null!=s&&(!i||i(s.value))&&s.sectionIndex===n){let e=`${s.value}${o}`,t=r(e,a);if(null==t.saveQuery)return l({sectionIndex:n,value:e,sectionType:a.type}),t}let c=r(o,a);return null==c.saveQuery||c.saveQuery?(l({sectionIndex:n,value:o,sectionType:a.type}),null!=c.saveQuery?null:c):(u(),null)};return{applyCharacterEditing:(0,jF.A)(s=>{var l;let u,d,h,p=e[s.sectionIndex],f=Vx(s.keyPressed,r)?(l=(0,og.A)({},s,{keyPressed:Vy(s.keyPressed,r)}),u=(e,t)=>{let i=Vv(e,r),o=Number(i),s=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(o>s.maximum)return{saveQuery:!1};if(o<s.minimum)return{saveQuery:!0};let l=10*o>s.maximum||i.length===s.maximum.toString().length;return{sectionValue:Vw(a,o,s,r,t),shouldGoToNextSection:l}},c(l,(e,t)=>{if("digit"===t.contentType||"digit-with-letter"===t.contentType)return u(e,t);if("month"===t.type){let n=VC(a,"digit","month","MM"),r=u(e,{type:t.type,format:"MM",hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(null!=r.saveQuery)return r;let i=VS(a,r.sectionValue,"MM",t.format);return(0,og.A)({},r,{sectionValue:i})}if("weekDay"===t.type){let n=u(e,t);if(null!=n.saveQuery)return n;let r=Vf(a,t.format)[Number(n.sectionValue)-1];return(0,og.A)({},n,{sectionValue:r})}return{saveQuery:!1}},e=>Vx(e,r))):(d=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},h=(e,t,n,r)=>{let i=e=>Vg(a,o,t.type,e);if("letter"===t.contentType)return d(t.format,i(t.format),e);if(n&&null!=r&&"letter"===Vp(a,n).contentType){let t=i(n),o=d(n,t,e);return null!=o.saveQuery?{saveQuery:!1}:(0,og.A)({},o,{sectionValue:r(o.sectionValue,t)})}return{saveQuery:!1}},c(s,(e,t)=>{switch(t.type){case"month":return h(e,t,a.formats.month,e=>VS(a,e,a.formats.month,t.format));case"weekDay":return h(e,t,a.formats.weekday,(e,t)=>t.indexOf(e).toString());case"meridiem":return h(e,t);default:return{saveQuery:!1}}}));null==f?i(null):t({activeSection:p,newSectionValue:f.sectionValue,shouldGoToNextSection:f.shouldGoToNextSection})}),resetCharacterQuery:u}})({sections:v.sections,updateSectionValue:S,sectionsValueBoundaries:M,localizedDigits:A,setTempAndroidValueStr:C,timezone:T}),{resetCharacterQuery:k}=I,D=p.areValuesEqual(t,v.value,p.emptyValue),O=o?WS:WM,P=ed.useMemo(()=>((e,t)=>{let n={};if(!t)return e.forEach((t,r)=>{let i=r===e.length-1?null:r+1;n[r]={leftIndex:0===r?null:r-1,rightIndex:i}}),{neighbors:n,startIndex:0,endIndex:e.length-1};let r={},i={},o=0,a=0,s=e.length-1;for(;s>=0;){-1===(a=e.findIndex((e,t)=>t>=o&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator))&&(a=e.length-1);for(let e=a;e>=o;e-=1)i[e]=s,r[s]=e,s-=1;o=a+1}return e.forEach((t,o)=>{let a=i[o],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[o]={leftIndex:s,rightIndex:l}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(v.sections,g&&!o),[v.sections,g,o]),{returnedValue:R,interactions:E}=O((0,og.A)({},e,m,I,{areAllSectionsEmpty:D,sectionOrder:P})),L=(0,jF.A)(e=>{if(l?.(e),!a)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),b("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==x)b(P.startIndex);else if("all"===x)b(P.endIndex);else{let e=P.neighbors[x].rightIndex;null!==e&&b(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)b(P.endIndex);else if("all"===x)b(P.startIndex);else{let e=P.neighbors[x].leftIndex;null!==e&&b(e)}break;case"Delete"===e.key:if(e.preventDefault(),s)break;null==x||"all"===x?w():_(),k();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),s||null==y)break;"all"===x&&b(y);let n=v.sections[y],r=h.getActiveDateManager(t,v,n),o=((e,t,n,r,i,o,a,s)=>{let l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return -1;case"PageUp":return 5;case"PageDown":return -5;default:return 0}})(r),u="Home"===r,c="End"===r,d=""===n.value||u||c;if("digit"===n.contentType||"digit-with-letter"===n.contentType){let r,h=i[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1;if(d){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);r=l>0||u?h.minimum:h.maximum}else r=parseInt(Vv(n.value,o),10)+l*p;return(r%p!=0&&((l<0||u)&&(r+=p-(p+r)%p),(l>0||c)&&(r-=r%p)),r>h.maximum)?Vw(e,h.minimum+(r-h.maximum-1)%(h.maximum-h.minimum+1),h,o,n):r<h.minimum?Vw(e,h.maximum-(h.minimum-r-1)%(h.maximum-h.minimum+1),h,o,n):Vw(e,r,h,o,n)}let h=Vg(e,t,n.type,n.format);if(0===h.length)return n.value;if(d)return l>0||u?h[0]:h[h.length-1];let p=((h.indexOf(n.value)+l)%h.length+h.length)%h.length;return h[p]})(t,T,n,e.key,M,A,r.date,{minutesStep:i});S({activeSection:n,newSectionValue:o,shouldGoToNextSection:!1})}}});(0,jW.A)(()=>{E.syncSelectionToDOM()});let{hasValidationError:N}=H1({props:n,validator:f,timezone:T,value:v.value,onError:n.onError}),z=ed.useMemo(()=>void 0!==u?u:N,[N,u]);ed.useEffect(()=>{z||null!=y||k()},[v.referenceValue,y,z]),ed.useEffect(()=>{null!=v.tempValueStrAndroid&&null!=y&&(k(),_())},[v.sections]),ed.useImperativeHandle(r,()=>({getSections:()=>v.sections,getActiveSectionIndex:E.getActiveSectionIndexFromDOM,setSelectedSections:E.setSelectedSections,focusField:E.focusField,isFieldFocused:E.isFieldFocused}));let F={onKeyDown:L,onClear:(0,jF.A)((e,...t)=>{e.preventDefault(),d?.(e,...t),w(),E.isFieldFocused()?b(P.startIndex):E.focusField(0)}),error:z,clearable:!!(c&&!D&&!s&&!a)};return(0,og.A)({},e.forwardedProps,F,{disabled:a,readOnly:s},R)})({forwardedProps:a,internalProps:s,valueManager:VD,fieldValueManager:VO,validator:Wx,valueType:"date-time"})})(u)),d=(e=>{let t=Bj().localeText,{clearable:n,onClear:r,InputProps:i,sx:o,slots:a,slotProps:s}=e,l=(0,Bk.A)(e,WD),u=a?.clearButton??eR.A,c=(0,jk.A)({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=(0,Bk.A)(c,WO),h=a?.clearIcon??B3,p=(0,jk.A)({elementType:h,externalSlotProps:s?.clearIcon,ownerState:{}});return(0,og.A)({},l,{InputProps:(0,og.A)({},i,{endAdornment:(0,ec.jsxs)(ed.Fragment,{children:[n&&(0,ec.jsx)(fb.A,{position:"end",sx:{marginRight:i?.endAdornment?-1:-1.5},children:(0,ec.jsx)(u,(0,og.A)({},d,{onClick:r,children:(0,ec.jsx)(h,(0,og.A)({fontSize:"small"},p))}))}),i?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(o)?o:[o]]})})((0,og.A)({},c,{slots:r,slotProps:i}));return(0,ec.jsx)(l,(0,og.A)({},d))});var GC=n(65130),GM=n(43628),GA=n(47196),GT=n(54266),GI=n(54708),Gk=n(38086),GD=n(16299),GO=n(85910),GP=n(44766),GR=n(65043),GE=n(72710),GL=n(96962),GN=n(47918),Gz=n(54354),GF=n(8151),GB=n(91733),Gj=n(99042),GV=n(89321),GH=n(51148),GW=n(55578),GG=n(18463),G$=n(54752),GU=n(36163),GZ=n(28850),GY=n(45350),GX=n(67619),Gq=n(39270),GK=n(56756),GQ=n(268),GJ=n(12282),G0=n(41042),G1=n(38267),G2=n(47025),G5=n(30118),G3=n(84253),G4=n(98608),G6=n(8643),G9=n(18109),G8=n(19681),G7=n(73206),$e=n(53819),$t=n(96058),$n=n(682),$r=n(67671);let $i={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},$o={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class $a{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=$i,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=e=>void 0===e?new Date:null===e?null:new Date(e),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=e=>e,this.toJsDate=e=>e,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,this.longFormatters[t])(e,this.locale.formatLong):e}).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;const{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=(0,og.A)({},$o,n),this.longFormatters=r,this.lib=i||"date-fns"}}class $s extends $a{constructor({locale:e,formats:t}={}){super({locale:e??$r.c,formats:t,longFormatters:GE.m}),this.parse=(e,t)=>""===e?null:(0,GJ.qg)(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&(0,GQ.f)(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>(0,GL.GP)(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&(0,GZ.n)(e,t),this.isSameYear=(e,t)=>(0,GX.s)(e,t),this.isSameMonth=(e,t)=>(0,Gq.t)(e,t),this.isSameDay=(e,t)=>(0,GY.r)(e,t),this.isSameHour=(e,t)=>(0,GK.l)(e,t),this.isAfter=(e,t)=>(0,G$.d)(e,t),this.isAfterYear=(e,t)=>(0,G$.d)(e,(0,GR.Q)(t)),this.isAfterDay=(e,t)=>(0,G$.d)(e,(0,GO.D)(t)),this.isBefore=(e,t)=>(0,GU.Y)(e,t),this.isBeforeYear=(e,t)=>(0,GU.Y)(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>(0,GU.Y)(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>(0,$n.v)(e,{start:t,end:n}),this.startOfYear=e=>(0,$t.D)(e),this.startOfMonth=e=>(0,G8.w)(e),this.startOfWeek=e=>(0,$e.k)(e,{locale:this.locale}),this.startOfDay=e=>(0,G9.o)(e),this.endOfYear=e=>(0,GR.Q)(e),this.endOfMonth=e=>(0,G7.p)(e),this.endOfWeek=e=>(0,GP.$)(e,{locale:this.locale}),this.endOfDay=e=>(0,GO.D)(e),this.addYears=(e,t)=>(0,GD.e)(e,t),this.addMonths=(e,t)=>(0,Gk.P)(e,t),this.addWeeks=(e,t)=>(0,GI.J)(e,t),this.addDays=(e,t)=>(0,GC.f)(e,t),this.addHours=(e,t)=>(0,GT.L)(e,t),this.addMinutes=(e,t)=>(0,GA.z)(e,t),this.addSeconds=(e,t)=>(0,GM.p)(e,t),this.getYear=e=>(0,GG.C)(e),this.getMonth=e=>(0,Gj.t)(e),this.getDate=e=>(0,GN.p)(e),this.getHours=e=>(0,GF.q)(e),this.getMinutes=e=>(0,GB.O)(e),this.getSeconds=e=>(0,GV.S)(e),this.getMilliseconds=e=>(0,GH.D)(e),this.setYear=(e,t)=>(0,G6.i)(e,t),this.setMonth=(e,t)=>(0,G5.Z)(e,t),this.setDate=(e,t)=>(0,G0.X)(e,t),this.setHours=(e,t)=>(0,G1.a)(e,t),this.setMinutes=(e,t)=>(0,G2.g)(e,t),this.setSeconds=(e,t)=>(0,G3.g)(e,t),this.setMilliseconds=(e,t)=>(0,G4.$)(e,t),this.getDaysInMonth=e=>(0,Gz.P)(e),this.getWeekArray=e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,o=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);o[e]=o[e]||[],o[e].push(i),i=this.addDays(i,1),r+=1}return o},this.getWeekNumber=e=>(0,GW.N)(e,{locale:this.locale}),this.getYearRange=([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],o=n;for(;this.isBefore(o,r);)i.push(o),o=this.addYears(o,1);return i}}}let $l="yyyy-MM-dd HH:mm:ss";function $u(e,t){let n,r;return e?(0,nR.bB)(e)?e.pastDuration:(n=i4(e.start,$l,t),r=i4(e.end,$l,t),`${n} - ${r}`):"Custom Time Range"}let $c=({initialTimeRange:e,onChange:t,onCancel:n,timeZone:r})=>{let i=["local","browser"].includes(r.toLowerCase())?Intl.DateTimeFormat().resolvedOptions().timeZone:r,[o,a]=(0,ed.useState)(e),[s,l]=(0,ed.useState)(!0),u=(e,t)=>{a(n=>({...n,[t]:e}))},c=e=>{u(e,"start")},d=e=>{u(e,"end")},h=()=>{var e,t;let n={start:o.start,end:o.end};if(e=n.start,t=n.end,(0,nE.isValid)(e)&&(0,nE.isValid)(t)?!!(0,nE.isBefore)(e,t)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return n};return(0,ec.jsx)(BN,{dateAdapter:$s,children:(0,ec.jsxs)(eP.A,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[s&&(0,ec.jsxs)(ud.A,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,ec.jsx)(fc.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,ec.jsx)(Wb,{timezone:i,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new i5(o.start,i),onChange:e=>{null!==e&&c(e)},onAccept:()=>{l(!1)}})]}),!s&&(0,ec.jsxs)(ud.A,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,ec.jsx)(fc.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,ec.jsx)(Wb,{timezone:i,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new i5(o.end,i),minDateTime:new i5(o.start,i),onChange:e=>{null!==e&&d(e)},onAccept:e=>{null!==e&&(l(!0),d(e))}})]}),(0,ec.jsxs)(eP.A,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,ec.jsx)(Fz.ErrorBoundary,{FallbackComponent:FN,children:(0,ec.jsx)(GS,{"data-testid":"start_time_input",timezone:i,label:"Start Time",value:new i5(o.start,i),onChange:e=>{e&&c(e)},onBlur:()=>h(),format:$l})}),(0,ec.jsx)(Fz.ErrorBoundary,{FallbackComponent:FN,children:(0,ec.jsx)(GS,{"data-testid":"end_time_input",timezone:i,label:"End Time",value:new i5(o.end,i),onChange:e=>{e&&d(e)},onBlur:()=>h(),format:$l})})]}),(0,ec.jsxs)(eP.A,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,ec.jsx)(eD.A,{variant:"contained",onClick:()=>{let e;(e=h())&&t(e)},fullWidth:!0,children:"Apply"}),(0,ec.jsx)(eD.A,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function $d({value:e,timeOptions:t,onChange:n,height:r,showCustomTimeRange:i=!0,timeZone:o,timeZoneOptions:a,onTimeZoneChange:s}){let l,{timeZone:u}=us(),c=o??u,d=(0,ed.useRef)(),[h,p]=(0,ed.useState)(!1),f=(0,ed.useMemo)(()=>(0,nR.bB)(e)?(0,nR.b5)(e):e,[e]),g=(0,ed.useMemo)(()=>{var t;return{value:t=(0,nR.bB)(e)?void 0:e,display:$u(t,c)}},[e,c]),[m,v]=(0,ed.useState)(!1),y=a??nN(),[x,b]=(0,ed.useState)(null),w=y.find(e=>e.value===c)?.display??c,_=i6(c),S=i6("local"),C=y.map(e=>({id:e.value,label:e.display}));{let e=y.find(e=>e.value===c);e&&(l={id:e.value,label:e.display})}return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(ti.Ay,{anchorEl:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:!!x,onClose:()=>b(null),sx:e=>({padding:e.spacing(1)}),children:(0,ec.jsx)(ud.A,{sx:{p:1,minWidth:260},onClick:e=>{e.stopPropagation()},children:(0,ec.jsx)(gr,{options:C,value:l,onChange:(e,t)=>{if(t){let e=y.find(e=>e.value===t.id);e&&s?.(e)}b(null)},disableClearable:!0,renderInput:e=>(0,ec.jsx)(eE.A,{...e,placeholder:"Search timezones",size:"small"})})})}),(0,ec.jsx)(ti.Ay,{anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:h,onClose:()=>p(!1),sx:e=>({padding:e.spacing(2)}),children:(0,ec.jsx)($c,{initialTimeRange:f,onChange:e=>{n(e),p(!1),v(!1)},onCancel:()=>p(!1),timeZone:c})}),(0,ec.jsx)(ud.A,{ref:d,children:(0,ec.jsxs)(pI.A,{open:m,value:$u(e,c),onClick:()=>v(!m),IconComponent:BT,renderValue:()=>(0,ec.jsxs)(eP.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ec.jsx)("span",{children:t.find(t=>$u(t.value,c)===$u(e,c))?.display??$u(e,c)}),_!==S&&(0,ec.jsxs)(ud.A,{sx:{typography:"caption",color:"text.secondary"},children:["\xb7 ",_]})]}),inputProps:{"aria-label":`Select time range. Currently set to ${e}`},sx:{".MuiSelect-icon":{marginTop:"1px",transform:"none"},".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":{paddingRight:"36px"},".MuiSelect-select":r?{lineHeight:r,paddingY:0}:{}},children:[(0,ec.jsx)(pT.A,{disableRipple:!0,onClick:e=>{e.preventDefault(),e.stopPropagation()},sx:{cursor:"default","&:hover":{backgroundColor:"transparent"},py:.5,px:1},children:(0,ec.jsxs)(ud.A,{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[(0,ec.jsxs)(ud.A,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start"},children:[(0,ec.jsx)(ud.A,{sx:{typography:"subtitle1"},children:"Time Range"}),(0,ec.jsxs)(ud.A,{sx:{color:"text.secondary",typography:"caption",mt:.25},children:["Timezone: ",w]})]}),(0,ec.jsx)(ud.A,{sx:{display:"flex",alignItems:"center",pr:1,ml:1.5},children:(0,ec.jsx)(eR.A,{size:"small","aria-label":"Select timezone",onClick:e=>{e.preventDefault(),e.stopPropagation(),b(e.currentTarget)},children:(0,ec.jsx)(BI,{fontSize:"small"})})})]})}),t.map((e,t)=>(0,ec.jsx)(pT.A,{value:$u(e.value,c),onClick:()=>{n(e.value)},children:e.display},t)),i&&(0,ec.jsx)(pT.A,{value:$u(g.value,c),onClick:()=>p(!0),children:g.display})]})})]})}function $h({value:e,onChange:t,timeZoneOptions:n,variant:r="standard",heightPx:i,...o}){let a,s=(0,ed.useMemo)(()=>n??nN(),[n]);i&&(a="number"==typeof i?`${i}px`:i);let l=(0,ed.useMemo)(()=>({minWidth:"compact"===r?"80px":"150px",...a&&{lineHeight:a,paddingY:0},...o.sx}),[r,a,o.sx]);return(0,ec.jsx)(pI.A,{...o,value:e,onChange:(e,n)=>{var r;let i;r=e.target.value,(i=s.find(e=>e.value===r))&&t&&t(i)},sx:l,size:"compact"===r?"small":"medium",children:s.map(e=>(0,ec.jsx)(pT.A,{value:e.value,children:e.display},e.value))})}function $p(e){let{markerColor:t,sx:n}=e;return(0,ec.jsx)(ud.A,{sx:iS({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function $f(e){let{formattedY:t,markerColor:n,metricName:r,metricLabels:i}=e;return(0,ec.jsxs)(eP.A,{spacing:.5,children:[(0,ec.jsxs)(ud.A,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,ec.jsx)($p,{markerColor:n,sx:{marginTop:.25}}),(0,ec.jsxs)(ud.A,{component:"span",children:[r,(0,ec.jsx)(ud.A,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,ec.jsx)(fv.A,{sx:e=>({borderColor:e.palette.grey["500"]})}),(0,ec.jsx)(ud.A,{sx:e=>({color:e.palette.common.white}),children:i.map(e=>{if(e){let[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,ec.jsxs)(ud.A,{sx:{display:"flex",gap:"4px"},children:[(0,ec.jsx)(fc.A,{sx:{fontSize:"11px"},children:r}),(0,ec.jsx)(fc.A,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:i})]},e)}})})]})}let $g=375,$m=650,$v=650,$y=500,$x=.75,$b=8,$w=750,$_="nearby series showing in tooltip",$S="emphasized series showing as bold in tooltip",$C="#2E313E",$M=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),$A={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},$T=[],$I=()=>{let[e,t]=(0,ed.useState)(null);return(0,ed.useEffect)(()=>{let e=e=>t({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},[]),e},$k={wrapLabels:!0,enablePinning:!0},$D="Click chart to pin",$O="Click chart to unpin";function $P(e){let{seriesName:t,formattedY:n,markerColor:r,totalSeries:i,emphasizeText:o=!1,wrapLabels:a=!0}=e,s=t.split("{"),l=(s[1]??t).replace(/[{}]/g,"").split(",");if(1===i&&l.length>1){let e=s[0]?`${s[0]}:`:"value:";return(0,ec.jsx)($f,{formattedY:n,metricName:e,metricLabels:l,markerColor:r})}let u=t.replace(/[,]/g,", ");return(0,ec.jsxs)(ud.A,{sx:{display:"table-row",paddingTop:.5},children:[(0,ec.jsxs)(ud.A,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,ec.jsx)($p,{markerColor:r,sx:{marginTop:.5}}),(0,ec.jsx)(ud.A,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:$y,overflow:"hidden",color:e.palette.common.white,fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:a?"normal":"nowrap"}),"aria-label":o?$S:$_,children:u})]}),(0,ec.jsx)(ud.A,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}var $R=n(36961),$E=n(85180);function $L(e,t,n,r,i){if(null===e||(null!==t&&(e=t),void 0===e.plotCanvas.x))return;let o=n>0?n:$v,a=r>0?r:$m,s=e.page.x+32,l=e.page.y+16;if(i){let e=i.getBoundingClientRect();s=s-e.left+i.scrollLeft,l=l-e.top+i.scrollTop;let t=e.top+i.scrollHeight;l+o>t&&(l=Math.max(t-o-16,$b/2))}else l+o>window.innerHeight+window.scrollY&&(l=Math.max(window.innerHeight+window.scrollY-o-16,$b/2));return s+a>window.innerWidth&&(s=e.page.x-a-32),s<32&&(s=32),l<$b/2&&(l=$b/2),`translate3d(${s}px, ${l}px, 0)`}function $N(e,t,n){return{minWidth:$g,maxWidth:$m,maxHeight:(n?n-$b:void 0)??$v,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??$C,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"opacity 0.1s ease-out, visibility 0.1s ease-out",zIndex:null!==t?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}function $z(e,t){try{let n=t.convertToPixel("grid",[e,0]);return n?.[0]??null}catch{return null}}function $F(e,t,n,r){let i=n[e];if(!i)return t;let o=i.stack;if(!o)return t;let a=o.toString(),s=(r.get(a)??0)+t;return r.set(a,s),s}function $B(e,t,n){let r,i,o=t.indexOf(e);if(-1===o)return 20;let a=o>0?t[o-1]??null:null,s=o<t.length-1?t[o+1]??null:null,l=$z(e,n);if(null===l)return 20;if(null!==a&&null!==s){let e=$z(a,n)??l,t=$z(s,n)??l;r=(l+e)/2,i=(l+t)/2}else if(null!==a){let e=$z(a,n)??l;r=(l+e)/2,i=l+(l-r)}else{if(null===s)return 20;let e=$z(s,n)??l;i=(l+e)/2,r=l-(i-l)}return Math.max(1,i-r)}function $j(e,t,n,r){let i=t/Math.max(1,r),o=n-t/2+e*i;return{left:o,right:o+i}}function $V(e,t,n){try{let r=n.convertToPixel("grid",[0,e]),i=n.convertToPixel("grid",[0,t]);if(!r||!i||void 0===r[1]||void 0===i[1])return null;return{top:Math.min(i[1],r[1]),bottom:Math.max(i[1],r[1])}}catch{return null}}let $H=5.5,$W=30,$G=5;function $$(e,t,n,r,i,o,a,s,l){let u=n[0]??null,c=n[1]??null;if(null===u||null===c||void 0===i.dispatchAction||!Array.isArray(e))return $T;let d=iw(e[0]?.values,u);if(null===d)return $T;let h=null;if(void 0!==s){let e=i.convertToPixel("grid",[0,c]),t=i.convertToPixel("grid",[0,c+r]);e&&t&&void 0!==e[1]&&void 0!==t[1]&&(h=Math.abs(t[1]-e[1]))}let p=l??$z(d,i),f=function(e,t,n,r,i,o,a,s,l){let u=[],c=e.length,d=new Map,h=[],p=e[0]?.values;if(p&&p.length>0){let e=new Set;for(let[t]of p)e.has(t)||(e.add(t),h.push(t));h=h.sort((e,t)=>e-t)}let f=[];for(let e=0;e<c;e++)(t[e]?.type??"line")==="bar"&&f.push(e);let g=null,m=null;f.length>0&&null!==i&&(g=$B(n,h,l),m=$z(n,l));for(let h=0;h<c;h++){let c,p=t[h];if(!p)continue;let v=e[h];if(!v)continue;let y=v.values;if(!y||!Array.isArray(y))continue;let x=p.type??"line",b=p.name?p.name.toString():"",w=p.id?p.id.toString():"",_=(p.color??"#000").toString(),S=-1,C=0;for(let e=0;e<y.length;e++){let t=y[e];if(t&&t[0]===n){S=e,C=t[0],c=t[1];break}}if(-1===S||null==c)continue;let M=!1,A=c,T=1/0;if("line"===x)if(A=$F(h,c,t,d),void 0!==o&&null!==s)try{let e=l.convertToPixel({seriesIndex:h},[S,A]);if(e&&void 0!==e[1]){let t=Math.abs(o-e[1]);M=t<=s,T=t}else{let e=Math.abs(A-r);M=e<=a,T=e}}catch{let e=Math.abs(A-r);M=e<=a,T=e}else{let e=Math.abs(A-r);M=e<=a,T=e}else if("bar"===x){if(null===i||null===g||null===m)continue;let e=f.indexOf(h);if(-1===e)continue;let n=$j(e,g,m,f.length);if(!(i>=n.left&&i<=n.right))continue;let o=p.stack,a=!0;if(o){let e=o.toString(),n=$V(d.get(e)??0,A=$F(h,c,t,d),l);if(n){let e=l.convertToPixel("grid",[0,r]);e&&void 0!==e[1]&&(a=e[1]>=n.top&&e[1]<=n.bottom)}}else A=c;if(!a)continue;T=Math.abs(i-(n.left+n.right)/2),M=!0}M&&u.push({seriesIdx:h,datumIdx:S,seriesId:w,seriesName:b,date:n,markerColor:_,x:C,y:c,visualY:A,distance:T})}return u}(e,t,d,c,p,s,r,h,i),g=function(e){if(0===e.length)return null;let t=null;for(let n of e)(null===t||n.distance<t.distance)&&(t=n);return t}(f),m=new Set;for(let e of f)m.add(e.seriesIdx);let v=[];for(let t=0;t<e.length;t++)m.has(t)||v.push(t);return function(e,t,n,r,i,o){let a=[],s=[],l=[...o],u=[],c=[],d=new Map,h=[];for(let i of e){let e=r?.get(i.seriesId)??n,o=i.y,p=r3(o,e),f=null!==t&&i.seriesIdx===t.seriesIdx;if(f){s.push(i.seriesIdx);let e=d.get(o)??0;d.set(o,e+1),e>0&&c.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o}),u.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o})}else l.push(i.seriesIdx);h.push({seriesIdx:i.seriesIdx,datumIdx:i.datumIdx,seriesName:i.seriesName,date:i.date,x:i.x,y:o,formattedY:p,markerColor:i.markerColor,isClosestToCursor:f}),a.push(i.seriesIdx)}return ix(i,a,s,l,u,c),h}(f,g,o,a,i,v)}function $U(e,t,n,r,i){let o=[],a=t[0]??null,s=t[1]??null;if(null===a||null===s)return o;let l=[],u=[],c=[],d=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t<d;t++){let h=e.timeSeries[t];if(void 0===h||o.length>=1e3)break;let p=h.name?h.name.toString():"",f=h.color??"#000";if(Array.isArray(h.data))for(let g=0;g<h.data.length;g++){let m=e.xAxis[g]??0,v=h.data[g];if(null!=v&&a===g&&"-"!==v&&s<=v+n&&s>=v-n){let e=$Y({valueToCheck:s,baseValue:v,percentage:Math.max(d>$G?2:5,100/d)});e?u.push(t):(c.push(t),r?.dispatchAction!==void 0&&r.dispatchAction({type:"downplay",seriesIndex:t}));let n=m>0x174876e7ff?m:1e3*m,a=r3(v,i);o.push({seriesIdx:t,datumIdx:g,seriesName:p,date:n,x:m,y:v,formattedY:a,markerColor:f.toString(),isClosestToCursor:e}),l.push(t)}}}return r?.dispatchAction!==void 0&&(r.dispatchAction({type:"downplay",seriesIndex:c}),u.length>0?r.dispatchAction({type:"highlight",seriesIndex:u,notBlur:!1,escapeConnect:!0}):r.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),o}function $Z({mousePos:e,pinnedPos:t,data:n,seriesMapping:r,chart:i,format:o,seriesFormatMap:a,showAllSeries:s=!1}){if(void 0===i||null===e)return $T;let l=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&i.getDom()===e&&(l=!0)}}if(null!==t&&(e=t,l=!0),!1===l||null===n||void 0===i._model||void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return $T;let u=e.plotCanvas.y,c=e.plotCanvas.x,d=iy(c,u,i);if(null!==d){let e=i._model.getComponent("yAxis").axis.scale,t="log"===e.type,l=e._interval;if(t&&e.base){let t=e.base,n=e._extent,r=t**n[0];l=(t**n[1]-r)/100}let h=$X({yInterval:l,totalSeries:n.length,showAllSeries:s}),p=r.some(e=>void 0!==e.yAxisIndex&&e.yAxisIndex>0);return $$(n,r,d,h,i,o,a,p?u:void 0,c)}return $T}function $Y({valueToCheck:e,baseValue:t,percentage:n}){let r=n/100*t;return e>=t-r&&e<=t+r}function $X({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;let r=.3*e;return t>$G?Math.max(r,e*$W/t):Math.max(r,e*$H)}function $q(e){let{series:t,wrapLabels:n}=e,r=(0,ed.useMemo)(()=>null===t?null:t.sort((e,t)=>e.y>t.y?-1:1),[t]);return null===t||null===r?null:(0,ec.jsx)(ud.A,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:r.map(({datumIdx:e,seriesIdx:t,seriesName:i,y:o,formattedY:a,markerColor:s,isClosestToCursor:l})=>{if(null===e||null===t)return null;let u=t.toString()+e.toString();return(0,ec.jsx)($P,{seriesName:i,y:o,formattedY:a,markerColor:s,totalSeries:r.length,wrapLabels:n,emphasizeText:l},u)})})}var $K=n(68003),$Q=n(4491),$J=n(29917);let $0=(0,ed.memo)(function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:r,enablePinning:i=!0,onShowAllClick:o,onUnpinClick:a}){let s,l,u,{formatWithUserTimeZone:c}=us(),d=e[0]?.date??null;if(null===d)return null;let h=i&&t>5;return(0,ec.jsxs)(ud.A,{sx:e=>({width:"100%",maxWidth:$m,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??$C,position:"sticky",top:0,left:0}),children:[(0,ec.jsxs)(ud.A,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(l=c(s=new Date(d),"MMM dd, yyyy - "),u=c(s,"HH:mm:ss"),(0,ec.jsxs)(ud.A,{children:[(0,ec.jsx)(fc.A,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:l}),(0,ec.jsx)(fc.A,{variant:"caption",children:(0,ec.jsx)("strong",{children:u})})]})),(0,ec.jsxs)(eP.A,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[h&&(0,ec.jsxs)(eP.A,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,ec.jsx)(fc.A,{sx:{fontSize:11},children:"Show All"}),(0,ec.jsx)($K.A,{checked:r,size:"small",onChange:(e,t)=>{if(void 0!==o)return o(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),i&&(0,ec.jsxs)(eP.A,{direction:"row",alignItems:"center",children:[(0,ec.jsx)(fc.A,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:n?$O:$D}),n?(0,ec.jsx)($Q,{onClick:()=>{void 0!==a&&a()},sx:{fontSize:16,cursor:"pointer"}}):(0,ec.jsx)($J,{sx:{fontSize:16}})]})]})]}),(0,ec.jsx)(fv.A,{sx:e=>({width:"100%",borderColor:e.palette.grey["500"]})})]})}),$1=(0,ed.memo)(function({containerId:e,chartRef:t,data:n,seriesMapping:r,enablePinning:i=!0,wrapLabels:o,format:a,seriesFormatMap:s,onUnpinClick:l,pinnedPos:u}){let[c,d]=(0,ed.useState)(!1),h=(0,ed.useRef)(),p=(0,ed.useRef)(null),f=$I(),{height:g,width:m,ref:v}=(0,$E.A)(),y=null!==u&&i,x=(0,ed.useCallback)(e=>{p.current=e,v(e)},[v]),b=e?document.querySelector(e):void 0;if((0,ed.useLayoutEffect)(()=>{if(null===f)return;let e=p.current;if(!e)return;let t=e.getBoundingClientRect();if(0===t.height||0===t.width)return;let n=$L(f,u,t.height,t.width,b);n&&n!==h.current&&(h.current=n,e.style.transform=n)}),null===f||null===f.target||null===n||null===u&&"CANVAS"!==f.target.tagName)return null;let w=t.current,_=b?b.getBoundingClientRect().height:void 0;h.current=$L(f,u,g??0,m??0,b);let S=$Z({mousePos:f,data:n,seriesMapping:r,pinnedPos:u,chart:w,format:a,seriesFormatMap:s,showAllSeries:c});if(0===S.length)return null;let C=n.length;return(0,ec.jsx)($R.A,{container:b,children:(0,ec.jsx)(ud.A,{ref:x,sx:e=>$N(e,u,_),style:{transform:h.current},children:(0,ec.jsxs)(eP.A,{spacing:.5,children:[(0,ec.jsx)($0,{nearbySeries:S,totalSeries:C,enablePinning:i,isTooltipPinned:y,showAllSeries:c,onShowAllClick:e=>d(e),onUnpinClick:l}),(0,ec.jsx)($q,{series:S,wrapLabels:o})]})})})}),$2=(0,ey.A)(eD.A)(({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"})),$5=(0,ed.forwardRef)(function(e,t){return(0,ec.jsx)($2,{ref:t,variant:"outlined",color:"secondary",...e})}),$3=Object.entries(r5).map(([e,t])=>({...t,id:e,group:t.group||"Decimal"})).filter(e=>!e.disableSelectorOption);function $4({value:e,onChange:t,disabled:n=!1,...r}){let i=r5[e?.unit||"decimal"];return(0,ec.jsx)(gr,{value:{id:e?.unit||"decimal",...i},options:$3,groupBy:e=>e.group??"Decimal",onChange:(e,n)=>{null===n?t(void 0):t({unit:n.id})},disabled:n,disableClearable:!0,renderInput:({InputProps:e,...r})=>(0,ec.jsx)(eE.A,{...r,slotProps:{input:{...e,endAdornment:(0,ec.jsxs)(ec.Fragment,{children:[e.endAdornment,(0,ec.jsx)(fb.A,{position:"end",children:(0,ec.jsx)(eR.A,{size:"small","aria-label":"clear unit",onClick:()=>t(void 0),disabled:n,tabIndex:-1,children:(0,ec.jsx)(fS,{fontSize:"small"})})})]})}}}),...r})}let $6=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function $9({value:e,onChange:t,disabled:n=!1}){var r;let i=ii(e),o=io(e);return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(f8,{label:"Short values",control:(0,ec.jsx)($K.A,{checked:!!o&&nQ(e.shortValues),onChange:(n,r)=>{o&&t({...e,shortValues:r})},disabled:!o})}),(0,ec.jsx)(f8,{label:"Unit",control:(0,ec.jsx)($4,{value:e,onChange:e=>{t(e||{unit:"decimal"})},disabled:n})}),(0,ec.jsx)(f8,{label:"Decimals",control:(0,ec.jsx)(gr,{value:(r=e.decimalPlaces,$6.find(e=>e.decimalPlaces===r)),options:$6,getOptionLabel:e=>e.label,onChange:(n,r)=>(({decimalPlaces:n})=>{i&&t({...e,decimalPlaces:n})})(r),disabled:!i,disableClearable:!0})})]})}function $8({name:e,height:t}){return(0,ec.jsx)(ud.A,{style:{maxWidth:t,top:`calc(${t}px / 2)`},sx:{display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},children:(0,ec.jsx)(fc.A,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}var $7=n(9408);let Ue=ol((0,$7.A)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),Ut={chartsTheme:Ue,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null};var Un=n(52855);let Ur={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.error.dark,color:e.palette.error.light,[`& .${Un.A.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`& .${Un.A.icon}`]:{color:e.palette.error.main}},standardInfo:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.info.dark,color:e.palette.info.light,[`& .${Un.A.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`& .${Un.A.icon}`]:{color:e.palette.info.main}},standardSuccess:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.success.dark,color:e.palette.success.light,[`& .${Un.A.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`& .${Un.A.icon}`]:{color:e.palette.success.main}},standardWarning:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.warning.dark,color:e.palette.warning.light,[`& .${Un.A.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`& .${Un.A.icon}`]:{color:e.palette.warning.main}},root:{["& ."+n(82561).A.root]:{textDecoration:"underline"}}}},Ui={styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},Uo={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},Ua="#FFFFFF",Us={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},Ul={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},Uu={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},Uc={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},Ud={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},Uh=e=>"light"===e?{main:Uo["500"],dark:Uo["600"],light:Uo["50"]}:{main:Uo["400"],dark:Uo["800"],light:Uo["200"]},Up={fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:{fontSize:"1.5rem",fontWeight:600,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:600,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:600,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:400,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:400,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:400,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:600,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:400,lineHeight:"16px"}},Uf=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function Ug(e,t={},n=!1){var r,i;let o;return(0,$7.A)({palette:function(e){let t,n,r,i;return{mode:e,primary:Uh(e),secondary:"light"===e?{main:Us["600"],dark:Us["900"],light:Us["100"]}:{main:Ua,dark:Ua,light:Ua},grey:"light"===e?{50:Us["50"],100:Us["100"],200:Us["200"],300:Us["300"],400:Us["400"],500:Us["500"],600:Us["600"],700:Us["700"],800:Us["800"],900:Us["900"],950:Us["950"]}:{50:Us["950"],100:Us["900"],200:Us["800"],300:Us["700"],400:Us["600"],500:Us["500"],600:Us["400"],700:Us["300"],800:Us["200"],900:Us["100"],950:Us["50"]},background:(t=Uo["150"],n="rgba(21, 23, 33, 0.75)","light"===e?{navigation:t,overlay:n,default:Ua,paper:Us["50"],code:Us["50"],tooltip:Us["100"],lighter:Us["50"],border:Us["100"]}:{navigation:t,overlay:n,default:Us["900"],paper:Us["850"],code:Us["800"],tooltip:Us["600"],lighter:Us["700"],border:Us["600"]}),text:(r=Us["800"],i=Us["300"],"light"===e?{navigation:r,accent:i,primary:Us["800"],secondary:Us["700"],disabled:Us["300"],link:Uo["500"],linkHover:Uo["600"]}:{navigation:r,accent:i,primary:Ua,secondary:Us["50"],disabled:Us["600"],link:Uo["400"],linkHover:Uo["500"]}),error:"light"===e?{main:Ud["500"],dark:Ud["600"],light:Ud["50"]}:{main:Ud["400"],dark:Ud["800"],light:Ud["300"]},warning:"light"===e?{main:Uu["500"],dark:Uu["700"],light:Uu["50"]}:{main:Uu["400"],dark:Uu["800"],light:Uu["300"]},info:Uh(e),success:"light"===e?{main:Ul["500"],dark:Ul["700"],light:Ul["50"]}:{main:Ul["400"],dark:Ul["800"],light:Ul["300"]},common:{white:Ua,black:"#000000"},designSystem:{blue:Uo,green:Ul,grey:Us,orange:Uu,purple:Uc,red:Ud}}}(e),typography:Up,mixins:{},components:(r=e,i=n,o={MuiAlert:Ur,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:Ui,MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:Uf}},MuiDialog:{styleOverrides:{paper:Uf}},MuiPopover:{styleOverrides:{paper:Uf}}},i?o:{MuiCssBaseline:{styleOverrides:{body:{colorScheme:r}}},...o}),...t})}var Um=n(87275),Uv=n(11061),Uy=n(78536),Ux=n(1355);function Ub({value:e,onChange:t}){return(0,ec.jsxs)(eP.A,{direction:"row",children:[(0,ec.jsx)(gt.A,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,ec.jsx)(eE.A,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,ec.jsx)(Bl.A,{label:"Enabled",labelPlacement:"start",control:(0,ec.jsx)($K.A,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function Uw({value:e,onChange:t}){return(0,ec.jsxs)(eP.A,{direction:"row",gap:1,alignItems:"center",children:[(0,ec.jsx)(gt.A,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,ec.jsx)(eE.A,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,ec.jsx)(fk,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:e.spec.name??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,name:n}})},required:!0}),(0,ec.jsx)(Bl.A,{label:"Enabled",labelPlacement:"start",control:(0,ec.jsx)($K.A,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function U_({value:e,onChange:t}){return(0,ec.jsxs)(eP.A,{direction:"row",children:[(0,ec.jsx)(fk,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:e.spec.column??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,column:n}})},required:!0}),(0,ec.jsx)(Bl.A,{label:"Enabled",labelPlacement:"start",control:(0,ec.jsx)($K.A,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function US({value:e,onChange:t}){return(0,ec.jsx)(eP.A,{direction:"row",children:(0,ec.jsx)(Bl.A,{label:"Enabled",labelPlacement:"start",control:(0,ec.jsx)($K.A,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function UC({value:e,onChange:t,...n}){return(0,ec.jsxs)(eP.A,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,ec.jsxs)(fk,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,ec.jsx)(pT.A,{value:"JoinByColumnValue",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Join by column value"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,ec.jsx)(pT.A,{value:"MergeColumns",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Merge columns"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,ec.jsx)(pT.A,{value:"MergeIndexedColumns",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Merge indexed columns"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,ec.jsx)(pT.A,{value:"MergeSeries",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Merge series"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,ec.jsx)(Ub,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,ec.jsx)(Uw,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,ec.jsx)(U_,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,ec.jsx)(US,{value:e,onChange:t})]})}function UM({index:e,value:t,isCollapsed:n,onChange:r,onCollapse:i,onDelete:o,...a}){return(0,ec.jsxs)(eP.A,{...a,children:[(0,ec.jsxs)(eP.A,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,ec.jsxs)(eP.A,{direction:"row",gap:1,children:[(0,ec.jsx)(eR.A,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>i(!n),children:n?(0,ec.jsx)(Uv,{}):(0,ec.jsx)(Um,{})}),(0,ec.jsx)(fc.A,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,ec.jsx)("span",{children:(0,ec.jsx)("strong",{children:ic[t.kind]})}):(0,ec.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,ec.jsxs)(eP.A,{direction:"row",gap:1,children:[n&&(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(fw.A,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,ec.jsx)(eR.A,{size:"small",sx:{marginLeft:"auto"},onClick:function(){r({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,ec.jsx)(Uy,{}):(0,ec.jsx)(Ux,{})})}),(0,ec.jsx)(fv.A,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,ec.jsx)(fw.A,{title:"Remove transformation",placement:"top",children:(0,ec.jsx)(eR.A,{size:"small",sx:{marginLeft:"auto"},onClick:o,children:(0,ec.jsx)(BS,{})})})]})]}),!n&&(0,ec.jsx)(UC,{value:t,onChange:r})]})}function UA({value:e,onChange:t,...n}){let[r,i]=(0,ed.useState)(e.map(()=>!0));return(0,ec.jsxs)(eP.A,{gap:1,...n,children:[e.map((n,o)=>(0,ec.jsx)(UM,{index:o,value:n,isCollapsed:r[o]??!0,onChange:n=>{let r;(r=[...e])[o]=n,t(r)},onDelete:()=>{let n;(n=[...e]).splice(o,1),t(n),i(e=>(e.splice(o,1),[...e]))},onCollapse:e=>{i(t=>(t[o]=e,[...t]))}},o)),(0,ec.jsx)(eD.A,{variant:"contained",startIcon:(0,ec.jsx)(B_,{}),sx:{marginTop:1},onClick:function(){let n=[...e];n.push({kind:"",spec:{}}),t(n),i(e=>(e.push(!1),[...e]))},children:"Add Transformation"})]})}function UT(e){let{value:t,onChange:n,timeOptions:r,height:i}=e,o=(0,ed.useMemo)(()=>{if(t&&!r.some(e=>e.value.pastDuration===t))return(0,ec.jsx)(pT.A,{value:t,children:t})},[r,t]);return(0,ec.jsx)(f1.A,{children:(0,ec.jsx)(ud.A,{children:(0,ec.jsxs)(pI.A,{id:"refreshInterval",value:t,onChange:e=>{n(e.target.value)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[r.map((e,t)=>(0,ec.jsx)(pT.A,{value:e.value.pastDuration,children:e.display},t)),o]})})})}function UI({repeatItems:e,maxPer:t,gap:n,renderItem:r,containerSx:i,rowSx:o}){let{rows:a,perRow:s}=(0,ed.useMemo)(()=>{let n=Math.max(1,t),r=[];for(let t=0;t<e.length;t+=n)r.push(e.slice(t,t+n));return{rows:r,perRow:n}},[t,e]);return(0,ec.jsx)(ud.A,{sx:[{display:"flex",flexDirection:"column",width:"100%",height:"100%",gap:`${n}px`},...Array.isArray(i)?i:[i]],children:a.map((e,t)=>(0,ec.jsx)(ud.A,{sx:[{display:"flex",gap:`${n}px`},...Array.isArray(o)?o:[o]],children:e.map((e,i)=>(0,ec.jsx)(ud.A,{sx:{width:`calc((100% - ${n*(s-1)}px) / ${s})`,overflow:"hidden"},children:r(e,{rowIndex:t,colIndex:i})},`${t}-${i}`))},t))})}var Uk=n(54381);let UD=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,ec.jsx)(eP.A,{gap:1,direction:"row",...n,children:(0,ec.jsx)(eE.A,{label:"Value",placeholder:"Exact value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{...e.spec,value:n.target.value}}),fullWidth:!0})});case"Range":return(0,ec.jsxs)(eP.A,{gap:1,direction:"row",...n,children:[(0,ec.jsx)(eE.A,{label:"From",placeholder:"Start of range",value:e.spec?.from??"",onChange:n=>t({...e,spec:{...e.spec,from:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0}),(0,ec.jsx)(eE.A,{label:"To",placeholder:"End of range (inclusive)",value:e.spec?.to??"",onChange:n=>t({...e,spec:{...e.spec,to:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0})]});case"Regex":return(0,ec.jsx)(eP.A,{gap:1,direction:"row",...n,children:(0,ec.jsx)(eE.A,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:e.spec?.pattern??"",onChange:n=>t({...e,spec:{...e.spec,pattern:n.target.value}}),fullWidth:!0})});case"Misc":return(0,ec.jsx)(eP.A,{gap:1,direction:"row",...n,children:(0,ec.jsxs)(eE.A,{select:!0,label:"Value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{value:n.target.value}}),SelectProps:{renderValue:e=>{switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}},fullWidth:!0,children:[(0,ec.jsx)(pT.A,{value:"empty",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Empty"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches empty string"})]})}),(0,ec.jsx)(pT.A,{value:"null",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Null"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches null or undefined"})]})}),(0,ec.jsx)(pT.A,{value:"NaN",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"NaN"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,ec.jsx)(pT.A,{value:"true",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"True"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches true boolean"})]})}),(0,ec.jsx)(pT.A,{value:"false",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"False"}),(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},UO=({mapping:e,onChange:t,onDelete:n,...r})=>{let i=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,ec.jsxs)(Uk.A,{container:!0,spacing:2,...r,children:[(0,ec.jsx)(Uk.A,{size:{xs:5},children:(0,ec.jsxs)(eP.A,{direction:"row",gap:1,width:"100%",children:[(0,ec.jsxs)(eE.A,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,ec.jsx)(pT.A,{value:"Value",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Value"}),"Value"!==e.kind&&(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches an exact text value"})]})}),(0,ec.jsx)(pT.A,{value:"Range",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Range"}),"Range"!==e.kind&&(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,ec.jsx)(pT.A,{value:"Regex",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Regex"}),"Regex"!==e.kind&&(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,ec.jsx)(pT.A,{value:"Misc",children:(0,ec.jsxs)(eP.A,{children:[(0,ec.jsx)(fc.A,{children:"Misc"}),"Misc"!==e.kind&&(0,ec.jsx)(fc.A,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,ec.jsx)(UD,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,ec.jsx)(Uk.A,{size:{xs:4},children:(0,ec.jsx)(eE.A,{label:"Display text",value:e.spec?.result?.value??"",onChange:n=>t({...e,spec:{...e.spec,result:{...e.spec?.result,value:n.target.value}}}),fullWidth:!0})}),(0,ec.jsx)(Uk.A,{size:{xs:1},children:(0,ec.jsx)(eP.A,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,ec.jsx)(ul,{label:"Color",color:e.spec.result.color??"#000",onColorChange:i,onClear:()=>i(void 0)}):(0,ec.jsx)(eR.A,{onClick:()=>i("#000"),children:(0,ec.jsx)(B_,{})})})}),(0,ec.jsx)(Uk.A,{size:{xs:1},textAlign:"end",children:(0,ec.jsx)(fw.A,{title:"Remove mapping settings",placement:"top",children:(0,ec.jsx)(eR.A,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,ec.jsx)(BS,{})})})})]})},UP=({mappings:e,onChange:t})=>{let[n,r]=(0,ed.useState)(e);return(0,ec.jsxs)(eP.A,{spacing:1,children:[(0,ec.jsxs)(Uk.A,{container:!0,spacing:2,children:[(0,ec.jsx)(Uk.A,{size:{xs:5},children:(0,ec.jsx)(fc.A,{variant:"subtitle1",children:"Condition"})}),(0,ec.jsx)(Uk.A,{size:{xs:4},children:(0,ec.jsx)(fc.A,{variant:"subtitle1",children:"Display Text"})}),(0,ec.jsx)(Uk.A,{size:{xs:1},textAlign:"center",children:(0,ec.jsx)(fc.A,{variant:"subtitle1",children:"Color"})}),(0,ec.jsx)(Uk.A,{size:{xs:1}})]}),(0,ec.jsx)(eP.A,{gap:1.5,divider:(0,ec.jsx)(fv.A,{flexItem:!0,orientation:"horizontal"}),children:n.map((e,i)=>(0,ec.jsx)(UO,{mapping:e,onChange:e=>{let o;(o=[...n])[i]=e,r(o),t(o)},onDelete:()=>{let e;(e=[...n]).splice(i,1),r(e),t(e)}},i))}),(0,ec.jsx)(eD.A,{variant:"contained",startIcon:(0,ec.jsx)(B_,{}),sx:{marginTop:1},onClick:function(){let e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),r(e),t(e)},children:"Add value mappings"})]})}}}]);