@justifi/webcomponents 4.8.3 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/dist/cjs/{Business-42d0c522.js → Business-64dffab7.js} +6 -7
  2. package/dist/cjs/{BusinessFormEventTypes-863f48e9.js → BusinessFormEventTypes-62990815.js} +1 -1
  3. package/dist/cjs/{Payout-44b49b2d.js → Payment-89a8bc21.js} +0 -43
  4. package/dist/cjs/Payout-a2dd7b01.js +45 -0
  5. package/dist/cjs/{SubAccount-2a803b22.js → SubAccount-f8144025.js} +1 -1
  6. package/dist/cjs/additional-questions-details_5.cjs.entry.js +24 -10
  7. package/dist/{webcomponents/p-4ee44c76.entry.js → cjs/business-details-core.cjs.entry.js} +55 -1
  8. package/dist/cjs/form-control-datepart_3.cjs.entry.js +1 -1
  9. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  10. package/dist/cjs/form-control-select_2.cjs.entry.js +1 -1
  11. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +11036 -0
  12. package/dist/cjs/{index-55950669.js → index-07ddbad2.js} +0 -3
  13. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
  15. package/dist/cjs/{select-input_2.cjs.entry.js → justifi-billing-form_4.cjs.entry.js} +1818 -1
  16. package/dist/cjs/justifi-business-details.cjs.entry.js +43 -57
  17. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +5 -4
  18. package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
  19. package/dist/cjs/justifi-business-list.cjs.entry.js +5 -4
  20. package/dist/cjs/justifi-business-owners.cjs.entry.js +1 -1
  21. package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
  22. package/dist/cjs/justifi-checkout-core.cjs.entry.js +95 -0
  23. package/dist/cjs/justifi-checkout.cjs.entry.js +99 -0
  24. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  25. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +39 -11008
  26. package/dist/cjs/justifi-new-payment-method_3.cjs.entry.js +168 -0
  27. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +5 -4
  28. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
  29. package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -4
  30. package/dist/cjs/{justifi-billing-form_2.cjs.entry.js → justifi-payment-method-selector.cjs.entry.js} +4 -79
  31. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -5
  32. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
  33. package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -4
  34. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -3
  35. package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
  36. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +6 -5
  37. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +5 -4
  38. package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
  39. package/dist/cjs/loader.cjs.js +2 -2
  40. package/dist/cjs/payment-details-core.cjs.entry.js +10 -4
  41. package/dist/cjs/{payment.service-605896dc.js → payment.service-0b0086dc.js} +2 -1
  42. package/dist/cjs/payments-list-core.cjs.entry.js +4 -3
  43. package/dist/cjs/payout-details-core.cjs.entry.js +4 -4
  44. package/dist/cjs/{payout.service-b39f2739.js → payout.service-5cc3b4e9.js} +2 -1
  45. package/dist/cjs/payouts-list-core.cjs.entry.js +4 -3
  46. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +7 -7
  47. package/dist/cjs/subaccount-bank-details.cjs.entry.js +3 -3
  48. package/dist/cjs/subaccount-terms-details.cjs.entry.js +3 -3
  49. package/dist/cjs/{utils-d126d17c.js → utils-5c3e442d.js} +5 -5
  50. package/dist/cjs/{utils-29a8a91d.js → utils-84208d99.js} +11 -2
  51. package/dist/cjs/webcomponents.cjs.js +2 -2
  52. package/dist/collection/api/Business.js +6 -7
  53. package/dist/collection/api/Checkout.js +1 -0
  54. package/dist/collection/api/index.js +1 -0
  55. package/dist/collection/api/services/business.service.js +8 -0
  56. package/dist/collection/api/services/checkout.service.js +12 -0
  57. package/dist/collection/api/services/reports.service.js +9 -0
  58. package/dist/collection/collection-manifest.json +7 -0
  59. package/dist/collection/components/billing-form/billing-form.js +1 -2
  60. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +5 -2
  61. package/dist/collection/components/business-details/additional-questions-details/test/additional-questions.spec.js +16 -0
  62. package/dist/collection/components/business-details/business-details-core.js +86 -0
  63. package/dist/collection/components/business-details/business-details.js +20 -65
  64. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +4 -2
  65. package/dist/collection/components/business-details/generic-info-details/test/generic-info-details.spec.js +16 -0
  66. package/dist/collection/components/business-details/get-business.js +17 -0
  67. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +5 -2
  68. package/dist/collection/components/business-details/legal-address-details/test/legal-address-details.spec.js +16 -0
  69. package/dist/collection/components/business-details/owner-details/owner-details.js +10 -12
  70. package/dist/collection/components/business-details/owner-details/test/owner-details.spec.js +16 -0
  71. package/dist/collection/components/business-details/representative-details/representative-details.js +5 -3
  72. package/dist/collection/components/business-details/representative-details/test/representative-details.spec.js +16 -0
  73. package/dist/collection/components/business-details/test/busines-details-core.spec.js +53 -0
  74. package/dist/collection/components/business-details/test/business-details.spec.js +40 -0
  75. package/dist/collection/components/business-details/test/get-business.spec.js +60 -0
  76. package/dist/collection/components/checkout/checkout-actions.js +33 -0
  77. package/dist/collection/components/checkout/checkout-core.css +2604 -0
  78. package/dist/collection/components/checkout/checkout-core.js +248 -0
  79. package/dist/collection/components/checkout/checkout.js +112 -0
  80. package/dist/collection/components/checkout/new-payment-method.js +188 -0
  81. package/dist/collection/components/checkout/payment-method-option-utils.js +19 -0
  82. package/dist/collection/components/checkout/payment-method-options.css +7073 -0
  83. package/dist/collection/components/checkout/payment-method-options.js +248 -0
  84. package/dist/collection/components/checkout/saved-payment-method.js +123 -0
  85. package/dist/collection/components/checkout/test/checkout.js +22 -0
  86. package/dist/collection/components/checkout/test/checkout.spec.js +166 -0
  87. package/dist/collection/components/checkout/test/mockCheckout.js +19 -0
  88. package/dist/collection/components/details/utils.js +4 -1
  89. package/dist/collection/components/gross-payment-chart/get-gross-payment-chart-data.js +14 -0
  90. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +119 -0
  91. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +25 -73
  92. package/dist/collection/components/gross-payment-chart/test/get-gross-payment-chart-data.spec.js +69 -0
  93. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart-core.spec.js +64 -0
  94. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +23 -8
  95. package/dist/collection/components/payment-details/payment-details-core.js +8 -2
  96. package/dist/collection/components/payment-details/payment-details.js +0 -1
  97. package/dist/collection/components/payment-form/payment-form.js +1 -1
  98. package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
  99. package/dist/collection/components/payout-details/payout-details-core.js +2 -2
  100. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +2 -2
  101. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +2 -2
  102. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +2 -2
  103. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +2 -2
  104. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +2 -2
  105. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +2 -2
  106. package/dist/collection/utils/utils.js +9 -3
  107. package/dist/docs.json +1152 -187
  108. package/dist/esm/{Business-e9340f6b.js → Business-9921d35f.js} +6 -7
  109. package/dist/esm/{BusinessFormEventTypes-989960ba.js → BusinessFormEventTypes-182e20be.js} +1 -1
  110. package/dist/esm/{Payout-dc5f009c.js → Payment-55886c86.js} +1 -43
  111. package/dist/esm/Payout-dfe15b00.js +43 -0
  112. package/dist/esm/{SubAccount-46b4c2b1.js → SubAccount-76f6d565.js} +1 -1
  113. package/dist/esm/additional-questions-details_5.entry.js +24 -10
  114. package/dist/esm/business-details-core.entry.js +51 -0
  115. package/dist/esm/form-control-datepart_3.entry.js +1 -1
  116. package/dist/esm/form-control-monetary.entry.js +1 -1
  117. package/dist/esm/form-control-select_2.entry.js +1 -1
  118. package/dist/esm/gross-payment-chart-core.entry.js +11032 -0
  119. package/dist/esm/{index-62b8aa8a.js → index-fb5ca346.js} +0 -3
  120. package/dist/esm/justifi-additional-questions_5.entry.js +2 -2
  121. package/dist/esm/justifi-bank-account-form.entry.js +1 -1
  122. package/dist/esm/{select-input_2.entry.js → justifi-billing-form_4.entry.js} +1817 -2
  123. package/dist/esm/justifi-business-details.entry.js +42 -56
  124. package/dist/esm/justifi-business-form-stepped.entry.js +5 -4
  125. package/dist/esm/justifi-business-form.entry.js +5 -4
  126. package/dist/esm/justifi-business-list.entry.js +5 -4
  127. package/dist/esm/justifi-business-owners.entry.js +1 -1
  128. package/dist/esm/justifi-card-form.entry.js +1 -1
  129. package/dist/esm/justifi-checkout-core.entry.js +91 -0
  130. package/dist/esm/justifi-checkout.entry.js +95 -0
  131. package/dist/esm/justifi-details.entry.js +2 -2
  132. package/dist/esm/justifi-gross-payment-chart.entry.js +39 -11008
  133. package/dist/esm/justifi-new-payment-method_3.entry.js +162 -0
  134. package/dist/esm/justifi-payment-balance-transactions.entry.js +4 -3
  135. package/dist/esm/justifi-payment-details.entry.js +5 -4
  136. package/dist/esm/justifi-payment-form.entry.js +4 -3
  137. package/dist/esm/{justifi-billing-form_2.entry.js → justifi-payment-method-selector.entry.js} +4 -78
  138. package/dist/esm/justifi-payments-list.entry.js +5 -4
  139. package/dist/esm/justifi-payout-details.entry.js +5 -4
  140. package/dist/esm/justifi-payouts-list.entry.js +5 -4
  141. package/dist/esm/justifi-proceeds-list.entry.js +4 -3
  142. package/dist/esm/justifi-refund-form.entry.js +3 -2
  143. package/dist/esm/justifi-subaccount-details.entry.js +6 -5
  144. package/dist/esm/justifi-subaccounts-list.entry.js +5 -4
  145. package/dist/esm/justifi-table_2.entry.js +1 -1
  146. package/dist/esm/loader.js +3 -3
  147. package/dist/esm/payment-details-core.entry.js +10 -4
  148. package/dist/esm/{payment.service-bea02ccf.js → payment.service-f274ef98.js} +2 -1
  149. package/dist/esm/payments-list-core.entry.js +4 -3
  150. package/dist/esm/payout-details-core.entry.js +4 -4
  151. package/dist/esm/{payout.service-92e56814.js → payout.service-af293f61.js} +2 -1
  152. package/dist/esm/payouts-list-core.entry.js +4 -3
  153. package/dist/esm/subaccount-account-details_4.entry.js +7 -7
  154. package/dist/esm/subaccount-bank-details.entry.js +3 -3
  155. package/dist/esm/subaccount-terms-details.entry.js +3 -3
  156. package/dist/esm/{utils-76a93600.js → utils-5193fcd7.js} +10 -3
  157. package/dist/esm/{utils-576874df.js → utils-a3e96d9f.js} +5 -5
  158. package/dist/esm/webcomponents.js +3 -3
  159. package/dist/module/Business.js +6 -7
  160. package/dist/module/Payment.js +138 -0
  161. package/dist/module/Payout.js +1 -138
  162. package/dist/module/SubAccount.js +1 -1
  163. package/dist/module/additional-questions-details2.js +5 -2
  164. package/dist/module/billing-form.js +1 -2
  165. package/dist/module/business-details-core.d.ts +11 -0
  166. package/dist/module/business-details-core.js +6 -0
  167. package/dist/module/business-details-core2.js +101 -0
  168. package/dist/module/checkout-core.js +163 -0
  169. package/dist/module/generic-info-details2.js +4 -2
  170. package/dist/module/gross-payment-chart-core.d.ts +11 -0
  171. package/dist/module/gross-payment-chart-core.js +6 -0
  172. package/dist/module/gross-payment-chart-core2.js +11055 -0
  173. package/dist/module/justifi-business-details.js +51 -60
  174. package/dist/module/justifi-business-form-stepped.js +1 -0
  175. package/dist/module/justifi-business-form.js +1 -0
  176. package/dist/module/justifi-business-list.js +2 -1
  177. package/dist/module/justifi-checkout-core.d.ts +11 -0
  178. package/dist/module/justifi-checkout-core.js +6 -0
  179. package/dist/module/justifi-checkout.d.ts +11 -0
  180. package/dist/module/justifi-checkout.js +172 -0
  181. package/dist/module/justifi-gross-payment-chart.js +49 -11016
  182. package/dist/module/justifi-new-payment-method.d.ts +11 -0
  183. package/dist/module/justifi-new-payment-method.js +6 -0
  184. package/dist/module/justifi-payment-balance-transactions.js +3 -2
  185. package/dist/module/justifi-payment-details.js +2 -1
  186. package/dist/module/justifi-payment-form.js +2 -1
  187. package/dist/module/justifi-payment-method-options.d.ts +11 -0
  188. package/dist/module/justifi-payment-method-options.js +6 -0
  189. package/dist/module/justifi-payments-list.js +2 -1
  190. package/dist/module/justifi-payout-details.js +2 -1
  191. package/dist/module/justifi-payouts-list.js +2 -1
  192. package/dist/module/justifi-proceeds-list.js +2 -1
  193. package/dist/module/justifi-refund-form.js +1 -0
  194. package/dist/module/justifi-saved-payment-method.d.ts +11 -0
  195. package/dist/module/justifi-saved-payment-method.js +6 -0
  196. package/dist/module/justifi-subaccount-details.js +2 -1
  197. package/dist/module/justifi-subaccounts-list.js +2 -1
  198. package/dist/module/legal-address-details2.js +5 -2
  199. package/dist/module/new-payment-method.js +105 -0
  200. package/dist/module/owner-details2.js +10 -4
  201. package/dist/module/payment-details-core2.js +9 -3
  202. package/dist/module/payment-method-form.js +3 -2
  203. package/dist/module/payment-method-options.js +128 -0
  204. package/dist/module/payment-method-selector.js +2 -1
  205. package/dist/module/payment.service.js +1 -0
  206. package/dist/module/payments-list-core2.js +2 -1
  207. package/dist/module/payout-details-core2.js +3 -3
  208. package/dist/module/payout.service.js +1 -0
  209. package/dist/module/payouts-list-core2.js +3 -2
  210. package/dist/module/representative-details2.js +5 -3
  211. package/dist/module/saved-payment-method.js +66 -0
  212. package/dist/module/subaccount-account-details2.js +2 -2
  213. package/dist/module/subaccount-bank-details.js +2 -2
  214. package/dist/module/subaccount-merchant-details2.js +3 -3
  215. package/dist/module/subaccount-owners-details2.js +2 -2
  216. package/dist/module/subaccount-representative-details2.js +2 -2
  217. package/dist/module/subaccount-terms-details.js +2 -2
  218. package/dist/module/utils.js +4 -4
  219. package/dist/module/utils2.js +10 -3
  220. package/dist/types/api/Api.d.ts +1 -1
  221. package/dist/types/api/Checkout.d.ts +14 -0
  222. package/dist/types/api/index.d.ts +1 -0
  223. package/dist/types/api/services/business.service.d.ts +8 -0
  224. package/dist/types/api/services/checkout.service.d.ts +9 -0
  225. package/dist/types/api/services/reports.service.d.ts +5 -0
  226. package/dist/types/components/billing-form/billing-form.d.ts +0 -1
  227. package/dist/types/components/business-details/business-details-core.d.ts +16 -0
  228. package/dist/types/components/business-details/business-details.d.ts +3 -13
  229. package/dist/types/components/business-details/get-business.d.ts +8 -0
  230. package/dist/types/components/business-details/owner-details/owner-details.d.ts +0 -8
  231. package/dist/types/components/checkout/checkout-actions.d.ts +17 -0
  232. package/dist/types/components/checkout/checkout-core.d.ts +28 -0
  233. package/dist/types/components/checkout/checkout.d.ts +12 -0
  234. package/dist/types/components/checkout/new-payment-method.d.ts +17 -0
  235. package/dist/types/components/checkout/payment-method-option-utils.d.ts +16 -0
  236. package/dist/types/components/checkout/payment-method-options.d.ts +18 -0
  237. package/dist/types/components/checkout/saved-payment-method.d.ts +11 -0
  238. package/dist/types/components/checkout/test/checkout.d.ts +1 -0
  239. package/dist/types/components/checkout/test/mockCheckout.d.ts +19 -0
  240. package/dist/types/components/details/utils.d.ts +1 -1
  241. package/dist/types/components/gross-payment-chart/get-gross-payment-chart-data.d.ts +11 -0
  242. package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +18 -0
  243. package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +4 -14
  244. package/dist/types/components/payment-details/payment-details.d.ts +0 -1
  245. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +3 -9
  246. package/dist/types/components.d.ts +217 -32
  247. package/dist/types/utils/utils.d.ts +1 -0
  248. package/dist/webcomponents/p-018b71f5.entry.js +1 -0
  249. package/dist/webcomponents/p-0923e39c.js +1 -0
  250. package/dist/webcomponents/{p-7a1a06c0.entry.js → p-09b94d22.entry.js} +1 -1
  251. package/dist/webcomponents/p-1b04d091.entry.js +1 -0
  252. package/dist/webcomponents/{p-0a0cf2e6.entry.js → p-1bac1674.entry.js} +1 -1
  253. package/dist/webcomponents/p-1cbdca15.entry.js +1 -0
  254. package/dist/webcomponents/p-3134ab82.entry.js +1 -0
  255. package/dist/webcomponents/{p-22c1acd6.js → p-34f9fe6b.js} +1 -1
  256. package/dist/webcomponents/p-3bae0ed3.entry.js +1 -0
  257. package/dist/webcomponents/p-41031759.entry.js +1 -0
  258. package/dist/webcomponents/p-41490d96.entry.js +1 -0
  259. package/dist/webcomponents/p-44b88365.entry.js +1 -0
  260. package/dist/webcomponents/{p-081cf5f6.entry.js → p-4ed3a9f5.entry.js} +1 -1
  261. package/dist/webcomponents/{p-6478f3ca.js → p-4edd9721.js} +1 -1
  262. package/dist/webcomponents/p-51b0bf2a.entry.js +1 -0
  263. package/dist/webcomponents/p-531844f6.entry.js +1 -0
  264. package/dist/webcomponents/{p-4fa27a28.entry.js → p-591e29bf.entry.js} +1 -1
  265. package/dist/webcomponents/p-5d5d7550.entry.js +1 -0
  266. package/dist/webcomponents/{p-810b72b5.js → p-5ea274b8.js} +1 -1
  267. package/dist/webcomponents/{p-4ba2c711.entry.js → p-5f785ede.entry.js} +1 -1
  268. package/dist/webcomponents/p-63296409.js +1 -0
  269. package/dist/webcomponents/{p-4f14df36.js → p-6d05174c.js} +1 -1
  270. package/dist/webcomponents/p-72d1ad98.entry.js +1 -0
  271. package/dist/webcomponents/{p-40349ffc.entry.js → p-796cf44f.entry.js} +1 -1
  272. package/dist/webcomponents/p-79f99d62.entry.js +1 -0
  273. package/dist/webcomponents/p-7b2cddc7.js +1 -0
  274. package/dist/webcomponents/{p-7c0f91fa.entry.js → p-7cd06ada.entry.js} +1 -1
  275. package/dist/webcomponents/p-8f895ec3.entry.js +1 -0
  276. package/dist/webcomponents/p-92a55427.entry.js +1 -0
  277. package/dist/webcomponents/p-97c42345.entry.js +1 -0
  278. package/dist/webcomponents/p-99a8b7d0.entry.js +1 -0
  279. package/dist/webcomponents/p-9a63eec9.entry.js +1 -0
  280. package/dist/webcomponents/p-9c310f5c.entry.js +1 -0
  281. package/dist/webcomponents/p-9e3771b7.entry.js +19 -0
  282. package/dist/webcomponents/{p-6d0725ef.entry.js → p-a81229a5.entry.js} +1 -1
  283. package/dist/webcomponents/{p-234bc840.entry.js → p-adc96df1.entry.js} +1 -1
  284. package/dist/webcomponents/p-baafa7f5.js +1 -0
  285. package/dist/webcomponents/p-babd292f.entry.js +1 -0
  286. package/dist/webcomponents/{p-5c0310ee.js → p-bb037696.js} +1 -1
  287. package/dist/webcomponents/p-bb7f6095.entry.js +1 -0
  288. package/dist/webcomponents/p-c032b216.entry.js +1 -0
  289. package/dist/webcomponents/{p-08833966.entry.js → p-c2c3d5d1.entry.js} +1 -1
  290. package/dist/webcomponents/p-c8d51336.entry.js +1 -0
  291. package/dist/webcomponents/{p-4c01df65.entry.js → p-dc05b5c5.entry.js} +1 -1
  292. package/dist/webcomponents/p-e3fab0e2.js +1 -0
  293. package/dist/webcomponents/p-e536a4c1.entry.js +1 -0
  294. package/dist/webcomponents/p-ec358d69.entry.js +1 -0
  295. package/dist/webcomponents/p-f55ac955.entry.js +1 -0
  296. package/dist/webcomponents/p-f64a85cf.entry.js +1 -0
  297. package/dist/webcomponents/webcomponents.esm.js +1 -1
  298. package/package.json +3 -2
  299. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +0 -1747
  300. package/dist/esm/justifi-payment-method-form.entry.js +0 -1743
  301. package/dist/webcomponents/p-0bc8b02e.entry.js +0 -1
  302. package/dist/webcomponents/p-112acd3c.entry.js +0 -1
  303. package/dist/webcomponents/p-1555e6b1.js +0 -1
  304. package/dist/webcomponents/p-16f41fd0.entry.js +0 -1
  305. package/dist/webcomponents/p-17715325.js +0 -1
  306. package/dist/webcomponents/p-3a4d4869.entry.js +0 -1
  307. package/dist/webcomponents/p-3cb0b96d.js +0 -1
  308. package/dist/webcomponents/p-5422a24b.entry.js +0 -1
  309. package/dist/webcomponents/p-578e0a05.entry.js +0 -1
  310. package/dist/webcomponents/p-640d90dc.entry.js +0 -1
  311. package/dist/webcomponents/p-663bfe87.js +0 -1
  312. package/dist/webcomponents/p-696396c7.entry.js +0 -1
  313. package/dist/webcomponents/p-6ab67031.entry.js +0 -1
  314. package/dist/webcomponents/p-8516d602.entry.js +0 -1
  315. package/dist/webcomponents/p-894a7475.entry.js +0 -19
  316. package/dist/webcomponents/p-94ebfafb.entry.js +0 -1
  317. package/dist/webcomponents/p-9cb3ff78.entry.js +0 -1
  318. package/dist/webcomponents/p-9e81808f.entry.js +0 -1
  319. package/dist/webcomponents/p-a432110c.entry.js +0 -1
  320. package/dist/webcomponents/p-b1881723.entry.js +0 -1
  321. package/dist/webcomponents/p-b5aba473.entry.js +0 -1
  322. package/dist/webcomponents/p-bd099662.entry.js +0 -1
  323. package/dist/webcomponents/p-bfd917b8.entry.js +0 -1
  324. package/dist/webcomponents/p-c90fa055.entry.js +0 -1
  325. package/dist/webcomponents/p-ebb91944.entry.js +0 -1
  326. package/dist/webcomponents/p-ec4f27e7.entry.js +0 -1
  327. package/dist/webcomponents/p-fa495a43.entry.js +0 -1
@@ -0,0 +1,19 @@
1
+ import{r as t,h as i,H as e}from"./p-6d05174c.js";import{b as s,d as n}from"./p-34f9fe6b.js";import{E as r,L as o}from"./p-baafa7f5.js";
2
+ /*!
3
+ * @kurkle/color v0.3.2
4
+ * https://github.com/kurkle/color#readme
5
+ * (c) 2023 Jukka Kurkela
6
+ * Released under the MIT License
7
+ */function a(t){return t+.5|0}const h=(t,i,e)=>Math.max(Math.min(t,e),i);function c(t){return h(a(2.55*t),0,255)}function l(t){return h(a(255*t),0,255)}function u(t){return h(a(t/2.55)/100,0,1)}function d(t){return h(a(100*t),0,100)}const f={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},b=[..."0123456789ABCDEF"],p=t=>b[15&t],g=t=>b[(240&t)>>4]+b[15&t],m=t=>(240&t)>>4==(15&t);const v=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,i,e){const s=i*Math.min(e,1-e),n=(i,n=(i+t/30)%12)=>e-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function x(t,i,e){const s=(s,n=(s+t/60)%6)=>e-e*i*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function M(t,i,e){const s=y(t,1,.5);let n;for(i+e>1&&(n=1/(i+e),i*=n,e*=n),n=0;n<3;n++)s[n]*=1-i-e,s[n]+=i;return s}function k(t){const i=t.r/255,e=t.g/255,s=t.b/255,n=Math.max(i,e,s),r=Math.min(i,e,s),o=(n+r)/2;let a,h,c;return n!==r&&(c=n-r,h=o>.5?c/(2-n-r):c/(n+r),a=function(t,i,e,s,n){return t===n?(i-e)/s+(i<e?6:0):i===n?(e-t)/s+2:(t-i)/s+4}(i,e,s,c,n),a=60*a+.5),[0|a,h||0,o]}function w(t,i,e,s){return(Array.isArray(i)?t(i[0],i[1],i[2]):t(i,e,s)).map(l)}function _(t,i,e){return w(y,t,i,e)}function A(t){return(t%360+360)%360}const O={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},S={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let R;const D=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,j=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,C=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function B(t,i,e){if(t){let s=k(t);s[i]=Math.max(0,Math.min(s[i]+s[i]*e,0===i?360:1)),s=_(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function E(t,i){return t?Object.assign(i||{},t):t}function L(t){var i={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(i={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(i.a=l(t[3]))):(i=E(t,{r:0,g:0,b:0,a:1})).a=l(i.a),i}function P(t){return"r"===t.charAt(0)?function(t){const i=D.exec(t);let e,s,n,r=255;if(i){if(i[7]!==e){const t=+i[7];r=i[8]?c(t):h(255*t,0,255)}return e=+i[1],s=+i[3],n=+i[5],e=255&(i[2]?c(e):h(e,0,255)),s=255&(i[4]?c(s):h(s,0,255)),n=255&(i[6]?c(n):h(n,0,255)),{r:e,g:s,b:n,a:r}}}(t):function(t){const i=v.exec(t);let e,s=255;if(!i)return;i[5]!==e&&(s=i[6]?c(+i[5]):l(+i[5]));const n=A(+i[2]),r=+i[3]/100,o=+i[4]/100;return e="hwb"===i[1]?function(t,i,e){return w(M,t,i,e)}(n,r,o):"hsv"===i[1]?function(t,i,e){return w(x,t,i,e)}(n,r,o):_(n,r,o),{r:e[0],g:e[1],b:e[2],a:s}}(t)}class I{constructor(t){if(t instanceof I)return t;const i=typeof t;let e;var s,n,r;"object"===i?e=L(t):"string"===i&&(r=(s=t).length,"#"===s[0]&&(4===r||5===r?n={r:255&17*f[s[1]],g:255&17*f[s[2]],b:255&17*f[s[3]],a:5===r?17*f[s[4]]:255}:7!==r&&9!==r||(n={r:f[s[1]]<<4|f[s[2]],g:f[s[3]]<<4|f[s[4]],b:f[s[5]]<<4|f[s[6]],a:9===r?f[s[7]]<<4|f[s[8]]:255})),e=n||function(t){R||(R=function(){const t={},i=Object.keys(S),e=Object.keys(O);let s,n,r,o,a;for(s=0;s<i.length;s++){for(o=a=i[s],n=0;n<e.length;n++)r=e[n],a=a.replace(r,O[r]);r=parseInt(S[o],16),t[a]=[r>>16&255,r>>8&255,255&r]}return t}(),R.transparent=[0,0,0,0]);const i=R[t.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(t)||P(t)),this._rgb=e,this._valid=!!e}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=u(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${u(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(i=(t=>m(t.r)&&m(t.g)&&m(t.b)&&m(t.a))(t=this._rgb)?p:g,t?"#"+i(t.r)+i(t.g)+i(t.b)+((t,i)=>t<255?i(t):"")(t.a,i):void 0):void 0;var t,i}hslString(){return this._valid?function(t){if(!t)return;const i=k(t),e=i[0],s=d(i[1]),n=d(i[2]);return t.a<255?`hsla(${e}, ${s}%, ${n}%, ${u(t.a)})`:`hsl(${e}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,i){if(t){const e=this.rgb,s=t.rgb;let n;const r=i===n?.5:i,o=2*r-1,a=e.a-s.a,h=((o*a==-1?o:(o+a)/(1+o*a))+1)/2;n=1-h,e.r=255&h*e.r+n*s.r+.5,e.g=255&h*e.g+n*s.g+.5,e.b=255&h*e.b+n*s.b+.5,e.a=r*e.a+(1-r)*s.a,this.rgb=e}return this}interpolate(t,i){return t&&(this._rgb=function(t,i,e){const s=C(u(t.r)),n=C(u(t.g)),r=C(u(t.b));return{r:l(j(s+e*(C(u(i.r))-s))),g:l(j(n+e*(C(u(i.g))-n))),b:l(j(r+e*(C(u(i.b))-r))),a:t.a+e*(i.a-t.a)}}(this._rgb,t._rgb,i)),this}clone(){return new I(this.rgb)}alpha(t){return this._rgb.a=l(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,i=a(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=i,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return B(this._rgb,2,t),this}darken(t){return B(this._rgb,2,-t),this}saturate(t){return B(this._rgb,1,t),this}desaturate(t){return B(this._rgb,1,-t),this}rotate(t){return function(t,i){var e=k(t);e[0]=A(e[0]+i),e=_(e),t.r=e[0],t.g=e[1],t.b=e[2]}(this._rgb,t),this}}
8
+ /*!
9
+ * Chart.js v4.4.1
10
+ * https://www.chartjs.org
11
+ * (c) 2023 Chart.js Contributors
12
+ * Released under the MIT License
13
+ */function T(){}const F=(()=>{let t=0;return()=>t++})();function z(t){return null==t}function N(t){if(Array.isArray&&Array.isArray(t))return!0;const i=Object.prototype.toString.call(t);return"[object"===i.slice(0,7)&&"Array]"===i.slice(-6)}function W(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function H(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function $(t,i){return H(t)?t:i}function G(t,i){return void 0===t?i:t}const Y=(t,i)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*i:+t;function V(t,i,e){if(t&&"function"==typeof t.call)return t.apply(e,i)}function X(t,i,e,s){let n,r,o;if(N(t))if(r=t.length,s)for(n=r-1;n>=0;n--)i.call(e,t[n],n);else for(n=0;n<r;n++)i.call(e,t[n],n);else if(W(t))for(o=Object.keys(t),r=o.length,n=0;n<r;n++)i.call(e,t[o[n]],o[n])}function U(t,i){let e,s,n,r;if(!t||!i||t.length!==i.length)return!1;for(e=0,s=t.length;e<s;++e)if(n=t[e],r=i[e],n.datasetIndex!==r.datasetIndex||n.index!==r.index)return!1;return!0}function Z(t){if(N(t))return t.map(Z);if(W(t)){const i=Object.create(null),e=Object.keys(t),s=e.length;let n=0;for(;n<s;++n)i[e[n]]=Z(t[e[n]]);return i}return t}function K(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Q(t,i,e,s){if(!K(t))return;const n=i[t],r=e[t];W(n)&&W(r)?q(n,r,s):i[t]=Z(r)}function q(t,i,e){const s=N(i)?i:[i],n=s.length;if(!W(t))return t;const r=(e=e||{}).merger||Q;let o;for(let i=0;i<n;++i){if(o=s[i],!W(o))continue;const n=Object.keys(o);for(let i=0,s=n.length;i<s;++i)r(n[i],t,o,e)}return t}function J(t,i){return q(t,i,{merger:tt})}function tt(t,i,e){if(!K(t))return;const s=i[t],n=e[t];W(s)&&W(n)?J(s,n):Object.prototype.hasOwnProperty.call(i,t)||(i[t]=Z(n))}const it={"":t=>t,x:t=>t.x,y:t=>t.y};function et(t,i){const e=it[i]||(it[i]=function(t){const i=function(t){const i=t.split("."),e=[];let s="";for(const t of i)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}(t);return t=>{for(const e of i){if(""===e)break;t=t&&t[e]}return t}}(i));return e(t)}function st(t){return t.charAt(0).toUpperCase()+t.slice(1)}const nt=t=>void 0!==t,rt=t=>"function"==typeof t,ot=(t,i)=>{if(t.size!==i.size)return!1;for(const e of t)if(!i.has(e))return!1;return!0},at=Math.PI,ht=2*at,ct=Number.POSITIVE_INFINITY,lt=at/180,ut=at/2,dt=at/4,ft=2*at/3,bt=Math.log10,pt=Math.sign;function gt(t,i,e){return Math.abs(t-i)<e}function mt(t){const i=Math.round(t);t=gt(t,i,t/1e3)?i:t;const e=Math.pow(10,Math.floor(bt(t))),s=t/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function vt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function yt(t){return t*(at/180)}function xt(t){if(!H(t))return;let i=1,e=0;for(;Math.round(t*i)/i!==t;)i*=10,e++;return e}function Mt(t){return(t%ht+ht)%ht}function kt(t,i,e,s){const n=Mt(t),r=Mt(i),o=Mt(e),a=Mt(r-n),h=Mt(o-n),c=Mt(n-r),l=Mt(n-o);return n===r||n===o||s&&r===o||a>h&&c<l}function wt(t,i,e){return Math.max(i,Math.min(e,t))}function _t(t,i,e,s=1e-6){return t>=Math.min(i,e)-s&&t<=Math.max(i,e)+s}function At(t,i,e){e=e||(e=>t[e]<i);let s,n=t.length-1,r=0;for(;n-r>1;)s=r+n>>1,e(s)?r=s:n=s;return{lo:r,hi:n}}const Ot=(t,i,e,s)=>At(t,e,s?s=>{const n=t[s][i];return n<e||n===e&&t[s+1][i]===e}:s=>t[s][i]<e),St=(t,i,e)=>At(t,e,(s=>t[s][i]>=e)),Rt=["push","pop","shift","splice","unshift"];function Dt(t,i){const e=t._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(i);-1!==n&&s.splice(n,1),s.length>0||(Rt.forEach((i=>{delete t[i]})),delete t._chartjs)}const jt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ct(t,i){let e=[],s=!1;return function(...n){e=n,s||(s=!0,jt.call(window,(()=>{s=!1,t.apply(i,e)})))}}const Bt=t=>"start"===t?"left":"end"===t?"right":"center",Et=(t,i,e)=>"start"===t?i:"end"===t?e:(i+e)/2,Lt=t=>0===t||1===t,Pt=(t,i,e)=>-Math.pow(2,10*(t-=1))*Math.sin((t-i)*ht/e),It=(t,i,e)=>Math.pow(2,-10*t)*Math.sin((t-i)*ht/e)+1,Tt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ut),easeOutSine:t=>Math.sin(t*ut),easeInOutSine:t=>-.5*(Math.cos(at*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Lt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Lt(t)?t:Pt(t,.075,.3),easeOutElastic:t=>Lt(t)?t:It(t,.075,.3),easeInOutElastic(t){const i=.1125;return Lt(t)?t:t<.5?.5*Pt(2*t,i,.45):.5+.5*It(2*t-1,i,.45)},easeInBack(t){const i=1.70158;return t*t*((i+1)*t-i)},easeOutBack(t){const i=1.70158;return(t-=1)*t*((i+1)*t+i)+1},easeInOutBack(t){let i=1.70158;return(t/=.5)<1?t*t*((1+(i*=1.525))*t-i)*.5:.5*((t-=2)*t*((1+(i*=1.525))*t+i)+2)},easeInBounce:t=>1-Tt.easeOutBounce(1-t),easeOutBounce(t){const i=7.5625,e=2.75;return t<1/e?i*t*t:t<2/e?i*(t-=1.5/e)*t+.75:t<2.5/e?i*(t-=2.25/e)*t+.9375:i*(t-=2.625/e)*t+.984375},easeInOutBounce:t=>t<.5?.5*Tt.easeInBounce(2*t):.5*Tt.easeOutBounce(2*t-1)+.5};function Ft(t){if(t&&"object"==typeof t){const i=t.toString();return"[object CanvasPattern]"===i||"[object CanvasGradient]"===i}return!1}function zt(t){return Ft(t)?t:new I(t)}function Nt(t){return Ft(t)?t:new I(t).saturate(.5).darken(.1).hexString()}const Wt=["x","y","borderWidth","radius","tension"],Ht=["color","borderColor","backgroundColor"],$t=new Map;function Gt(t,i,e){return function(t,i){i=i||{};const e=t+JSON.stringify(i);let s=$t.get(e);return s||(s=new Intl.NumberFormat(t,i),$t.set(e,s)),s}(i,e).format(t)}const Yt={values:t=>N(t)?t:""+t,numeric(t,i,e){if(0===t)return"0";const s=this.chart.options.locale;let n,r=t;if(e.length>1){const i=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(i<1e-4||i>1e15)&&(n="scientific"),r=function(t,i){let e=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(e)>=1&&t!==Math.floor(t)&&(e=t-Math.floor(t)),e}(t,e)}const o=bt(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),h={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(h,this.options.ticks.format),Gt(t,s,h)},logarithmic(t,i,e){if(0===t)return"0";const s=e[i].significand||t/Math.pow(10,Math.floor(bt(t)));return[1,2,3,5,10,15].includes(s)||i>.8*e.length?Yt.numeric.call(this,t,i,e):""}};var Vt={formatters:Yt};const Xt=Object.create(null),Ut=Object.create(null);function Zt(t,i){if(!i)return t;const e=i.split(".");for(let i=0,s=e.length;i<s;++i){const s=e[i];t=t[s]||(t[s]=Object.create(null))}return t}function Kt(t,i,e){return"string"==typeof i?q(Zt(t,i),e):q(Zt(t,""),i)}class Qt{constructor(t,i){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>Nt(i.backgroundColor),this.hoverBorderColor=(t,i)=>Nt(i.borderColor),this.hoverColor=(t,i)=>Nt(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(i)}set(t,i){return Kt(this,t,i)}get(t){return Zt(this,t)}describe(t,i){return Kt(Ut,t,i)}override(t,i){return Kt(Xt,t,i)}route(t,i,e,s){const n=Zt(this,t),r=Zt(this,e),o="_"+i;Object.defineProperties(n,{[o]:{value:n[i],writable:!0},[i]:{enumerable:!0,get(){const t=this[o],i=r[s];return W(t)?Object.assign({},i,t):G(t,i)},set(t){this[o]=t}}})}apply(t){t.forEach((t=>t(this)))}}var qt=new Qt({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Ht},numbers:{type:"number",properties:Wt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,i)=>i.lineWidth,tickColor:(t,i)=>i.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Vt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Jt(t,i,e,s,n){let r=i[n];return r||(r=i[n]=t.measureText(n).width,e.push(n)),r>s&&(s=r),s}function ti(t,i,e){const s=t.currentDevicePixelRatio,n=0!==e?Math.max(e/2,.5):0;return Math.round((i-n)*s)/s+n}function ii(t,i){(i=i||t.getContext("2d")).save(),i.resetTransform(),i.clearRect(0,0,t.width,t.height),i.restore()}function ei(t,i,e,s){si(t,i,e,s,null)}function si(t,i,e,s,n){let r,o,a,h,c,l,u,d;const f=i.pointStyle,b=i.rotation,p=i.radius;let g=(b||0)*lt;if(f&&"object"==typeof f&&(r=f.toString(),"[object HTMLImageElement]"===r||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(e,s),t.rotate(g),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:n?t.ellipse(e,s,n/2,p,0,0,ht):t.arc(e,s,p,0,ht),t.closePath();break;case"triangle":l=n?n/2:p,t.moveTo(e+Math.sin(g)*l,s-Math.cos(g)*p),g+=ft,t.lineTo(e+Math.sin(g)*l,s-Math.cos(g)*p),g+=ft,t.lineTo(e+Math.sin(g)*l,s-Math.cos(g)*p),t.closePath();break;case"rectRounded":c=.516*p,h=p-c,o=Math.cos(g+dt)*h,u=Math.cos(g+dt)*(n?n/2-c:h),a=Math.sin(g+dt)*h,d=Math.sin(g+dt)*(n?n/2-c:h),t.arc(e-u,s-a,c,g-at,g-ut),t.arc(e+d,s-o,c,g-ut,g),t.arc(e+u,s+a,c,g,g+ut),t.arc(e-d,s+o,c,g+ut,g+at),t.closePath();break;case"rect":if(!b){h=Math.SQRT1_2*p,l=n?n/2:h,t.rect(e-l,s-h,2*l,2*h);break}g+=dt;case"rectRot":u=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(n?n/2:p),t.moveTo(e-u,s-a),t.lineTo(e+d,s-o),t.lineTo(e+u,s+a),t.lineTo(e-d,s+o),t.closePath();break;case"crossRot":g+=dt;case"cross":u=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(n?n/2:p),t.moveTo(e-u,s-a),t.lineTo(e+u,s+a),t.moveTo(e+d,s-o),t.lineTo(e-d,s+o);break;case"star":u=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(n?n/2:p),t.moveTo(e-u,s-a),t.lineTo(e+u,s+a),t.moveTo(e+d,s-o),t.lineTo(e-d,s+o),g+=dt,u=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(n?n/2:p),t.moveTo(e-u,s-a),t.lineTo(e+u,s+a),t.moveTo(e+d,s-o),t.lineTo(e-d,s+o);break;case"line":o=n?n/2:Math.cos(g)*p,a=Math.sin(g)*p,t.moveTo(e-o,s-a),t.lineTo(e+o,s+a);break;case"dash":t.moveTo(e,s),t.lineTo(e+Math.cos(g)*(n?n/2:p),s+Math.sin(g)*p);break;case!1:t.closePath()}t.fill(),i.borderWidth>0&&t.stroke()}}function ni(t,i,e){return e=e||.5,!i||t&&t.x>i.left-e&&t.x<i.right+e&&t.y>i.top-e&&t.y<i.bottom+e}function ri(t,i){t.save(),t.beginPath(),t.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),t.clip()}function oi(t){t.restore()}function ai(t,i,e,s,n){if(n.strikethrough||n.underline){const r=t.measureText(s),o=i-r.actualBoundingBoxLeft,a=i+r.actualBoundingBoxRight,h=e+r.actualBoundingBoxDescent,c=n.strikethrough?(e-r.actualBoundingBoxAscent+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(o,c),t.lineTo(a,c),t.stroke()}}function hi(t,i){const e=t.fillStyle;t.fillStyle=i.color,t.fillRect(i.left,i.top,i.width,i.height),t.fillStyle=e}function ci(t,i,e,s,n,r={}){const o=N(i)?i:[i],a=r.strokeWidth>0&&""!==r.strokeColor;let h,c;for(t.save(),t.font=n.string,function(t,i){i.translation&&t.translate(i.translation[0],i.translation[1]),z(i.rotation)||t.rotate(i.rotation),i.color&&(t.fillStyle=i.color),i.textAlign&&(t.textAlign=i.textAlign),i.textBaseline&&(t.textBaseline=i.textBaseline)}(t,r),h=0;h<o.length;++h)c=o[h],r.backdrop&&hi(t,r.backdrop),a&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),z(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(c,e,s,r.maxWidth)),t.fillText(c,e,s,r.maxWidth),ai(t,e,s,c,r),s+=Number(n.lineHeight);t.restore()}function li(t,i){const{x:e,y:s,w:n,h:r,radius:o}=i;t.arc(e+o.topLeft,s+o.topLeft,o.topLeft,1.5*at,at,!0),t.lineTo(e,s+r-o.bottomLeft),t.arc(e+o.bottomLeft,s+r-o.bottomLeft,o.bottomLeft,at,ut,!0),t.lineTo(e+n-o.bottomRight,s+r),t.arc(e+n-o.bottomRight,s+r-o.bottomRight,o.bottomRight,ut,0,!0),t.lineTo(e+n,s+o.topRight),t.arc(e+n-o.topRight,s+o.topRight,o.topRight,0,-ut,!0),t.lineTo(e+o.topLeft,s)}const ui=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,di=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function fi(t,i){const e=(""+t).match(ui);if(!e||"normal"===e[1])return 1.2*i;switch(t=+e[2],e[3]){case"px":return t;case"%":t/=100}return i*t}const bi=t=>+t||0;function pi(t,i){const e={},s=W(i),n=s?Object.keys(i):i,r=W(t)?s?e=>G(t[e],t[i[e]]):i=>t[i]:()=>t;for(const t of n)e[t]=bi(r(t));return e}function gi(t){return pi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function mi(t){return pi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function vi(t){const i=gi(t);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function yi(t,i){let e=G((t=t||{}).size,(i=i||qt.font).size);"string"==typeof e&&(e=parseInt(e,10));let s=G(t.style,i.style);s&&!(""+s).match(di)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:G(t.family,i.family),lineHeight:fi(G(t.lineHeight,i.lineHeight),e),size:e,style:s,weight:G(t.weight,i.weight),string:""};return n.string=function(t){return!t||z(t.size)||z(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function xi(t,i,e,s){let n,r,o,a=!0;for(n=0,r=t.length;n<r;++n)if(o=t[n],void 0!==o&&(void 0!==i&&"function"==typeof o&&(o=o(i),a=!1),void 0!==e&&N(o)&&(o=o[e%o.length],a=!1),void 0!==o))return s&&!a&&(s.cacheable=!1),o}function Mi(t,i){return Object.assign(Object.create(t),i)}function ki(t,i=[""],e,s,n=(()=>t[0])){const r=e||t;void 0===s&&(s=Ei("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:s,_getTarget:n,override:e=>ki([e,...t],i,r,s)};return new Proxy(o,{deleteProperty:(i,e)=>(delete i[e],delete i._keys,delete t[0][e],!0),get:(e,s)=>Si(e,s,(()=>function(t,i,e,s){let n;for(const r of i)if(n=Ei(Ai(r,t),e),void 0!==n)return Oi(t,n)?Ci(e,s,t,n):n}(s,i,t,e))),getOwnPropertyDescriptor:(t,i)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],i),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,i)=>Li(t).includes(i),ownKeys:t=>Li(t),set(t,i,e){const s=t._storage||(t._storage=n());return t[i]=s[i]=e,delete t._keys,!0}})}function wi(t,i,e,s){const n={_cacheable:!1,_proxy:t,_context:i,_subProxy:e,_stack:new Set,_descriptors:_i(t,s),setContext:i=>wi(t,i,e,s),override:n=>wi(t.override(n),i,e,s)};return new Proxy(n,{deleteProperty:(i,e)=>(delete i[e],delete t[e],!0),get:(t,i,e)=>Si(t,i,(()=>function(t,i,e){const{_proxy:s,_context:n,_subProxy:r,_descriptors:o}=t;let a=s[i];return rt(a)&&o.isScriptable(i)&&(a=function(t,i,e,s){const{_proxy:n,_context:r,_subProxy:o,_stack:a}=e;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let h=i(r,o||s);return a.delete(t),Oi(t,h)&&(h=Ci(n._scopes,n,t,h)),h}(i,a,t,e)),N(a)&&a.length&&(a=function(t,i,e,s){const{_proxy:n,_context:r,_subProxy:o,_descriptors:a}=e;if(void 0!==r.index&&s(t))return i[r.index%i.length];if(W(i[0])){const e=i,s=n._scopes.filter((t=>t!==e));i=[];for(const h of e){const e=Ci(s,n,t,h);i.push(wi(e,r,o&&o[t],a))}}return i}(i,a,t,o.isIndexable)),Oi(i,a)&&(a=wi(a,n,r&&r[i],o)),a}(t,i,e))),getOwnPropertyDescriptor:(i,e)=>i._descriptors.allKeys?Reflect.has(t,e)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,e),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(i,e)=>Reflect.has(t,e),ownKeys:()=>Reflect.ownKeys(t),set:(i,e,s)=>(t[e]=s,delete i[e],!0)})}function _i(t,i={scriptable:!0,indexable:!0}){const{_scriptable:e=i.scriptable,_indexable:s=i.indexable,_allKeys:n=i.allKeys}=t;return{allKeys:n,scriptable:e,indexable:s,isScriptable:rt(e)?e:()=>e,isIndexable:rt(s)?s:()=>s}}const Ai=(t,i)=>t?t+st(i):i,Oi=(t,i)=>W(i)&&"adapters"!==t&&(null===Object.getPrototypeOf(i)||i.constructor===Object);function Si(t,i,e){if(Object.prototype.hasOwnProperty.call(t,i))return t[i];const s=e();return t[i]=s,s}function Ri(t,i,e){return rt(t)?t(i,e):t}const Di=(t,i)=>!0===t?i:"string"==typeof t?et(i,t):void 0;function ji(t,i,e,s,n){for(const r of i){const i=Di(e,r);if(i){t.add(i);const r=Ri(i._fallback,e,n);if(void 0!==r&&r!==e&&r!==s)return r}else if(!1===i&&void 0!==s&&e!==s)return null}return!1}function Ci(t,i,e,s){const n=i._rootScopes,r=Ri(i._fallback,e,s),o=[...t,...n],a=new Set;a.add(s);let h=Bi(a,o,e,r||e,s);return null!==h&&(void 0===r||r===e||(h=Bi(a,o,r,h,s),null!==h))&&ki(Array.from(a),[""],n,r,(()=>function(t,i,e){const s=t._getTarget();i in s||(s[i]={});const n=s[i];return N(n)&&W(e)?e:n||{}}(i,e,s)))}function Bi(t,i,e,s,n){for(;e;)e=ji(t,i,e,s,n);return e}function Ei(t,i){for(const e of i){if(!e)continue;const i=e[t];if(void 0!==i)return i}}function Li(t){let i=t._keys;return i||(i=t._keys=function(t){const i=new Set;for(const e of t)for(const t of Object.keys(e).filter((t=>!t.startsWith("_"))))i.add(t);return Array.from(i)}(t._scopes)),i}function Pi(t,i,e,s){const{iScale:n}=t,{key:r="r"}=this._parsing,o=new Array(s);let a,h,c,l;for(a=0,h=s;a<h;++a)c=a+e,l=i[c],o[a]={r:n.parse(et(l,r),c)};return o}function Ii(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ti(t){let i=t.parentNode;return i&&"[object ShadowRoot]"===i.toString()&&(i=i.host),i}function Fi(t,i,e){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*i.parentNode[e])):s=t,s}const zi=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),Ni=["top","right","bottom","left"];function Wi(t,i,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const r=Ni[n];s[r]=parseFloat(t[i+"-"+r+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Hi=(t,i,e)=>(t>0||i>0)&&(!e||!e.shadowRoot);function $i(t,i){if("native"in t)return t;const{canvas:e,currentDevicePixelRatio:s}=i,n=zi(e),r="border-box"===n.boxSizing,o=Wi(n,"padding"),a=Wi(n,"border","width"),{x:h,y:c,box:l}=function(t,i){const e=t.touches,s=e&&e.length?e[0]:t,{offsetX:n,offsetY:r}=s;let o,a,h=!1;if(Hi(n,r,t.target))o=n,a=r;else{const t=i.getBoundingClientRect();o=s.clientX-t.left,a=s.clientY-t.top,h=!0}return{x:o,y:a,box:h}}(t,e),u=o.left+(l&&a.left),d=o.top+(l&&a.top);let{width:f,height:b}=i;return r&&(f-=o.width+a.width,b-=o.height+a.height),{x:Math.round((h-u)/f*e.width/s),y:Math.round((c-d)/b*e.height/s)}}const Gi=t=>Math.round(10*t)/10;function Yi(t,i,e){const s=i||1,n=Math.floor(t.height*s),r=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||o.height!==n||o.width!==r)&&(t.currentDevicePixelRatio=s,o.height=n,o.width=r,t.ctx.setTransform(s,0,0,s,0,0),!0)}const Vi=function(){let t=!1;try{const i={get passive(){return t=!0,!1}};Ii()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch(t){}return t}();function Xi(t,i){const e=function(t,i){return zi(t).getPropertyValue(i)}(t,i),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Ui(t,i,e){return t?function(t,i){return{x:e=>t+t+i-e,setWidth(t){i=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,i)=>t-i,leftForLtr:(t,i)=>t-i}}(i,e):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,i)=>t+i,leftForLtr:t=>t}}function Zi(t,i){let e,s;"ltr"!==i&&"rtl"!==i||(e=t.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",i,"important"),t.prevTextDirection=s)}function Ki(t,i){void 0!==i&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",i[0],i[1]))}
14
+ /*!
15
+ * Chart.js v4.4.1
16
+ * https://www.chartjs.org
17
+ * (c) 2023 Chart.js Contributors
18
+ * Released under the MIT License
19
+ */class Qi{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,i,e,s){const n=i.duration;i.listeners[s].forEach((s=>s({chart:t,initial:i.initial,numSteps:n,currentStep:Math.min(e-i.start,n)})))}_refresh(){this._request||(this._running=!0,this._request=jt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let i=0;this._charts.forEach(((e,s)=>{if(!e.running||!e.items.length)return;const n=e.items;let r,o=n.length-1,a=!1;for(;o>=0;--o)r=n[o],r._active?(r._total>e.duration&&(e.duration=r._total),r.tick(t),a=!0):(n[o]=n[n.length-1],n.pop());a&&(s.draw(),this._notify(s,e,t,"progress")),n.length||(e.running=!1,this._notify(s,e,t,"complete"),e.initial=!1),i+=n.length})),this._lastDate=t,0===i&&(this._running=!1)}_getAnims(t){const i=this._charts;let e=i.get(t);return e||(e={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},i.set(t,e)),e}listen(t,i,e){this._getAnims(t).listeners[i].push(e)}add(t,i){i&&i.length&&this._getAnims(t).items.push(...i)}has(t){return this._getAnims(t).items.length>0}start(t){const i=this._charts.get(t);i&&(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce(((t,i)=>Math.max(t,i._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const i=this._charts.get(t);return!!(i&&i.running&&i.items.length)}stop(t){const i=this._charts.get(t);if(!i||!i.items.length)return;const e=i.items;let s=e.length-1;for(;s>=0;--s)e[s].cancel();i.items=[],this._notify(t,i,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var qi=new Qi;const Ji="transparent",te={boolean:(t,i,e)=>e>.5?i:t,color(t,i,e){const s=zt(t||Ji),n=s.valid&&zt(i||Ji);return n&&n.valid?n.mix(s,e).hexString():i},number:(t,i,e)=>t+(i-t)*e};class ie{constructor(t,i,e,s){const n=i[e];s=xi([t.to,s,n,t.from]);const r=xi([t.from,n,s]);this._active=!0,this._fn=t.fn||te[t.type||typeof r],this._easing=Tt[t.easing]||Tt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=i,this._prop=e,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,i,e){if(this._active){this._notify(!1);const s=this._target[this._prop],n=e-this._start,r=this._duration-n;this._start=e,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=xi([t.to,i,s,t.from]),this._from=xi([t.from,s,i])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const i=t-this._start,e=this._duration,s=this._prop,n=this._from,r=this._loop,o=this._to;let a;if(this._active=n!==o&&(r||i<e),!this._active)return this._target[s]=o,void this._notify(!0);i<0?this._target[s]=n:(a=i/e%2,a=r&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(n,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((i,e)=>{t.push({res:i,rej:e})}))}_notify(t){const i=t?"res":"rej",e=this._promises||[];for(let t=0;t<e.length;t++)e[t][i]()}}class ee{constructor(t,i){this._chart=t,this._properties=new Map,this.configure(i)}configure(t){if(!W(t))return;const i=Object.keys(qt.animation),e=this._properties;Object.getOwnPropertyNames(t).forEach((s=>{const n=t[s];if(!W(n))return;const r={};for(const t of i)r[t]=n[t];(N(n.properties)&&n.properties||[s]).forEach((t=>{t!==s&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,i){const e=i.options,s=function(t,i){if(!i)return;let e=t.options;if(e)return e.$shared&&(t.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e;t.options=i}(t,e);if(!s)return[];const n=this._createAnimations(s,e);return e.$shared&&function(t,i){const e=[],s=Object.keys(i);for(let i=0;i<s.length;i++){const n=t[s[i]];n&&n.active()&&e.push(n.wait())}return Promise.all(e)}(t.options.$animations,e).then((()=>{t.options=e}),(()=>{})),n}_createAnimations(t,i){const e=this._properties,s=[],n=t.$animations||(t.$animations={}),r=Object.keys(i),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const h=r[a];if("$"===h.charAt(0))continue;if("options"===h){s.push(...this._animateOptions(t,i));continue}const c=i[h];let l=n[h];const u=e.get(h);if(l){if(u&&l.active()){l.update(u,c,o);continue}l.cancel()}u&&u.duration?(n[h]=l=new ie(u,t,h,c),s.push(l)):t[h]=c}return s}update(t,i){if(0===this._properties.size)return void Object.assign(t,i);const e=this._createAnimations(t,i);return e.length?(qi.add(this._chart,e),!0):void 0}}function se(t,i){const e=t&&t.options||{},s=e.reverse,n=void 0===e.min?i:0,r=void 0===e.max?i:0;return{start:s?r:n,end:s?n:r}}function ne(t,i){const e=[],s=t._getSortedDatasetMetas(i);let n,r;for(n=0,r=s.length;n<r;++n)e.push(s[n].index);return e}function re(t,i,e,s={}){const n=t.keys,r="single"===s.mode;let o,a,h,c;if(null!==i){for(o=0,a=n.length;o<a;++o){if(h=+n[o],h===e){if(s.all)continue;break}c=t.values[h],H(c)&&(r||0===i||pt(i)===pt(c))&&(i+=c)}return i}}function oe(t,i){const e=t&&t.options.stacked;return e||void 0===e&&void 0!==i.stack}function ae(t,i,e){const s=t[i]||(t[i]={});return s[e]||(s[e]={})}function he(t,i,e,s){for(const n of i.getMatchingVisibleMetas(s).reverse()){const i=t[n.index];if(e&&i>0||!e&&i<0)return n.index}return null}function ce(t,i){const{chart:e,_cachedMeta:s}=t,n=e._stacks||(e._stacks={}),{iScale:r,vScale:o,index:a}=s,h=r.axis,c=o.axis,l=function(t,i,e){return`${t.id}.${i.id}.${e.stack||e.type}`}(r,o,s),u=i.length;let d;for(let t=0;t<u;++t){const e=i[t],{[h]:r,[c]:u}=e;d=(e._stacks||(e._stacks={}))[c]=ae(n,l,r),d[a]=u,d._top=he(d,o,!0,s.type),d._bottom=he(d,o,!1,s.type),(d._visualValues||(d._visualValues={}))[a]=u}}function le(t,i){const e=t.scales;return Object.keys(e).filter((t=>e[t].axis===i)).shift()}function ue(t,i){const e=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){i=i||t._parsed;for(const t of i){const i=t._stacks;if(!i||void 0===i[s]||void 0===i[s][e])return;delete i[s][e],void 0!==i[s]._visualValues&&void 0!==i[s]._visualValues[e]&&delete i[s]._visualValues[e]}}}const de=t=>"reset"===t||"none"===t,fe=(t,i)=>i?t:Object.assign({},t);class be{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,i){this.chart=t,this._ctx=t.ctx,this.index=i,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=oe(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ue(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,i=this._cachedMeta,e=this.getDataset(),s=(t,i,e,s)=>"x"===t?i:"r"===t?s:e,n=i.xAxisID=G(e.xAxisID,le(t,"x")),r=i.yAxisID=G(e.yAxisID,le(t,"y")),o=i.rAxisID=G(e.rAxisID,le(t,"r")),a=i.indexAxis,h=i.iAxisID=s(a,n,r,o),c=i.vAxisID=s(a,r,n,o);i.xScale=this.getScaleForId(n),i.yScale=this.getScaleForId(r),i.rScale=this.getScaleForId(o),i.iScale=this.getScaleForId(h),i.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Dt(this._data,this),t._stacked&&ue(t)}_dataCheck(){const t=this.getDataset(),i=t.data||(t.data=[]),e=this._data;if(W(i))this._data=function(t){const i=Object.keys(t),e=new Array(i.length);let s,n,r;for(s=0,n=i.length;s<n;++s)r=i[s],e[s]={x:r,y:t[r]};return e}(i);else if(e!==i){if(e){Dt(e,this);const t=this._cachedMeta;ue(t),t._parsed=[]}i&&Object.isExtensible(i)&&(this,(s=i)._chartjs?s._chartjs.listeners.push(this):(Object.defineProperty(s,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),Rt.forEach((t=>{const i="_onData"+st(t),e=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...t){const n=e.apply(this,t);return s._chartjs.listeners.forEach((e=>{"function"==typeof e[i]&&e[i](...t)})),n}})})))),this._syncList=[],this._data=i}var s}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const i=this._cachedMeta,e=this.getDataset();let s=!1;this._dataCheck();const n=i._stacked;i._stacked=oe(i.vScale,i),i.stack!==e.stack&&(s=!0,ue(i),i.stack=e.stack),this._resyncElements(t),(s||n!==i._stacked)&&ce(this,i._parsed)}configure(){const t=this.chart.config,i=t.datasetScopeKeys(this._type),e=t.getOptionScopes(this.getDataset(),i,!0);this.options=t.createResolver(e,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,i){const{_cachedMeta:e,_data:s}=this,{iScale:n,_stacked:r}=e,o=n.axis;let a,h,c,l=0===t&&i===s.length||e._sorted,u=t>0&&e._parsed[t-1];if(!1===this._parsing)e._parsed=s,e._sorted=!0,c=s;else{c=N(s[t])?this.parseArrayData(e,s,t,i):W(s[t])?this.parseObjectData(e,s,t,i):this.parsePrimitiveData(e,s,t,i);const n=()=>null===h[o]||u&&h[o]<u[o];for(a=0;a<i;++a)e._parsed[a+t]=h=c[a],l&&(n()&&(l=!1),u=h);e._sorted=l}r&&ce(this,c)}parsePrimitiveData(t,i,e,s){const{iScale:n,vScale:r}=t,o=n.axis,a=r.axis,h=n.getLabels(),c=n===r,l=new Array(s);let u,d,f;for(u=0,d=s;u<d;++u)f=u+e,l[u]={[o]:c||n.parse(h[f],f),[a]:r.parse(i[f],f)};return l}parseArrayData(t,i,e,s){const{xScale:n,yScale:r}=t,o=new Array(s);let a,h,c,l;for(a=0,h=s;a<h;++a)c=a+e,l=i[c],o[a]={x:n.parse(l[0],c),y:r.parse(l[1],c)};return o}parseObjectData(t,i,e,s){const{xScale:n,yScale:r}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,h=new Array(s);let c,l,u,d;for(c=0,l=s;c<l;++c)u=c+e,d=i[u],h[c]={x:n.parse(et(d,o),u),y:r.parse(et(d,a),u)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,e){const s=this._cachedMeta,n=i[t.axis];return re({keys:ne(this.chart,!0),values:i._stacks[t.axis]._visualValues},n,s.index,{mode:e})}updateRangeFromParsed(t,i,e,s){const n=e[i.axis];let r=null===n?NaN:n;const o=s&&e._stacks[i.axis];s&&o&&(s.values=o,r=re(s,n,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,i){const e=this._cachedMeta,s=e._parsed,n=e._sorted&&t===e.iScale,r=s.length,o=this._getOtherScale(t),a=((t,i)=>t&&!i.hidden&&i._stacked&&{keys:ne(this.chart,!0),values:null})(i,e),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:l}=function(t){const{min:i,max:e,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?i:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}(o);let u,d;function f(){d=s[u];const i=d[o.axis];return!H(d[t.axis])||c>i||l<i}for(u=0;u<r&&(f()||(this.updateRangeFromParsed(h,t,d,a),!n));++u);if(n)for(u=r-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(h,t,d,a);break}return h}getAllParsedValues(t){const i=this._cachedMeta._parsed,e=[];let s,n,r;for(s=0,n=i.length;s<n;++s)r=i[s][t.axis],H(r)&&e.push(r);return e}getMaxOverflow(){return!1}getLabelAndValue(t){const i=this._cachedMeta,e=i.iScale,s=i.vScale,n=this.getParsed(t);return{label:e?""+e.getLabelForValue(n[e.axis]):"",value:s?""+s.getLabelForValue(n[s.axis]):""}}_update(t){const i=this._cachedMeta;this.update(t||"default"),i._clip=function(t){let i,e,s,n;return W(t)?(i=t.top,e=t.right,s=t.bottom,n=t.left):i=e=s=n=t,{top:i,right:e,bottom:s,left:n,disabled:!1===t}}(G(this.options.clip,function(t,i,e){if(!1===e)return!1;const s=se(t,e),n=se(i,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}(i.xScale,i.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,i=this._cachedMeta,e=i.data||[],s=this.chart.chartArea,n=[],r=this._drawStart||0,o=this._drawCount||e.length-r,a=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,s,r,o),h=r;h<r+o;++h){const i=e[h];i.hidden||(i.active&&a?n.push(i):i.draw(t,s))}for(h=0;h<n.length;++h)n[h].draw(t,s)}getStyle(t,i){const e=i?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(t,i,e){const s=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const i=this._cachedMeta.data[t];n=i.$context||(i.$context=function(t,i,e){return Mi(t,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:e,index:i,mode:"default",type:"data"})}(this.getContext(),t,i)),n.parsed=this.getParsed(t),n.raw=s.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,i){return Mi(t,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=s,n.index=n.datasetIndex=this.index;return n.active=!!i,n.mode=e,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",e){const s="active"===i,n=this._cachedDataOpts,r=t+"-"+i,o=n[r],a=this.enableOptionSharing&&nt(e);if(o)return fe(o,a);const h=this.chart.config,c=h.datasetElementScopeKeys(this._type,t),l=s?[`${t}Hover`,"hover",t,""]:[t,""],u=h.getOptionScopes(this.getDataset(),c),d=Object.keys(qt.elements[t]),f=h.resolveNamedOptions(u,d,(()=>this.getContext(e,s,i)),l);return f.$shared&&(f.$shared=a,n[r]=Object.freeze(fe(f,a))),f}_resolveAnimations(t,i,e){const s=this.chart,n=this._cachedDataOpts,r=`animation-${i}`,o=n[r];if(o)return o;let a;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,i),r=s.getOptionScopes(this.getDataset(),n);a=s.createResolver(r,this.getContext(t,e,i))}const h=new ee(s,a&&a.animations);return a&&a._cacheable&&(n[r]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||de(t)||this.chart._animationsDisabled}_getSharedOptions(t,i){const e=this.resolveDataElementOptions(t,i),s=this._sharedOptions,n=this.getSharedOptions(e),r=this.includeOptions(i,n)||n!==s;return this.updateSharedOptions(n,i,e),{sharedOptions:n,includeOptions:r}}updateElement(t,i,e,s){de(s)?Object.assign(t,e):this._resolveAnimations(i,s).update(t,e)}updateSharedOptions(t,i,e){t&&!de(i)&&this._resolveAnimations(void 0,i).update(t,e)}_setStyle(t,i,e,s){t.active=s;const n=this.getStyle(i,s);this._resolveAnimations(i,e,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,i,e){this._setStyle(t,e,"active",!1)}setHoverStyle(t,i,e){this._setStyle(t,e,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const i=this._data,e=this._cachedMeta.data;for(const[t,i,e]of this._syncList)this[t](i,e);this._syncList=[];const s=e.length,n=i.length,r=Math.min(n,s);r&&this.parse(0,r),n>s?this._insertElements(s,n-s,t):n<s&&this._removeElements(n,s-n)}_insertElements(t,i,e=!0){const s=this._cachedMeta,n=s.data,r=t+i;let o;const a=t=>{for(t.length+=i,o=t.length-1;o>=r;o--)t[o]=t[o-i]};for(a(n),o=t;o<r;++o)n[o]=new this.dataElementType;this._parsing&&a(s._parsed),this.parse(t,i),e&&this.updateElements(n,t,i,"reset")}updateElements(t,i,e,s){}_removeElements(t,i){const e=this._cachedMeta;if(this._parsing){const s=e._parsed.splice(t,i);e._stacked&&ue(e,s)}e.data.splice(t,i)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[i,e,s]=t;this[i](e,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,i){i&&this._sync(["_removeElements",t,i]);const e=arguments.length-2;e&&this._sync(["_insertElements",t,e])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function pe(t,i,e,s){return N(t)?function(t,i,e,s){const n=e.parse(t[0],s),r=e.parse(t[1],s),o=Math.min(n,r),a=Math.max(n,r);let h=o,c=a;Math.abs(o)>Math.abs(a)&&(h=a,c=o),i[e.axis]=c,i._custom={barStart:h,barEnd:c,start:n,end:r,min:o,max:a}}(t,i,e,s):i[e.axis]=e.parse(t,s),i}function ge(t,i,e,s){const n=t.iScale,r=t.vScale,o=n.getLabels(),a=n===r,h=[];let c,l,u,d;for(c=e,l=e+s;c<l;++c)d=i[c],u={},u[n.axis]=a||n.parse(o[c],c),h.push(pe(d,u,r,c));return h}function me(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function ve(t,i,e,s){let n=i.borderSkipped;const r={};if(!n)return void(t.borderSkipped=r);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:a,reverse:h,top:c,bottom:l}=function(t){let i,e,s,n,r;return t.horizontal?(i=t.base>t.x,e="left",s="right"):(i=t.base<t.y,e="bottom",s="top"),i?(n="end",r="start"):(n="start",r="end"),{start:e,end:s,reverse:i,top:n,bottom:r}}(t);"middle"===n&&e&&(t.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=l:(r[ye(l,o,a,h)]=!0,n=c)),r[ye(n,o,a,h)]=!0,t.borderSkipped=r}function ye(t,i,e,s){var n,r,o;return s?(o=e,t=xe(t=(n=t)===(r=i)?o:n===o?r:n,e,i)):t=xe(t,i,e),t}function xe(t,i,e){return"start"===t?i:"end"===t?e:t}function Me(t,{inflateAmount:i},e){t.inflateAmount="auto"===i?1===e?.33:0:i}class ke extends be{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const i=t.data;if(i.labels.length&&i.datasets.length){const{labels:{pointStyle:e,color:s}}=t.legend.options;return i.labels.map(((i,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:i,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,i,e){e.chart.toggleDataVisibility(i.index),e.chart.update()}}}};constructor(t,i){super(t,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,i){const e=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=e;else{let n,r,o=t=>+e[t];if(W(e[t])){const{key:t="value"}=this._parsing;o=i=>+et(e[i],t)}for(n=t,r=t+i;n<r;++n)s._parsed[n]=o(n)}}_getRotation(){return yt(this.options.rotation-90)}_getCircumference(){return yt(this.options.circumference)}_getRotationExtents(){let t=ht,i=-ht;for(let e=0;e<this.chart.data.datasets.length;++e)if(this.chart.isDatasetVisible(e)&&this.chart.getDatasetMeta(e).type===this._type){const s=this.chart.getDatasetMeta(e).controller,n=s._getRotation(),r=s._getCircumference();t=Math.min(t,n),i=Math.max(i,n+r)}return{rotation:t,circumference:i-t}}update(t){const i=this.chart,{chartArea:e}=i,s=this._cachedMeta,n=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,o=Math.max((Math.min(e.width,e.height)-r)/2,0),a=Math.min((c=o,"string"==typeof(h=this.options.cutout)&&h.endsWith("%")?parseFloat(h)/100:+h/c),1);var h,c;const l=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:b,offsetX:p,offsetY:g}=function(t,i,e){let s=1,n=1,r=0,o=0;if(i<ht){const a=t,h=a+i,c=Math.cos(a),l=Math.sin(a),u=Math.cos(h),d=Math.sin(h),f=(t,i,s)=>kt(t,a,h,!0)?1:Math.max(i,i*e,s,s*e),b=(t,i,s)=>kt(t,a,h,!0)?-1:Math.min(i,i*e,s,s*e),p=f(0,c,u),g=f(ut,l,d),m=b(at,c,u),v=b(at+ut,l,d);s=(p-m)/2,n=(g-v)/2,r=-(p+m)/2,o=-(g+v)/2}return{ratioX:s,ratioY:n,offsetX:r,offsetY:o}}(d,u,a),m=Math.max(Math.min((e.width-r)/f,(e.height-r)/b)/2,0),v=Y(this.options.radius,m),y=(v-Math.max(v*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*v,this.offsetY=g*v,s.total=this.calculateTotal(),this.outerRadius=v-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*l,0),this.updateElements(n,0,n.length,t)}_circumference(t,i){const e=this.options,s=this._cachedMeta,n=this._getCircumference();return i&&e.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/ht)}updateElements(t,i,e,s){const n="reset"===s,r=this.chart,o=r.chartArea,a=(o.left+o.right)/2,h=(o.top+o.bottom)/2,c=n&&r.options.animation.animateScale,l=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(i,s);let b,p=this._getRotation();for(b=0;b<i;++b)p+=this._circumference(b,n);for(b=i;b<i+e;++b){const i=this._circumference(b,n),e=t[b],r={x:a+this.offsetX,y:h+this.offsetY,startAngle:p,endAngle:p+i,circumference:i,outerRadius:u,innerRadius:l};f&&(r.options=d||this.resolveDataElementOptions(b,e.active?"active":s)),p+=i,this.updateElement(e,b,r,s)}}calculateTotal(){const t=this._cachedMeta,i=t.data;let e,s=0;for(e=0;e<i.length;e++){const n=t._parsed[e];null===n||isNaN(n)||!this.chart.getDataVisibility(e)||i[e].hidden||(s+=Math.abs(n))}return s}calculateCircumference(t){const i=this._cachedMeta.total;return i>0&&!isNaN(t)?ht*(Math.abs(t)/i):0}getLabelAndValue(t){const i=this.chart,e=i.data.labels||[],s=Gt(this._cachedMeta._parsed[t],i.options.locale);return{label:e[t]||"",value:s}}getMaxBorderWidth(t){let i=0;const e=this.chart;let s,n,r,o,a;if(!t)for(s=0,n=e.data.datasets.length;s<n;++s)if(e.isDatasetVisible(s)){r=e.getDatasetMeta(s),t=r.data,o=r.controller;break}if(!t)return 0;for(s=0,n=t.length;s<n;++s)a=o.resolveDataElementOptions(s),"inner"!==a.borderAlign&&(i=Math.max(i,a.borderWidth||0,a.hoverBorderWidth||0));return i}getMaxOffset(t){let i=0;for(let e=0,s=t.length;e<s;++e){const t=this.resolveDataElementOptions(e);i=Math.max(i,t.offset||0,t.hoverOffset||0)}return i}_getRingWeightOffset(t){let i=0;for(let e=0;e<t;++e)this.chart.isDatasetVisible(e)&&(i+=this._getRingWeight(e));return i}_getRingWeight(t){return Math.max(G(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class we extends be{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const i=t.data;if(i.labels.length&&i.datasets.length){const{labels:{pointStyle:e,color:s}}=t.legend.options;return i.labels.map(((i,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:i,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,i,e){e.chart.toggleDataVisibility(i.index),e.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,i){super(t,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const i=this.chart,e=i.data.labels||[],s=Gt(this._cachedMeta._parsed[t].r,i.options.locale);return{label:e[t]||"",value:s}}parseObjectData(t,i,e,s){return Pi.bind(this)(t,i,e,s)}update(t){const i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,t)}getMinMax(){const t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach(((i,e)=>{const s=this.getParsed(e).r;!isNaN(s)&&this.chart.getDataVisibility(e)&&(s<t.min&&(t.min=s),s>t.max&&(t.max=s))})),t}_updateRadius(){const t=this.chart,i=t.chartArea,e=t.options,s=Math.min(i.right-i.left,i.bottom-i.top),n=Math.max(s/2,0),r=(n-Math.max(e.cutoutPercentage?n/100*e.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,i,e,s){const n="reset"===s,r=this.chart,o=r.options.animation,a=this._cachedMeta.rScale,h=a.xCenter,c=a.yCenter,l=a.getIndexAngle(0)-.5*at;let u,d=l;const f=360/this.countVisibleElements();for(u=0;u<i;++u)d+=this._computeAngle(u,s,f);for(u=i;u<i+e;u++){const i=t[u];let e=d,b=d+this._computeAngle(u,s,f),p=r.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=b,n&&(o.animateScale&&(p=0),o.animateRotate&&(e=b=l));const g={x:h,y:c,innerRadius:0,outerRadius:p,startAngle:e,endAngle:b,options:this.resolveDataElementOptions(u,i.active?"active":s)};this.updateElement(i,u,g,s)}}countVisibleElements(){let t=0;return this._cachedMeta.data.forEach(((i,e)=>{!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)&&t++})),t}_computeAngle(t,i,e){return this.chart.getDataVisibility(t)?yt(this.resolveDataElementOptions(t,i).angle||e):0}}function _e(t,i,e,s){const{controller:n,data:r,_sorted:o}=t,a=n._cachedMeta.iScale;if(a&&i===a.axis&&"r"!==i&&o&&r.length){const t=a._reversePixels?St:Ot;if(!s)return t(r,i,e);if(n._sharedOptions){const s=r[0],n="function"==typeof s.getRange&&s.getRange(i);if(n){const s=t(r,i,e-n),o=t(r,i,e+n);return{lo:s.lo,hi:o.hi}}}}return{lo:0,hi:r.length-1}}function Ae(t,i,e,s,n){const r=t.getSortedVisibleDatasetMetas(),o=e[i];for(let t=0,e=r.length;t<e;++t){const{index:e,data:a}=r[t],{lo:h,hi:c}=_e(r[t],i,o,n);for(let t=h;t<=c;++t){const i=a[t];i.skip||s(i,e,t)}}}function Oe(t,i,e,s,n){const r=[];return n||t.isPointInArea(i)?(Ae(t,e,i,(function(e,o,a){(n||ni(e,t.chartArea,0))&&e.inRange(i.x,i.y,s)&&r.push({element:e,datasetIndex:o,index:a})}),!0),r):r}function Se(t,i,e,s,n,r){return r||t.isPointInArea(i)?"r"!==e||s?function(t,i,e,s,n,r){let o=[];const a=function(t){const i=-1!==t.indexOf("x"),e=-1!==t.indexOf("y");return function(t,s){const n=i?Math.abs(t.x-s.x):0,r=e?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}}(e);let h=Number.POSITIVE_INFINITY;return Ae(t,e,i,(function(e,c,l){const u=e.inRange(i.x,i.y,n);if(s&&!u)return;const d=e.getCenterPoint(n);if(!r&&!t.isPointInArea(d)&&!u)return;const f=a(i,d);f<h?(o=[{element:e,datasetIndex:c,index:l}],h=f):f===h&&o.push({element:e,datasetIndex:c,index:l})})),o}(t,i,e,s,n,r):function(t,i,e,s){let n=[];return Ae(t,e,i,(function(t,e,r){const{startAngle:o,endAngle:a}=t.getProps(["startAngle","endAngle"],s),{angle:h}=function(t,i){const e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s);let r=Math.atan2(s,e);return r<-.5*at&&(r+=ht),{angle:r,distance:n}}(t,{x:i.x,y:i.y});kt(h,o,a)&&n.push({element:t,datasetIndex:e,index:r})})),n}(t,i,e,n):[]}function Re(t,i,e,s,n){const r=[],o="x"===e?"inXRange":"inYRange";let a=!1;return Ae(t,e,i,((t,s,h)=>{t[o](i[e],n)&&(r.push({element:t,datasetIndex:s,index:h}),a=a||t.inRange(i.x,i.y,n))})),s&&!a?[]:r}var De={evaluateInteractionItems:Ae,modes:{index(t,i,e,s){const n=$i(i,t),r=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?Oe(t,n,r,s,o):Se(t,n,r,!1,s,o),h=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const i=a[0].index,e=t.data[i];e&&!e.skip&&h.push({element:e,datasetIndex:t.index,index:i})})),h):[]},dataset(t,i,e,s){const n=$i(i,t),r=e.axis||"xy",o=e.includeInvisible||!1;let a=e.intersect?Oe(t,n,r,s,o):Se(t,n,r,!1,s,o);if(a.length>0){const i=a[0].datasetIndex,e=t.getDatasetMeta(i).data;a=[];for(let t=0;t<e.length;++t)a.push({element:e[t],datasetIndex:i,index:t})}return a},point:(t,i,e,s)=>Oe(t,$i(i,t),e.axis||"xy",s,e.includeInvisible||!1),nearest:(t,i,e,s)=>Se(t,$i(i,t),e.axis||"xy",e.intersect,s,e.includeInvisible||!1),x:(t,i,e,s)=>Re(t,$i(i,t),"x",e.intersect,s),y:(t,i,e,s)=>Re(t,$i(i,t),"y",e.intersect,s)}};const je=["left","top","right","bottom"];function Ce(t,i){return t.filter((t=>t.pos===i))}function Be(t,i){return t.filter((t=>-1===je.indexOf(t.pos)&&t.box.axis===i))}function Ee(t,i){return t.sort(((t,e)=>{const s=i?e:t,n=i?t:e;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function Le(t,i,e,s){return Math.max(t[e],i[e])+Math.max(t[s],i[s])}function Pe(t,i){t.top=Math.max(t.top,i.top),t.left=Math.max(t.left,i.left),t.bottom=Math.max(t.bottom,i.bottom),t.right=Math.max(t.right,i.right)}function Ie(t,i,e,s){const{pos:n,box:r}=e,o=t.maxPadding;if(!W(n)){e.size&&(t[n]-=e.size);const i=s[e.stack]||{size:0,count:1};i.size=Math.max(i.size,e.horizontal?r.height:r.width),e.size=i.size/i.count,t[n]+=e.size}r.getPadding&&Pe(o,r.getPadding());const a=Math.max(0,i.outerWidth-Le(o,t,"left","right")),h=Math.max(0,i.outerHeight-Le(o,t,"top","bottom")),c=a!==t.w,l=h!==t.h;return t.w=a,t.h=h,e.horizontal?{same:c,other:l}:{same:l,other:c}}function Te(t,i){const e=i.maxPadding;return function(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(i[t],e[t])})),s}(t?["left","right"]:["top","bottom"])}function Fe(t,i,e,s){const n=[];let r,o,a,h,c,l;for(r=0,o=t.length,c=0;r<o;++r){a=t[r],h=a.box,h.update(a.width||i.w,a.height||i.h,Te(a.horizontal,i));const{same:o,other:u}=Ie(i,e,a,s);c|=o&&n.length,l=l||u,h.fullSize||n.push(a)}return c&&Fe(n,i,e,s)||l}function ze(t,i,e,s,n){t.top=e,t.left=i,t.right=i+s,t.bottom=e+n,t.width=s,t.height=n}function Ne(t,i,e,s){const n=e.padding;let{x:r,y:o}=i;for(const a of t){const t=a.box,h=s[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/h.weight||1;if(a.horizontal){const s=i.w*c,r=h.size||t.height;nt(h.start)&&(o=h.start),t.fullSize?ze(t,n.left,o,e.outerWidth-n.right-n.left,r):ze(t,i.left+h.placed,o,s,r),h.start=o,h.placed+=s,o=t.bottom}else{const s=i.h*c,o=h.size||t.width;nt(h.start)&&(r=h.start),t.fullSize?ze(t,r,n.top,o,e.outerHeight-n.bottom-n.top):ze(t,r,i.top+h.placed,o,s),h.start=r,h.placed+=s,r=t.right}}i.x=r,i.y=o}var We={addBox(t,i){t.boxes||(t.boxes=[]),i.fullSize=i.fullSize||!1,i.position=i.position||"top",i.weight=i.weight||0,i._layers=i._layers||function(){return[{z:0,draw(t){i.draw(t)}}]},t.boxes.push(i)},removeBox(t,i){const e=t.boxes?t.boxes.indexOf(i):-1;-1!==e&&t.boxes.splice(e,1)},configure(t,i,e){i.fullSize=e.fullSize,i.position=e.position,i.weight=e.weight},update(t,i,e,s){if(!t)return;const n=vi(t.options.layout.padding),r=Math.max(i-n.width,0),o=Math.max(e-n.height,0),a=function(t){const i=function(t){const i=[];let e,s,n,r,o,a;for(e=0,s=(t||[]).length;e<s;++e)n=t[e],({position:r,options:{stack:o,stackWeight:a=1}}=n),i.push({index:e,box:n,pos:r,horizontal:n.isHorizontal(),weight:n.weight,stack:o&&r+o,stackWeight:a});return i}(t),e=Ee(i.filter((t=>t.box.fullSize)),!0),s=Ee(Ce(i,"left"),!0),n=Ee(Ce(i,"right")),r=Ee(Ce(i,"top"),!0),o=Ee(Ce(i,"bottom")),a=Be(i,"x"),h=Be(i,"y");return{fullSize:e,leftAndTop:s.concat(r),rightAndBottom:n.concat(h).concat(o).concat(a),chartArea:Ce(i,"chartArea"),vertical:s.concat(n).concat(h),horizontal:r.concat(o).concat(a)}}(t.boxes),h=a.vertical,c=a.horizontal;X(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const l=h.reduce(((t,i)=>i.box.options&&!1===i.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:i,outerHeight:e,padding:n,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/l,hBoxMaxHeight:o/2}),d=Object.assign({},n);Pe(d,vi(s));const f=Object.assign({maxPadding:d,w:r,h:o,x:n.left,y:n.top},n),b=function(t,i){const e=function(t){const i={};for(const e of t){const{stack:t,pos:s,stackWeight:n}=e;if(!t||!je.includes(s))continue;const r=i[t]||(i[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=n}return i}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=i;let r,o,a;for(r=0,o=t.length;r<o;++r){a=t[r];const{fullSize:o}=a.box,h=e[a.stack],c=h&&a.stackWeight/h.weight;a.horizontal?(a.width=c?c*s:o&&i.availableWidth,a.height=n):(a.width=s,a.height=c?c*n:o&&i.availableHeight)}return e}(h.concat(c),u);Fe(a.fullSize,f,u,b),Fe(h,f,u,b),Fe(c,f,u,b)&&Fe(h,f,u,b),function(t){const i=t.maxPadding;function e(e){const s=Math.max(i[e]-t[e],0);return t[e]+=s,s}t.y+=e("top"),t.x+=e("left"),e("right"),e("bottom")}(f),Ne(a.leftAndTop,f,u,b),f.x+=f.w,f.y+=f.h,Ne(a.rightAndBottom,f,u,b),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},X(a.chartArea,(i=>{const e=i.box;Object.assign(e,t.chartArea),e.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class He{acquireContext(t,i){}releaseContext(t){return!1}addEventListener(t,i,e){}removeEventListener(t,i,e){}getDevicePixelRatio(){return 1}getMaximumSize(t,i,e,s){return i=Math.max(0,i||t.width),e=e||t.height,{width:i,height:Math.max(0,s?Math.floor(i/s):e)}}isAttached(t){return!0}updateConfig(t){}}class $e extends He{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ge="$chartjs",Ye={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ve=t=>null===t||""===t,Xe=!!Vi&&{passive:!0};function Ue(t,i,e){t.canvas.removeEventListener(i,e,Xe)}function Ze(t,i){for(const e of t)if(e===i||e.contains(i))return!0}function Ke(t,i,e){const s=t.canvas,n=new MutationObserver((t=>{let i=!1;for(const e of t)i=i||Ze(e.addedNodes,s),i=i&&!Ze(e.removedNodes,s);i&&e()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Qe(t,i,e){const s=t.canvas,n=new MutationObserver((t=>{let i=!1;for(const e of t)i=i||Ze(e.removedNodes,s),i=i&&!Ze(e.addedNodes,s);i&&e()}));return n.observe(document,{childList:!0,subtree:!0}),n}const qe=new Map;let Je=0;function ts(){const t=window.devicePixelRatio;t!==Je&&(Je=t,qe.forEach(((i,e)=>{e.currentDevicePixelRatio!==t&&i()})))}function is(t,i,e){const s=t.canvas,n=s&&Ti(s);if(!n)return;const r=Ct(((t,i)=>{const s=n.clientWidth;e(t,i),s<n.clientWidth&&e()}),window),o=new ResizeObserver((t=>{const i=t[0],e=i.contentRect.width,s=i.contentRect.height;0===e&&0===s||r(e,s)}));return o.observe(n),function(t,i){qe.size||window.addEventListener("resize",ts),qe.set(t,i)}(t,r),o}function es(t,i,e){e&&e.disconnect(),"resize"===i&&function(t){qe.delete(t),qe.size||window.removeEventListener("resize",ts)}(t)}function ss(t,i,e){const s=t.canvas,n=Ct((i=>{null!==t.ctx&&e(function(t,i){const e=Ye[t.type]||t.type,{x:s,y:n}=$i(t,i);return{type:e,chart:i,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(i,t))}),t);return function(t,i,e){t.addEventListener(i,e,Xe)}(s,i,n),n}class ns extends He{acquireContext(t,i){const e=t&&t.getContext&&t.getContext("2d");return e&&e.canvas===t?(function(t,i){const e=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[Ge]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ve(n)){const i=Xi(t,"width");void 0!==i&&(t.width=i)}if(Ve(s))if(""===t.style.height)t.height=t.width/(i||2);else{const i=Xi(t,"height");void 0!==i&&(t.height=i)}}(t,i),e):null}releaseContext(t){const i=t.canvas;if(!i[Ge])return!1;const e=i[Ge].initial;["height","width"].forEach((t=>{const s=e[t];z(s)?i.removeAttribute(t):i.setAttribute(t,s)}));const s=e.style||{};return Object.keys(s).forEach((t=>{i.style[t]=s[t]})),i.width=i.width,delete i[Ge],!0}addEventListener(t,i,e){this.removeEventListener(t,i),(t.$proxies||(t.$proxies={}))[i]=({attach:Ke,detach:Qe,resize:is}[i]||ss)(t,i,e)}removeEventListener(t,i){const e=t.$proxies||(t.$proxies={}),s=e[i];s&&(({attach:es,detach:es,resize:es}[i]||Ue)(t,i,s),e[i]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,i,e,s){return function(t,i,e,s){const n=zi(t),r=Wi(n,"margin"),o=Fi(n.maxWidth,t,"clientWidth")||ct,a=Fi(n.maxHeight,t,"clientHeight")||ct,h=function(t,i,e){let s,n;if(void 0===i||void 0===e){const r=Ti(t);if(r){const t=r.getBoundingClientRect(),o=zi(r),a=Wi(o,"border","width"),h=Wi(o,"padding");i=t.width-h.width-a.width,e=t.height-h.height-a.height,s=Fi(o.maxWidth,r,"clientWidth"),n=Fi(o.maxHeight,r,"clientHeight")}else i=t.clientWidth,e=t.clientHeight}return{width:i,height:e,maxWidth:s||ct,maxHeight:n||ct}}(t,i,e);let{width:c,height:l}=h;if("content-box"===n.boxSizing){const t=Wi(n,"border","width"),i=Wi(n,"padding");c-=i.width+t.width,l-=i.height+t.height}return c=Math.max(0,c-r.width),l=Math.max(0,s?c/s:l-r.height),c=Gi(Math.min(c,o,h.maxWidth)),l=Gi(Math.min(l,a,h.maxHeight)),c&&!l&&(l=Gi(c/2)),(void 0!==i||void 0!==e)&&s&&h.height&&l>h.height&&(l=h.height,c=Gi(Math.floor(l*s))),{width:c,height:l}}(t,i,e,s)}isAttached(t){const i=Ti(t);return!(!i||!i.isConnected)}}class rs{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:i,y:e}=this.getProps(["x","y"],t);return{x:i,y:e}}hasValue(){return vt(this.x)&&vt(this.y)}getProps(t,i){const e=this.$animations;if(!i||!e)return this;const s={};return t.forEach((t=>{s[t]=e[t]&&e[t].active()?e[t]._to:this[t]})),s}}function os(t,i,e,s,n){const r=G(s,0),o=Math.min(G(n,t.length),t.length);let a,h,c,l=0;for(e=Math.ceil(e),n&&(a=n-s,e=a/Math.floor(a/e)),c=r;c<0;)l++,c=Math.round(r+l*e);for(h=Math.max(r,0);h<o;h++)h===c&&(i.push(t[h]),l++,c=Math.round(r+l*e))}const as=(t,i,e)=>"top"===i||"left"===i?t[i]+e:t[i]-e,hs=(t,i)=>Math.min(i||t,t);function cs(t,i){const e=[],s=t.length/i,n=t.length;let r=0;for(;r<n;r+=s)e.push(t[Math.floor(r)]);return e}function ls(t,i,e){const s=t.ticks.length,n=Math.min(i,s-1),r=t._startPixel,o=t._endPixel,a=1e-6;let h,c=t.getPixelForTick(n);if(!(e&&(h=1===s?Math.max(c-r,o-c):0===i?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(n-1))/2,c+=n<i?h:-h,c<r-a||c>o+a)))return c}function us(t){return t.drawTicks?t.tickLength:0}function ds(t,i){if(!t.display)return 0;const e=yi(t.font,i),s=vi(t.padding);return(N(t.text)?t.text.length:1)*e.lineHeight+s.height}function fs(t,i,e){let s=Bt(t);return(e&&"right"!==i||!e&&"right"===i)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class bs extends rs{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,i){return t}getUserBounds(){let{_userMin:t,_userMax:i,_suggestedMin:e,_suggestedMax:s}=this;return t=$(t,Number.POSITIVE_INFINITY),i=$(i,Number.NEGATIVE_INFINITY),e=$(e,Number.POSITIVE_INFINITY),s=$(s,Number.NEGATIVE_INFINITY),{min:$(t,e),max:$(i,s),minDefined:H(t),maxDefined:H(i)}}getMinMax(t){let i,{min:e,max:s,minDefined:n,maxDefined:r}=this.getUserBounds();if(n&&r)return{min:e,max:s};const o=this.getMatchingVisibleMetas();for(let a=0,h=o.length;a<h;++a)i=o[a].controller.getMinMax(this,t),n||(e=Math.min(e,i.min)),r||(s=Math.max(s,i.max));return e=r&&e>s?s:e,s=n&&e>s?e:s,{min:$(e,$(s,e)),max:$(s,$(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){V(this.options.beforeUpdate,[this])}update(t,i,e){const{beginAtZero:s,grace:n,ticks:r}=this.options,o=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=i,this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,i,e){const{min:s,max:n}=t,r=Y(i,(n-s)/2),o=(t,i)=>e&&0===t?0:t+i;return{min:o(s,-Math.abs(r)),max:o(n,r)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o<this.ticks.length;this._convertTicksToLabels(a?cs(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function(t,i){const e=t.options.ticks,s=function(t){const i=t.options.offset,e=t._tickSize();return Math.floor(Math.min(t._length/e+(i?0:1),t._maxLength/e))}(t),n=Math.min(e.maxTicksLimit||s,s),r=e.major.enabled?function(t){const i=[];let e,s;for(e=0,s=t.length;e<s;e++)t[e].major&&i.push(e);return i}(i):[],o=r.length,a=r[0],h=r[o-1],c=[];if(o>n)return function(t,i,e,s){let n,r=0,o=e[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===o&&(i.push(t[n]),r++,o=e[r*s])}(i,c,r,o/n),c;const l=function(t,i,e){const s=function(t){const i=t.length;let e,s;if(i<2)return!1;for(s=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==s)return!1;return s}(t),n=i.length/e;if(!s)return Math.max(n,1);const r=function(t){const i=[],e=Math.sqrt(t);let s;for(s=1;s<e;s++)t%s==0&&(i.push(s),i.push(t/s));return e===(0|e)&&i.push(e),i.sort(((t,i)=>t-i)).pop(),i}(s);for(let t=0,i=r.length-1;t<i;t++){const i=r[t];if(i>n)return i}return Math.max(n,1)}(r,i,n);if(o>0){let t,e;const s=o>1?Math.round((h-a)/(o-1)):null;for(os(i,c,l,z(s)?0:a-s,a),t=0,e=o-1;t<e;t++)os(i,c,l,r[t],r[t+1]);return os(i,c,l,h,z(s)?i.length:h+s),c}return os(i,c,l),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,i,e=this.options.reverse;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,e=!e),this._startPixel=t,this._endPixel=i,this._reversePixels=e,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){V(this.options.afterUpdate,[this])}beforeSetDimensions(){V(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){V(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),V(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){V(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const i=this.options.ticks;let e,s,n;for(e=0,s=t.length;e<s;e++)n=t[e],n.label=V(i.callback,[n.value,e,t],this)}afterTickToLabelConversion(){V(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){V(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,i=t.ticks,e=hs(this.ticks.length,t.ticks.maxTicksLimit),s=i.minRotation||0,n=i.maxRotation;let r,o,a,h=s;if(!this._isVisible()||!i.display||s>=n||e<=1||!this.isHorizontal())return void(this.labelRotation=s);const c=this._getLabelSizes(),l=c.widest.width,u=c.highest.height,d=wt(this.chart.width-l,0,this.maxWidth);r=t.offset?this.maxWidth/e:d/(e-1),l+6>r&&(r=d/(e-(t.offset?.5:1)),o=this.maxHeight-us(t.grid)-i.padding-ds(t.title,this.chart.options.font),a=Math.sqrt(l*l+u*u),h=Math.min(Math.asin(wt((c.highest.height+6)/r,-1,1)),Math.asin(wt(o/a,-1,1))-Math.asin(wt(u/a,-1,1)))*(180/at),h=Math.max(s,Math.min(n,h))),this.labelRotation=h}afterCalculateLabelRotation(){V(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){V(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:i,options:{ticks:e,title:s,grid:n}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){const r=ds(s,i.options.font);if(o?(t.width=this.maxWidth,t.height=us(n)+r):(t.height=this.maxHeight,t.width=us(n)+r),e.display&&this.ticks.length){const{first:i,last:s,widest:n,highest:r}=this._getLabelSizes(),a=2*e.padding,h=yt(this.labelRotation),c=Math.cos(h),l=Math.sin(h);o?t.height=Math.min(this.maxHeight,t.height+(e.mirror?0:l*n.width+c*r.height)+a):t.width=Math.min(this.maxWidth,t.width+(e.mirror?0:c*n.width+l*r.height)+a),this._calculatePadding(i,s,l,c)}}this._handleMargins(),o?(this.width=this._length=i.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=i.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,i,e,s){const{ticks:{align:n,padding:r},position:o}=this.options,a=0!==this.labelRotation,h="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let l=0,u=0;a?h?(l=s*t.width,u=e*i.height):(l=e*t.height,u=s*i.width):"start"===n?u=i.width:"end"===n?l=t.width:"inner"!==n&&(l=t.width/2,u=i.width/2),this.paddingLeft=Math.max((l-o+r)*this.width/(this.width-o),0),this.paddingRight=Math.max((u-c+r)*this.width/(this.width-c),0)}else{let e=i.height/2,s=t.height/2;"start"===n?(e=0,s=t.height):"end"===n&&(e=i.height,s=0),this.paddingTop=e+r,this.paddingBottom=s+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){V(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:i}=this.options;return"top"===i||"bottom"===i||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let i,e;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),i=0,e=t.length;i<e;i++)z(t[i].label)&&(t.splice(i,1),e--,i--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const i=this.options.ticks.sampleSize;let e=this.ticks;i<e.length&&(e=cs(e,i)),this._labelSizes=t=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,i,e){const{ctx:s,_longestTextCache:n}=this,r=[],o=[],a=Math.floor(i/hs(i,e));let h,c,l,u,d,f,b,p,g,m,v,y=0,x=0;for(h=0;h<i;h+=a){if(u=t[h].label,d=this._resolveTickFontOptions(h),s.font=f=d.string,b=n[f]=n[f]||{data:{},gc:[]},p=d.lineHeight,g=m=0,z(u)||N(u)){if(N(u))for(c=0,l=u.length;c<l;++c)v=u[c],z(v)||N(v)||(g=Jt(s,b.data,b.gc,g,v),m+=p)}else g=Jt(s,b.data,b.gc,g,u),m=p;r.push(g),o.push(m),y=Math.max(g,y),x=Math.max(m,x)}!function(t,i){X(t,(t=>{const e=t.gc,s=e.length/2;let n;if(s>i){for(n=0;n<s;++n)delete t.data[e[n]];e.splice(0,s)}}))}(n,i);const M=r.indexOf(y),k=o.indexOf(x),w=t=>({width:r[t]||0,height:o[t]||0});return{first:w(0),last:w(i-1),widest:w(M),highest:w(k),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,i){return NaN}getValueForPixel(t){}getPixelForTick(t){const i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const i=this._startPixel+t*this._length;return wt(this._alignToPixels?ti(this.chart,i,0):i,-32768,32767)}getDecimalForPixel(t){const i=(t-this._startPixel)/this._length;return this._reversePixels?1-i:i}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:i}=this;return t<0&&i<0?i:t>0&&i>0?t:0}getContext(t){const i=this.ticks||[];if(t>=0&&t<i.length){const e=i[t];return e.$context||(e.$context=function(t,i,e){return Mi(t,{tick:e,index:i,type:"tick"})}(this.getContext(),t,e))}return this.$context||(this.$context=Mi(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,i=yt(this.labelRotation),e=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i)),n=this._getLabelSizes(),r=t.autoSkipPadding||0,o=n?n.widest.width+r:0,a=n?n.highest.height+r:0;return this.isHorizontal()?a*e>o*s?o/e:a/s:a*s<o*e?a/e:o/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const i=this.axis,e=this.chart,s=this.options,{grid:n,position:r,border:o}=s,a=n.offset,h=this.isHorizontal(),c=this.ticks.length+(a?1:0),l=us(n),u=[],d=o.setContext(this.getContext()),f=d.display?d.width:0,b=f/2,p=function(t){return ti(e,t,f)};let g,m,v,y,x,M,k,w,_,A,O,S;if("top"===r)g=p(this.bottom),M=this.bottom-l,w=g-b,A=p(t.top)+b,S=t.bottom;else if("bottom"===r)g=p(this.top),A=t.top,S=p(t.bottom)-b,M=g+b,w=this.top+l;else if("left"===r)g=p(this.right),x=this.right-l,k=g-b,_=p(t.left)+b,O=t.right;else if("right"===r)g=p(this.left),_=t.left,O=p(t.right)-b,x=g+b,k=this.left+l;else if("x"===i){if("center"===r)g=p((t.top+t.bottom)/2+.5);else if(W(r)){const t=Object.keys(r)[0];g=p(this.chart.scales[t].getPixelForValue(r[t]))}A=t.top,S=t.bottom,M=g+b,w=M+l}else if("y"===i){if("center"===r)g=p((t.left+t.right)/2);else if(W(r)){const t=Object.keys(r)[0];g=p(this.chart.scales[t].getPixelForValue(r[t]))}x=g-b,k=x-l,_=t.left,O=t.right}const R=G(s.ticks.maxTicksLimit,c),D=Math.max(1,Math.ceil(c/R));for(m=0;m<c;m+=D){const t=this.getContext(m),i=n.setContext(t),s=o.setContext(t),r=i.lineWidth,c=i.color,l=s.dash||[],d=s.dashOffset,f=i.tickWidth,b=i.tickColor,p=i.tickBorderDash||[],g=i.tickBorderDashOffset;v=ls(this,m,a),void 0!==v&&(y=ti(e,v,r),h?x=k=_=O=y:M=w=A=S=y,u.push({tx1:x,ty1:M,tx2:k,ty2:w,x1:_,y1:A,x2:O,y2:S,width:r,color:c,borderDash:l,borderDashOffset:d,tickWidth:f,tickColor:b,tickBorderDash:p,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,u}_computeLabelItems(t){const i=this.axis,e=this.options,{position:s,ticks:n}=e,r=this.isHorizontal(),o=this.ticks,{align:a,crossAlign:h,padding:c,mirror:l}=n,u=us(e.grid),d=u+c,f=l?-c:d,b=-yt(this.labelRotation),p=[];let g,m,v,y,x,M,k,w,_,A,O,S,R="middle";if("top"===s)M=this.bottom-f,k=this._getXAxisLabelAlignment();else if("bottom"===s)M=this.top+f,k=this._getXAxisLabelAlignment();else if("left"===s){const t=this._getYAxisLabelAlignment(u);k=t.textAlign,x=t.x}else if("right"===s){const t=this._getYAxisLabelAlignment(u);k=t.textAlign,x=t.x}else if("x"===i){if("center"===s)M=(t.top+t.bottom)/2+d;else if(W(s)){const t=Object.keys(s)[0];M=this.chart.scales[t].getPixelForValue(s[t])+d}k=this._getXAxisLabelAlignment()}else if("y"===i){if("center"===s)x=(t.left+t.right)/2-d;else if(W(s)){const t=Object.keys(s)[0];x=this.chart.scales[t].getPixelForValue(s[t])}k=this._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===a?R="top":"end"===a&&(R="bottom"));const D=this._getLabelSizes();for(g=0,m=o.length;g<m;++g){v=o[g],y=v.label;const t=n.setContext(this.getContext(g));w=this.getPixelForTick(g)+n.labelOffset,_=this._resolveTickFontOptions(g),A=_.lineHeight,O=N(y)?y.length:1;const i=O/2,e=t.color,a=t.textStrokeColor,c=t.textStrokeWidth;let u,d=k;if(r?(x=w,"inner"===k&&(d=g===m-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),S="top"===s?"near"===h||0!==b?-O*A+A/2:"center"===h?-D.highest.height/2-i*A+A:A/2-D.highest.height:"near"===h||0!==b?A/2:"center"===h?D.highest.height/2-i*A:D.highest.height-O*A,l&&(S*=-1),0===b||t.showLabelBackdrop||(x+=A/2*Math.sin(b))):(M=w,S=(1-O)*A/2),t.showLabelBackdrop){const i=vi(t.backdropPadding),e=D.heights[g],s=D.widths[g];let n=S-i.top,r=0-i.left;switch(R){case"middle":n-=e/2;break;case"bottom":n-=e}switch(k){case"center":r-=s/2;break;case"right":r-=s;break;case"inner":g===m-1?r-=s:g>0&&(r-=s/2)}u={left:r,top:n,width:s+i.width,height:e+i.height,color:t.backdropColor}}p.push({label:y,font:_,textOffset:S,options:{rotation:b,color:e,strokeColor:a,strokeWidth:c,textAlign:d,textBaseline:R,translation:[x,M],backdrop:u}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:i}=this.options;if(-yt(this.labelRotation))return"top"===t?"left":"right";let e="center";return"start"===i.align?e="left":"end"===i.align?e="right":"inner"===i.align&&(e="inner"),e}_getYAxisLabelAlignment(t){const{position:i,ticks:{crossAlign:e,mirror:s,padding:n}}=this.options,r=t+n,o=this._getLabelSizes().widest.width;let a,h;return"left"===i?s?(h=this.right+n,"near"===e?a="left":"center"===e?(a="center",h+=o/2):(a="right",h+=o)):(h=this.right-r,"near"===e?a="right":"center"===e?(a="center",h-=o/2):(a="left",h=this.left)):"right"===i?s?(h=this.left+n,"near"===e?a="right":"center"===e?(a="center",h-=o/2):(a="left",h-=o)):(h=this.left+r,"near"===e?a="left":"center"===e?(a="center",h+=o/2):(a="right",h=this.right)):a="right",{textAlign:a,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,i=this.options.position;return"left"===i||"right"===i?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===i||"bottom"===i?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:i},left:e,top:s,width:n,height:r}=this;i&&(t.save(),t.fillStyle=i,t.fillRect(e,s,n,r),t.restore())}getLineWidthForValue(t){const i=this.options.grid;if(!this._isVisible()||!i.display)return 0;const e=this.ticks.findIndex((i=>i.value===t));return e>=0?i.setContext(this.getContext(e)).lineWidth:0}drawGrid(t){const i=this.options.grid,e=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,r;const o=(t,i,s)=>{s.width&&s.color&&(e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset,e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(i.x,i.y),e.stroke(),e.restore())};if(i.display)for(n=0,r=s.length;n<r;++n){const t=s[n];i.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:i,options:{border:e,grid:s}}=this,n=e.setContext(this.getContext()),r=e.display?n.width:0;if(!r)return;const o=s.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let h,c,l,u;this.isHorizontal()?(h=ti(t,this.left,r)-r/2,c=ti(t,this.right,o)+o/2,l=u=a):(l=ti(t,this.top,r)-r/2,u=ti(t,this.bottom,o)+o/2,h=c=a),i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.beginPath(),i.moveTo(h,l),i.lineTo(c,u),i.stroke(),i.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,e=this._computeLabelArea();e&&ri(i,e);const s=this.getLabelItems(t);for(const t of s)ci(i,t.label,0,t.textOffset,t.font,t.options);e&&oi(i)}drawTitle(){const{ctx:t,options:{position:i,title:e,reverse:s}}=this;if(!e.display)return;const n=yi(e.font),r=vi(e.padding),o=e.align;let a=n.lineHeight/2;"bottom"===i||"center"===i||W(i)?(a+=r.bottom,N(e.text)&&(a+=n.lineHeight*(e.text.length-1))):a+=r.top;const{titleX:h,titleY:c,maxWidth:l,rotation:u}=function(t,i,e,s){const{top:n,left:r,bottom:o,right:a,chart:h}=t,{chartArea:c,scales:l}=h;let u,d,f,b=0;const p=o-n,g=a-r;if(t.isHorizontal()){if(d=Et(s,r,a),W(e)){const t=Object.keys(e)[0];f=l[t].getPixelForValue(e[t])+p-i}else f="center"===e?(c.bottom+c.top)/2+p-i:as(t,e,i);u=a-r}else{if(W(e)){const t=Object.keys(e)[0];d=l[t].getPixelForValue(e[t])-g+i}else d="center"===e?(c.left+c.right)/2-g+i:as(t,e,i);f=Et(s,o,n),b="left"===e?-ut:ut}return{titleX:d,titleY:f,maxWidth:u,rotation:b}}(this,a,i,o);ci(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:u,textAlign:fs(o,i,s),textBaseline:"middle",translation:[h,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,i=t.ticks&&t.ticks.z||0,e=G(t.grid&&t.grid.z,-1),s=G(t.border&&t.border.z,0);return this._isVisible()&&this.draw===bs.prototype.draw?[{z:e,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:i,draw:t=>{this.drawLabels(t)}}]:[{z:i,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const i=this.chart.getSortedVisibleDatasetMetas(),e=this.axis+"AxisID",s=[];let n,r;for(n=0,r=i.length;n<r;++n){const r=i[n];r[e]!==this.id||t&&r.type!==t||s.push(r)}return s}_resolveTickFontOptions(t){return yi(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ps{constructor(t,i,e){this.type=t,this.scope=i,this.override=e,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const i=Object.getPrototypeOf(t);let e;(function(t){return"id"in t&&"defaults"in t})(i)&&(e=this.register(i));const s=this.items,n=t.id,r=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in s||(s[n]=t,function(t,i,e){const s=q(Object.create(null),[e?qt.get(e):{},qt.get(i),t.defaults]);qt.set(i,s),t.defaultRoutes&&function(t,i){Object.keys(i).forEach((e=>{const s=e.split("."),n=s.pop(),r=[t].concat(s).join("."),o=i[e].split("."),a=o.pop(),h=o.join(".");qt.route(r,n,h,a)}))}(i,t.defaultRoutes),t.descriptors&&qt.describe(i,t.descriptors)}(t,r,e),this.override&&qt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const i=this.items,e=t.id,s=this.scope;e in i&&delete i[e],s&&e in qt[s]&&(delete qt[s][e],this.override&&delete Xt[e])}}class gs{constructor(){this.controllers=new ps(be,"datasets",!0),this.elements=new ps(rs,"elements"),this.plugins=new ps(Object,"plugins"),this.scales=new ps(bs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,i,e){[...i].forEach((i=>{const s=e||this._getRegistryForType(i);e||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):X(i,(i=>{const s=e||this._getRegistryForType(i);this._exec(t,s,i)}))}))}_exec(t,i,e){const s=st(t);V(e["before"+s],[],e),i[t](e),V(e["after"+s],[],e)}_getRegistryForType(t){for(let i=0;i<this._typedRegistries.length;i++){const e=this._typedRegistries[i];if(e.isForType(t))return e}return this.plugins}_get(t,i,e){const s=i.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+e+".");return s}}var ms=new gs;class vs{constructor(){this._init=[]}notify(t,i,e,s){"beforeInit"===i&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(n,t,i,e);return"afterDestroy"===i&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,i,e,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===V(t[e],[i,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){z(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const i=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),i}_createDescriptors(t,i){const e=t&&t.config,s=G(e.options&&e.options.plugins,{}),n=function(t){const i={},e=[],s=Object.keys(ms.plugins.items);for(let t=0;t<s.length;t++)e.push(ms.getPlugin(s[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const s=n[t];-1===e.indexOf(s)&&(e.push(s),i[s.id]=!0)}return{plugins:e,localIds:i}}(e);return!1!==s||i?function(t,{plugins:i,localIds:e},s,n){const r=[],o=t.getContext();for(const a of i){const i=a.id,h=ys(s[i],n);null!==h&&r.push({plugin:a,options:xs(t.config,{plugin:a,local:e[i]},h,o)})}return r}(t,n,s,i):[]}_notifyStateChanges(t){const i=this._oldCache||[],e=this._cache,s=(t,i)=>t.filter((t=>!i.some((i=>t.plugin.id===i.plugin.id))));this._notify(s(i,e),t,"stop"),this._notify(s(e,i),t,"start")}}function ys(t,i){return i||!1!==t?!0===t?{}:t:null}function xs(t,{plugin:i,local:e},s,n){const r=t.pluginScopeKeys(i),o=t.getOptionScopes(s,r);return e&&i.defaults&&o.push(i.defaults),t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ms(t,i){return((i.datasets||{})[t]||{}).indexAxis||i.indexAxis||(qt.datasets[t]||{}).indexAxis||"x"}function ks(t){if("x"===t||"y"===t||"r"===t)return t}function ws(t,...i){if(ks(t))return t;for(const s of i){const i=s.axis||("top"===(e=s.position)||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0)||t.length>1&&ks(t[0].toLowerCase());if(i)return i}var e;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function _s(t,i,e){if(e[i+"AxisID"]===t)return{axis:i}}function As(t){const i=t.options||(t.options={});i.plugins=G(i.plugins,{}),i.scales=function(t,i){const e=Xt[t.type]||{scales:{}},s=i.scales||{},n=Ms(t.type,i),r=Object.create(null);return Object.keys(s).forEach((i=>{const o=s[i];if(!W(o))return console.error(`Invalid scale configuration for scale: ${i}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const a=ws(i,o,function(t,i){if(i.data&&i.data.datasets){const e=i.data.datasets.filter((i=>i.xAxisID===t||i.yAxisID===t));if(e.length)return _s(t,"x",e[0])||_s(t,"y",e[0])}return{}}(i,t),qt.scales[o.type]),h=function(t,i){return t===i?"_index_":"_value_"}(a,n),c=e.scales||{};r[i]=J(Object.create(null),[{axis:a},o,c[a],c[h]])})),t.data.datasets.forEach((e=>{const n=e.type||t.type,o=e.indexAxis||Ms(n,i),a=(Xt[n]||{}).scales||{};Object.keys(a).forEach((t=>{const i=function(t,i){let e=t;return"_index_"===t?e=i:"_value_"===t&&(e="x"===i?"y":"x"),e}(t,o),n=e[i+"AxisID"]||i;r[n]=r[n]||Object.create(null),J(r[n],[{axis:i},s[n],a[t]])}))})),Object.keys(r).forEach((t=>{const i=r[t];J(i,[qt.scales[i.type],qt.scale])})),r}(t,i)}function Os(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Ss=new Map,Rs=new Set;function Ds(t,i){let e=Ss.get(t);return e||(e=i(),Ss.set(t,e),Rs.add(e)),e}const js=(t,i,e)=>{const s=et(i,e);void 0!==s&&t.add(s)};class Cs{constructor(t){this._config=function(t){return(t=t||{}).data=Os(t.data),As(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Os(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),As(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ds(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,i){return Ds(`${t}.transition.${i}`,(()=>[[`datasets.${t}.transitions.${i}`,`transitions.${i}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,i){return Ds(`${t}-${i}`,(()=>[[`datasets.${t}.elements.${i}`,`datasets.${t}`,`elements.${i}`,""]]))}pluginScopeKeys(t){const i=t.id;return Ds(`${this.type}-plugin-${i}`,(()=>[[`plugins.${i}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,i){const e=this._scopeCache;let s=e.get(t);return s&&!i||(s=new Map,e.set(t,s)),s}getOptionScopes(t,i,e){const{options:s,type:n}=this,r=this._cachedScopes(t,e),o=r.get(i);if(o)return o;const a=new Set;i.forEach((i=>{t&&(a.add(t),i.forEach((i=>js(a,t,i)))),i.forEach((t=>js(a,s,t))),i.forEach((t=>js(a,Xt[n]||{},t))),i.forEach((t=>js(a,qt,t))),i.forEach((t=>js(a,Ut,t)))}));const h=Array.from(a);return 0===h.length&&h.push(Object.create(null)),Rs.has(i)&&r.set(i,h),h}chartOptionScopes(){const{options:t,type:i}=this;return[t,Xt[i]||{},qt.datasets[i]||{},{type:i},qt,Ut]}resolveNamedOptions(t,i,e,s=[""]){const n={$shared:!0},{resolver:r,subPrefixes:o}=Bs(this._resolverCache,t,s);let a=r;(function(t,i){const{isScriptable:e,isIndexable:s}=_i(t);for(const n of i){const i=e(n),r=s(n),o=(r||i)&&t[n];if(i&&(rt(o)||Es(o))||r&&N(o))return!0}return!1})(r,i)&&(n.$shared=!1,a=wi(r,e=rt(e)?e():e,this.createResolver(t,e,o)));for(const t of i)n[t]=a[t];return n}createResolver(t,i,e=[""],s){const{resolver:n}=Bs(this._resolverCache,t,e);return W(i)?wi(n,i,void 0,s):n}}function Bs(t,i,e){let s=t.get(i);s||(s=new Map,t.set(i,s));const n=e.join();let r=s.get(n);return r||(r={resolver:ki(i,e),subPrefixes:e.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,r)),r}const Es=t=>W(t)&&Object.getOwnPropertyNames(t).some((i=>rt(t[i]))),Ls=["top","bottom","left","right","chartArea"];function Ps(t,i){return"top"===t||"bottom"===t||-1===Ls.indexOf(t)&&"x"===i}function Is(t,i){return function(e,s){return e[t]===s[t]?e[i]-s[i]:e[t]-s[t]}}function Ts(t){const i=t.chart,e=i.options.animation;i.notifyPlugins("afterRender"),V(e&&e.onComplete,[t],i)}function Fs(t){const i=t.chart,e=i.options.animation;V(e&&e.onProgress,[t],i)}function zs(t){return Ii()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ns={},Ws=t=>{const i=zs(t);return Object.values(Ns).filter((t=>t.canvas===i)).pop()};function Hs(t,i,e){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=i){const r=t[n];delete t[n],(e>0||s>i)&&(t[s+e]=r)}}}function $s(t,i,e){return t.options.clip?t[e]:i[e]}class Gs{static defaults=qt;static instances=Ns;static overrides=Xt;static registry=ms;static version="4.4.1";static getChart=Ws;static register(...t){ms.add(...t),Ys()}static unregister(...t){ms.remove(...t),Ys()}constructor(t,i){const e=this.config=new Cs(i),s=zs(t),n=Ws(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const r=e.createResolver(e.chartOptionScopes(),this.getContext());this.platform=new(e.platform||function(t){return!Ii()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?$e:ns}(s)),this.platform.updateConfig(e);const o=this.platform.acquireContext(s,r.aspectRatio),a=o&&o.canvas,h=a&&a.height,c=a&&a.width;this.id=F(),this.ctx=o,this.canvas=a,this.width=c,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new vs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,i){let e;return function(...s){return i?(clearTimeout(e),e=setTimeout(t,i,s)):t.apply(this,s),i}}((t=>this.update(t)),r.resizeDelay||0),this._dataChanges=[],Ns[this.id]=this,o&&a?(qi.listen(this,"complete",Ts),qi.listen(this,"progress",Fs),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:i},width:e,height:s,_aspectRatio:n}=this;return z(t)?i&&n?n:s?e/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ms}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Yi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ii(this.canvas,this.ctx),this}stop(){return qi.stop(this),this}resize(t,i){qi.running(this)?this._resizeBeforeDraw={width:t,height:i}:this._resize(t,i)}_resize(t,i){const e=this.options,s=this.platform.getMaximumSize(this.canvas,t,i,e.maintainAspectRatio&&this.aspectRatio),n=e.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Yi(this,n,!0)&&(this.notifyPlugins("resize",{size:s}),V(e.onResize,[this,s],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){X(this.options.scales||{},((t,i)=>{t.id=i}))}buildOrUpdateScales(){const t=this.options,i=t.scales,e=this.scales,s=Object.keys(e).reduce(((t,i)=>(t[i]=!1,t)),{});let n=[];i&&(n=n.concat(Object.keys(i).map((t=>{const e=i[t],s=ws(t,e),n="r"===s,r="x"===s;return{options:e,dposition:n?"chartArea":r?"bottom":"left",dtype:n?"radialLinear":r?"category":"linear"}})))),X(n,(i=>{const n=i.options,r=n.id,o=ws(r,n),a=G(n.type,i.dtype);void 0!==n.position&&Ps(n.position,o)===Ps(i.dposition)||(n.position=i.dposition),s[r]=!0;let h=null;r in e&&e[r].type===a?h=e[r]:(h=new(ms.getScale(a))({id:r,type:a,ctx:this.ctx,chart:this}),e[h.id]=h),h.init(n,t)})),X(s,((t,i)=>{t||delete e[i]})),X(e,(t=>{We.configure(this,t,t.options),We.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,i=this.data.datasets.length,e=t.length;if(t.sort(((t,i)=>t.index-i.index)),e>i){for(let t=i;t<e;++t)this._destroyDatasetMeta(t);t.splice(i,e-i)}this._sortedMetasets=t.slice(0).sort(Is("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:i}}=this;t.length>i.length&&delete this._stacks,t.forEach(((t,e)=>{0===i.filter((i=>i===t._dataset)).length&&this._destroyDatasetMeta(e)}))}buildOrUpdateControllers(){const t=[],i=this.data.datasets;let e,s;for(this._removeUnreferencedMetasets(),e=0,s=i.length;e<s;e++){const s=i[e];let n=this.getDatasetMeta(e);const r=s.type||this.config.type;if(n.type&&n.type!==r&&(this._destroyDatasetMeta(e),n=this.getDatasetMeta(e)),n.type=r,n.indexAxis=s.indexAxis||Ms(r,this.options),n.order=s.order||0,n.index=e,n.label=""+s.label,n.visible=this.isDatasetVisible(e),n.controller)n.controller.updateIndex(e),n.controller.linkScales();else{const i=ms.getController(r),{datasetElementType:s,dataElementType:o}=qt.datasets[r];Object.assign(i,{dataElementType:ms.getElement(o),datasetElementType:s&&ms.getElement(s)}),n.controller=new i(this,e),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){X(this.data.datasets,((t,i)=>{this.getDatasetMeta(i).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const i=this.config;i.update();const e=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!e.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,i=this.data.datasets.length;t<i;t++){const{controller:i}=this.getDatasetMeta(t),e=!s&&-1===n.indexOf(i);i.buildOrUpdateElements(e),r=Math.max(+i.getMaxOverflow(),r)}r=this._minPadding=e.layout.autoPadding?r:0,this._updateLayout(r),s||X(n,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Is("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){X(this.scales,(t=>{We.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,i=new Set(Object.keys(this._listeners)),e=new Set(t.events);ot(i,e)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,i=this._getUniformDataChanges()||[];for(const{method:e,start:s,count:n}of i)Hs(t,s,"_removeElements"===e?-n:n)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const i=this.data.datasets.length,e=i=>new Set(t.filter((t=>t[0]===i)).map(((t,i)=>i+","+t.splice(1).join(",")))),s=e(0);for(let t=1;t<i;t++)if(!ot(s,e(t)))return;return Array.from(s).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;We.update(this,this.width,this.height,t);const i=this.chartArea,e=i.width<=0||i.height<=0;this._layers=[],X(this.boxes,(t=>{e&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,i)=>{t._idx=i})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,i=this.data.datasets.length;t<i;++t)this.getDatasetMeta(t).controller.configure();for(let i=0,e=this.data.datasets.length;i<e;++i)this._updateDataset(i,rt(t)?t({datasetIndex:i}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,i){const e=this.getDatasetMeta(t),s={meta:e,index:t,mode:i,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(e.controller._update(i),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(qi.has(this)?this.attached&&!qi.running(this)&&qi.start(this):(this.draw(),Ts({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:i}=this._resizeBeforeDraw;this._resize(t,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=this._layers;for(t=0;t<i.length&&i[t].z<=0;++t)i[t].draw(this.chartArea);for(this._drawDatasets();t<i.length;++t)i[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const i=this._sortedMetasets,e=[];let s,n;for(s=0,n=i.length;s<n;++s){const n=i[s];t&&!n.visible||e.push(n)}return e}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let i=t.length-1;i>=0;--i)this._drawDataset(t[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const i=this.ctx,e=t._clip,s=!e.disabled,n=function(t,i){const{xScale:e,yScale:s}=t;return e&&s?{left:$s(e,i,"left"),right:$s(e,i,"right"),top:$s(s,i,"top"),bottom:$s(s,i,"bottom")}:i}(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(s&&ri(i,{left:!1===e.left?0:n.left-e.left,right:!1===e.right?this.width:n.right+e.right,top:!1===e.top?0:n.top-e.top,bottom:!1===e.bottom?this.height:n.bottom+e.bottom}),t.controller.draw(),s&&oi(i),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return ni(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,i,e,s){const n=De.modes[i];return"function"==typeof n?n(this,t,e,s):[]}getDatasetMeta(t){const i=this.data.datasets[t],e=this._metasets;let s=e.filter((t=>t&&t._dataset===i)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:t,_dataset:i,_parsed:[],_sorted:!1},e.push(s)),s}getContext(){return this.$context||(this.$context=Mi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const i=this.data.datasets[t];if(!i)return!1;const e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!i.hidden}setDatasetVisibility(t,i){this.getDatasetMeta(t).hidden=!i}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,i,e){const s=e?"show":"hide",n=this.getDatasetMeta(t),r=n.controller._resolveAnimations(void 0,s);nt(i)?(n.data[i].hidden=!e,this.update()):(this.setDatasetVisibility(t,e),r.update(n,{visible:e}),this.update((i=>i.datasetIndex===t?s:void 0)))}hide(t,i){this._updateVisibility(t,i,!1)}show(t,i){this._updateVisibility(t,i,!0)}_destroyDatasetMeta(t){const i=this._metasets[t];i&&i.controller&&i.controller._destroy(),delete this._metasets[t]}_stop(){let t,i;for(this.stop(),qi.remove(this),t=0,i=this.data.datasets.length;t<i;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:i}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ii(t,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete Ns[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,i=this.platform,e=(e,s)=>{i.addEventListener(this,e,s),t[e]=s},s=(t,i,e)=>{t.offsetX=i,t.offsetY=e,this._eventHandler(t)};X(this.options.events,(t=>e(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,i=this.platform,e=(e,s)=>{i.addEventListener(this,e,s),t[e]=s},s=(e,s)=>{t[e]&&(i.removeEventListener(this,e,s),delete t[e])},n=(t,i)=>{this.canvas&&this.resize(t,i)};let r;const o=()=>{s("attach",o),this.attached=!0,this.resize(),e("resize",n),e("detach",r)};r=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),e("attach",o)},i.isAttached(this.canvas)?o():r()}unbindEvents(){X(this._listeners,((t,i)=>{this.platform.removeEventListener(this,i,t)})),this._listeners={},X(this._responsiveListeners,((t,i)=>{this.platform.removeEventListener(this,i,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,i,e){const s=e?"set":"remove";let n,r,o,a;for("dataset"===i&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),o=0,a=t.length;o<a;++o){r=t[o];const i=r&&this.getDatasetMeta(r.datasetIndex).controller;i&&i[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const i=this._active||[],e=t.map((({datasetIndex:t,index:i})=>{const e=this.getDatasetMeta(t);if(!e)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:e.data[i],index:i}}));!U(e,i)&&(this._active=e,this._lastEvent=null,this._updateHoverStyles(e,i))}notifyPlugins(t,i,e){return this._plugins.notify(this,t,i,e)}isPluginEnabled(t){return 1===this._plugins._cache.filter((i=>i.plugin.id===t)).length}_updateHoverStyles(t,i,e){const s=this.options.hover,n=(t,i)=>t.filter((t=>!i.some((i=>t.datasetIndex===i.datasetIndex&&t.index===i.index)))),r=n(i,t),o=e?t:n(t,i);r.length&&this.updateHoverStyle(r,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(t,i){const e={event:t,replay:i,cancelable:!0,inChartArea:this.isPointInArea(t)},s=i=>(i.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",e,s))return;const n=this._handleEvent(t,i,e.inChartArea);return e.cancelable=!1,this.notifyPlugins("afterEvent",e,s),(n||e.changed)&&this.render(),this}_handleEvent(t,i,e){const{_active:s=[],options:n}=this,r=this._getActiveElements(t,s,e,i),o=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),a=function(t,i,e,s){return e&&"mouseout"!==t.type?s?i:t:null}(t,this._lastEvent,e,o);e&&(this._lastEvent=null,V(n.onHover,[t,r,this],this),o&&V(n.onClick,[t,r,this],this));const h=!U(r,s);return(h||i)&&(this._active=r,this._updateHoverStyles(r,s,i)),this._lastEvent=a,h}_getActiveElements(t,i,e,s){if("mouseout"===t.type)return[];if(!e)return i;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function Ys(){return X(Gs.instances,(t=>t._plugins.invalidate()))}function Vs(t,i){const{x:e,y:s,base:n,width:r,height:o}=t.getProps(["x","y","base","width","height"],i);let a,h,c,l,u;return t.horizontal?(u=o/2,a=Math.min(e,n),h=Math.max(e,n),c=s-u,l=s+u):(u=r/2,a=e-u,h=e+u,c=Math.min(s,n),l=Math.max(s,n)),{left:a,top:c,right:h,bottom:l}}function Xs(t,i,e,s){return t?0:wt(i,e,s)}function Us(t,i,e,s){const n=null===i,r=null===e,o=t&&!(n&&r)&&Vs(t,s);return o&&(n||_t(i,o.left,o.right))&&(r||_t(e,o.top,o.bottom))}function Zs(t,i){t.rect(i.x,i.y,i.w,i.h)}function Ks(t,i,e={}){const s=t.x!==e.x?-i:0,n=t.y!==e.y?-i:0;return{x:t.x+s,y:t.y+n,w:t.w+((t.x+t.w!==e.x+e.w?i:0)-s),h:t.h+((t.y+t.h!==e.y+e.h?i:0)-n),radius:t.radius}}const Qs=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],qs=Qs.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Js(t){return Qs[t%Qs.length]}function tn(t){return qs[t%qs.length]}function en(t){let i;for(i in t)if(t[i].borderColor||t[i].backgroundColor)return!0;return!1}var sn={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,i,e){if(!e.enabled)return;const{data:{datasets:s},options:n}=t.config,{elements:r}=n;if(!e.forceOverride&&(en(s)||(o=n)&&(o.borderColor||o.backgroundColor)||r&&en(r)))return;var o;const a=function(t){let i=0;return(e,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof ke?i=function(t,i){return t.backgroundColor=t.data.map((()=>Js(i++))),i}(e,i):n instanceof we?i=function(t,i){return t.backgroundColor=t.data.map((()=>tn(i++))),i}(e,i):n&&(i=function(t,i){return t.borderColor=Js(i),t.backgroundColor=tn(i),++i}(e,i))}}(t);s.forEach(a)}};const nn=(t,i)=>{let{boxHeight:e=i,boxWidth:s=i}=t;return t.usePointStyle&&(e=Math.min(e,i),s=t.pointStyleWidth||Math.min(s,i)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(i,e)}};class rn extends rs{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,i,e){this.maxWidth=t,this.maxHeight=i,this._margins=e,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let i=V(t.generateLabels,[this.chart],this)||[];t.filter&&(i=i.filter((i=>t.filter(i,this.chart.data)))),t.sort&&(i=i.sort(((i,e)=>t.sort(i,e,this.chart.data)))),this.options.reverse&&i.reverse(),this.legendItems=i}fit(){const{options:t,ctx:i}=this;if(!t.display)return void(this.width=this.height=0);const e=t.labels,s=yi(e.font),n=s.size,r=this._computeTitleHeight(),{boxWidth:o,itemHeight:a}=nn(e,n);let h,c;i.font=s.string,this.isHorizontal()?(h=this.maxWidth,c=this._fitRows(r,n,o,a)+10):(c=this.maxHeight,h=this._fitCols(r,s,o,a)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,i,e,s){const{ctx:n,maxWidth:r,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],h=this.lineWidths=[0],c=s+o;let l=t;n.textAlign="left",n.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const b=e+i/2+n.measureText(t.text).width;(0===f||h[h.length-1]+b+2*o>r)&&(l+=c,h[h.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:b,height:s},h[h.length-1]+=b+o})),l}_fitCols(t,i,e,s){const{ctx:n,maxHeight:r,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],h=this.columnSizes=[],c=r-t;let l=o,u=0,d=0,f=0,b=0;return this.legendItems.forEach(((t,r)=>{const{itemWidth:p,itemHeight:g}=function(t,i,e,s,n){const r=function(t,i,e,s){let n=t.text;return n&&"string"!=typeof n&&(n=n.reduce(((t,i)=>t.length>i.length?t:i))),i+e.size/2+s.measureText(n).width}(s,t,i,e),o=function(t,i,e){let s=t;return"string"!=typeof i.text&&(s=on(i,e)),s}(n,s,i.lineHeight);return{itemWidth:r,itemHeight:o}}(e,i,n,t,s);r>0&&d+g+2*o>c&&(l+=u+o,h.push({width:u,height:d}),f+=u+o,b++,u=d=0),a[r]={left:f,top:d,col:b,width:p,height:g},u=Math.max(u,p),d+=g+o})),l+=u,h.push({width:u,height:d}),l}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:i,options:{align:e,labels:{padding:s},rtl:n}}=this,r=Ui(n,this.left,this.width);if(this.isHorizontal()){let n=0,o=Et(e,this.left+s,this.right-this.lineWidths[n]);for(const a of i)n!==a.row&&(n=a.row,o=Et(e,this.left+s,this.right-this.lineWidths[n])),a.top+=this.top+t+s,a.left=r.leftForLtr(r.x(o),a.width),o+=a.width+s}else{let n=0,o=Et(e,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const a of i)a.col!==n&&(n=a.col,o=Et(e,this.top+t+s,this.bottom-this.columnSizes[n].height)),a.top=o,a.left+=this.left+s,a.left=r.leftForLtr(r.x(a.left),a.width),o+=a.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ri(t,this),this._draw(),oi(t)}}_draw(){const{options:t,columnSizes:i,lineWidths:e,ctx:s}=this,{align:n,labels:r}=t,o=qt.color,a=Ui(t.rtl,this.left,this.width),h=yi(r.font),{padding:c}=r,l=h.size,u=l/2;let d;this.drawTitle(),s.textAlign=a.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:f,boxHeight:b,itemHeight:p}=nn(r,l),g=this.isHorizontal(),m=this._computeTitleHeight();d=g?{x:Et(n,this.left+c,this.right-e[0]),y:this.top+c+m,line:0}:{x:this.left+c,y:Et(n,this.top+m+c,this.bottom-i[0].height),line:0},Zi(this.ctx,t.textDirection);const v=p+c;this.legendItems.forEach(((y,x)=>{s.strokeStyle=y.fontColor,s.fillStyle=y.fontColor;const M=s.measureText(y.text).width,k=a.textAlign(y.textAlign||(y.textAlign=r.textAlign)),w=f+u+M;let _=d.x,A=d.y;a.setWidth(this.width),g?x>0&&_+w+c>this.right&&(A=d.y+=v,d.line++,_=d.x=Et(n,this.left+c,this.right-e[d.line])):x>0&&A+v>this.bottom&&(_=d.x=_+i[d.line].width+c,d.line++,A=d.y=Et(n,this.top+m+c,this.bottom-i[d.line].height)),function(t,i,e){if(isNaN(f)||f<=0||isNaN(b)||b<0)return;s.save();const n=G(e.lineWidth,1);if(s.fillStyle=G(e.fillStyle,o),s.lineCap=G(e.lineCap,"butt"),s.lineDashOffset=G(e.lineDashOffset,0),s.lineJoin=G(e.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=G(e.strokeStyle,o),s.setLineDash(G(e.lineDash,[])),r.usePointStyle){const o={radius:b*Math.SQRT2/2,pointStyle:e.pointStyle,rotation:e.rotation,borderWidth:n},h=a.xPlus(t,f/2);si(s,o,h,i+u,r.pointStyleWidth&&f)}else{const r=i+Math.max((l-b)/2,0),o=a.leftForLtr(t,f),h=mi(e.borderRadius);s.beginPath(),Object.values(h).some((t=>0!==t))?li(s,{x:o,y:r,w:f,h:b,radius:h}):s.rect(o,r,f,b),s.fill(),0!==n&&s.stroke()}s.restore()}(a.x(_),A,y),_=((t,i,e,s)=>t===(s?"left":"right")?e:"center"===t?(i+e)/2:i)(k,_+f+u,g?_+w:this.right,t.rtl),function(t,i,e){ci(s,e.text,t,i+p/2,h,{strikethrough:e.hidden,textAlign:a.textAlign(e.textAlign)})}(a.x(_),A,y),g?d.x+=w+c:d.y+="string"!=typeof y.text?on(y,h.lineHeight)+c:v})),Ki(this.ctx,t.textDirection)}drawTitle(){const t=this.options,i=t.title,e=yi(i.font),s=vi(i.padding);if(!i.display)return;const n=Ui(t.rtl,this.left,this.width),r=this.ctx,o=i.position,a=s.top+e.size/2;let h,c=this.left,l=this.width;if(this.isHorizontal())l=Math.max(...this.lineWidths),h=this.top+a,c=Et(t.align,c,this.right-l);else{const i=this.columnSizes.reduce(((t,i)=>Math.max(t,i.height)),0);h=a+Et(t.align,this.top,this.bottom-i-t.labels.padding-this._computeTitleHeight())}const u=Et(o,c,c+l);r.textAlign=n.textAlign(Bt(o)),r.textBaseline="middle",r.strokeStyle=i.color,r.fillStyle=i.color,r.font=e.string,ci(r,i.text,u,h,e)}_computeTitleHeight(){const t=this.options.title,i=yi(t.font),e=vi(t.padding);return t.display?i.lineHeight+e.height:0}_getLegendItemAt(t,i){let e,s,n;if(_t(t,this.left,this.right)&&_t(i,this.top,this.bottom))for(n=this.legendHitBoxes,e=0;e<n.length;++e)if(s=n[e],_t(t,s.left,s.left+s.width)&&_t(i,s.top,s.top+s.height))return this.legendItems[e];return null}handleEvent(t){const i=this.options;if(!function(t,i){return!("mousemove"!==t&&"mouseout"!==t||!i.onHover&&!i.onLeave)||!(!i.onClick||"click"!==t&&"mouseup"!==t)}(t.type,i))return;const e=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const r=this._hoveredItem,o=(n=e,null!==(s=r)&&null!==n&&s.datasetIndex===n.datasetIndex&&s.index===n.index);r&&!o&&V(i.onLeave,[t,r,this],this),this._hoveredItem=e,e&&!o&&V(i.onHover,[t,e,this],this)}else e&&V(i.onClick,[t,e,this],this);var s,n}}function on(t,i){return i*(t.text?t.text.length:0)}var an={id:"legend",_element:rn,start(t,i,e){const s=t.legend=new rn({ctx:t.ctx,options:e,chart:t});We.configure(t,s,e),We.addBox(t,s)},stop(t){We.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,i,e){const s=t.legend;We.configure(t,s,e),s.options=e},afterUpdate(t){const i=t.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(t,i){i.replay||t.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,i,e){const s=i.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),i.hidden=!0):(n.show(s),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const i=t.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:r,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const h=t.controller.getStyle(e?0:void 0),c=vi(h.borderWidth);return{text:i[t.index].label,fillStyle:h.backgroundColor,fontColor:r,hidden:!t.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:h.borderColor,pointStyle:s||h.pointStyle,rotation:h.rotation,textAlign:n||h.textAlign,borderRadius:o&&(a||h.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class hn extends rs{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,i){const e=this.options;if(this.left=0,this.top=0,!e.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=i;const s=N(e.text)?e.text.length:1;this._padding=vi(e.padding);const n=s*yi(e.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:i,left:e,bottom:s,right:n,options:r}=this,o=r.align;let a,h,c,l=0;return this.isHorizontal()?(h=Et(o,e,n),c=i+t,a=n-e):("left"===r.position?(h=e+t,c=Et(o,s,i),l=-.5*at):(h=n-t,c=Et(o,i,s),l=.5*at),a=s-i),{titleX:h,titleY:c,maxWidth:a,rotation:l}}draw(){const t=this.ctx,i=this.options;if(!i.display)return;const e=yi(i.font),s=e.lineHeight/2+this._padding.top,{titleX:n,titleY:r,maxWidth:o,rotation:a}=this._drawArgs(s);ci(t,i.text,0,0,e,{color:i.color,maxWidth:o,rotation:a,textAlign:Bt(i.align),textBaseline:"middle",translation:[n,r]})}}var cn={id:"title",_element:hn,start(t,i,e){!function(t,i){const e=new hn({ctx:t.ctx,options:i,chart:t});We.configure(t,e,i),We.addBox(t,e),t.titleBlock=e}(t,e)},stop(t){We.removeBox(t,t.titleBlock),delete t.titleBlock},beforeUpdate(t,i,e){const s=t.titleBlock;We.configure(t,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ln={average(t){if(!t.length)return!1;let i,e,s=0,n=0,r=0;for(i=0,e=t.length;i<e;++i){const e=t[i].element;if(e&&e.hasValue()){const t=e.tooltipPosition();s+=t.x,n+=t.y,++r}}return{x:s/r,y:n/r}},nearest(t,i){if(!t.length)return!1;let e,s,n,r=i.x,o=i.y,a=Number.POSITIVE_INFINITY;for(e=0,s=t.length;e<s;++e){const s=t[e].element;if(s&&s.hasValue()){const t=(h=i,c=s.getCenterPoint(),Math.sqrt(Math.pow(c.x-h.x,2)+Math.pow(c.y-h.y,2)));t<a&&(a=t,n=s)}}var h,c;if(n){const t=n.tooltipPosition();r=t.x,o=t.y}return{x:r,y:o}}};function un(t,i){return i&&(N(i)?Array.prototype.push.apply(t,i):t.push(i)),t}function dn(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function fn(t,i){const{element:e,datasetIndex:s,index:n}=i,r=t.getDatasetMeta(s).controller,{label:o,value:a}=r.getLabelAndValue(n);return{chart:t,label:o,parsed:r.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:a,dataset:r.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function bn(t,i){const e=t.chart.ctx,{body:s,footer:n,title:r}=t,{boxWidth:o,boxHeight:a}=i,h=yi(i.bodyFont),c=yi(i.titleFont),l=yi(i.footerFont),u=r.length,d=n.length,f=s.length,b=vi(i.padding);let p=b.height,g=0,m=s.reduce(((t,i)=>t+i.before.length+i.lines.length+i.after.length),0);m+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*i.titleSpacing+i.titleMarginBottom),m&&(p+=f*(i.displayColors?Math.max(a,h.lineHeight):h.lineHeight)+(m-f)*h.lineHeight+(m-1)*i.bodySpacing),d&&(p+=i.footerMarginTop+d*l.lineHeight+(d-1)*i.footerSpacing);let v=0;const y=function(t){g=Math.max(g,e.measureText(t).width+v)};return e.save(),e.font=c.string,X(t.title,y),e.font=h.string,X(t.beforeBody.concat(t.afterBody),y),v=i.displayColors?o+2+i.boxPadding:0,X(s,(t=>{X(t.before,y),X(t.lines,y),X(t.after,y)})),v=0,e.font=l.string,X(t.footer,y),e.restore(),g+=b.width,{width:g,height:p}}function pn(t,i,e,s){const{x:n,width:r}=e,{width:o,chartArea:{left:a,right:h}}=t;let c="center";return"center"===s?c=n<=(a+h)/2?"left":"right":n<=r/2?c="left":n>=o-r/2&&(c="right"),function(t,i,e,s){const{x:n,width:r}=s,o=e.caretSize+e.caretPadding;return"left"===t&&n+r+o>i.width||"right"===t&&n-r-o<0||void 0}(c,t,i,e)&&(c="center"),c}function gn(t,i,e){const s=e.yAlign||i.yAlign||function(t,i){const{y:e,height:s}=i;return e<s/2?"top":e>t.height-s/2?"bottom":"center"}(t,e);return{xAlign:e.xAlign||i.xAlign||pn(t,i,e,s),yAlign:s}}function mn(t,i,e,s){const{caretSize:n,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:h}=e,c=n+r,{topLeft:l,topRight:u,bottomLeft:d,bottomRight:f}=mi(o);let b=function(t,i){let{x:e,width:s}=t;return"right"===i?e-=s:"center"===i&&(e-=s/2),e}(i,a);const p=function(t,i,e){let{y:s,height:n}=t;return"top"===i?s+=e:s-="bottom"===i?n+e:n/2,s}(i,h,c);return"center"===h?"left"===a?b+=c:"right"===a&&(b-=c):"left"===a?b-=Math.max(l,d)+n:"right"===a&&(b+=Math.max(u,f)+n),{x:wt(b,0,s.width-i.width),y:wt(p,0,s.height-i.height)}}function vn(t,i,e){const s=vi(e.padding);return"center"===i?t.x+t.width/2:"right"===i?t.x+t.width-s.right:t.x+s.left}function yn(t){return un([],dn(t))}function xn(t,i){const e=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return e?t.override(e):t}const Mn={beforeTitle:T,title(t){if(t.length>0){const i=t[0],e=i.chart.data.labels,s=e?e.length:0;if(this&&this.options&&"dataset"===this.options.mode)return i.dataset.label||"";if(i.label)return i.label;if(s>0&&i.dataIndex<s)return e[i.dataIndex]}return""},afterTitle:T,beforeBody:T,beforeLabel:T,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let i=t.dataset.label||"";i&&(i+=": ");const e=t.formattedValue;return z(e)||(i+=e),i},labelColor(t){const i=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const i=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:T,afterBody:T,beforeFooter:T,footer:T,afterFooter:T};function kn(t,i,e,s){const n=t[i].call(e,s);return void 0===n?Mn[i].call(e,s):n}class wn extends rs{static positioners=ln;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const i=this.chart,e=this.options.setContext(this.getContext()),s=e.enabled&&i.options.animation&&e.animations,n=new ee(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=Mi(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,i){const{callbacks:e}=i,s=kn(e,"beforeTitle",this,t),n=kn(e,"title",this,t),r=kn(e,"afterTitle",this,t);let o=[];return o=un(o,dn(s)),o=un(o,dn(n)),o=un(o,dn(r)),o}getBeforeBody(t,i){return yn(kn(i.callbacks,"beforeBody",this,t))}getBody(t,i){const{callbacks:e}=i,s=[];return X(t,(t=>{const i={before:[],lines:[],after:[]},n=xn(e,t);un(i.before,dn(kn(n,"beforeLabel",this,t))),un(i.lines,kn(n,"label",this,t)),un(i.after,dn(kn(n,"afterLabel",this,t))),s.push(i)})),s}getAfterBody(t,i){return yn(kn(i.callbacks,"afterBody",this,t))}getFooter(t,i){const{callbacks:e}=i,s=kn(e,"beforeFooter",this,t),n=kn(e,"footer",this,t),r=kn(e,"afterFooter",this,t);let o=[];return o=un(o,dn(s)),o=un(o,dn(n)),o=un(o,dn(r)),o}_createItems(t){const i=this._active,e=this.chart.data,s=[],n=[],r=[];let o,a,h=[];for(o=0,a=i.length;o<a;++o)h.push(fn(this.chart,i[o]));return t.filter&&(h=h.filter(((i,s,n)=>t.filter(i,s,n,e)))),t.itemSort&&(h=h.sort(((i,s)=>t.itemSort(i,s,e)))),X(h,(i=>{const e=xn(t.callbacks,i);s.push(kn(e,"labelColor",this,i)),n.push(kn(e,"labelPointStyle",this,i)),r.push(kn(e,"labelTextColor",this,i))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=r,this.dataPoints=h,h}update(t,i){const e=this.options.setContext(this.getContext()),s=this._active;let n,r=[];if(s.length){const t=ln[e.position].call(this,s,this._eventPosition);r=this._createItems(e),this.title=this.getTitle(r,e),this.beforeBody=this.getBeforeBody(r,e),this.body=this.getBody(r,e),this.afterBody=this.getAfterBody(r,e),this.footer=this.getFooter(r,e);const i=this._size=bn(this,e),o=Object.assign({},t,i),a=gn(this.chart,e,o),h=mn(e,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,n={opacity:1,x:h.x,y:h.y,width:i.width,height:i.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=r,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&e.external&&e.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(t,i,e,s){const n=this.getCaretPosition(t,e,s);i.lineTo(n.x1,n.y1),i.lineTo(n.x2,n.y2),i.lineTo(n.x3,n.y3)}getCaretPosition(t,i,e){const{xAlign:s,yAlign:n}=this,{caretSize:r,cornerRadius:o}=e,{topLeft:a,topRight:h,bottomLeft:c,bottomRight:l}=mi(o),{x:u,y:d}=t,{width:f,height:b}=i;let p,g,m,v,y,x;return"center"===n?(y=d+b/2,"left"===s?(p=u,g=p-r,v=y+r,x=y-r):(p=u+f,g=p+r,v=y-r,x=y+r),m=p):(g="left"===s?u+Math.max(a,c)+r:"right"===s?u+f-Math.max(h,l)-r:this.caretX,"top"===n?(v=d,y=v-r,p=g-r,m=g+r):(v=d+b,y=v+r,p=g+r,m=g-r),x=v),{x1:p,x2:g,x3:m,y1:v,y2:y,y3:x}}drawTitle(t,i,e){const s=this.title,n=s.length;let r,o,a;if(n){const h=Ui(e.rtl,this.x,this.width);for(t.x=vn(this,e.titleAlign,e),i.textAlign=h.textAlign(e.titleAlign),i.textBaseline="middle",r=yi(e.titleFont),o=e.titleSpacing,i.fillStyle=e.titleColor,i.font=r.string,a=0;a<n;++a)i.fillText(s[a],h.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+o,a+1===n&&(t.y+=e.titleMarginBottom-o)}}_drawColorBox(t,i,e,s,n){const r=this.labelColors[e],o=this.labelPointStyles[e],{boxHeight:a,boxWidth:h}=n,c=yi(n.bodyFont),l=vn(this,"left",n),u=s.x(l),d=i.y+(a<c.lineHeight?(c.lineHeight-a)/2:0);if(n.usePointStyle){const i={radius:Math.min(h,a)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},e=s.leftForLtr(u,h)+h/2,c=d+a/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,ei(t,i,e,c),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,ei(t,i,e,c)}else{t.lineWidth=W(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const i=s.leftForLtr(u,h),e=s.leftForLtr(s.xPlus(u,1),h-2),o=mi(r.borderRadius);Object.values(o).some((t=>0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,li(t,{x:i,y:d,w:h,h:a,radius:o}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),li(t,{x:e,y:d+1,w:h-2,h:a-2,radius:o}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(i,d,h,a),t.strokeRect(i,d,h,a),t.fillStyle=r.backgroundColor,t.fillRect(e,d+1,h-2,a-2))}t.fillStyle=this.labelTextColors[e]}drawBody(t,i,e){const{body:s}=this,{bodySpacing:n,bodyAlign:r,displayColors:o,boxHeight:a,boxWidth:h,boxPadding:c}=e,l=yi(e.bodyFont);let u=l.lineHeight,d=0;const f=Ui(e.rtl,this.x,this.width),b=function(e){i.fillText(e,f.x(t.x+d),t.y+u/2),t.y+=u+n},p=f.textAlign(r);let g,m,v,y,x,M,k;for(i.textAlign=r,i.textBaseline="middle",i.font=l.string,t.x=vn(this,p,e),i.fillStyle=e.bodyColor,X(this.beforeBody,b),d=o&&"right"!==p?"center"===r?h/2+c:h+2+c:0,y=0,M=s.length;y<M;++y){for(g=s[y],m=this.labelTextColors[y],i.fillStyle=m,X(g.before,b),v=g.lines,o&&v.length&&(this._drawColorBox(i,t,y,f,e),u=Math.max(l.lineHeight,a)),x=0,k=v.length;x<k;++x)b(v[x]),u=l.lineHeight;X(g.after,b)}d=0,u=l.lineHeight,X(this.afterBody,b),t.y-=n}drawFooter(t,i,e){const s=this.footer,n=s.length;let r,o;if(n){const a=Ui(e.rtl,this.x,this.width);for(t.x=vn(this,e.footerAlign,e),t.y+=e.footerMarginTop,i.textAlign=a.textAlign(e.footerAlign),i.textBaseline="middle",r=yi(e.footerFont),i.fillStyle=e.footerColor,i.font=r.string,o=0;o<n;++o)i.fillText(s[o],a.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+e.footerSpacing}}drawBackground(t,i,e,s){const{xAlign:n,yAlign:r}=this,{x:o,y:a}=t,{width:h,height:c}=e,{topLeft:l,topRight:u,bottomLeft:d,bottomRight:f}=mi(s.cornerRadius);i.fillStyle=s.backgroundColor,i.strokeStyle=s.borderColor,i.lineWidth=s.borderWidth,i.beginPath(),i.moveTo(o+l,a),"top"===r&&this.drawCaret(t,i,e,s),i.lineTo(o+h-u,a),i.quadraticCurveTo(o+h,a,o+h,a+u),"center"===r&&"right"===n&&this.drawCaret(t,i,e,s),i.lineTo(o+h,a+c-f),i.quadraticCurveTo(o+h,a+c,o+h-f,a+c),"bottom"===r&&this.drawCaret(t,i,e,s),i.lineTo(o+d,a+c),i.quadraticCurveTo(o,a+c,o,a+c-d),"center"===r&&"left"===n&&this.drawCaret(t,i,e,s),i.lineTo(o,a+l),i.quadraticCurveTo(o,a,o+l,a),i.closePath(),i.fill(),s.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){const i=this.chart,e=this.$animations,s=e&&e.x,n=e&&e.y;if(s||n){const e=ln[t.position].call(this,this._active,this._eventPosition);if(!e)return;const r=this._size=bn(this,t),o=Object.assign({},e,this._size),a=gn(i,t,o),h=mn(t,o,a,i);s._to===h.x&&n._to===h.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=r.width,this.height=r.height,this.caretX=e.x,this.caretY=e.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const i=this.options.setContext(this.getContext());let e=this.opacity;if(!e)return;this._updateAnimationTarget(i);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};e=Math.abs(e)<.001?0:e;const r=vi(i.padding);i.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=e,this.drawBackground(n,t,s,i),Zi(t,i.textDirection),n.y+=r.top,this.drawTitle(n,t,i),this.drawBody(n,t,i),this.drawFooter(n,t,i),Ki(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){const e=this._active,s=t.map((({datasetIndex:t,index:i})=>{const e=this.chart.getDatasetMeta(t);if(!e)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:e.data[i],index:i}})),n=!U(e,s),r=this._positionChanged(s,i);(n||r)&&(this._active=s,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,i,e=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],r=this._getActiveElements(t,n,i,e),o=this._positionChanged(r,t),a=i||!U(r,n)||o;return a&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),a}_getActiveElements(t,i,e,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return i.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const r=this.chart.getElementsAtEventForMode(t,n.mode,n,e);return n.reverse&&r.reverse(),r}_positionChanged(t,i){const{caretX:e,caretY:s,options:n}=this,r=ln[n.position].call(this,t,i);return!1!==r&&(e!==r.x||s!==r.y)}}var _n={id:"tooltip",_element:wn,positioners:ln,afterInit(t,i,e){e&&(t.tooltip=new wn({chart:t,options:e}))},beforeUpdate(t,i,e){t.tooltip&&t.tooltip.initialize(e)},reset(t,i,e){t.tooltip&&t.tooltip.initialize(e)},afterDraw(t){const i=t.tooltip;if(i&&i._willRender()){const e={tooltip:i};if(!1===t.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0}))return;i.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,i){t.tooltip&&t.tooltip.handleEvent(i.event,i.replay,i.inChartArea)&&(i.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,i)=>i.bodyFont.size,boxWidth:(t,i)=>i.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Mn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function An(t){const i=this.getLabels();return t>=0&&t<i.length?i[t]:t}function On(t,i,{horizontal:e,minRotation:s}){const n=yt(s),r=(e?Math.sin(n):Math.cos(n))||.001;return Math.min(i/r,.75*i*(""+t).length)}class Sn extends bs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,i){return z(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:i,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this;const r=t=>s=i?s:t,o=t=>n=e?n:t;if(t){const t=pt(s),i=pt(n);t<0&&i<0?o(0):t>0&&i>0&&r(0)}if(s===n){let i=0===n?1:Math.abs(.05*n);o(n+i),t||r(s-i)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let i,{maxTicksLimit:e,stepSize:s}=t;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),e=e||11),e&&(i=Math.min(e,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,i=t.ticks;let e=this.getTickLimit();e=Math.max(2,e);const s=function(t,i){const e=[],{bounds:s,step:n,min:r,max:o,precision:a,count:h,maxTicks:c,maxDigits:l,includeBounds:u}=t,d=n||1,f=c-1,{min:b,max:p}=i,g=!z(r),m=!z(o),v=!z(h),y=(p-b)/(l+1);let x,M,k,w,_=mt((p-b)/f/d)*d;if(_<1e-14&&!g&&!m)return[{value:b},{value:p}];w=Math.ceil(p/_)-Math.floor(b/_),w>f&&(_=mt(w*_/f/d)*d),z(a)||(x=Math.pow(10,a),_=Math.ceil(_*x)/x),"ticks"===s?(M=Math.floor(b/_)*_,k=Math.ceil(p/_)*_):(M=b,k=p),g&&m&&n&&function(t,i){const e=Math.round(t);return e-i<=t&&e+i>=t}((o-r)/n,_/1e3)?(w=Math.round(Math.min((o-r)/_,c)),_=(o-r)/w,M=r,k=o):v?(M=g?r:M,k=m?o:k,w=h-1,_=(k-M)/w):(w=(k-M)/_,w=gt(w,Math.round(w),_/1e3)?Math.round(w):Math.ceil(w));const A=Math.max(xt(_),xt(M));x=Math.pow(10,z(a)?A:a),M=Math.round(M*x)/x,k=Math.round(k*x)/x;let O=0;for(g&&(u&&M!==r?(e.push({value:r}),M<r&&O++,gt(Math.round((M+O*_)*x)/x,r,On(r,y,t))&&O++):M<r&&O++);O<w;++O){const t=Math.round((M+O*_)*x)/x;if(m&&t>o)break;e.push({value:t})}return m&&u&&k!==o?e.length&&gt(e[e.length-1].value,o,On(o,y,t))?e[e.length-1].value=o:e.push({value:o}):m&&k!==o||e.push({value:k}),e}({maxTicks:e,bounds:t.bounds,min:t.min,max:t.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:i.minRotation||0,includeBounds:!1!==i.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,i){let e,s,n;for(e=0,s=t.length;e<s;e++)n=t[e].value,isNaN(n)||(i.min=Math.min(i.min,n),i.max=Math.max(i.max,n))}(s,this),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let i=this.min,e=this.max;if(super.configure(),this.options.offset&&t.length){const s=(e-i)/Math.max(t.length-1,1)/2;i-=s,e+=s}this._startValue=i,this._endValue=e,this._valueRange=e-i}getLabelForValue(t){return Gt(t,this.chart.options.locale,this.options.ticks.format)}}Gs.register(sn,class extends be{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,i,e,s){return ge(t,i,e,s)}parseArrayData(t,i,e,s){return ge(t,i,e,s)}parseObjectData(t,i,e,s){const{iScale:n,vScale:r}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,h="x"===n.axis?o:a,c="x"===r.axis?o:a,l=[];let u,d,f,b;for(u=e,d=e+s;u<d;++u)b=i[u],f={},f[n.axis]=n.parse(et(b,h),u),l.push(pe(et(b,c),f,r,u));return l}updateRangeFromParsed(t,i,e,s){super.updateRangeFromParsed(t,i,e,s);const n=e._custom;n&&i===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const i=this._cachedMeta,{iScale:e,vScale:s}=i,n=this.getParsed(t),r=n._custom,o=me(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(n[s.axis]);return{label:""+e.getLabelForValue(n[e.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,t)}updateElements(t,i,e,s){const n="reset"===s,{index:r,_cachedMeta:{vScale:o}}=this,a=o.getBasePixel(),h=o.isHorizontal(),c=this._getRuler(),{sharedOptions:l,includeOptions:u}=this._getSharedOptions(i,s);for(let d=i;d<i+e;d++){const i=this.getParsed(d),e=n||z(i[o.axis])?{base:a,head:a}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,c),b=(i._stacks||{})[o.axis],p={horizontal:h,base:e.base,enableBorderRadius:!b||me(i._custom)||r===b._top||r===b._bottom,x:h?e.head:f.center,y:h?f.center:e.head,height:h?f.size:Math.abs(e.size),width:h?Math.abs(e.size):f.size};u&&(p.options=l||this.resolveDataElementOptions(d,t[d].active?"active":s));const g=p.options||t[d].options;ve(p,g,b,r),Me(p,g,c.ratio),this.updateElement(t[d],d,p,s)}}_getStacks(t,i){const{iScale:e}=this._cachedMeta,s=e.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),n=e.options.stacked,r=[],o=t=>{const e=t.controller.getParsed(i),s=e&&e[t.vScale.axis];if(z(s)||isNaN(s))return!0};for(const e of s)if((void 0===i||!o(e))&&((!1===n||-1===r.indexOf(e.stack)||void 0===n&&void 0===e.stack)&&r.push(e.stack),e.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,i,e){const s=this._getStacks(t,e),n=void 0!==i?s.indexOf(i):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,i=this._cachedMeta,e=i.iScale,s=[];let n,r;for(n=0,r=i.data.length;n<r;++n)s.push(e.getPixelForValue(this.getParsed(n)[e.axis],n));const o=t.barThickness,a=o||function(t){const i=t.iScale,e=function(t,i){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas(i);let s=[];for(let i=0,n=e.length;i<n;i++)s=s.concat(e[i].controller.getAllParsedValues(t));t._cache.$bar=function(t){const i=new Set(t);return i.size===t.length?t:Array.from(i)}(s.sort(((t,i)=>t-i)))}return t._cache.$bar}(i,t.type);let s,n,r,o,a=i._length;const h=()=>{32767!==r&&-32768!==r&&(nt(o)&&(a=Math.min(a,Math.abs(r-o)||a)),o=r)};for(s=0,n=e.length;s<n;++s)r=i.getPixelForValue(e[s]),h();for(o=void 0,s=0,n=i.ticks.length;s<n;++s)r=i.getPixelForTick(s),h();return a}(i);return{min:a,pixels:s,start:e._startPixel,end:e._endPixel,stackCount:this._getStackCount(),scale:e,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:i,_stacked:e,index:s},options:{base:n,minBarLength:r}}=this,o=n||0,a=this.getParsed(t),h=a._custom,c=me(h);let l,u,d=a[i.axis],f=0,b=e?this.applyStack(i,a,e):d;b!==d&&(f=b-d,b=d),c&&(d=h.barStart,b=h.barEnd-h.barStart,0!==d&&pt(d)!==pt(h.barEnd)&&(f=0),f+=d);const p=z(n)||c?f:n;let g=i.getPixelForValue(p);if(l=this.chart.getDataVisibility(t)?i.getPixelForValue(f+b):g,u=l-g,Math.abs(u)<r){u=function(t,i,e){return 0!==t?pt(t):(i.isHorizontal()?1:-1)*(i.min>=e?1:-1)}(u,i,o)*r,d===o&&(g-=u/2);const t=i.getPixelForDecimal(0),n=i.getPixelForDecimal(1),h=Math.min(t,n),f=Math.max(t,n);g=Math.max(Math.min(g,f),h),l=g+u,e&&!c&&(a._stacks[i.axis]._visualValues[s]=i.getValueForPixel(l)-i.getValueForPixel(g))}if(g===i.getPixelForValue(o)){const t=pt(u)*i.getLineWidthForValue(o)/2;g+=t,u-=t}return{size:u,base:g,head:l,center:l+u/2}}_calculateBarIndexPixels(t,i){const e=i.scale,s=this.options,n=s.skipNull,r=G(s.maxBarThickness,1/0);let o,a;if(i.grouped){const e=n?this._getStackCount(t):i.stackCount,h="flex"===s.barThickness?function(t,i,e,s){const n=i.pixels,r=n[t];let o=t>0?n[t-1]:null,a=t<n.length-1?n[t+1]:null;const h=e.categoryPercentage;null===o&&(o=r-(null===a?i.end-i.start:a-r)),null===a&&(a=r+r-o);const c=r-(r-Math.min(o,a))/2*h;return{chunk:Math.abs(a-o)/2*h/s,ratio:e.barPercentage,start:c}}(t,i,s,e):function(t,i,e,s){const n=e.barThickness;let r,o;return z(n)?(r=i.min*e.categoryPercentage,o=e.barPercentage):(r=n*s,o=1),{chunk:r/s,ratio:o,start:i.pixels[t]-r/2}}(t,i,s,e),c=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:void 0);o=h.start+h.chunk*c+h.chunk/2,a=Math.min(r,h.chunk*h.ratio)}else o=e.getPixelForValue(this.getParsed(t)[e.axis],t),a=Math.min(r,i.min*i.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}}draw(){const t=this._cachedMeta,i=t.vScale,e=t.data,s=e.length;let n=0;for(;n<s;++n)null!==this.getParsed(n)[i.axis]&&e[n].draw(this._ctx)}},class extends rs{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:i,options:{borderColor:e,backgroundColor:s}}=this,{inner:n,outer:r}=function(t){const i=Vs(t),e=i.right-i.left,s=i.bottom-i.top,n=function(t,i,e){const s=t.borderSkipped,n=gi(t.options.borderWidth);return{t:Xs(s.top,n.top,0,e),r:Xs(s.right,n.right,0,i),b:Xs(s.bottom,n.bottom,0,e),l:Xs(s.left,n.left,0,i)}}(t,e/2,s/2),r=function(t,i,e){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,r=mi(n),o=Math.min(i,e),a=t.borderSkipped,h=s||W(n);return{topLeft:Xs(!h||a.top||a.left,r.topLeft,0,o),topRight:Xs(!h||a.top||a.right,r.topRight,0,o),bottomLeft:Xs(!h||a.bottom||a.left,r.bottomLeft,0,o),bottomRight:Xs(!h||a.bottom||a.right,r.bottomRight,0,o)}}(t,e/2,s/2);return{outer:{x:i.left,y:i.top,w:e,h:s,radius:r},inner:{x:i.left+n.l,y:i.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,r.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(n.b,n.r))}}}}(this),o=(a=r.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?li:Zs;var a;t.save(),r.w===n.w&&r.h===n.h||(t.beginPath(),o(t,Ks(r,i,n)),t.clip(),o(t,Ks(n,-i,r)),t.fillStyle=e,t.fill("evenodd")),t.beginPath(),o(t,Ks(n,i)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,i,e){return Us(this,t,i,e)}inXRange(t,i){return Us(this,t,null,i)}inYRange(t,i){return Us(this,null,t,i)}getCenterPoint(t){const{x:i,y:e,base:s,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(i+s)/2:i,y:n?e:(e+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},class extends bs{static id="category";static defaults={ticks:{callback:An}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const i=this._addedLabels;if(i.length){const t=this.getLabels();for(const{index:e,label:s}of i)t[e]===s&&t.splice(e,1);this._addedLabels=[]}super.init(t)}parse(t,i){if(z(t))return null;const e=this.getLabels();return((t,i)=>null===t?null:wt(Math.round(t),0,i))(i=isFinite(i)&&e[i]===t?i:function(t,i,e,s){const n=t.indexOf(i);return-1===n?((t,i,e,s)=>("string"==typeof i?(e=t.push(i)-1,s.unshift({index:e,label:i})):isNaN(i)&&(e=null),e))(t,i,e,s):n!==t.lastIndexOf(i)?e:n}(e,t,G(i,t),this._addedLabels),e.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:e,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(e=0),i||(s=this.getLabels().length-1)),this.min=e,this.max=s}buildTicks(){const t=this.min,i=this.max,e=this.options.offset,s=[];let n=this.getLabels();n=0===t&&i===n.length-1?n:n.slice(t,i+1),this._valueRange=Math.max(n.length-(e?0:1),1),this._startValue=this.min-(e?.5:0);for(let e=t;e<=i;e++)s.push({value:e});return s}getLabelForValue(t){return An.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},class extends Sn{static id="linear";static defaults={ticks:{callback:Vt.formatters.numeric}};determineDataLimits(){const{min:t,max:i}=this.getMinMax(!0);this.min=H(t)?t:0,this.max=H(i)?i:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),i=t?this.width:this.height,e=yt(this.options.ticks.minRotation),s=(t?Math.sin(e):Math.cos(e))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},an,_n,cn);const Rn=class{constructor(i){t(this,i),this.getGrossPayment=void 0,this.grossVolumeReport=void 0,this.loading=!0,this.errorMessage=""}componentDidLoad(){this.getGrossPayment&&this.fetchData()}propChanged(){this.getGrossPayment&&this.fetchData()}grossVolumeReportChanged(t){t&&(this.chart?this.updateChartData(t):this.initChart(t))}async fetchData(){this.loading=!0,this.getGrossPayment({onSuccess:t=>{this.loading=!1,this.grossVolumeReport=t},onError:t=>{this.loading=!1,this.errorMessage=t}})}initChart(t){const{dates:i,total:e}=t,r=i.reverse(),o=((t,i,e)=>({type:"bar",options:{plugins:{legend:{display:!1},title:{display:!0,text:["Trailing 30 Days","Gross Payments",s(t)],position:"top",align:"start"},tooltip:{displayColors:!1,intersect:!1,callbacks:{label:t=>{let r=t.dataIndex;return[n(i[r].date,e),s(i[r].value)]}}}},scales:{x:{grid:{drawOnChartArea:!1,drawTicks:!1},ticks:{callback:t=>{if(0===t||t===i.length-1)return n(i[t].date,e)}}},y:{display:!1}}},data:{labels:i.map((()=>"")),datasets:[{label:"Gross Volume by Date",data:i.map((t=>t.value))}]}}))(e,r,r[i.length-1].date);this.chart=new Gs(this.chartRef.getContext("2d"),o)}updateChartData(t){const i=t.dates.map((t=>t.value));this.chart.data.datasets.forEach((t=>{t.data=i})),this.chart.update()}disconnectedCallback(){this.chart&&this.chart.destroy()}render(){return i(e,null,this.loading&&o(),this.errorMessage?r(this.errorMessage):i("canvas",{id:"chart",ref:t=>this.chartRef=t}))}static get watchers(){return{getGrossPayment:["propChanged"],grossVolumeReport:["grossVolumeReportChanged"]}}};Rn.style=':root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33, 37, 41;--bs-body-bg:#fff;--bs-body-bg-rgb:255, 255, 255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0, 0, 0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33, 37, 41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233, 236, 239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33, 37, 41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248, 249, 250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13, 110, 253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10, 88, 202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222, 226, 230;--bs-body-bg:#212529;--bs-body-bg-rgb:33, 37, 41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255, 255, 255;--bs-secondary-color:rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb:222, 226, 230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52, 58, 64;--bs-tertiary-color:rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb:222, 226, 230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43, 48, 53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--bs-link-color:#6ea8fe;--bs-link-hover-color:#8bb9fe;--bs-link-color-rgb:110, 168, 254;--bs-link-hover-color-rgb:139, 185, 254;--bs-code-color:#e685b5;--bs-highlight-color:#dee2e6;--bs-highlight-bg:#664d03;--bs-border-color:#495057;--bs-border-color-translucent:rgba(255, 255, 255, 0.15);--bs-form-valid-color:#75b798;--bs-form-valid-border-color:#75b798;--bs-form-invalid-color:#ea868f;--bs-form-invalid-border-color:#ea868f}.spinner-grow,.spinner-border{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg) }}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion: reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff !important;background-color:RGBA(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-secondary{color:#fff !important;background-color:RGBA(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-success{color:#fff !important;background-color:RGBA(var(--bs-success-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-info{color:#000 !important;background-color:RGBA(var(--bs-info-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-warning{color:#000 !important;background-color:RGBA(var(--bs-warning-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-danger{color:#fff !important;background-color:RGBA(var(--bs-danger-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-light{color:#000 !important;background-color:RGBA(var(--bs-light-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-dark{color:#fff !important;background-color:RGBA(var(--bs-dark-rgb), var(--bs-bg-opacity, 1)) !important}.link-primary{color:RGBA(var(--bs-primary-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-primary-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-primary:hover,.link-primary:focus{color:RGBA(10, 88, 202, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(10, 88, 202, var(--bs-link-underline-opacity, 1)) !important}.link-secondary{color:RGBA(var(--bs-secondary-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-secondary-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-secondary:hover,.link-secondary:focus{color:RGBA(86, 94, 100, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(86, 94, 100, var(--bs-link-underline-opacity, 1)) !important}.link-success{color:RGBA(var(--bs-success-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-success-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-success:hover,.link-success:focus{color:RGBA(20, 108, 67, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(20, 108, 67, var(--bs-link-underline-opacity, 1)) !important}.link-info{color:RGBA(var(--bs-info-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-info-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-info:hover,.link-info:focus{color:RGBA(61, 213, 243, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(61, 213, 243, var(--bs-link-underline-opacity, 1)) !important}.link-warning{color:RGBA(var(--bs-warning-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-warning-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-warning:hover,.link-warning:focus{color:RGBA(255, 205, 57, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(255, 205, 57, var(--bs-link-underline-opacity, 1)) !important}.link-danger{color:RGBA(var(--bs-danger-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-danger-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-danger:hover,.link-danger:focus{color:RGBA(176, 42, 55, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(176, 42, 55, var(--bs-link-underline-opacity, 1)) !important}.link-light{color:RGBA(var(--bs-light-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-light-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-light:hover,.link-light:focus{color:RGBA(249, 250, 251, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(249, 250, 251, var(--bs-link-underline-opacity, 1)) !important}.link-dark{color:RGBA(var(--bs-dark-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-dark-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-dark:hover,.link-dark:focus{color:RGBA(26, 30, 33, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(26, 30, 33, var(--bs-link-underline-opacity, 1)) !important}.link-body-emphasis{color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-body-emphasis:hover,.link-body-emphasis:focus{color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 0.75)) !important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 0.75)) !important}.focus-ring:focus{outline:0;box-shadow:var(--bs-focus-ring-x, 0) var(--bs-focus-ring-y, 0) var(--bs-focus-ring-blur, 0) var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.icon-link{display:inline-flex;gap:0.375rem;align-items:center;text-decoration-color:rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 0.5));text-underline-offset:0.25em;backface-visibility:hidden}.icon-link>.bi{flex-shrink:0;width:1em;height:1em;fill:currentcolor;transition:0.2s ease-in-out transform}@media (prefers-reduced-motion: reduce){.icon-link>.bi{transition:none}}.icon-link-hover:hover>.bi,.icon-link-hover:focus-visible>.bi{transform:var(--bs-icon-link-transform, translate3d(0.25em, 0, 0))}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:sticky;top:0;z-index:1020}.sticky-bottom{position:sticky;bottom:0;z-index:1020}@media (min-width: 576px){.sticky-sm-top{position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 768px){.sticky-md-top{position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 992px){.sticky-lg-top{position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 1200px){.sticky-xl-top{position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 1400px){.sticky-xxl-top{position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption),.visually-hidden-focusable:not(:focus):not(:focus-within):not(caption){position:absolute !important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:var(--bs-border-width);min-height:1em;background-color:currentcolor;opacity:0.25}:host{display:block}';export{Rn as gross_payment_chart_core}