@justifi/webcomponents 4.6.4 → 4.7.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (688) hide show
  1. package/dist/cjs/{Api-f76b337f.js → Api-548eaa62.js} +3 -17
  2. package/dist/cjs/Api-548eaa62.js.map +1 -0
  3. package/dist/cjs/Pagination-cae1dcbd.js +15 -0
  4. package/dist/cjs/Pagination-cae1dcbd.js.map +1 -0
  5. package/dist/cjs/{Payout-4906a445.js → Payout-68a99ee3.js} +22 -1
  6. package/dist/cjs/Payout-68a99ee3.js.map +1 -0
  7. package/dist/cjs/SubAccount-f47c8522.js +109 -0
  8. package/dist/cjs/SubAccount-f47c8522.js.map +1 -0
  9. package/dist/cjs/additional-questions-details_5.cjs.entry.js +84 -0
  10. package/dist/cjs/additional-questions-details_5.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{business-form-schema-725ec6f5.js → business-form-schema-fe831c30.js} +2 -2
  12. package/dist/cjs/business-form-schema-fe831c30.js.map +1 -0
  13. package/dist/cjs/config-70f62990.js +19 -0
  14. package/dist/cjs/config-70f62990.js.map +1 -0
  15. package/dist/cjs/form-1e732a9d.js +731 -0
  16. package/dist/cjs/form-1e732a9d.js.map +1 -0
  17. package/dist/cjs/form-control-datepart_2.cjs.entry.js +44 -20
  18. package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -1
  19. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  20. package/dist/cjs/form-control-number_3.cjs.entry.js +17 -32
  21. package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -1
  22. package/dist/cjs/helpers-c505d861.js +28 -0
  23. package/dist/cjs/helpers-c505d861.js.map +1 -0
  24. package/dist/cjs/{index-3533152c.js → index-c5ace247.js} +8 -1
  25. package/dist/cjs/index-c5ace247.js.map +1 -0
  26. package/dist/cjs/{index.esm-84a0a7a8.js → index.esm-91ec051e.js} +123 -1
  27. package/dist/cjs/index.esm-91ec051e.js.map +1 -0
  28. package/dist/cjs/{justifi-additional-questions_5.cjs.entry.js → justifi-additional-questions_6.cjs.entry.js} +41 -16
  29. package/dist/cjs/justifi-additional-questions_6.cjs.entry.js.map +1 -0
  30. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
  31. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
  32. package/dist/cjs/justifi-business-details.cjs.entry.js +77 -0
  33. package/dist/cjs/justifi-business-details.cjs.entry.js.map +1 -0
  34. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +131 -0
  35. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js.map +1 -0
  36. package/dist/cjs/justifi-business-form.cjs.entry.js +13 -756
  37. package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
  38. package/dist/cjs/justifi-business-list.cjs.entry.js +38 -67
  39. package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -1
  40. package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
  41. package/dist/cjs/justifi-details.cjs.entry.js +4 -8
  42. package/dist/cjs/justifi-details.cjs.entry.js.map +1 -1
  43. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11029 -0
  44. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js.map +1 -0
  45. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +88 -0
  46. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js.map +1 -0
  47. package/dist/cjs/justifi-payment-details.cjs.entry.js +9 -9
  48. package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -1
  49. package/dist/cjs/justifi-payment-form.cjs.entry.js +4 -3
  50. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
  51. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +12 -10
  52. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
  53. package/dist/cjs/justifi-payments-list.cjs.entry.js +23 -17
  54. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
  55. package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -7
  56. package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -1
  57. package/dist/cjs/justifi-payouts-list.cjs.entry.js +24 -18
  58. package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
  59. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +24 -18
  60. package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -1
  61. package/dist/cjs/justifi-refund-form.cjs.entry.js +105 -0
  62. package/dist/cjs/justifi-refund-form.cjs.entry.js.map +1 -0
  63. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +82 -0
  64. package/dist/cjs/justifi-subaccount-details.cjs.entry.js.map +1 -0
  65. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +105 -0
  66. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js.map +1 -0
  67. package/dist/cjs/justifi-table_2.cjs.entry.js +80 -0
  68. package/dist/cjs/justifi-table_2.cjs.entry.js.map +1 -0
  69. package/dist/cjs/loader.cjs.js +2 -2
  70. package/dist/cjs/select-input_2.cjs.entry.js +1 -1
  71. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +72 -0
  72. package/dist/cjs/subaccount-account-details_4.cjs.entry.js.map +1 -0
  73. package/dist/cjs/subaccount-bank-details.cjs.entry.js +24 -0
  74. package/dist/cjs/subaccount-bank-details.cjs.entry.js.map +1 -0
  75. package/dist/cjs/subaccount-terms-details.cjs.entry.js +24 -0
  76. package/dist/cjs/subaccount-terms-details.cjs.entry.js.map +1 -0
  77. package/dist/cjs/{utils-0fd61dbd.js → utils-13d069be.js} +96 -18
  78. package/dist/cjs/utils-13d069be.js.map +1 -0
  79. package/dist/cjs/utils-4622829d.js +37 -0
  80. package/dist/cjs/utils-4622829d.js.map +1 -0
  81. package/dist/cjs/webcomponents.cjs.js +2 -2
  82. package/dist/collection/api/Api.js +2 -16
  83. package/dist/collection/api/Api.js.map +1 -1
  84. package/dist/collection/api/Business.js +0 -2
  85. package/dist/collection/api/Business.js.map +1 -1
  86. package/dist/collection/api/GrossVolume.js +2 -0
  87. package/dist/collection/api/GrossVolume.js.map +1 -0
  88. package/dist/collection/api/Pagination.js +8 -8
  89. package/dist/collection/api/Pagination.js.map +1 -1
  90. package/dist/collection/api/Payment.js +20 -0
  91. package/dist/collection/api/Payment.js.map +1 -1
  92. package/dist/collection/api/SubAccount.js +104 -0
  93. package/dist/collection/api/SubAccount.js.map +1 -0
  94. package/dist/collection/api/mockData/MockOnboardingData.js +118 -0
  95. package/dist/collection/api/mockData/MockOnboardingData.js.map +1 -0
  96. package/dist/collection/api/mockData/MockSubAccount.js +103 -0
  97. package/dist/collection/api/mockData/MockSubAccount.js.map +1 -0
  98. package/dist/collection/api/mockData/mockGrossVolumeReport.js +126 -0
  99. package/dist/collection/api/mockData/mockGrossVolumeReport.js.map +1 -0
  100. package/dist/collection/assets/info-icon.svg +5 -0
  101. package/dist/collection/collection-manifest.json +20 -1
  102. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +2 -9
  103. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
  104. package/dist/collection/components/billing-form/billing-form.stories.js +1 -1
  105. package/dist/collection/components/billing-form/billing-form.stories.js.map +1 -1
  106. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +7341 -0
  107. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +57 -0
  108. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js.map +1 -0
  109. package/dist/collection/components/business-details/business-details.css +6439 -0
  110. package/dist/collection/components/business-details/business-details.js +128 -0
  111. package/dist/collection/components/business-details/business-details.js.map +1 -0
  112. package/dist/collection/components/business-details/business-details.stories.js +24 -0
  113. package/dist/collection/components/business-details/business-details.stories.js.map +1 -0
  114. package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +7341 -0
  115. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +50 -0
  116. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js.map +1 -0
  117. package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +7341 -0
  118. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +49 -0
  119. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js.map +1 -0
  120. package/dist/collection/components/business-details/owner-details/owner-details.css +7341 -0
  121. package/dist/collection/components/business-details/owner-details/owner-details.js +57 -0
  122. package/dist/collection/components/business-details/owner-details/owner-details.js.map +1 -0
  123. package/dist/collection/components/business-details/representative-details/representative-details.css +7341 -0
  124. package/dist/collection/components/business-details/representative-details/representative-details.js +58 -0
  125. package/dist/collection/components/business-details/representative-details/representative-details.js.map +1 -0
  126. package/dist/collection/components/business-form/additional-questions/additional-questions.js +1 -1
  127. package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -1
  128. package/dist/collection/components/business-form/business-form-schema.js +1 -1
  129. package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
  130. package/dist/collection/components/business-form/business-form-stepped.css +7929 -0
  131. package/dist/collection/components/business-form/business-form-stepped.js +195 -0
  132. package/dist/collection/components/business-form/business-form-stepped.js.map +1 -0
  133. package/dist/collection/components/business-form/business-form-stepped.stories.js +132 -0
  134. package/dist/collection/components/business-form/business-form-stepped.stories.js.map +1 -0
  135. package/dist/collection/components/business-form/business-form.js +5 -24
  136. package/dist/collection/components/business-form/business-form.js.map +1 -1
  137. package/dist/collection/components/business-form/business-form.stories.js +21 -8
  138. package/dist/collection/components/business-form/business-form.stories.js.map +1 -1
  139. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +7 -5
  140. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
  141. package/dist/collection/components/business-form/business-owners/business-owners.js +4 -5
  142. package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
  143. package/dist/collection/components/business-form/business-representative/business-representative-schema.js.map +1 -1
  144. package/dist/collection/components/business-form/business-representative/business-representative.js +1 -1
  145. package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
  146. package/dist/collection/components/business-form/helpers.js +23 -0
  147. package/dist/collection/components/business-form/helpers.js.map +1 -0
  148. package/dist/collection/components/business-form/legal-address-form/legal-address-form-schema.js.map +1 -0
  149. package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.js +3 -21
  150. package/dist/collection/components/business-form/legal-address-form/legal-address-form.js.map +1 -0
  151. package/dist/collection/components/business-list/business-list.js +72 -84
  152. package/dist/collection/components/business-list/business-list.js.map +1 -1
  153. package/dist/collection/components/business-list/business-list.stories.js +3 -2
  154. package/dist/collection/components/business-list/business-list.stories.js.map +1 -1
  155. package/dist/collection/components/card-form/card-form.stories.js +2 -9
  156. package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
  157. package/dist/collection/components/details/details.js +2 -21
  158. package/dist/collection/components/details/details.js.map +1 -1
  159. package/dist/collection/components/details/utils.js +7 -8
  160. package/dist/collection/components/details/utils.js.map +1 -1
  161. package/dist/collection/components/form/form-control-number-masked.js +1 -1
  162. package/dist/collection/components/form/form-control-number-masked.js.map +1 -1
  163. package/dist/collection/components/form/form.js +4 -4
  164. package/dist/collection/components/form/form.js.map +1 -1
  165. package/dist/collection/components/gross-payment-chart/chart-utils.js +59 -0
  166. package/dist/collection/components/gross-payment-chart/chart-utils.js.map +1 -0
  167. package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +572 -0
  168. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +127 -0
  169. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js.map +1 -0
  170. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js +22 -0
  171. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js.map +1 -0
  172. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +15 -0
  173. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js.map +1 -0
  174. package/dist/collection/components/pagination-menu/pagination-menu.js +78 -0
  175. package/dist/collection/components/pagination-menu/pagination-menu.js.map +1 -0
  176. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
  177. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +153 -0
  178. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js.map +1 -0
  179. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js +32 -0
  180. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js.map +1 -0
  181. package/dist/collection/components/payment-details/payment-details.js +12 -6
  182. package/dist/collection/components/payment-details/payment-details.js.map +1 -1
  183. package/dist/collection/components/payment-details/payment-details.stories.js +4 -4
  184. package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -1
  185. package/dist/collection/components/payment-form/payment-form.stories.js +3 -11
  186. package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
  187. package/dist/collection/components/payment-method-form/payment-method-form.js +7 -6
  188. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
  189. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +15 -14
  190. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
  191. package/dist/collection/components/payments-list/payments-list.js +21 -13
  192. package/dist/collection/components/payments-list/payments-list.js.map +1 -1
  193. package/dist/collection/components/payments-list/payments-list.stories.js +4 -4
  194. package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
  195. package/dist/collection/components/payout-details/payout-details.js +12 -3
  196. package/dist/collection/components/payout-details/payout-details.js.map +1 -1
  197. package/dist/collection/components/payout-details/payout-details.stories.js +4 -4
  198. package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -1
  199. package/dist/collection/components/payouts-list/payouts-list.js +22 -14
  200. package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
  201. package/dist/collection/components/payouts-list/payouts-list.stories.js +4 -4
  202. package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
  203. package/dist/collection/components/proceeds-list/proceeds-list.js +22 -14
  204. package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -1
  205. package/dist/collection/components/proceeds-list/proceeds-list.stories.js +3 -2
  206. package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -1
  207. package/dist/collection/components/refund-form/refund-form-schema.js +14 -0
  208. package/dist/collection/components/refund-form/refund-form-schema.js.map +1 -0
  209. package/dist/collection/components/refund-form/refund-form.css +7785 -0
  210. package/dist/collection/components/refund-form/refund-form.js +229 -0
  211. package/dist/collection/components/refund-form/refund-form.js.map +1 -0
  212. package/dist/collection/components/refund-form/refund-form.stories.js +169 -0
  213. package/dist/collection/components/refund-form/refund-form.stories.js.map +1 -0
  214. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +7345 -0
  215. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +71 -0
  216. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js.map +1 -0
  217. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +7345 -0
  218. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +49 -0
  219. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js.map +1 -0
  220. package/dist/collection/components/subaccount-details/subaccount-details.css +7983 -0
  221. package/dist/collection/components/subaccount-details/subaccount-details.js +148 -0
  222. package/dist/collection/components/subaccount-details/subaccount-details.js.map +1 -0
  223. package/dist/collection/components/subaccount-details/subaccount-details.stories.js +26 -0
  224. package/dist/collection/components/subaccount-details/subaccount-details.stories.js.map +1 -0
  225. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +7345 -0
  226. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +51 -0
  227. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js.map +1 -0
  228. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +7345 -0
  229. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +49 -0
  230. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js.map +1 -0
  231. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +7345 -0
  232. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +50 -0
  233. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js.map +1 -0
  234. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +7345 -0
  235. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +49 -0
  236. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js.map +1 -0
  237. package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js +22 -0
  238. package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js.map +1 -0
  239. package/dist/collection/components/subaccounts-list/subaccounts-list.css +3 -0
  240. package/dist/collection/components/subaccounts-list/subaccounts-list.js +180 -0
  241. package/dist/collection/components/subaccounts-list/subaccounts-list.js.map +1 -0
  242. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +70 -0
  243. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js.map +1 -0
  244. package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js +10 -0
  245. package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js.map +1 -0
  246. package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js +34 -0
  247. package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js.map +1 -0
  248. package/dist/collection/components/table/table.js +27 -12
  249. package/dist/collection/components/table/table.js.map +1 -1
  250. package/dist/collection/components/table/test/table.spec.js +2 -2
  251. package/dist/collection/components/table/test/table.spec.js.map +1 -1
  252. package/dist/collection/utils/utils.js +95 -17
  253. package/dist/collection/utils/utils.js.map +1 -1
  254. package/dist/components/Api.js +2 -16
  255. package/dist/components/Api.js.map +1 -1
  256. package/dist/components/Pagination.js +12 -0
  257. package/dist/components/Pagination.js.map +1 -0
  258. package/dist/components/Payout.js +21 -1
  259. package/dist/components/Payout.js.map +1 -1
  260. package/dist/components/SubAccount.js +107 -0
  261. package/dist/components/SubAccount.js.map +1 -0
  262. package/dist/components/additional-questions-details.d.ts +11 -0
  263. package/dist/components/additional-questions-details.js +8 -0
  264. package/dist/components/additional-questions-details.js.map +1 -0
  265. package/dist/{cjs/justifi-table.cjs.entry.js → components/additional-questions-details2.js} +30 -61
  266. package/dist/components/additional-questions-details2.js.map +1 -0
  267. package/dist/components/additional-questions.js +1 -1
  268. package/dist/components/additional-questions.js.map +1 -1
  269. package/dist/components/business-generic-info.js +2 -5
  270. package/dist/components/business-generic-info.js.map +1 -1
  271. package/dist/components/business-owners.js +4 -5
  272. package/dist/components/business-owners.js.map +1 -1
  273. package/dist/components/business-representative.js +1 -1
  274. package/dist/components/business-representative.js.map +1 -1
  275. package/dist/components/config.js +17 -0
  276. package/dist/components/config.js.map +1 -0
  277. package/dist/components/details.js +6 -33
  278. package/dist/components/details.js.map +1 -1
  279. package/dist/components/form-control-number-masked2.js +1 -1
  280. package/dist/components/form-control-number-masked2.js.map +1 -1
  281. package/dist/components/form.js +729 -0
  282. package/dist/components/form.js.map +1 -0
  283. package/dist/components/generic-info-details.d.ts +11 -0
  284. package/dist/components/generic-info-details.js +8 -0
  285. package/dist/components/generic-info-details.js.map +1 -0
  286. package/dist/components/generic-info-details2.js +38 -0
  287. package/dist/components/generic-info-details2.js.map +1 -0
  288. package/dist/components/helpers.js +26 -0
  289. package/dist/components/helpers.js.map +1 -0
  290. package/dist/components/index.esm.js +122 -1
  291. package/dist/components/index.esm.js.map +1 -1
  292. package/dist/components/justifi-business-details.d.ts +11 -0
  293. package/dist/components/justifi-business-details.js +127 -0
  294. package/dist/components/justifi-business-details.js.map +1 -0
  295. package/dist/components/justifi-business-form-stepped.d.ts +11 -0
  296. package/dist/components/justifi-business-form-stepped.js +222 -0
  297. package/dist/components/justifi-business-form-stepped.js.map +1 -0
  298. package/dist/components/justifi-business-form.js +7 -750
  299. package/dist/components/justifi-business-form.js.map +1 -1
  300. package/dist/components/justifi-business-list.js +44 -65
  301. package/dist/components/justifi-business-list.js.map +1 -1
  302. package/dist/components/justifi-gross-payment-chart.d.ts +11 -0
  303. package/dist/components/justifi-gross-payment-chart.js +11052 -0
  304. package/dist/components/justifi-gross-payment-chart.js.map +1 -0
  305. package/dist/components/justifi-payment-balance-transactions.d.ts +11 -0
  306. package/dist/components/justifi-payment-balance-transactions.js +123 -0
  307. package/dist/components/justifi-payment-balance-transactions.js.map +1 -0
  308. package/dist/components/justifi-payment-details.js +7 -6
  309. package/dist/components/justifi-payment-details.js.map +1 -1
  310. package/dist/components/justifi-payment-form.js +3 -2
  311. package/dist/components/justifi-payment-form.js.map +1 -1
  312. package/dist/components/justifi-payments-list.js +30 -16
  313. package/dist/components/justifi-payments-list.js.map +1 -1
  314. package/dist/components/justifi-payout-details.js +7 -4
  315. package/dist/components/justifi-payout-details.js.map +1 -1
  316. package/dist/components/justifi-payouts-list.js +31 -17
  317. package/dist/components/justifi-payouts-list.js.map +1 -1
  318. package/dist/components/justifi-proceeds-list.js +30 -16
  319. package/dist/components/justifi-proceeds-list.js.map +1 -1
  320. package/dist/components/justifi-refund-form.d.ts +11 -0
  321. package/dist/components/justifi-refund-form.js +140 -0
  322. package/dist/components/justifi-refund-form.js.map +1 -0
  323. package/dist/components/justifi-subaccount-details.d.ts +11 -0
  324. package/dist/components/justifi-subaccount-details.js +134 -0
  325. package/dist/components/justifi-subaccount-details.js.map +1 -0
  326. package/dist/components/justifi-subaccounts-list.d.ts +11 -0
  327. package/dist/components/justifi-subaccounts-list.js +139 -0
  328. package/dist/components/justifi-subaccounts-list.js.map +1 -0
  329. package/dist/components/legal-address-details.d.ts +11 -0
  330. package/dist/components/legal-address-details.js +8 -0
  331. package/dist/components/legal-address-details.js.map +1 -0
  332. package/dist/components/legal-address-details2.js +37 -0
  333. package/dist/components/legal-address-details2.js.map +1 -0
  334. package/dist/components/legal-address-form.js +1 -3
  335. package/dist/components/legal-address-form.js.map +1 -1
  336. package/dist/components/owner-details.d.ts +11 -0
  337. package/dist/components/owner-details.js +8 -0
  338. package/dist/components/owner-details.js.map +1 -0
  339. package/dist/components/owner-details2.js +37 -0
  340. package/dist/components/owner-details2.js.map +1 -0
  341. package/dist/components/pagination-menu.d.ts +11 -0
  342. package/dist/components/pagination-menu.js +8 -0
  343. package/dist/components/pagination-menu.js.map +1 -0
  344. package/dist/{esm/justifi-table.entry.js → components/pagination-menu2.js} +35 -55
  345. package/dist/components/pagination-menu2.js.map +1 -0
  346. package/dist/components/payment-method-form.js +11 -9
  347. package/dist/components/payment-method-form.js.map +1 -1
  348. package/dist/components/representative-details.d.ts +11 -0
  349. package/dist/components/representative-details.js +8 -0
  350. package/dist/components/representative-details.js.map +1 -0
  351. package/dist/components/representative-details2.js +38 -0
  352. package/dist/components/representative-details2.js.map +1 -0
  353. package/dist/components/subaccount-account-details.d.ts +11 -0
  354. package/dist/components/subaccount-account-details.js +8 -0
  355. package/dist/components/subaccount-account-details.js.map +1 -0
  356. package/dist/components/subaccount-account-details2.js +39 -0
  357. package/dist/components/subaccount-account-details2.js.map +1 -0
  358. package/dist/components/subaccount-bank-details.d.ts +11 -0
  359. package/dist/components/subaccount-bank-details.js +40 -0
  360. package/dist/components/subaccount-bank-details.js.map +1 -0
  361. package/dist/components/subaccount-merchant-details.d.ts +11 -0
  362. package/dist/components/subaccount-merchant-details.js +8 -0
  363. package/dist/components/subaccount-merchant-details.js.map +1 -0
  364. package/dist/components/subaccount-merchant-details2.js +38 -0
  365. package/dist/components/subaccount-merchant-details2.js.map +1 -0
  366. package/dist/components/subaccount-owners-details.d.ts +11 -0
  367. package/dist/components/subaccount-owners-details.js +8 -0
  368. package/dist/components/subaccount-owners-details.js.map +1 -0
  369. package/dist/components/subaccount-owners-details2.js +38 -0
  370. package/dist/components/subaccount-owners-details2.js.map +1 -0
  371. package/dist/components/subaccount-representative-details.d.ts +11 -0
  372. package/dist/components/subaccount-representative-details.js +8 -0
  373. package/dist/components/subaccount-representative-details.js.map +1 -0
  374. package/dist/components/subaccount-representative-details2.js +38 -0
  375. package/dist/components/subaccount-representative-details2.js.map +1 -0
  376. package/dist/components/subaccount-terms-details.d.ts +11 -0
  377. package/dist/components/subaccount-terms-details.js +40 -0
  378. package/dist/components/subaccount-terms-details.js.map +1 -0
  379. package/dist/components/table.js +12 -21
  380. package/dist/components/table.js.map +1 -1
  381. package/dist/components/utils.js +27 -3909
  382. package/dist/components/utils.js.map +1 -1
  383. package/dist/components/utils2.js +3983 -0
  384. package/dist/components/utils2.js.map +1 -0
  385. package/dist/config.js +12 -4
  386. package/dist/config.js.map +1 -1
  387. package/dist/esm/{Api-cca120a8.js → Api-c65d3ed8.js} +3 -17
  388. package/dist/esm/Api-c65d3ed8.js.map +1 -0
  389. package/dist/esm/Pagination-31f770d6.js +12 -0
  390. package/dist/esm/Pagination-31f770d6.js.map +1 -0
  391. package/dist/esm/{Payout-9a1f2859.js → Payout-fcf16887.js} +22 -2
  392. package/dist/esm/Payout-fcf16887.js.map +1 -0
  393. package/dist/esm/SubAccount-128190e9.js +107 -0
  394. package/dist/esm/SubAccount-128190e9.js.map +1 -0
  395. package/dist/esm/additional-questions-details_5.entry.js +76 -0
  396. package/dist/esm/additional-questions-details_5.entry.js.map +1 -0
  397. package/dist/esm/{business-form-schema-5885d3d6.js → business-form-schema-30a3eadd.js} +2 -2
  398. package/dist/esm/business-form-schema-30a3eadd.js.map +1 -0
  399. package/dist/esm/config-b1976dbd.js +17 -0
  400. package/dist/esm/config-b1976dbd.js.map +1 -0
  401. package/dist/esm/form-32cf3d1e.js +729 -0
  402. package/dist/esm/form-32cf3d1e.js.map +1 -0
  403. package/dist/esm/form-control-datepart_2.entry.js +44 -20
  404. package/dist/esm/form-control-datepart_2.entry.js.map +1 -1
  405. package/dist/esm/form-control-monetary.entry.js +1 -1
  406. package/dist/esm/form-control-number_3.entry.js +17 -32
  407. package/dist/esm/form-control-number_3.entry.js.map +1 -1
  408. package/dist/esm/helpers-1d5ecdc8.js +26 -0
  409. package/dist/esm/helpers-1d5ecdc8.js.map +1 -0
  410. package/dist/esm/{index-fe877d03.js → index-7471ed60.js} +8 -1
  411. package/dist/esm/index-7471ed60.js.map +1 -0
  412. package/dist/esm/{index.esm-89fe6af9.js → index.esm-9397ffa0.js} +123 -2
  413. package/dist/esm/index.esm-9397ffa0.js.map +1 -0
  414. package/dist/esm/{justifi-additional-questions_5.entry.js → justifi-additional-questions_6.entry.js} +41 -17
  415. package/dist/esm/justifi-additional-questions_6.entry.js.map +1 -0
  416. package/dist/esm/justifi-bank-account-form.entry.js +1 -1
  417. package/dist/esm/justifi-billing-form_2.entry.js +2 -2
  418. package/dist/esm/justifi-business-details.entry.js +73 -0
  419. package/dist/esm/justifi-business-details.entry.js.map +1 -0
  420. package/dist/esm/justifi-business-form-stepped.entry.js +127 -0
  421. package/dist/esm/justifi-business-form-stepped.entry.js.map +1 -0
  422. package/dist/esm/justifi-business-form.entry.js +12 -755
  423. package/dist/esm/justifi-business-form.entry.js.map +1 -1
  424. package/dist/esm/justifi-business-list.entry.js +37 -66
  425. package/dist/esm/justifi-business-list.entry.js.map +1 -1
  426. package/dist/esm/justifi-card-form.entry.js +1 -1
  427. package/dist/esm/justifi-details.entry.js +4 -8
  428. package/dist/esm/justifi-details.entry.js.map +1 -1
  429. package/dist/esm/justifi-gross-payment-chart.entry.js +11025 -0
  430. package/dist/esm/justifi-gross-payment-chart.entry.js.map +1 -0
  431. package/dist/esm/justifi-payment-balance-transactions.entry.js +84 -0
  432. package/dist/esm/justifi-payment-balance-transactions.entry.js.map +1 -0
  433. package/dist/esm/justifi-payment-details.entry.js +9 -9
  434. package/dist/esm/justifi-payment-details.entry.js.map +1 -1
  435. package/dist/esm/justifi-payment-form.entry.js +4 -3
  436. package/dist/esm/justifi-payment-form.entry.js.map +1 -1
  437. package/dist/esm/justifi-payment-method-form.entry.js +12 -10
  438. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
  439. package/dist/esm/justifi-payments-list.entry.js +22 -16
  440. package/dist/esm/justifi-payments-list.entry.js.map +1 -1
  441. package/dist/esm/justifi-payout-details.entry.js +9 -7
  442. package/dist/esm/justifi-payout-details.entry.js.map +1 -1
  443. package/dist/esm/justifi-payouts-list.entry.js +23 -17
  444. package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
  445. package/dist/esm/justifi-proceeds-list.entry.js +23 -17
  446. package/dist/esm/justifi-proceeds-list.entry.js.map +1 -1
  447. package/dist/esm/justifi-refund-form.entry.js +101 -0
  448. package/dist/esm/justifi-refund-form.entry.js.map +1 -0
  449. package/dist/esm/justifi-subaccount-details.entry.js +78 -0
  450. package/dist/esm/justifi-subaccount-details.entry.js.map +1 -0
  451. package/dist/esm/justifi-subaccounts-list.entry.js +101 -0
  452. package/dist/esm/justifi-subaccounts-list.entry.js.map +1 -0
  453. package/dist/esm/justifi-table_2.entry.js +75 -0
  454. package/dist/esm/justifi-table_2.entry.js.map +1 -0
  455. package/dist/esm/loader.js +3 -3
  456. package/dist/esm/select-input_2.entry.js +1 -1
  457. package/dist/esm/subaccount-account-details_4.entry.js +65 -0
  458. package/dist/esm/subaccount-account-details_4.entry.js.map +1 -0
  459. package/dist/esm/subaccount-bank-details.entry.js +20 -0
  460. package/dist/esm/subaccount-bank-details.entry.js.map +1 -0
  461. package/dist/esm/subaccount-terms-details.entry.js +20 -0
  462. package/dist/esm/subaccount-terms-details.entry.js.map +1 -0
  463. package/dist/esm/{utils-ad0bbe03.js → utils-40b7002c.js} +91 -19
  464. package/dist/esm/utils-40b7002c.js.map +1 -0
  465. package/dist/esm/utils-6352c002.js +29 -0
  466. package/dist/esm/utils-6352c002.js.map +1 -0
  467. package/dist/esm/webcomponents.js +3 -3
  468. package/dist/types/api/Api.d.ts +4 -4
  469. package/dist/types/api/Business.d.ts +12 -4
  470. package/dist/types/api/GrossVolume.d.ts +8 -0
  471. package/dist/types/api/Pagination.d.ts +12 -6
  472. package/dist/types/api/Payment.d.ts +28 -0
  473. package/dist/types/api/SubAccount.d.ts +165 -0
  474. package/dist/types/api/mockData/MockOnboardingData.d.ts +8 -0
  475. package/dist/types/api/mockData/MockSubAccount.d.ts +3 -0
  476. package/dist/types/api/mockData/mockGrossVolumeReport.d.ts +7 -0
  477. package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +0 -7
  478. package/dist/types/components/business-details/additional-questions-details/additional-questions-details.d.ts +13 -0
  479. package/dist/types/components/business-details/business-details.d.ts +28 -0
  480. package/dist/types/components/business-details/business-details.stories.d.ts +7 -0
  481. package/dist/types/components/business-details/generic-info-details/generic-info-details.d.ts +5 -0
  482. package/dist/types/components/business-details/legal-address-details/legal-address-details.d.ts +5 -0
  483. package/dist/types/components/business-details/owner-details/owner-details.d.ts +13 -0
  484. package/dist/types/components/business-details/representative-details/representative-details.d.ts +13 -0
  485. package/dist/types/components/business-form/business-form-stepped.d.ts +29 -0
  486. package/dist/types/components/business-form/business-form-stepped.stories.d.ts +27 -0
  487. package/dist/types/components/business-form/business-form.d.ts +0 -1
  488. package/dist/types/components/business-form/business-form.stories.d.ts +6 -0
  489. package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +5 -1
  490. package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +2 -0
  491. package/dist/types/components/business-form/helpers.d.ts +1 -0
  492. package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.d.ts +1 -2
  493. package/dist/types/components/business-list/business-list.d.ts +34 -21
  494. package/dist/types/components/card-form/card-form.stories.d.ts +0 -7
  495. package/dist/types/components/details/details.d.ts +0 -3
  496. package/dist/types/components/details/utils.d.ts +5 -2
  497. package/dist/types/components/form/form.d.ts +1 -1
  498. package/dist/types/components/gross-payment-chart/chart-utils.d.ts +45 -0
  499. package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +20 -0
  500. package/dist/types/components/gross-payment-chart/gross-payment-chart.stories.d.ts +7 -0
  501. package/dist/types/components/pagination-menu/pagination-menu.d.ts +10 -0
  502. package/dist/types/components/payment-balance-transactions/payment-balance-transactions.d.ts +17 -0
  503. package/dist/types/components/payment-balance-transactions/payment-balance-transactions.stories.d.ts +8 -0
  504. package/dist/types/components/payment-details/payment-details.d.ts +8 -0
  505. package/dist/types/components/payment-form/payment-form.stories.d.ts +1 -9
  506. package/dist/types/components/payments-list/payments-list.d.ts +5 -4
  507. package/dist/types/components/payout-details/payout-details.d.ts +8 -0
  508. package/dist/types/components/payouts-list/payouts-list.d.ts +5 -4
  509. package/dist/types/components/proceeds-list/proceeds-list.d.ts +5 -3
  510. package/dist/types/components/refund-form/refund-form-schema.d.ts +11 -0
  511. package/dist/types/components/refund-form/refund-form.d.ts +58 -0
  512. package/dist/types/components/refund-form/refund-form.stories.d.ts +27 -0
  513. package/dist/types/components/subaccount-details/subaccount-account-details/subaccount-account-details.d.ts +6 -0
  514. package/dist/types/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.d.ts +5 -0
  515. package/dist/types/components/subaccount-details/subaccount-details.d.ts +16 -0
  516. package/dist/types/components/subaccount-details/subaccount-details.stories.d.ts +7 -0
  517. package/dist/types/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.d.ts +5 -0
  518. package/dist/types/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.d.ts +5 -0
  519. package/dist/types/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.d.ts +5 -0
  520. package/dist/types/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.d.ts +5 -0
  521. package/dist/types/components/subaccounts-list/subaccounts-list.d.ts +19 -0
  522. package/dist/types/components/subaccounts-list/subaccounts-list.stories.d.ts +9 -0
  523. package/dist/types/components/table/table.d.ts +3 -7
  524. package/dist/types/components.d.ts +619 -7
  525. package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +12 -4
  526. package/dist/types/utils/utils.d.ts +19 -0
  527. package/dist/webcomponents/p-0d5d02d7.js +2 -0
  528. package/dist/webcomponents/p-0d5d02d7.js.map +1 -0
  529. package/dist/webcomponents/p-0e9a7fa7.entry.js +2 -0
  530. package/dist/webcomponents/p-0e9a7fa7.entry.js.map +1 -0
  531. package/dist/webcomponents/p-1920e118.entry.js +2 -0
  532. package/dist/webcomponents/p-1920e118.entry.js.map +1 -0
  533. package/dist/webcomponents/p-215b4c87.entry.js +2 -0
  534. package/dist/webcomponents/{p-f6cc37a6.entry.js.map → p-215b4c87.entry.js.map} +1 -1
  535. package/dist/webcomponents/p-222d357c.entry.js +20 -0
  536. package/dist/webcomponents/p-222d357c.entry.js.map +1 -0
  537. package/dist/webcomponents/{p-d92116e6.entry.js → p-2cd29187.entry.js} +2 -2
  538. package/dist/webcomponents/p-301a23aa.js +2 -0
  539. package/dist/webcomponents/p-301a23aa.js.map +1 -0
  540. package/dist/webcomponents/p-355eabff.entry.js +2 -0
  541. package/dist/webcomponents/p-355eabff.entry.js.map +1 -0
  542. package/dist/webcomponents/{p-640bfa9f.entry.js → p-356cf20d.entry.js} +2 -2
  543. package/dist/webcomponents/p-397e0d5a.entry.js +2 -0
  544. package/dist/webcomponents/p-397e0d5a.entry.js.map +1 -0
  545. package/dist/webcomponents/p-491d5c69.entry.js +2 -0
  546. package/dist/webcomponents/p-491d5c69.entry.js.map +1 -0
  547. package/dist/webcomponents/p-526cb161.js +2 -0
  548. package/dist/webcomponents/p-526cb161.js.map +1 -0
  549. package/dist/webcomponents/{p-f9e127a5.js → p-59860ac8.js} +2 -2
  550. package/dist/webcomponents/p-59860ac8.js.map +1 -0
  551. package/dist/webcomponents/p-62872b87.entry.js +2 -0
  552. package/dist/webcomponents/p-62872b87.entry.js.map +1 -0
  553. package/dist/webcomponents/p-635a3b3e.entry.js +2 -0
  554. package/dist/webcomponents/p-635a3b3e.entry.js.map +1 -0
  555. package/dist/webcomponents/p-64184a0c.entry.js +2 -0
  556. package/dist/webcomponents/p-64184a0c.entry.js.map +1 -0
  557. package/dist/webcomponents/p-6c3236e8.entry.js +2 -0
  558. package/dist/webcomponents/p-6c3236e8.entry.js.map +1 -0
  559. package/dist/webcomponents/p-76983a7e.js +2 -0
  560. package/dist/webcomponents/p-76983a7e.js.map +1 -0
  561. package/dist/webcomponents/p-76dffeec.js +2 -0
  562. package/dist/webcomponents/p-76dffeec.js.map +1 -0
  563. package/dist/webcomponents/{p-2b6f5e35.entry.js → p-77e732b2.entry.js} +2 -2
  564. package/dist/webcomponents/p-77e732b2.entry.js.map +1 -0
  565. package/dist/webcomponents/p-798483dd.entry.js +2 -0
  566. package/dist/webcomponents/p-798483dd.entry.js.map +1 -0
  567. package/dist/webcomponents/p-7a24ab66.entry.js +2 -0
  568. package/dist/webcomponents/p-7a24ab66.entry.js.map +1 -0
  569. package/dist/webcomponents/p-7cde64a2.entry.js +2 -0
  570. package/dist/webcomponents/{p-9d1c7e6a.entry.js.map → p-7cde64a2.entry.js.map} +1 -1
  571. package/dist/webcomponents/p-7d58db66.js +2 -0
  572. package/dist/webcomponents/p-7d58db66.js.map +1 -0
  573. package/dist/webcomponents/p-8367b46c.entry.js +2 -0
  574. package/dist/webcomponents/p-8367b46c.entry.js.map +1 -0
  575. package/dist/webcomponents/{p-1beaaba3.entry.js → p-88fa33c1.entry.js} +2 -2
  576. package/dist/webcomponents/{p-c46241ba.js → p-8f37e3ee.js} +2 -2
  577. package/dist/webcomponents/p-8f37e3ee.js.map +1 -0
  578. package/dist/webcomponents/p-931989e6.entry.js +2 -0
  579. package/dist/webcomponents/p-931989e6.entry.js.map +1 -0
  580. package/dist/webcomponents/{p-cd0eca25.entry.js → p-96eecdff.entry.js} +2 -2
  581. package/dist/webcomponents/p-988191bf.js +2 -0
  582. package/dist/webcomponents/p-988191bf.js.map +1 -0
  583. package/dist/webcomponents/p-a4c78757.entry.js +2 -0
  584. package/dist/webcomponents/p-a4c78757.entry.js.map +1 -0
  585. package/dist/webcomponents/p-b08a9520.entry.js +2 -0
  586. package/dist/webcomponents/p-b08a9520.entry.js.map +1 -0
  587. package/dist/webcomponents/p-b157f6ae.js +2 -0
  588. package/dist/webcomponents/p-b157f6ae.js.map +1 -0
  589. package/dist/webcomponents/p-b45453ea.entry.js +2 -0
  590. package/dist/webcomponents/p-b45453ea.entry.js.map +1 -0
  591. package/dist/webcomponents/p-c2845c5d.entry.js +2 -0
  592. package/dist/webcomponents/p-c2845c5d.entry.js.map +1 -0
  593. package/dist/webcomponents/p-c4289027.entry.js +2 -0
  594. package/dist/webcomponents/p-c4289027.entry.js.map +1 -0
  595. package/dist/webcomponents/p-c43e9572.entry.js +2 -0
  596. package/dist/webcomponents/p-c43e9572.entry.js.map +1 -0
  597. package/dist/webcomponents/p-cbb60191.js +3 -0
  598. package/dist/webcomponents/p-cbb60191.js.map +1 -0
  599. package/dist/webcomponents/{p-26392ae3.entry.js → p-d40718da.entry.js} +2 -2
  600. package/dist/webcomponents/p-d40718da.entry.js.map +1 -0
  601. package/dist/webcomponents/{p-9346ae33.js → p-d6b5793d.js} +2 -2
  602. package/dist/webcomponents/p-d6b5793d.js.map +1 -0
  603. package/dist/webcomponents/{p-a922b908.entry.js → p-ec1890fc.entry.js} +2 -2
  604. package/dist/webcomponents/p-ffcbf779.entry.js +2 -0
  605. package/dist/webcomponents/p-ffcbf779.entry.js.map +1 -0
  606. package/dist/webcomponents/webcomponents.esm.js +1 -1
  607. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  608. package/package.json +8 -7
  609. package/dist/cjs/Api-f76b337f.js.map +0 -1
  610. package/dist/cjs/Payout-4906a445.js.map +0 -1
  611. package/dist/cjs/business-form-schema-725ec6f5.js.map +0 -1
  612. package/dist/cjs/form-control-select.cjs.entry.js +0 -47
  613. package/dist/cjs/form-control-select.cjs.entry.js.map +0 -1
  614. package/dist/cjs/index-3533152c.js.map +0 -1
  615. package/dist/cjs/index.esm-84a0a7a8.js.map +0 -1
  616. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +0 -1
  617. package/dist/cjs/justifi-table.cjs.entry.js.map +0 -1
  618. package/dist/cjs/table-utils-617126e5.js +0 -13
  619. package/dist/cjs/table-utils-617126e5.js.map +0 -1
  620. package/dist/cjs/utils-0fd61dbd.js.map +0 -1
  621. package/dist/cjs/utils-d95b09c2.js +0 -35
  622. package/dist/cjs/utils-d95b09c2.js.map +0 -1
  623. package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +0 -1
  624. package/dist/collection/components/legal-address-form/legal-address-form.js.map +0 -1
  625. package/dist/collection/components/table/table-utils.js +0 -8
  626. package/dist/collection/components/table/table-utils.js.map +0 -1
  627. package/dist/esm/Api-cca120a8.js.map +0 -1
  628. package/dist/esm/Payout-9a1f2859.js.map +0 -1
  629. package/dist/esm/business-form-schema-5885d3d6.js.map +0 -1
  630. package/dist/esm/form-control-select.entry.js +0 -43
  631. package/dist/esm/form-control-select.entry.js.map +0 -1
  632. package/dist/esm/index-fe877d03.js.map +0 -1
  633. package/dist/esm/index.esm-89fe6af9.js.map +0 -1
  634. package/dist/esm/justifi-additional-questions_5.entry.js.map +0 -1
  635. package/dist/esm/justifi-table.entry.js.map +0 -1
  636. package/dist/esm/table-utils-6cdcaa8c.js +0 -11
  637. package/dist/esm/table-utils-6cdcaa8c.js.map +0 -1
  638. package/dist/esm/utils-1e7d6279.js +0 -28
  639. package/dist/esm/utils-1e7d6279.js.map +0 -1
  640. package/dist/esm/utils-ad0bbe03.js.map +0 -1
  641. package/dist/types/components/table/table-utils.d.ts +0 -14
  642. package/dist/webcomponents/p-26392ae3.entry.js.map +0 -1
  643. package/dist/webcomponents/p-2b6f5e35.entry.js.map +0 -1
  644. package/dist/webcomponents/p-2e66512d.entry.js +0 -2
  645. package/dist/webcomponents/p-2e66512d.entry.js.map +0 -1
  646. package/dist/webcomponents/p-523cbe04.js +0 -2
  647. package/dist/webcomponents/p-523cbe04.js.map +0 -1
  648. package/dist/webcomponents/p-641883b2.entry.js +0 -2
  649. package/dist/webcomponents/p-641883b2.entry.js.map +0 -1
  650. package/dist/webcomponents/p-69a1bec2.entry.js +0 -2
  651. package/dist/webcomponents/p-69a1bec2.entry.js.map +0 -1
  652. package/dist/webcomponents/p-6a0c8dec.entry.js +0 -2
  653. package/dist/webcomponents/p-6a0c8dec.entry.js.map +0 -1
  654. package/dist/webcomponents/p-87410719.entry.js +0 -2
  655. package/dist/webcomponents/p-87410719.entry.js.map +0 -1
  656. package/dist/webcomponents/p-881edb4d.entry.js +0 -2
  657. package/dist/webcomponents/p-881edb4d.entry.js.map +0 -1
  658. package/dist/webcomponents/p-9346ae33.js.map +0 -1
  659. package/dist/webcomponents/p-9d1c7e6a.entry.js +0 -2
  660. package/dist/webcomponents/p-ab0756ff.js +0 -2
  661. package/dist/webcomponents/p-ab0756ff.js.map +0 -1
  662. package/dist/webcomponents/p-c46241ba.js.map +0 -1
  663. package/dist/webcomponents/p-ccb0e1c5.js +0 -2
  664. package/dist/webcomponents/p-ccb0e1c5.js.map +0 -1
  665. package/dist/webcomponents/p-dabeb3df.entry.js +0 -2
  666. package/dist/webcomponents/p-dabeb3df.entry.js.map +0 -1
  667. package/dist/webcomponents/p-db9945b1.entry.js +0 -2
  668. package/dist/webcomponents/p-db9945b1.entry.js.map +0 -1
  669. package/dist/webcomponents/p-e1f6c8ec.entry.js +0 -2
  670. package/dist/webcomponents/p-e1f6c8ec.entry.js.map +0 -1
  671. package/dist/webcomponents/p-e41fb562.entry.js +0 -2
  672. package/dist/webcomponents/p-e41fb562.entry.js.map +0 -1
  673. package/dist/webcomponents/p-e6695628.js +0 -2
  674. package/dist/webcomponents/p-e6695628.js.map +0 -1
  675. package/dist/webcomponents/p-e70b2a21.js +0 -3
  676. package/dist/webcomponents/p-e70b2a21.js.map +0 -1
  677. package/dist/webcomponents/p-f6cc37a6.entry.js +0 -2
  678. package/dist/webcomponents/p-f8067330.entry.js +0 -2
  679. package/dist/webcomponents/p-f8067330.entry.js.map +0 -1
  680. package/dist/webcomponents/p-f9e127a5.js.map +0 -1
  681. /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.js +0 -0
  682. /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.css +0 -0
  683. /package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.d.ts +0 -0
  684. /package/dist/webcomponents/{p-d92116e6.entry.js.map → p-2cd29187.entry.js.map} +0 -0
  685. /package/dist/webcomponents/{p-640bfa9f.entry.js.map → p-356cf20d.entry.js.map} +0 -0
  686. /package/dist/webcomponents/{p-1beaaba3.entry.js.map → p-88fa33c1.entry.js.map} +0 -0
  687. /package/dist/webcomponents/{p-cd0eca25.entry.js.map → p-96eecdff.entry.js.map} +0 -0
  688. /package/dist/webcomponents/{p-a922b908.entry.js.map → p-ec1890fc.entry.js.map} +0 -0
@@ -0,0 +1,20 @@
1
+ import{r as t,h as e,H as s}from"./p-cbb60191.js";import{A as i}from"./p-b157f6ae.js";import"./p-0d5d02d7.js";import"./p-76983a7e.js";import{a as n,b as o}from"./p-d6b5793d.js";import{E as r}from"./p-76dffeec.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 c(t){return t+.5|0}const a=(t,e,s)=>Math.max(Math.min(t,s),e);function h(t){return a(c(t*2.55),0,255)}function f(t){return a(c(t*255),0,255)}function l(t){return a(c(t/2.55)/100,0,1)}function u(t){return a(c(t*100),0,100)}const d={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};const b=[..."0123456789ABCDEF"];const p=t=>b[t&15];const g=t=>b[(t&240)>>4]+b[t&15];const m=t=>(t&240)>>4===(t&15);const y=t=>m(t.r)&&m(t.g)&&m(t.b)&&m(t.a);function x(t){var e=t.length;var s;if(t[0]==="#"){if(e===4||e===5){s={r:255&d[t[1]]*17,g:255&d[t[2]]*17,b:255&d[t[3]]*17,a:e===5?d[t[4]]*17:255}}else if(e===7||e===9){s={r:d[t[1]]<<4|d[t[2]],g:d[t[3]]<<4|d[t[4]],b:d[t[5]]<<4|d[t[6]],a:e===9?d[t[7]]<<4|d[t[8]]:255}}}return s}const v=(t,e)=>t<255?e(t):"";function M(t){var e=y(t)?p:g;return t?"#"+e(t.r)+e(t.g)+e(t.b)+v(t.a,e):undefined}const k=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function w(t,e,s){const i=e*Math.min(s,1-s);const n=(e,n=(e+t/30)%12)=>s-i*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function _(t,e,s){const i=(i,n=(i+t/60)%6)=>s-s*e*Math.max(Math.min(n,4-n,1),0);return[i(5),i(3),i(1)]}function A(t,e,s){const i=w(t,1,.5);let n;if(e+s>1){n=1/(e+s);e*=n;s*=n}for(n=0;n<3;n++){i[n]*=1-e-s;i[n]+=e}return i}function O(t,e,s,i,n){if(t===n){return(e-s)/i+(e<s?6:0)}if(e===n){return(s-t)/i+2}return(t-e)/i+4}function S(t){const e=255;const s=t.r/e;const i=t.g/e;const n=t.b/e;const o=Math.max(s,i,n);const r=Math.min(s,i,n);const c=(o+r)/2;let a,h,f;if(o!==r){f=o-r;h=c>.5?f/(2-o-r):f/(o+r);a=O(s,i,n,f,o);a=a*60+.5}return[a|0,h||0,c]}function R(t,e,s,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,s,i)).map(f)}function D(t,e,s){return R(w,t,e,s)}function j(t,e,s){return R(A,t,e,s)}function B(t,e,s){return R(_,t,e,s)}function C(t){return(t%360+360)%360}function E(t){const e=k.exec(t);let s=255;let i;if(!e){return}if(e[5]!==i){s=e[6]?h(+e[5]):f(+e[5])}const n=C(+e[2]);const o=+e[3]/100;const r=+e[4]/100;if(e[1]==="hwb"){i=j(n,o,r)}else if(e[1]==="hsv"){i=B(n,o,r)}else{i=D(n,o,r)}return{r:i[0],g:i[1],b:i[2],a:s}}function L(t,e){var s=S(t);s[0]=C(s[0]+e);s=D(s);t.r=s[0];t.g=s[1];t.b=s[2]}function P(t){if(!t){return}const e=S(t);const s=e[0];const i=u(e[1]);const n=u(e[2]);return t.a<255?`hsla(${s}, ${i}%, ${n}%, ${l(t.a)})`:`hsl(${s}, ${i}%, ${n}%)`}const I={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"};const T={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"};function F(){const t={};const e=Object.keys(T);const s=Object.keys(I);let i,n,o,r,c;for(i=0;i<e.length;i++){r=c=e[i];for(n=0;n<s.length;n++){o=s[n];c=c.replace(o,I[o])}o=parseInt(T[r],16);t[c]=[o>>16&255,o>>8&255,o&255]}return t}let z;function N(t){if(!z){z=F();z.transparent=[0,0,0,0]}const e=z[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const W=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function H(t){const e=W.exec(t);let s=255;let i,n,o;if(!e){return}if(e[7]!==i){const t=+e[7];s=e[8]?h(t):a(t*255,0,255)}i=+e[1];n=+e[3];o=+e[5];i=255&(e[2]?h(i):a(i,0,255));n=255&(e[4]?h(n):a(n,0,255));o=255&(e[6]?h(o):a(o,0,255));return{r:i,g:n,b:o,a:s}}function $(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${l(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const G=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055;const Y=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function V(t,e,s){const i=Y(l(t.r));const n=Y(l(t.g));const o=Y(l(t.b));return{r:f(G(i+s*(Y(l(e.r))-i))),g:f(G(n+s*(Y(l(e.g))-n))),b:f(G(o+s*(Y(l(e.b))-o))),a:t.a+s*(e.a-t.a)}}function X(t,e,s){if(t){let i=S(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*s,e===0?360:1));i=D(i);t.r=i[0];t.g=i[1];t.b=i[2]}}function U(t,e){return t?Object.assign(e||{},t):t}function Z(t){var e={r:0,g:0,b:0,a:255};if(Array.isArray(t)){if(t.length>=3){e={r:t[0],g:t[1],b:t[2],a:255};if(t.length>3){e.a=f(t[3])}}}else{e=U(t,{r:0,g:0,b:0,a:1});e.a=f(e.a)}return e}function K(t){if(t.charAt(0)==="r"){return H(t)}return E(t)}class Q{constructor(t){if(t instanceof Q){return t}const e=typeof t;let s;if(e==="object"){s=Z(t)}else if(e==="string"){s=x(t)||N(t)||K(t)}this._rgb=s;this._valid=!!s}get valid(){return this._valid}get rgb(){var t=U(this._rgb);if(t){t.a=l(t.a)}return t}set rgb(t){this._rgb=Z(t)}rgbString(){return this._valid?$(this._rgb):undefined}hexString(){return this._valid?M(this._rgb):undefined}hslString(){return this._valid?P(this._rgb):undefined}mix(t,e){if(t){const s=this.rgb;const i=t.rgb;let n;const o=e===n?.5:e;const r=2*o-1;const c=s.a-i.a;const a=((r*c===-1?r:(r+c)/(1+r*c))+1)/2;n=1-a;s.r=255&a*s.r+n*i.r+.5;s.g=255&a*s.g+n*i.g+.5;s.b=255&a*s.b+n*i.b+.5;s.a=o*s.a+(1-o)*i.a;this.rgb=s}return this}interpolate(t,e){if(t){this._rgb=V(this._rgb,t._rgb,e)}return this}clone(){return new Q(this.rgb)}alpha(t){this._rgb.a=f(t);return this}clearer(t){const e=this._rgb;e.a*=1-t;return this}greyscale(){const t=this._rgb;const e=c(t.r*.3+t.g*.59+t.b*.11);t.r=t.g=t.b=e;return this}opaquer(t){const e=this._rgb;e.a*=1+t;return this}negate(){const t=this._rgb;t.r=255-t.r;t.g=255-t.g;t.b=255-t.b;return this}lighten(t){X(this._rgb,2,t);return this}darken(t){X(this._rgb,2,-t);return this}saturate(t){X(this._rgb,1,t);return this}desaturate(t){X(this._rgb,1,-t);return this}rotate(t){L(this._rgb,t);return 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 q(){}const J=(()=>{let t=0;return()=>t++})();function tt(t){return t===null||typeof t==="undefined"}function et(t){if(Array.isArray&&Array.isArray(t)){return true}const e=Object.prototype.toString.call(t);if(e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"){return true}return false}function st(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function it(t){return(typeof t==="number"||t instanceof Number)&&isFinite(+t)}function nt(t,e){return it(t)?t:e}function ot(t,e){return typeof t==="undefined"?e:t}const rt=(t,e)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e;const ct=(t,e)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function at(t,e,s){if(t&&typeof t.call==="function"){return t.apply(s,e)}}function ht(t,e,s,i){let n,o,r;if(et(t)){o=t.length;if(i){for(n=o-1;n>=0;n--){e.call(s,t[n],n)}}else{for(n=0;n<o;n++){e.call(s,t[n],n)}}}else if(st(t)){r=Object.keys(t);o=r.length;for(n=0;n<o;n++){e.call(s,t[r[n]],r[n])}}}function ft(t,e){let s,i,n,o;if(!t||!e||t.length!==e.length){return false}for(s=0,i=t.length;s<i;++s){n=t[s];o=e[s];if(n.datasetIndex!==o.datasetIndex||n.index!==o.index){return false}}return true}function lt(t){if(et(t)){return t.map(lt)}if(st(t)){const e=Object.create(null);const s=Object.keys(t);const i=s.length;let n=0;for(;n<i;++n){e[s[n]]=lt(t[s[n]])}return e}return t}function ut(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function dt(t,e,s,i){if(!ut(t)){return}const n=e[t];const o=s[t];if(st(n)&&st(o)){bt(n,o,i)}else{e[t]=lt(o)}}function bt(t,e,s){const i=et(e)?e:[e];const n=i.length;if(!st(t)){return t}s=s||{};const o=s.merger||dt;let r;for(let e=0;e<n;++e){r=i[e];if(!st(r)){continue}const n=Object.keys(r);for(let e=0,i=n.length;e<i;++e){o(n[e],t,r,s)}}return t}function pt(t,e){return bt(t,e,{merger:gt})}function gt(t,e,s){if(!ut(t)){return}const i=e[t];const n=s[t];if(st(i)&&st(n)){pt(i,n)}else if(!Object.prototype.hasOwnProperty.call(e,t)){e[t]=lt(n)}}const mt={"":t=>t,x:t=>t.x,y:t=>t.y};function yt(t){const e=t.split(".");const s=[];let i="";for(const t of e){i+=t;if(i.endsWith("\\")){i=i.slice(0,-1)+"."}else{s.push(i);i=""}}return s}function xt(t){const e=yt(t);return t=>{for(const s of e){if(s===""){break}t=t&&t[s]}return t}}function vt(t,e){const s=mt[e]||(mt[e]=xt(e));return s(t)}function Mt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const kt=t=>typeof t!=="undefined";const wt=t=>typeof t==="function";const _t=(t,e)=>{if(t.size!==e.size){return false}for(const s of t){if(!e.has(s)){return false}}return true};function At(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ot=Math.PI;const St=2*Ot;const Rt=Number.POSITIVE_INFINITY;const Dt=Ot/180;const jt=Ot/2;const Bt=Ot/4;const Ct=Ot*2/3;const Et=Math.log10;const Lt=Math.sign;function Pt(t,e,s){return Math.abs(t-e)<s}function It(t){const e=Math.round(t);t=Pt(t,e,t/1e3)?e:t;const s=Math.pow(10,Math.floor(Et(t)));const i=t/s;const n=i<=1?1:i<=2?2:i<=5?5:10;return n*s}function Tt(t){const e=[];const s=Math.sqrt(t);let i;for(i=1;i<s;i++){if(t%i===0){e.push(i);e.push(t/i)}}if(s===(s|0)){e.push(s)}e.sort(((t,e)=>t-e)).pop();return e}function Ft(t){return!isNaN(parseFloat(t))&&isFinite(t)}function zt(t,e){const s=Math.round(t);return s-e<=t&&s+e>=t}function Nt(t,e,s){let i,n,o;for(i=0,n=t.length;i<n;i++){o=t[i][s];if(!isNaN(o)){e.min=Math.min(e.min,o);e.max=Math.max(e.max,o)}}}function Wt(t){return t*(Ot/180)}function Ht(t){return t*(180/Ot)}function $t(t){if(!it(t)){return}let e=1;let s=0;while(Math.round(t*e)/e!==t){e*=10;s++}return s}function Gt(t,e){const s=e.x-t.x;const i=e.y-t.y;const n=Math.sqrt(s*s+i*i);let o=Math.atan2(i,s);if(o<-.5*Ot){o+=St}return{angle:o,distance:n}}function Yt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vt(t){return(t%St+St)%St}function Xt(t,e,s,i){const n=Vt(t);const o=Vt(e);const r=Vt(s);const c=Vt(o-n);const a=Vt(r-n);const h=Vt(n-o);const f=Vt(n-r);return n===o||n===r||i&&o===r||c>a&&h<f}function Ut(t,e,s){return Math.max(e,Math.min(s,t))}function Zt(t){return Ut(t,-32768,32767)}function Kt(t,e,s,i=1e-6){return t>=Math.min(e,s)-i&&t<=Math.max(e,s)+i}function Qt(t,e,s){s=s||(s=>t[s]<e);let i=t.length-1;let n=0;let o;while(i-n>1){o=n+i>>1;if(s(o)){n=o}else{i=o}}return{lo:n,hi:i}}const qt=(t,e,s,i)=>Qt(t,s,i?i=>{const n=t[i][e];return n<s||n===s&&t[i+1][e]===s}:i=>t[i][e]<s);const Jt=(t,e,s)=>Qt(t,s,(i=>t[i][e]>=s));const te=["push","pop","shift","splice","unshift"];function ee(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:true,enumerable:false,value:{listeners:[e]}});te.forEach((e=>{const s="_onData"+Mt(e);const i=t[e];Object.defineProperty(t,e,{configurable:true,enumerable:false,value(...e){const n=i.apply(this,e);t._chartjs.listeners.forEach((t=>{if(typeof t[s]==="function"){t[s](...e)}}));return n}})}))}function se(t,e){const s=t._chartjs;if(!s){return}const i=s.listeners;const n=i.indexOf(e);if(n!==-1){i.splice(n,1)}if(i.length>0){return}te.forEach((e=>{delete t[e]}));delete t._chartjs}function ie(t){const e=new Set(t);if(e.size===t.length){return t}return Array.from(e)}const ne=function(){if(typeof window==="undefined"){return function(t){return t()}}return window.requestAnimationFrame}();function oe(t,e){let s=[];let i=false;return function(...n){s=n;if(!i){i=true;ne.call(window,(()=>{i=false;t.apply(e,s)}))}}}function re(t,e){let s;return function(...i){if(e){clearTimeout(s);s=setTimeout(t,e,i)}else{t.apply(this,i)}return e}}const ce=t=>t==="start"?"left":t==="end"?"right":"center";const ae=(t,e,s)=>t==="start"?e:t==="end"?s:(e+s)/2;const he=(t,e,s,i)=>{const n=i?"left":"right";return t===n?s:t==="center"?(e+s)/2:e};const fe=t=>t===0||t===1;const le=(t,e,s)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*St/s));const ue=(t,e,s)=>Math.pow(2,-10*t)*Math.sin((t-e)*St/s)+1;const de={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=>-Math.cos(t*jt)+1,easeOutSine:t=>Math.sin(t*jt),easeInOutSine:t=>-.5*(Math.cos(Ot*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>fe(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),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=>fe(t)?t:le(t,.075,.3),easeOutElastic:t=>fe(t)?t:ue(t,.075,.3),easeInOutElastic(t){const e=.1125;const s=.45;return fe(t)?t:t<.5?.5*le(t*2,e,s):.5+.5*ue(t*2-1,e,s)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;if((t/=.5)<1){return.5*(t*t*(((e*=1.525)+1)*t-e))}return.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-de.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625;const s=2.75;if(t<1/s){return e*t*t}if(t<2/s){return e*(t-=1.5/s)*t+.75}if(t<2.5/s){return e*(t-=2.25/s)*t+.9375}return e*(t-=2.625/s)*t+.984375},easeInOutBounce:t=>t<.5?de.easeInBounce(t*2)*.5:de.easeOutBounce(t*2-1)*.5+.5};function be(t){if(t&&typeof t==="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return false}function pe(t){return be(t)?t:new Q(t)}function ge(t){return be(t)?t:new Q(t).saturate(.5).darken(.1).hexString()}const me=["x","y","borderWidth","radius","tension"];const ye=["color","borderColor","backgroundColor"];function xe(t){t.set("animation",{delay:undefined,duration:1e3,easing:"easeOutQuart",fn:undefined,from:undefined,loop:undefined,to:undefined,type:undefined});t.describe("animation",{_fallback:false,_indexable:false,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"});t.set("animations",{colors:{type:"color",properties:ye},numbers:{type:"number",properties:me}});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=>t|0}}}})}function ve(t){t.set("layout",{autoPadding:true,padding:{top:0,right:0,bottom:0,left:0}})}const Me=new Map;function ke(t,e){e=e||{};const s=t+JSON.stringify(e);let i=Me.get(s);if(!i){i=new Intl.NumberFormat(t,e);Me.set(s,i)}return i}function we(t,e,s){return ke(e,s).format(t)}const _e={values(t){return et(t)?t:""+t},numeric(t,e,s){if(t===0){return"0"}const i=this.chart.options.locale;let n;let o=t;if(s.length>1){const e=Math.max(Math.abs(s[0].value),Math.abs(s[s.length-1].value));if(e<1e-4||e>1e15){n="scientific"}o=Ae(t,s)}const r=Et(Math.abs(o));const c=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0);const a={notation:n,minimumFractionDigits:c,maximumFractionDigits:c};Object.assign(a,this.options.ticks.format);return we(t,i,a)},logarithmic(t,e,s){if(t===0){return"0"}const i=s[e].significand||t/Math.pow(10,Math.floor(Et(t)));if([1,2,3,5,10,15].includes(i)||e>.8*s.length){return _e.numeric.call(this,t,e,s)}return""}};function Ae(t,e){let s=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;if(Math.abs(s)>=1&&t!==Math.floor(t)){s=t-Math.floor(t)}return s}var Oe={formatters:_e};function Se(t){t.set("scale",{display:true,offset:false,reverse:false,beginAtZero:false,bounds:"ticks",clip:true,grace:0,grid:{display:true,lineWidth:1,drawOnChartArea:true,drawTicks:true,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:false},border:{display:true,dash:[],dashOffset:0,width:1},title:{display:false,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:false,textStrokeWidth:0,textStrokeColor:"",padding:3,display:true,autoSkip:true,autoSkipPadding:3,labelOffset:0,callback:Oe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:false,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:false,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"});t.describe("scales",{_fallback:"scale"});t.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Re=Object.create(null);const De=Object.create(null);function je(t,e){if(!e){return t}const s=e.split(".");for(let e=0,i=s.length;e<i;++e){const i=s[e];t=t[i]||(t[i]=Object.create(null))}return t}function Be(t,e,s){if(typeof e==="string"){return bt(je(t,e),s)}return bt(je(t,""),e)}class Ce{constructor(t,e){this.animation=undefined;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,e)=>ge(e.backgroundColor);this.hoverBorderColor=(t,e)=>ge(e.borderColor);this.hoverColor=(t,e)=>ge(e.color);this.indexAxis="x";this.interaction={mode:"nearest",intersect:true,includeInvisible:false};this.maintainAspectRatio=true;this.onHover=null;this.onClick=null;this.parsing=true;this.plugins={};this.responsive=true;this.scale=undefined;this.scales={};this.showLine=true;this.drawActiveElementsOnTop=true;this.describe(t);this.apply(e)}set(t,e){return Be(this,t,e)}get(t){return je(this,t)}describe(t,e){return Be(De,t,e)}override(t,e){return Be(Re,t,e)}route(t,e,s,i){const n=je(this,t);const o=je(this,s);const r="_"+e;Object.defineProperties(n,{[r]:{value:n[e],writable:true},[e]:{enumerable:true,get(){const t=this[r];const e=o[i];if(st(t)){return Object.assign({},e,t)}return ot(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Ee=new Ce({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:false,_indexable:false}},[xe,ve,Se]);function Le(t){if(!t||tt(t.size)||tt(t.family)){return null}return(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Pe(t,e,s,i,n){let o=e[n];if(!o){o=e[n]=t.measureText(n).width;s.push(n)}if(o>i){i=o}return i}function Ie(t,e,s){const i=t.currentDevicePixelRatio;const n=s!==0?Math.max(s/2,.5):0;return Math.round((e-n)*i)/i+n}function Te(t,e){e=e||t.getContext("2d");e.save();e.resetTransform();e.clearRect(0,0,t.width,t.height);e.restore()}function Fe(t,e,s,i){ze(t,e,s,i,null)}function ze(t,e,s,i,n){let o,r,c,a,h,f,l,u;const d=e.pointStyle;const b=e.rotation;const p=e.radius;let g=(b||0)*Dt;if(d&&typeof d==="object"){o=d.toString();if(o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]"){t.save();t.translate(s,i);t.rotate(g);t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height);t.restore();return}}if(isNaN(p)||p<=0){return}t.beginPath();switch(d){default:if(n){t.ellipse(s,i,n/2,p,0,0,St)}else{t.arc(s,i,p,0,St)}t.closePath();break;case"triangle":f=n?n/2:p;t.moveTo(s+Math.sin(g)*f,i-Math.cos(g)*p);g+=Ct;t.lineTo(s+Math.sin(g)*f,i-Math.cos(g)*p);g+=Ct;t.lineTo(s+Math.sin(g)*f,i-Math.cos(g)*p);t.closePath();break;case"rectRounded":h=p*.516;a=p-h;r=Math.cos(g+Bt)*a;l=Math.cos(g+Bt)*(n?n/2-h:a);c=Math.sin(g+Bt)*a;u=Math.sin(g+Bt)*(n?n/2-h:a);t.arc(s-l,i-c,h,g-Ot,g-jt);t.arc(s+u,i-r,h,g-jt,g);t.arc(s+l,i+c,h,g,g+jt);t.arc(s-u,i+r,h,g+jt,g+Ot);t.closePath();break;case"rect":if(!b){a=Math.SQRT1_2*p;f=n?n/2:a;t.rect(s-f,i-a,2*f,2*a);break}g+=Bt;case"rectRot":l=Math.cos(g)*(n?n/2:p);r=Math.cos(g)*p;c=Math.sin(g)*p;u=Math.sin(g)*(n?n/2:p);t.moveTo(s-l,i-c);t.lineTo(s+u,i-r);t.lineTo(s+l,i+c);t.lineTo(s-u,i+r);t.closePath();break;case"crossRot":g+=Bt;case"cross":l=Math.cos(g)*(n?n/2:p);r=Math.cos(g)*p;c=Math.sin(g)*p;u=Math.sin(g)*(n?n/2:p);t.moveTo(s-l,i-c);t.lineTo(s+l,i+c);t.moveTo(s+u,i-r);t.lineTo(s-u,i+r);break;case"star":l=Math.cos(g)*(n?n/2:p);r=Math.cos(g)*p;c=Math.sin(g)*p;u=Math.sin(g)*(n?n/2:p);t.moveTo(s-l,i-c);t.lineTo(s+l,i+c);t.moveTo(s+u,i-r);t.lineTo(s-u,i+r);g+=Bt;l=Math.cos(g)*(n?n/2:p);r=Math.cos(g)*p;c=Math.sin(g)*p;u=Math.sin(g)*(n?n/2:p);t.moveTo(s-l,i-c);t.lineTo(s+l,i+c);t.moveTo(s+u,i-r);t.lineTo(s-u,i+r);break;case"line":r=n?n/2:Math.cos(g)*p;c=Math.sin(g)*p;t.moveTo(s-r,i-c);t.lineTo(s+r,i+c);break;case"dash":t.moveTo(s,i);t.lineTo(s+Math.cos(g)*(n?n/2:p),i+Math.sin(g)*p);break;case false:t.closePath();break}t.fill();if(e.borderWidth>0){t.stroke()}}function Ne(t,e,s){s=s||.5;return!e||t&&t.x>e.left-s&&t.x<e.right+s&&t.y>e.top-s&&t.y<e.bottom+s}function We(t,e){t.save();t.beginPath();t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top);t.clip()}function He(t){t.restore()}function $e(t,e){if(e.translation){t.translate(e.translation[0],e.translation[1])}if(!tt(e.rotation)){t.rotate(e.rotation)}if(e.color){t.fillStyle=e.color}if(e.textAlign){t.textAlign=e.textAlign}if(e.textBaseline){t.textBaseline=e.textBaseline}}function Ge(t,e,s,i,n){if(n.strikethrough||n.underline){const o=t.measureText(i);const r=e-o.actualBoundingBoxLeft;const c=e+o.actualBoundingBoxRight;const a=s-o.actualBoundingBoxAscent;const h=s+o.actualBoundingBoxDescent;const f=n.strikethrough?(a+h)/2:h;t.strokeStyle=t.fillStyle;t.beginPath();t.lineWidth=n.decorationWidth||2;t.moveTo(r,f);t.lineTo(c,f);t.stroke()}}function Ye(t,e){const s=t.fillStyle;t.fillStyle=e.color;t.fillRect(e.left,e.top,e.width,e.height);t.fillStyle=s}function Ve(t,e,s,i,n,o={}){const r=et(e)?e:[e];const c=o.strokeWidth>0&&o.strokeColor!=="";let a,h;t.save();t.font=n.string;$e(t,o);for(a=0;a<r.length;++a){h=r[a];if(o.backdrop){Ye(t,o.backdrop)}if(c){if(o.strokeColor){t.strokeStyle=o.strokeColor}if(!tt(o.strokeWidth)){t.lineWidth=o.strokeWidth}t.strokeText(h,s,i,o.maxWidth)}t.fillText(h,s,i,o.maxWidth);Ge(t,s,i,h,o);i+=Number(n.lineHeight)}t.restore()}function Xe(t,e){const{x:s,y:i,w:n,h:o,radius:r}=e;t.arc(s+r.topLeft,i+r.topLeft,r.topLeft,1.5*Ot,Ot,true);t.lineTo(s,i+o-r.bottomLeft);t.arc(s+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,Ot,jt,true);t.lineTo(s+n-r.bottomRight,i+o);t.arc(s+n-r.bottomRight,i+o-r.bottomRight,r.bottomRight,jt,0,true);t.lineTo(s+n,i+r.topRight);t.arc(s+n-r.topRight,i+r.topRight,r.topRight,0,-jt,true);t.lineTo(s+r.topLeft,i)}const Ue=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/;const Ze=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Ke(t,e){const s=(""+t).match(Ue);if(!s||s[1]==="normal"){return e*1.2}t=+s[2];switch(s[3]){case"px":return t;case"%":t/=100;break}return e*t}const Qe=t=>+t||0;function qe(t,e){const s={};const i=st(e);const n=i?Object.keys(e):e;const o=st(t)?i?s=>ot(t[s],t[e[s]]):e=>t[e]:()=>t;for(const t of n){s[t]=Qe(o(t))}return s}function Je(t){return qe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ts(t){return qe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function es(t){const e=Je(t);e.width=e.left+e.right;e.height=e.top+e.bottom;return e}function ss(t,e){t=t||{};e=e||Ee.font;let s=ot(t.size,e.size);if(typeof s==="string"){s=parseInt(s,10)}let i=ot(t.style,e.style);if(i&&!(""+i).match(Ze)){console.warn('Invalid font style specified: "'+i+'"');i=undefined}const n={family:ot(t.family,e.family),lineHeight:Ke(ot(t.lineHeight,e.lineHeight),s),size:s,style:i,weight:ot(t.weight,e.weight),string:""};n.string=Le(n);return n}function is(t,e,s,i){let n=true;let o,r,c;for(o=0,r=t.length;o<r;++o){c=t[o];if(c===undefined){continue}if(e!==undefined&&typeof c==="function"){c=c(e);n=false}if(s!==undefined&&et(c)){c=c[s%c.length];n=false}if(c!==undefined){if(i&&!n){i.cacheable=false}return c}}}function ns(t,e,s){const{min:i,max:n}=t;const o=ct(e,(n-i)/2);const r=(t,e)=>s&&t===0?0:t+e;return{min:r(i,-Math.abs(o)),max:r(n,o)}}function os(t,e){return Object.assign(Object.create(t),e)}function rs(t,e=[""],s,i,n=(()=>t[0])){const o=s||t;if(typeof i==="undefined"){i=ks("_fallback",t)}const r={[Symbol.toStringTag]:"Object",_cacheable:true,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:n,override:s=>rs([s,...t],e,o,i)};return new Proxy(r,{deleteProperty(e,s){delete e[s];delete e._keys;delete t[0][s];return true},get(s,i){return ls(s,i,(()=>Ms(i,e,t,s)))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return ws(t).includes(e)},ownKeys(t){return ws(t)},set(t,e,s){const i=t._storage||(t._storage=n());t[e]=i[e]=s;delete t._keys;return true}})}function cs(t,e,s,i){const n={_cacheable:false,_proxy:t,_context:e,_subProxy:s,_stack:new Set,_descriptors:as(t,i),setContext:e=>cs(t,e,s,i),override:n=>cs(t.override(n),e,s,i)};return new Proxy(n,{deleteProperty(e,s){delete e[s];delete t[s];return true},get(t,e,s){return ls(t,e,(()=>us(t,e,s)))},getOwnPropertyDescriptor(e,s){return e._descriptors.allKeys?Reflect.has(t,s)?{enumerable:true,configurable:true}:undefined:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(e,s,i){t[s]=i;delete e[s];return true}})}function as(t,e={scriptable:true,indexable:true}){const{_scriptable:s=e.scriptable,_indexable:i=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:s,indexable:i,isScriptable:wt(s)?s:()=>s,isIndexable:wt(i)?i:()=>i}}const hs=(t,e)=>t?t+Mt(e):e;const fs=(t,e)=>st(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function ls(t,e,s){if(Object.prototype.hasOwnProperty.call(t,e)){return t[e]}const i=s();t[e]=i;return i}function us(t,e,s){const{_proxy:i,_context:n,_subProxy:o,_descriptors:r}=t;let c=i[e];if(wt(c)&&r.isScriptable(e)){c=ds(e,c,t,s)}if(et(c)&&c.length){c=bs(e,c,t,r.isIndexable)}if(fs(e,c)){c=cs(c,n,o&&o[e],r)}return c}function ds(t,e,s,i){const{_proxy:n,_context:o,_subProxy:r,_stack:c}=s;if(c.has(t)){throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t)}c.add(t);let a=e(o,r||i);c.delete(t);if(fs(t,a)){a=ys(n._scopes,n,t,a)}return a}function bs(t,e,s,i){const{_proxy:n,_context:o,_subProxy:r,_descriptors:c}=s;if(typeof o.index!=="undefined"&&i(t)){return e[o.index%e.length]}else if(st(e[0])){const s=e;const i=n._scopes.filter((t=>t!==s));e=[];for(const a of s){const s=ys(i,n,t,a);e.push(cs(s,o,r&&r[t],c))}}return e}function ps(t,e,s){return wt(t)?t(e,s):t}const gs=(t,e)=>t===true?e:typeof t==="string"?vt(e,t):undefined;function ms(t,e,s,i,n){for(const o of e){const e=gs(s,o);if(e){t.add(e);const o=ps(e._fallback,s,n);if(typeof o!=="undefined"&&o!==s&&o!==i){return o}}else if(e===false&&typeof i!=="undefined"&&s!==i){return null}}return false}function ys(t,e,s,i){const n=e._rootScopes;const o=ps(e._fallback,s,i);const r=[...t,...n];const c=new Set;c.add(i);let a=xs(c,r,s,o||s,i);if(a===null){return false}if(typeof o!=="undefined"&&o!==s){a=xs(c,r,o,a,i);if(a===null){return false}}return rs(Array.from(c),[""],n,o,(()=>vs(e,s,i)))}function xs(t,e,s,i,n){while(s){s=ms(t,e,s,i,n)}return s}function vs(t,e,s){const i=t._getTarget();if(!(e in i)){i[e]={}}const n=i[e];if(et(n)&&st(s)){return s}return n||{}}function Ms(t,e,s,i){let n;for(const o of e){n=ks(hs(o,t),s);if(typeof n!=="undefined"){return fs(t,n)?ys(s,i,t,n):n}}}function ks(t,e){for(const s of e){if(!s){continue}const e=s[t];if(typeof e!=="undefined"){return e}}}function ws(t){let e=t._keys;if(!e){e=t._keys=_s(t._scopes)}return e}function _s(t){const e=new Set;for(const s of t){for(const t of Object.keys(s).filter((t=>!t.startsWith("_")))){e.add(t)}}return Array.from(e)}function As(t,e,s,i){const{iScale:n}=t;const{key:o="r"}=this._parsing;const r=new Array(i);let c,a,h,f;for(c=0,a=i;c<a;++c){h=c+s;f=e[h];r[c]={r:n.parse(vt(f,o),h)}}return r}function Os(){return typeof window!=="undefined"&&typeof document!=="undefined"}function Ss(t){let e=t.parentNode;if(e&&e.toString()==="[object ShadowRoot]"){e=e.host}return e}function Rs(t,e,s){let i;if(typeof t==="string"){i=parseInt(t,10);if(t.indexOf("%")!==-1){i=i/100*e.parentNode[s]}}else{i=t}return i}const Ds=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function js(t,e){return Ds(t).getPropertyValue(e)}const Bs=["top","right","bottom","left"];function Cs(t,e,s){const i={};s=s?"-"+s:"";for(let n=0;n<4;n++){const o=Bs[n];i[o]=parseFloat(t[e+"-"+o+s])||0}i.width=i.left+i.right;i.height=i.top+i.bottom;return i}const Es=(t,e,s)=>(t>0||e>0)&&(!s||!s.shadowRoot);function Ls(t,e){const s=t.touches;const i=s&&s.length?s[0]:t;const{offsetX:n,offsetY:o}=i;let r=false;let c,a;if(Es(n,o,t.target)){c=n;a=o}else{const t=e.getBoundingClientRect();c=i.clientX-t.left;a=i.clientY-t.top;r=true}return{x:c,y:a,box:r}}function Ps(t,e){if("native"in t){return t}const{canvas:s,currentDevicePixelRatio:i}=e;const n=Ds(s);const o=n.boxSizing==="border-box";const r=Cs(n,"padding");const c=Cs(n,"border","width");const{x:a,y:h,box:f}=Ls(t,s);const l=r.left+(f&&c.left);const u=r.top+(f&&c.top);let{width:d,height:b}=e;if(o){d-=r.width+c.width;b-=r.height+c.height}return{x:Math.round((a-l)/d*s.width/i),y:Math.round((h-u)/b*s.height/i)}}function Is(t,e,s){let i,n;if(e===undefined||s===undefined){const o=Ss(t);if(!o){e=t.clientWidth;s=t.clientHeight}else{const t=o.getBoundingClientRect();const r=Ds(o);const c=Cs(r,"border","width");const a=Cs(r,"padding");e=t.width-a.width-c.width;s=t.height-a.height-c.height;i=Rs(r.maxWidth,o,"clientWidth");n=Rs(r.maxHeight,o,"clientHeight")}}return{width:e,height:s,maxWidth:i||Rt,maxHeight:n||Rt}}const Ts=t=>Math.round(t*10)/10;function Fs(t,e,s,i){const n=Ds(t);const o=Cs(n,"margin");const r=Rs(n.maxWidth,t,"clientWidth")||Rt;const c=Rs(n.maxHeight,t,"clientHeight")||Rt;const a=Is(t,e,s);let{width:h,height:f}=a;if(n.boxSizing==="content-box"){const t=Cs(n,"border","width");const e=Cs(n,"padding");h-=e.width+t.width;f-=e.height+t.height}h=Math.max(0,h-o.width);f=Math.max(0,i?h/i:f-o.height);h=Ts(Math.min(h,r,a.maxWidth));f=Ts(Math.min(f,c,a.maxHeight));if(h&&!f){f=Ts(h/2)}const l=e!==undefined||s!==undefined;if(l&&i&&a.height&&f>a.height){f=a.height;h=Ts(Math.floor(f*i))}return{width:h,height:f}}function zs(t,e,s){const i=e||1;const n=Math.floor(t.height*i);const o=Math.floor(t.width*i);t.height=Math.floor(t.height);t.width=Math.floor(t.width);const r=t.canvas;if(r.style&&(s||!r.style.height&&!r.style.width)){r.style.height=`${t.height}px`;r.style.width=`${t.width}px`}if(t.currentDevicePixelRatio!==i||r.height!==n||r.width!==o){t.currentDevicePixelRatio=i;r.height=n;r.width=o;t.ctx.setTransform(i,0,0,i,0,0);return true}return false}const Ns=function(){let t=false;try{const e={get passive(){t=true;return false}};if(Os()){window.addEventListener("test",null,e);window.removeEventListener("test",null,e)}}catch(t){}return t}();function Ws(t,e){const s=js(t,e);const i=s&&s.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:undefined}const Hs=function(t,e){return{x(s){return t+t+e-s},setWidth(t){e=t},textAlign(t){if(t==="center"){return t}return t==="right"?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}};const $s=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Gs(t,e,s){return t?Hs(e,s):$s()}function Ys(t,e){let s,i;if(e==="ltr"||e==="rtl"){s=t.canvas.style;i=[s.getPropertyValue("direction"),s.getPropertyPriority("direction")];s.setProperty("direction",e,"important");t.prevTextDirection=i}}function Vs(t,e){if(e!==undefined){delete t.prevTextDirection;t.canvas.style.setProperty("direction",e[0],e[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 Xs{constructor(){this._request=null;this._charts=new Map;this._running=false;this._lastDate=undefined}_notify(t,e,s,i){const n=e.listeners[i];const o=e.duration;n.forEach((i=>i({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(s-e.start,o)})))}_refresh(){if(this._request){return}this._running=true;this._request=ne.call(window,(()=>{this._update();this._request=null;if(this._running){this._refresh()}}))}_update(t=Date.now()){let e=0;this._charts.forEach(((s,i)=>{if(!s.running||!s.items.length){return}const n=s.items;let o=n.length-1;let r=false;let c;for(;o>=0;--o){c=n[o];if(c._active){if(c._total>s.duration){s.duration=c._total}c.tick(t);r=true}else{n[o]=n[n.length-1];n.pop()}}if(r){i.draw();this._notify(i,s,t,"progress")}if(!n.length){s.running=false;this._notify(i,s,t,"complete");s.initial=false}e+=n.length}));this._lastDate=t;if(e===0){this._running=false}}_getAnims(t){const e=this._charts;let s=e.get(t);if(!s){s={running:false,initial:true,items:[],listeners:{complete:[],progress:[]}};e.set(t,s)}return s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){if(!e||!e.length){return}this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);if(!e){return}e.running=true;e.start=Date.now();e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0);this._refresh()}running(t){if(!this._running){return false}const e=this._charts.get(t);if(!e||!e.running||!e.items.length){return false}return true}stop(t){const e=this._charts.get(t);if(!e||!e.items.length){return}const s=e.items;let i=s.length-1;for(;i>=0;--i){s[i].cancel()}e.items=[];this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Us=new Xs;const Zs="transparent";const Ks={boolean(t,e,s){return s>.5?e:t},color(t,e,s){const i=pe(t||Zs);const n=i.valid&&pe(e||Zs);return n&&n.valid?n.mix(i,s).hexString():e},number(t,e,s){return t+(e-t)*s}};class Qs{constructor(t,e,s,i){const n=e[s];i=is([t.to,i,n,t.from]);const o=is([t.from,n,i]);this._active=true;this._fn=t.fn||Ks[t.type||typeof o];this._easing=de[t.easing]||de.linear;this._start=Math.floor(Date.now()+(t.delay||0));this._duration=this._total=Math.floor(t.duration);this._loop=!!t.loop;this._target=e;this._prop=s;this._from=o;this._to=i;this._promises=undefined}active(){return this._active}update(t,e,s){if(this._active){this._notify(false);const i=this._target[this._prop];const n=s-this._start;const o=this._duration-n;this._start=s;this._duration=Math.floor(Math.max(o,t.duration));this._total+=n;this._loop=!!t.loop;this._to=is([t.to,e,i,t.from]);this._from=is([t.from,i,e])}}cancel(){if(this._active){this.tick(Date.now());this._active=false;this._notify(false)}}tick(t){const e=t-this._start;const s=this._duration;const i=this._prop;const n=this._from;const o=this._loop;const r=this._to;let c;this._active=n!==r&&(o||e<s);if(!this._active){this._target[i]=r;this._notify(true);return}if(e<0){this._target[i]=n;return}c=e/s%2;c=o&&c>1?2-c:c;c=this._easing(Math.min(1,Math.max(0,c)));this._target[i]=this._fn(n,r,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,s)=>{t.push({res:e,rej:s})}))}_notify(t){const e=t?"res":"rej";const s=this._promises||[];for(let t=0;t<s.length;t++){s[t][e]()}}}class qs{constructor(t,e){this._chart=t;this._properties=new Map;this.configure(e)}configure(t){if(!st(t)){return}const e=Object.keys(Ee.animation);const s=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!st(n)){return}const o={};for(const t of e){o[t]=n[t]}(et(n.properties)&&n.properties||[i]).forEach((t=>{if(t===i||!s.has(t)){s.set(t,o)}}))}))}_animateOptions(t,e){const s=e.options;const i=ti(t,s);if(!i){return[]}const n=this._createAnimations(i,s);if(s.$shared){Js(t.options.$animations,s).then((()=>{t.options=s}),(()=>{}))}return n}_createAnimations(t,e){const s=this._properties;const i=[];const n=t.$animations||(t.$animations={});const o=Object.keys(e);const r=Date.now();let c;for(c=o.length-1;c>=0;--c){const a=o[c];if(a.charAt(0)==="$"){continue}if(a==="options"){i.push(...this._animateOptions(t,e));continue}const h=e[a];let f=n[a];const l=s.get(a);if(f){if(l&&f.active()){f.update(l,h,r);continue}else{f.cancel()}}if(!l||!l.duration){t[a]=h;continue}n[a]=f=new Qs(l,t,a,h);i.push(f)}return i}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length){Us.add(this._chart,s);return true}}}function Js(t,e){const s=[];const i=Object.keys(e);for(let e=0;e<i.length;e++){const n=t[i[e]];if(n&&n.active()){s.push(n.wait())}}return Promise.all(s)}function ti(t,e){if(!e){return}let s=t.options;if(!s){t.options=e;return}if(s.$shared){t.options=s=Object.assign({},s,{$shared:false,$animations:{}})}return s}function ei(t,e){const s=t&&t.options||{};const i=s.reverse;const n=s.min===undefined?e:0;const o=s.max===undefined?e:0;return{start:i?o:n,end:i?n:o}}function si(t,e,s){if(s===false){return false}const i=ei(t,s);const n=ei(e,s);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function ii(t){let e,s,i,n;if(st(t)){e=t.top;s=t.right;i=t.bottom;n=t.left}else{e=s=i=n=t}return{top:e,right:s,bottom:i,left:n,disabled:t===false}}function ni(t,e){const s=[];const i=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=i.length;n<o;++n){s.push(i[n].index)}return s}function oi(t,e,s,i={}){const n=t.keys;const o=i.mode==="single";let r,c,a,h;if(e===null){return}for(r=0,c=n.length;r<c;++r){a=+n[r];if(a===s){if(i.all){continue}break}h=t.values[a];if(it(h)&&(o||e===0||Lt(e)===Lt(h))){e+=h}}return e}function ri(t){const e=Object.keys(t);const s=new Array(e.length);let i,n,o;for(i=0,n=e.length;i<n;++i){o=e[i];s[i]={x:o,y:t[o]}}return s}function ci(t,e){const s=t&&t.options.stacked;return s||s===undefined&&e.stack!==undefined}function ai(t,e,s){return`${t.id}.${e.id}.${s.stack||s.type}`}function hi(t){const{min:e,max:s,minDefined:i,maxDefined:n}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:n?s:Number.POSITIVE_INFINITY}}function fi(t,e,s){const i=t[e]||(t[e]={});return i[s]||(i[s]={})}function li(t,e,s,i){for(const n of e.getMatchingVisibleMetas(i).reverse()){const e=t[n.index];if(s&&e>0||!s&&e<0){return n.index}}return null}function ui(t,e){const{chart:s,_cachedMeta:i}=t;const n=s._stacks||(s._stacks={});const{iScale:o,vScale:r,index:c}=i;const a=o.axis;const h=r.axis;const f=ai(o,r,i);const l=e.length;let u;for(let t=0;t<l;++t){const s=e[t];const{[a]:o,[h]:l}=s;const d=s._stacks||(s._stacks={});u=d[h]=fi(n,f,o);u[c]=l;u._top=li(u,r,true,i.type);u._bottom=li(u,r,false,i.type);const b=u._visualValues||(u._visualValues={});b[c]=l}}function di(t,e){const s=t.scales;return Object.keys(s).filter((t=>s[t].axis===e)).shift()}function bi(t,e){return os(t,{active:false,dataset:undefined,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function pi(t,e,s){return os(t,{active:false,dataIndex:e,parsed:undefined,raw:undefined,element:s,index:e,mode:"default",type:"data"})}function gi(t,e){const s=t.controller.index;const i=t.vScale&&t.vScale.axis;if(!i){return}e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||e[i]===undefined||e[i][s]===undefined){return}delete e[i][s];if(e[i]._visualValues!==undefined&&e[i]._visualValues[s]!==undefined){delete e[i]._visualValues[s]}}}const mi=t=>t==="reset"||t==="none";const yi=(t,e)=>e?t:Object.assign({},t);const xi=(t,e,s)=>t&&!e.hidden&&e._stacked&&{keys:ni(s,true),values:null};class vi{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t;this._ctx=t.ctx;this.index=e;this._cachedDataOpts={};this._cachedMeta=this.getMeta();this._type=this._cachedMeta.type;this.options=undefined;this._parsing=false;this._data=undefined;this._objectData=undefined;this._sharedOptions=undefined;this._drawStart=undefined;this._drawCount=undefined;this.enableOptionSharing=false;this.supportsDecimation=false;this.$context=undefined;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=ci(t.vScale,t);this.addElements();if(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){if(this.index!==t){gi(this._cachedMeta)}this.index=t}linkScales(){const t=this.chart;const e=this._cachedMeta;const s=this.getDataset();const i=(t,e,s,i)=>t==="x"?e:t==="r"?i:s;const n=e.xAxisID=ot(s.xAxisID,di(t,"x"));const o=e.yAxisID=ot(s.yAxisID,di(t,"y"));const r=e.rAxisID=ot(s.rAxisID,di(t,"r"));const c=e.indexAxis;const a=e.iAxisID=i(c,n,o,r);const h=e.vAxisID=i(c,o,n,r);e.xScale=this.getScaleForId(n);e.yScale=this.getScaleForId(o);e.rScale=this.getScaleForId(r);e.iScale=this.getScaleForId(a);e.vScale=this.getScaleForId(h)}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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;if(this._data){se(this._data,this)}if(t._stacked){gi(t)}}_dataCheck(){const t=this.getDataset();const e=t.data||(t.data=[]);const s=this._data;if(st(e)){this._data=ri(e)}else if(s!==e){if(s){se(s,this);const t=this._cachedMeta;gi(t);t._parsed=[]}if(e&&Object.isExtensible(e)){ee(e,this)}this._syncList=[];this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck();if(this.datasetElementType){t.dataset=new this.datasetElementType}}buildOrUpdateElements(t){const e=this._cachedMeta;const s=this.getDataset();let i=false;this._dataCheck();const n=e._stacked;e._stacked=ci(e.vScale,e);if(e.stack!==s.stack){i=true;gi(e);e.stack=s.stack}this._resyncElements(t);if(i||n!==e._stacked){ui(this,e._parsed)}}configure(){const t=this.chart.config;const e=t.datasetScopeKeys(this._type);const s=t.getOptionScopes(this.getDataset(),e,true);this.options=t.createResolver(s,this.getContext());this._parsing=this.options.parsing;this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:i}=this;const{iScale:n,_stacked:o}=s;const r=n.axis;let c=t===0&&e===i.length?true:s._sorted;let a=t>0&&s._parsed[t-1];let h,f,l;if(this._parsing===false){s._parsed=i;s._sorted=true;l=i}else{if(et(i[t])){l=this.parseArrayData(s,i,t,e)}else if(st(i[t])){l=this.parseObjectData(s,i,t,e)}else{l=this.parsePrimitiveData(s,i,t,e)}const n=()=>f[r]===null||a&&f[r]<a[r];for(h=0;h<e;++h){s._parsed[h+t]=f=l[h];if(c){if(n()){c=false}a=f}}s._sorted=c}if(o){ui(this,l)}}parsePrimitiveData(t,e,s,i){const{iScale:n,vScale:o}=t;const r=n.axis;const c=o.axis;const a=n.getLabels();const h=n===o;const f=new Array(i);let l,u,d;for(l=0,u=i;l<u;++l){d=l+s;f[l]={[r]:h||n.parse(a[d],d),[c]:o.parse(e[d],d)}}return f}parseArrayData(t,e,s,i){const{xScale:n,yScale:o}=t;const r=new Array(i);let c,a,h,f;for(c=0,a=i;c<a;++c){h=c+s;f=e[h];r[c]={x:n.parse(f[0],h),y:o.parse(f[1],h)}}return r}parseObjectData(t,e,s,i){const{xScale:n,yScale:o}=t;const{xAxisKey:r="x",yAxisKey:c="y"}=this._parsing;const a=new Array(i);let h,f,l,u;for(h=0,f=i;h<f;++h){l=h+s;u=e[l];a[h]={x:n.parse(vt(u,r),l),y:o.parse(vt(u,c),l)}}return a}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const i=this.chart;const n=this._cachedMeta;const o=e[t.axis];const r={keys:ni(i,true),values:e._stacks[t.axis]._visualValues};return oi(r,o,n.index,{mode:s})}updateRangeFromParsed(t,e,s,i){const n=s[e.axis];let o=n===null?NaN:n;const r=i&&s._stacks[e.axis];if(i&&r){i.values=r;o=oi(i,n,this._cachedMeta.index)}t.min=Math.min(t.min,o);t.max=Math.max(t.max,o)}getMinMax(t,e){const s=this._cachedMeta;const i=s._parsed;const n=s._sorted&&t===s.iScale;const o=i.length;const r=this._getOtherScale(t);const c=xi(e,s,this.chart);const a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};const{min:h,max:f}=hi(r);let l,u;function d(){u=i[l];const e=u[r.axis];return!it(u[t.axis])||h>e||f<e}for(l=0;l<o;++l){if(d()){continue}this.updateRangeFromParsed(a,t,u,c);if(n){break}}if(n){for(l=o-1;l>=0;--l){if(d()){continue}this.updateRangeFromParsed(a,t,u,c);break}}return a}getAllParsedValues(t){const e=this._cachedMeta._parsed;const s=[];let i,n,o;for(i=0,n=e.length;i<n;++i){o=e[i][t.axis];if(it(o)){s.push(o)}}return s}getMaxOverflow(){return false}getLabelAndValue(t){const e=this._cachedMeta;const s=e.iScale;const i=e.vScale;const n=this.getParsed(t);return{label:s?""+s.getLabelForValue(n[s.axis]):"",value:i?""+i.getLabelForValue(n[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default");e._clip=ii(ot(this.options.clip,si(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx;const e=this.chart;const s=this._cachedMeta;const i=s.data||[];const n=e.chartArea;const o=[];const r=this._drawStart||0;const c=this._drawCount||i.length-r;const a=this.options.drawActiveElementsOnTop;let h;if(s.dataset){s.dataset.draw(t,n,r,c)}for(h=r;h<r+c;++h){const e=i[h];if(e.hidden){continue}if(e.active&&a){o.push(e)}else{e.draw(t,n)}}for(h=0;h<o.length;++h){o[h].draw(t,n)}}getStyle(t,e){const s=e?"active":"default";return t===undefined&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const i=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=pi(this.getContext(),t,e));n.parsed=this.getParsed(t);n.raw=i.data[t];n.index=n.dataIndex=t}else{n=this.$context||(this.$context=bi(this.chart.getContext(),this.index));n.dataset=i;n.index=n.datasetIndex=this.index}n.active=!!e;n.mode=s;return n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const i=e==="active";const n=this._cachedDataOpts;const o=t+"-"+e;const r=n[o];const c=this.enableOptionSharing&&kt(s);if(r){return yi(r,c)}const a=this.chart.config;const h=a.datasetElementScopeKeys(this._type,t);const f=i?[`${t}Hover`,"hover",t,""]:[t,""];const l=a.getOptionScopes(this.getDataset(),h);const u=Object.keys(Ee.elements[t]);const d=()=>this.getContext(s,i,e);const b=a.resolveNamedOptions(l,u,d,f);if(b.$shared){b.$shared=c;n[o]=Object.freeze(yi(b,c))}return b}_resolveAnimations(t,e,s){const i=this.chart;const n=this._cachedDataOpts;const o=`animation-${e}`;const r=n[o];if(r){return r}let c;if(i.options.animation!==false){const i=this.chart.config;const n=i.datasetAnimationScopeKeys(this._type,e);const o=i.getOptionScopes(this.getDataset(),n);c=i.createResolver(o,this.getContext(t,s,e))}const a=new qs(i,c&&c.animations);if(c&&c._cacheable){n[o]=Object.freeze(a)}return a}getSharedOptions(t){if(!t.$shared){return}return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||mi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e);const i=this._sharedOptions;const n=this.getSharedOptions(s);const o=this.includeOptions(e,n)||n!==i;this.updateSharedOptions(n,e,s);return{sharedOptions:n,includeOptions:o}}updateElement(t,e,s,i){if(mi(i)){Object.assign(t,s)}else{this._resolveAnimations(e,i).update(t,s)}}updateSharedOptions(t,e,s){if(t&&!mi(e)){this._resolveAnimations(undefined,e).update(t,s)}}_setStyle(t,e,s,i){t.active=i;const n=this.getStyle(e,i);this._resolveAnimations(e,s,i).update(t,{options:!i&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",false)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",true)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",false)}}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",true)}}_resyncElements(t){const e=this._data;const s=this._cachedMeta.data;for(const[t,e,s]of this._syncList){this[t](e,s)}this._syncList=[];const i=s.length;const n=e.length;const o=Math.min(n,i);if(o){this.parse(0,o)}if(n>i){this._insertElements(i,n-i,t)}else if(n<i){this._removeElements(n,i-n)}}_insertElements(t,e,s=true){const i=this._cachedMeta;const n=i.data;const o=t+e;let r;const c=t=>{t.length+=e;for(r=t.length-1;r>=o;r--){t[r]=t[r-e]}};c(n);for(r=t;r<o;++r){n[r]=new this.dataElementType}if(this._parsing){c(i._parsed)}this.parse(t,e);if(s){this.updateElements(n,t,e,"reset")}}updateElements(t,e,s,i){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(t,e);if(s._stacked){gi(s,i)}}s.data.splice(t,e)}_sync(t){if(this._parsing){this._syncList.push(t)}else{const[e,s,i]=t;this[e](s,i)}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,e){if(e){this._sync(["_removeElements",t,e])}const s=arguments.length-2;if(s){this._sync(["_insertElements",t,s])}}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Mi(t,e){if(!t._cache.$bar){const s=t.getMatchingVisibleMetas(e);let i=[];for(let e=0,n=s.length;e<n;e++){i=i.concat(s[e].controller.getAllParsedValues(t))}t._cache.$bar=ie(i.sort(((t,e)=>t-e)))}return t._cache.$bar}function ki(t){const e=t.iScale;const s=Mi(e,t.type);let i=e._length;let n,o,r,c;const a=()=>{if(r===32767||r===-32768){return}if(kt(c)){i=Math.min(i,Math.abs(r-c)||i)}c=r};for(n=0,o=s.length;n<o;++n){r=e.getPixelForValue(s[n]);a()}c=undefined;for(n=0,o=e.ticks.length;n<o;++n){r=e.getPixelForTick(n);a()}return i}function wi(t,e,s,i){const n=s.barThickness;let o,r;if(tt(n)){o=e.min*s.categoryPercentage;r=s.barPercentage}else{o=n*i;r=1}return{chunk:o/i,ratio:r,start:e.pixels[t]-o/2}}function _i(t,e,s,i){const n=e.pixels;const o=n[t];let r=t>0?n[t-1]:null;let c=t<n.length-1?n[t+1]:null;const a=s.categoryPercentage;if(r===null){r=o-(c===null?e.end-e.start:c-o)}if(c===null){c=o+o-r}const h=o-(o-Math.min(r,c))/2*a;const f=Math.abs(c-r)/2*a;return{chunk:f/i,ratio:s.barPercentage,start:h}}function Ai(t,e,s,i){const n=s.parse(t[0],i);const o=s.parse(t[1],i);const r=Math.min(n,o);const c=Math.max(n,o);let a=r;let h=c;if(Math.abs(r)>Math.abs(c)){a=c;h=r}e[s.axis]=h;e._custom={barStart:a,barEnd:h,start:n,end:o,min:r,max:c}}function Oi(t,e,s,i){if(et(t)){Ai(t,e,s,i)}else{e[s.axis]=s.parse(t,i)}return e}function Si(t,e,s,i){const n=t.iScale;const o=t.vScale;const r=n.getLabels();const c=n===o;const a=[];let h,f,l,u;for(h=s,f=s+i;h<f;++h){u=e[h];l={};l[n.axis]=c||n.parse(r[h],h);a.push(Oi(u,l,o,h))}return a}function Ri(t){return t&&t.barStart!==undefined&&t.barEnd!==undefined}function Di(t,e,s){if(t!==0){return Lt(t)}return(e.isHorizontal()?1:-1)*(e.min>=s?1:-1)}function ji(t){let e,s,i,n,o;if(t.horizontal){e=t.base>t.x;s="left";i="right"}else{e=t.base<t.y;s="bottom";i="top"}if(e){n="end";o="start"}else{n="start";o="end"}return{start:s,end:i,reverse:e,top:n,bottom:o}}function Bi(t,e,s,i){let n=e.borderSkipped;const o={};if(!n){t.borderSkipped=o;return}if(n===true){t.borderSkipped={top:true,right:true,bottom:true,left:true};return}const{start:r,end:c,reverse:a,top:h,bottom:f}=ji(t);if(n==="middle"&&s){t.enableBorderRadius=true;if((s._top||0)===i){n=h}else if((s._bottom||0)===i){n=f}else{o[Ci(f,r,c,a)]=true;n=h}}o[Ci(n,r,c,a)]=true;t.borderSkipped=o}function Ci(t,e,s,i){if(i){t=Ei(t,e,s);t=Li(t,s,e)}else{t=Li(t,e,s)}return t}function Ei(t,e,s){return t===e?s:t===s?e:t}function Li(t,e,s){return t==="start"?e:t==="end"?s:t}function Pi(t,{inflateAmount:e},s){t.inflateAmount=e==="auto"?s===1?.33:0:e}class Ii extends vi{static id="bar";static defaults={datasetElementType:false,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:true,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:true,grid:{offset:true}},_value_:{type:"linear",beginAtZero:true}}};parsePrimitiveData(t,e,s,i){return Si(t,e,s,i)}parseArrayData(t,e,s,i){return Si(t,e,s,i)}parseObjectData(t,e,s,i){const{iScale:n,vScale:o}=t;const{xAxisKey:r="x",yAxisKey:c="y"}=this._parsing;const a=n.axis==="x"?r:c;const h=o.axis==="x"?r:c;const f=[];let l,u,d,b;for(l=s,u=s+i;l<u;++l){b=e[l];d={};d[n.axis]=n.parse(vt(b,a),l);f.push(Oi(vt(b,h),d,o,l))}return f}updateRangeFromParsed(t,e,s,i){super.updateRangeFromParsed(t,e,s,i);const n=s._custom;if(n&&e===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 e=this._cachedMeta;const{iScale:s,vScale:i}=e;const n=this.getParsed(t);const o=n._custom;const r=Ri(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(n[i.axis]);return{label:""+s.getLabelForValue(n[s.axis]),value:r}}initialize(){this.enableOptionSharing=true;super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,i){const n=i==="reset";const{index:o,_cachedMeta:{vScale:r}}=this;const c=r.getBasePixel();const a=r.isHorizontal();const h=this._getRuler();const{sharedOptions:f,includeOptions:l}=this._getSharedOptions(e,i);for(let u=e;u<e+s;u++){const e=this.getParsed(u);const s=n||tt(e[r.axis])?{base:c,head:c}:this._calculateBarValuePixels(u);const d=this._calculateBarIndexPixels(u,h);const b=(e._stacks||{})[r.axis];const p={horizontal:a,base:s.base,enableBorderRadius:!b||Ri(e._custom)||o===b._top||o===b._bottom,x:a?s.head:d.center,y:a?d.center:s.head,height:a?d.size:Math.abs(s.size),width:a?Math.abs(s.size):d.size};if(l){p.options=f||this.resolveDataElementOptions(u,t[u].active?"active":i)}const g=p.options||t[u].options;Bi(p,g,b,o);Pi(p,g,h.ratio);this.updateElement(t[u],u,p,i)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta;const i=s.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped));const n=s.options.stacked;const o=[];const r=t=>{const s=t.controller.getParsed(e);const i=s&&s[t.vScale.axis];if(tt(i)||isNaN(i)){return true}};for(const s of i){if(e!==undefined&&r(s)){continue}if(n===false||o.indexOf(s.stack)===-1||n===undefined&&s.stack===undefined){o.push(s.stack)}if(s.index===t){break}}if(!o.length){o.push(undefined)}return o}_getStackCount(t){return this._getStacks(undefined,t).length}_getStackIndex(t,e,s){const i=this._getStacks(t,s);const n=e!==undefined?i.indexOf(e):-1;return n===-1?i.length-1:n}_getRuler(){const t=this.options;const e=this._cachedMeta;const s=e.iScale;const i=[];let n,o;for(n=0,o=e.data.length;n<o;++n){i.push(s.getPixelForValue(this.getParsed(n)[s.axis],n))}const r=t.barThickness;const c=r||ki(e);return{min:c,pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:i},options:{base:n,minBarLength:o}}=this;const r=n||0;const c=this.getParsed(t);const a=c._custom;const h=Ri(a);let f=c[e.axis];let l=0;let u=s?this.applyStack(e,c,s):f;let d,b;if(u!==f){l=u-f;u=f}if(h){f=a.barStart;u=a.barEnd-a.barStart;if(f!==0&&Lt(f)!==Lt(a.barEnd)){l=0}l+=f}const p=!tt(n)&&!h?n:l;let g=e.getPixelForValue(p);if(this.chart.getDataVisibility(t)){d=e.getPixelForValue(l+u)}else{d=g}b=d-g;if(Math.abs(b)<o){b=Di(b,e,r)*o;if(f===r){g-=b/2}const t=e.getPixelForDecimal(0);const n=e.getPixelForDecimal(1);const a=Math.min(t,n);const l=Math.max(t,n);g=Math.max(Math.min(g,l),a);d=g+b;if(s&&!h){c._stacks[e.axis]._visualValues[i]=e.getValueForPixel(d)-e.getValueForPixel(g)}}if(g===e.getPixelForValue(r)){const t=Lt(b)*e.getLineWidthForValue(r)/2;g+=t;b-=t}return{size:b,base:g,head:d,center:d+b/2}}_calculateBarIndexPixels(t,e){const s=e.scale;const i=this.options;const n=i.skipNull;const o=ot(i.maxBarThickness,Infinity);let r,c;if(e.grouped){const s=n?this._getStackCount(t):e.stackCount;const a=i.barThickness==="flex"?_i(t,e,i,s):wi(t,e,i,s);const h=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:undefined);r=a.start+a.chunk*h+a.chunk/2;c=Math.min(o,a.chunk*a.ratio)}else{r=s.getPixelForValue(this.getParsed(t)[s.axis],t);c=Math.min(o,e.min*e.ratio)}return{base:r-c/2,head:r+c/2,center:r,size:c}}draw(){const t=this._cachedMeta;const e=t.vScale;const s=t.data;const i=s.length;let n=0;for(;n<i;++n){if(this.getParsed(n)[e.axis]!==null){s[n].draw(this._ctx)}}}}function Ti(t,e,s){let i=1;let n=1;let o=0;let r=0;if(e<St){const c=t;const a=c+e;const h=Math.cos(c);const f=Math.sin(c);const l=Math.cos(a);const u=Math.sin(a);const d=(t,e,i)=>Xt(t,c,a,true)?1:Math.max(e,e*s,i,i*s);const b=(t,e,i)=>Xt(t,c,a,true)?-1:Math.min(e,e*s,i,i*s);const p=d(0,h,l);const g=d(jt,f,u);const m=b(Ot,h,l);const y=b(Ot+jt,f,u);i=(p-m)/2;n=(g-y)/2;o=-(p+m)/2;r=-(g+y)/2}return{ratioX:i,ratioY:n,offsetX:o,offsetY:r}}class Fi extends vi{static id="doughnut";static defaults={datasetElementType:false,dataElementType:"arc",animation:{animateRotate:true,animateScale:false},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=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0);const r=o.controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index);s.chart.update()}}}};constructor(t,e){super(t,e);this.enableOptionSharing=true;this.innerRadius=undefined;this.outerRadius=undefined;this.offsetX=undefined;this.offsetY=undefined}linkScales(){}parse(t,e){const s=this.getDataset().data;const i=this._cachedMeta;if(this._parsing===false){i._parsed=s}else{let n=t=>+s[t];if(st(s[t])){const{key:t="value"}=this._parsing;n=e=>+vt(s[e],t)}let o,r;for(o=t,r=t+e;o<r;++o){i._parsed[o]=n(o)}}}_getRotation(){return Wt(this.options.rotation-90)}_getCircumference(){return Wt(this.options.circumference)}_getRotationExtents(){let t=St;let e=-St;for(let s=0;s<this.chart.data.datasets.length;++s){if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller;const n=i._getRotation();const o=i._getCircumference();t=Math.min(t,n);e=Math.max(e,n+o)}}return{rotation:t,circumference:e-t}}update(t){const e=this.chart;const{chartArea:s}=e;const i=this._cachedMeta;const n=i.data;const o=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing;const r=Math.max((Math.min(s.width,s.height)-o)/2,0);const c=Math.min(rt(this.options.cutout,r),1);const a=this._getRingWeight(this.index);const{circumference:h,rotation:f}=this._getRotationExtents();const{ratioX:l,ratioY:u,offsetX:d,offsetY:b}=Ti(f,h,c);const p=(s.width-o)/l;const g=(s.height-o)/u;const m=Math.max(Math.min(p,g)/2,0);const y=ct(this.options.radius,m);const x=Math.max(y*c,0);const v=(y-x)/this._getVisibleDatasetWeightTotal();this.offsetX=d*y;this.offsetY=b*y;i.total=this.calculateTotal();this.outerRadius=y-v*this._getRingWeightOffset(this.index);this.innerRadius=Math.max(this.outerRadius-v*a,0);this.updateElements(n,0,n.length,t)}_circumference(t,e){const s=this.options;const i=this._cachedMeta;const n=this._getCircumference();if(e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden){return 0}return this.calculateCircumference(i._parsed[t]*n/St)}updateElements(t,e,s,i){const n=i==="reset";const o=this.chart;const r=o.chartArea;const c=o.options;const a=c.animation;const h=(r.left+r.right)/2;const f=(r.top+r.bottom)/2;const l=n&&a.animateScale;const u=l?0:this.innerRadius;const d=l?0:this.outerRadius;const{sharedOptions:b,includeOptions:p}=this._getSharedOptions(e,i);let g=this._getRotation();let m;for(m=0;m<e;++m){g+=this._circumference(m,n)}for(m=e;m<e+s;++m){const e=this._circumference(m,n);const s=t[m];const o={x:h+this.offsetX,y:f+this.offsetY,startAngle:g,endAngle:g+e,circumference:e,outerRadius:d,innerRadius:u};if(p){o.options=b||this.resolveDataElementOptions(m,s.active?"active":i)}g+=e;this.updateElement(s,m,o,i)}}calculateTotal(){const t=this._cachedMeta;const e=t.data;let s=0;let i;for(i=0;i<e.length;i++){const n=t._parsed[i];if(n!==null&&!isNaN(n)&&this.chart.getDataVisibility(i)&&!e[i].hidden){s+=Math.abs(n)}}return s}calculateCircumference(t){const e=this._cachedMeta.total;if(e>0&&!isNaN(t)){return St*(Math.abs(t)/e)}return 0}getLabelAndValue(t){const e=this._cachedMeta;const s=this.chart;const i=s.data.labels||[];const n=we(e._parsed[t],s.options.locale);return{label:i[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const s=this.chart;let i,n,o,r,c;if(!t){for(i=0,n=s.data.datasets.length;i<n;++i){if(s.isDatasetVisible(i)){o=s.getDatasetMeta(i);t=o.data;r=o.controller;break}}}if(!t){return 0}for(i=0,n=t.length;i<n;++i){c=r.resolveDataElementOptions(i);if(c.borderAlign!=="inner"){e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0)}}return e}getMaxOffset(t){let e=0;for(let s=0,i=t.length;s<i;++s){const t=this.resolveDataElementOptions(s);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s){if(this.chart.isDatasetVisible(s)){e+=this._getRingWeight(s)}}return e}_getRingWeight(t){return Math.max(ot(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class zi extends vi{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:true,animateScale:true},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 e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0);const r=o.controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index);s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:false},beginAtZero:true,grid:{circular:true},pointLabels:{display:false},startAngle:0}}};constructor(t,e){super(t,e);this.innerRadius=undefined;this.outerRadius=undefined}getLabelAndValue(t){const e=this._cachedMeta;const s=this.chart;const i=s.data.labels||[];const n=we(e._parsed[t].r,s.options.locale);return{label:i[t]||"",value:n}}parseObjectData(t,e,s,i){return As.bind(this)(t,e,s,i)}update(t){const e=this._cachedMeta.data;this._updateRadius();this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta;const e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};t.data.forEach(((t,s)=>{const i=this.getParsed(s).r;if(!isNaN(i)&&this.chart.getDataVisibility(s)){if(i<e.min){e.min=i}if(i>e.max){e.max=i}}}));return e}_updateRadius(){const t=this.chart;const e=t.chartArea;const s=t.options;const i=Math.min(e.right-e.left,e.bottom-e.top);const n=Math.max(i/2,0);const o=Math.max(s.cutoutPercentage?n/100*s.cutoutPercentage:1,0);const r=(n-o)/t.getVisibleDatasetCount();this.outerRadius=n-r*this.index;this.innerRadius=this.outerRadius-r}updateElements(t,e,s,i){const n=i==="reset";const o=this.chart;const r=o.options;const c=r.animation;const a=this._cachedMeta.rScale;const h=a.xCenter;const f=a.yCenter;const l=a.getIndexAngle(0)-.5*Ot;let u=l;let d;const b=360/this.countVisibleElements();for(d=0;d<e;++d){u+=this._computeAngle(d,i,b)}for(d=e;d<e+s;d++){const e=t[d];let s=u;let r=u+this._computeAngle(d,i,b);let p=o.getDataVisibility(d)?a.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=r;if(n){if(c.animateScale){p=0}if(c.animateRotate){s=r=l}}const g={x:h,y:f,innerRadius:0,outerRadius:p,startAngle:s,endAngle:r,options:this.resolveDataElementOptions(d,e.active?"active":i)};this.updateElement(e,d,g,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;t.data.forEach(((t,s)=>{if(!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)){e++}}));return e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?Wt(this.resolveDataElementOptions(t,e).angle||s):0}}function Ni(t,e,s,i){const{controller:n,data:o,_sorted:r}=t;const c=n._cachedMeta.iScale;if(c&&e===c.axis&&e!=="r"&&r&&o.length){const t=c._reversePixels?Jt:qt;if(!i){return t(o,e,s)}else if(n._sharedOptions){const i=o[0];const n=typeof i.getRange==="function"&&i.getRange(e);if(n){const i=t(o,e,s-n);const r=t(o,e,s+n);return{lo:i.lo,hi:r.hi}}}}return{lo:0,hi:o.length-1}}function Wi(t,e,s,i,n){const o=t.getSortedVisibleDatasetMetas();const r=s[e];for(let t=0,s=o.length;t<s;++t){const{index:s,data:c}=o[t];const{lo:a,hi:h}=Ni(o[t],e,r,n);for(let t=a;t<=h;++t){const e=c[t];if(!e.skip){i(e,s,t)}}}}function Hi(t){const e=t.indexOf("x")!==-1;const s=t.indexOf("y")!==-1;return function(t,i){const n=e?Math.abs(t.x-i.x):0;const o=s?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))}}function $i(t,e,s,i,n){const o=[];if(!n&&!t.isPointInArea(e)){return o}const r=function(s,r,c){if(!n&&!Ne(s,t.chartArea,0)){return}if(s.inRange(e.x,e.y,i)){o.push({element:s,datasetIndex:r,index:c})}};Wi(t,s,e,r,true);return o}function Gi(t,e,s,i){let n=[];function o(t,s,o){const{startAngle:r,endAngle:c}=t.getProps(["startAngle","endAngle"],i);const{angle:a}=Gt(t,{x:e.x,y:e.y});if(Xt(a,r,c)){n.push({element:t,datasetIndex:s,index:o})}}Wi(t,s,e,o);return n}function Yi(t,e,s,i,n,o){let r=[];const c=Hi(s);let a=Number.POSITIVE_INFINITY;function h(s,h,f){const l=s.inRange(e.x,e.y,n);if(i&&!l){return}const u=s.getCenterPoint(n);const d=!!o||t.isPointInArea(u);if(!d&&!l){return}const b=c(e,u);if(b<a){r=[{element:s,datasetIndex:h,index:f}];a=b}else if(b===a){r.push({element:s,datasetIndex:h,index:f})}}Wi(t,s,e,h);return r}function Vi(t,e,s,i,n,o){if(!o&&!t.isPointInArea(e)){return[]}return s==="r"&&!i?Gi(t,e,s,n):Yi(t,e,s,i,n,o)}function Xi(t,e,s,i,n){const o=[];const r=s==="x"?"inXRange":"inYRange";let c=false;Wi(t,s,e,((t,i,a)=>{if(t[r](e[s],n)){o.push({element:t,datasetIndex:i,index:a});c=c||t.inRange(e.x,e.y,n)}}));if(i&&!c){return[]}return o}var Ui={evaluateInteractionItems:Wi,modes:{index(t,e,s,i){const n=Ps(e,t);const o=s.axis||"x";const r=s.includeInvisible||false;const c=s.intersect?$i(t,n,o,i,r):Vi(t,n,o,false,i,r);const a=[];if(!c.length){return[]}t.getSortedVisibleDatasetMetas().forEach((t=>{const e=c[0].index;const s=t.data[e];if(s&&!s.skip){a.push({element:s,datasetIndex:t.index,index:e})}}));return a},dataset(t,e,s,i){const n=Ps(e,t);const o=s.axis||"xy";const r=s.includeInvisible||false;let c=s.intersect?$i(t,n,o,i,r):Vi(t,n,o,false,i,r);if(c.length>0){const e=c[0].datasetIndex;const s=t.getDatasetMeta(e).data;c=[];for(let t=0;t<s.length;++t){c.push({element:s[t],datasetIndex:e,index:t})}}return c},point(t,e,s,i){const n=Ps(e,t);const o=s.axis||"xy";const r=s.includeInvisible||false;return $i(t,n,o,i,r)},nearest(t,e,s,i){const n=Ps(e,t);const o=s.axis||"xy";const r=s.includeInvisible||false;return Vi(t,n,o,s.intersect,i,r)},x(t,e,s,i){const n=Ps(e,t);return Xi(t,n,"x",s.intersect,i)},y(t,e,s,i){const n=Ps(e,t);return Xi(t,n,"y",s.intersect,i)}}};const Zi=["left","top","right","bottom"];function Ki(t,e){return t.filter((t=>t.pos===e))}function Qi(t,e){return t.filter((t=>Zi.indexOf(t.pos)===-1&&t.box.axis===e))}function qi(t,e){return t.sort(((t,s)=>{const i=e?s:t;const n=e?t:s;return i.weight===n.weight?i.index-n.index:i.weight-n.weight}))}function Ji(t){const e=[];let s,i,n,o,r,c;for(s=0,i=(t||[]).length;s<i;++s){n=t[s];({position:o,options:{stack:r,stackWeight:c=1}}=n);e.push({index:s,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:c})}return e}function tn(t){const e={};for(const s of t){const{stack:t,pos:i,stackWeight:n}=s;if(!t||!Zi.includes(i)){continue}const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++;o.weight+=n}return e}function en(t,e){const s=tn(t);const{vBoxMaxWidth:i,hBoxMaxHeight:n}=e;let o,r,c;for(o=0,r=t.length;o<r;++o){c=t[o];const{fullSize:r}=c.box;const a=s[c.stack];const h=a&&c.stackWeight/a.weight;if(c.horizontal){c.width=h?h*i:r&&e.availableWidth;c.height=n}else{c.width=i;c.height=h?h*n:r&&e.availableHeight}}return s}function sn(t){const e=Ji(t);const s=qi(e.filter((t=>t.box.fullSize)),true);const i=qi(Ki(e,"left"),true);const n=qi(Ki(e,"right"));const o=qi(Ki(e,"top"),true);const r=qi(Ki(e,"bottom"));const c=Qi(e,"x");const a=Qi(e,"y");return{fullSize:s,leftAndTop:i.concat(o),rightAndBottom:n.concat(a).concat(r).concat(c),chartArea:Ki(e,"chartArea"),vertical:i.concat(n).concat(a),horizontal:o.concat(r).concat(c)}}function nn(t,e,s,i){return Math.max(t[s],e[s])+Math.max(t[i],e[i])}function on(t,e){t.top=Math.max(t.top,e.top);t.left=Math.max(t.left,e.left);t.bottom=Math.max(t.bottom,e.bottom);t.right=Math.max(t.right,e.right)}function rn(t,e,s,i){const{pos:n,box:o}=s;const r=t.maxPadding;if(!st(n)){if(s.size){t[n]-=s.size}const e=i[s.stack]||{size:0,count:1};e.size=Math.max(e.size,s.horizontal?o.height:o.width);s.size=e.size/e.count;t[n]+=s.size}if(o.getPadding){on(r,o.getPadding())}const c=Math.max(0,e.outerWidth-nn(r,t,"left","right"));const a=Math.max(0,e.outerHeight-nn(r,t,"top","bottom"));const h=c!==t.w;const f=a!==t.h;t.w=c;t.h=a;return s.horizontal?{same:h,other:f}:{same:f,other:h}}function cn(t){const e=t.maxPadding;function s(s){const i=Math.max(e[s]-t[s],0);t[s]+=i;return i}t.y+=s("top");t.x+=s("left");s("right");s("bottom")}function an(t,e){const s=e.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};t.forEach((t=>{i[t]=Math.max(e[t],s[t])}));return i}return t?i(["left","right"]):i(["top","bottom"])}function hn(t,e,s,i){const n=[];let o,r,c,a,h,f;for(o=0,r=t.length,h=0;o<r;++o){c=t[o];a=c.box;a.update(c.width||e.w,c.height||e.h,an(c.horizontal,e));const{same:r,other:l}=rn(e,s,c,i);h|=r&&n.length;f=f||l;if(!a.fullSize){n.push(c)}}return h&&hn(n,e,s,i)||f}function fn(t,e,s,i,n){t.top=s;t.left=e;t.right=e+i;t.bottom=s+n;t.width=i;t.height=n}function ln(t,e,s,i){const n=s.padding;let{x:o,y:r}=e;for(const c of t){const t=c.box;const a=i[c.stack]||{count:1,placed:0,weight:1};const h=c.stackWeight/a.weight||1;if(c.horizontal){const i=e.w*h;const o=a.size||t.height;if(kt(a.start)){r=a.start}if(t.fullSize){fn(t,n.left,r,s.outerWidth-n.right-n.left,o)}else{fn(t,e.left+a.placed,r,i,o)}a.start=r;a.placed+=i;r=t.bottom}else{const i=e.h*h;const r=a.size||t.width;if(kt(a.start)){o=a.start}if(t.fullSize){fn(t,o,n.top,r,s.outerHeight-n.bottom-n.top)}else{fn(t,o,e.top+a.placed,r,i)}a.start=o;a.placed+=i;o=t.right}}e.x=o;e.y=r}var un={addBox(t,e){if(!t.boxes){t.boxes=[]}e.fullSize=e.fullSize||false;e.position=e.position||"top";e.weight=e.weight||0;e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]};t.boxes.push(e)},removeBox(t,e){const s=t.boxes?t.boxes.indexOf(e):-1;if(s!==-1){t.boxes.splice(s,1)}},configure(t,e,s){e.fullSize=s.fullSize;e.position=s.position;e.weight=s.weight},update(t,e,s,i){if(!t){return}const n=es(t.options.layout.padding);const o=Math.max(e-n.width,0);const r=Math.max(s-n.height,0);const c=sn(t.boxes);const a=c.vertical;const h=c.horizontal;ht(t.boxes,(t=>{if(typeof t.beforeLayout==="function"){t.beforeLayout()}}));const f=a.reduce(((t,e)=>e.box.options&&e.box.options.display===false?t:t+1),0)||1;const l=Object.freeze({outerWidth:e,outerHeight:s,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/f,hBoxMaxHeight:r/2});const u=Object.assign({},n);on(u,es(i));const d=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n);const b=en(a.concat(h),l);hn(c.fullSize,d,l,b);hn(a,d,l,b);if(hn(h,d,l,b)){hn(a,d,l,b)}cn(d);ln(c.leftAndTop,d,l,b);d.x+=d.w;d.y+=d.h;ln(c.rightAndBottom,d,l,b);t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w};ht(c.chartArea,(e=>{const s=e.box;Object.assign(s,t.chartArea);s.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})}))}};class dn{acquireContext(t,e){}releaseContext(t){return false}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,i){e=Math.max(0,e||t.width);s=s||t.height;return{width:e,height:Math.max(0,i?Math.floor(e/i):s)}}isAttached(t){return true}updateConfig(t){}}class bn extends dn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=false}}const pn="$chartjs";const gn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};const mn=t=>t===null||t==="";function yn(t,e){const s=t.style;const i=t.getAttribute("height");const n=t.getAttribute("width");t[pn]={initial:{height:i,width:n,style:{display:s.display,height:s.height,width:s.width}}};s.display=s.display||"block";s.boxSizing=s.boxSizing||"border-box";if(mn(n)){const e=Ws(t,"width");if(e!==undefined){t.width=e}}if(mn(i)){if(t.style.height===""){t.height=t.width/(e||2)}else{const e=Ws(t,"height");if(e!==undefined){t.height=e}}}return t}const xn=Ns?{passive:true}:false;function vn(t,e,s){t.addEventListener(e,s,xn)}function Mn(t,e,s){t.canvas.removeEventListener(e,s,xn)}function kn(t,e){const s=gn[t.type]||t.type;const{x:i,y:n}=Ps(t,e);return{type:s,chart:e,native:t,x:i!==undefined?i:null,y:n!==undefined?n:null}}function wn(t,e){for(const s of t){if(s===e||s.contains(e)){return true}}}function _n(t,e,s){const i=t.canvas;const n=new MutationObserver((t=>{let e=false;for(const s of t){e=e||wn(s.addedNodes,i);e=e&&!wn(s.removedNodes,i)}if(e){s()}}));n.observe(document,{childList:true,subtree:true});return n}function An(t,e,s){const i=t.canvas;const n=new MutationObserver((t=>{let e=false;for(const s of t){e=e||wn(s.removedNodes,i);e=e&&!wn(s.addedNodes,i)}if(e){s()}}));n.observe(document,{childList:true,subtree:true});return n}const On=new Map;let Sn=0;function Rn(){const t=window.devicePixelRatio;if(t===Sn){return}Sn=t;On.forEach(((e,s)=>{if(s.currentDevicePixelRatio!==t){e()}}))}function Dn(t,e){if(!On.size){window.addEventListener("resize",Rn)}On.set(t,e)}function jn(t){On.delete(t);if(!On.size){window.removeEventListener("resize",Rn)}}function Bn(t,e,s){const i=t.canvas;const n=i&&Ss(i);if(!n){return}const o=oe(((t,e)=>{const i=n.clientWidth;s(t,e);if(i<n.clientWidth){s()}}),window);const r=new ResizeObserver((t=>{const e=t[0];const s=e.contentRect.width;const i=e.contentRect.height;if(s===0&&i===0){return}o(s,i)}));r.observe(n);Dn(t,o);return r}function Cn(t,e,s){if(s){s.disconnect()}if(e==="resize"){jn(t)}}function En(t,e,s){const i=t.canvas;const n=oe((e=>{if(t.ctx!==null){s(kn(e,t))}}),t);vn(i,e,n);return n}class Ln extends dn{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");if(s&&s.canvas===t){yn(t,e);return s}return null}releaseContext(t){const e=t.canvas;if(!e[pn]){return false}const s=e[pn].initial;["height","width"].forEach((t=>{const i=s[t];if(tt(i)){e.removeAttribute(t)}else{e.setAttribute(t,i)}}));const i=s.style||{};Object.keys(i).forEach((t=>{e.style[t]=i[t]}));e.width=e.width;delete e[pn];return true}addEventListener(t,e,s){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={});const n={attach:_n,detach:An,resize:Bn};const o=n[e]||En;i[e]=o(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={});const i=s[e];if(!i){return}const n={attach:Cn,detach:Cn,resize:Cn};const o=n[e]||Mn;o(t,e,i);s[e]=undefined}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,i){return Fs(t,e,s,i)}isAttached(t){const e=Ss(t);return!!(e&&e.isConnected)}}function Pn(t){if(!Os()||typeof OffscreenCanvas!=="undefined"&&t instanceof OffscreenCanvas){return bn}return Ln}class In{static defaults={};static defaultRoutes=undefined;x;y;active=false;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Ft(this.x)&&Ft(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s){return this}const i={};t.forEach((t=>{i[t]=s[t]&&s[t].active()?s[t]._to:this[t]}));return i}}function Tn(t,e){const s=t.options.ticks;const i=Fn(t);const n=Math.min(s.maxTicksLimit||i,i);const o=s.major.enabled?Nn(e):[];const r=o.length;const c=o[0];const a=o[r-1];const h=[];if(r>n){Wn(e,h,o,r/n);return h}const f=zn(o,e,n);if(r>0){let t,s;const i=r>1?Math.round((a-c)/(r-1)):null;Hn(e,h,f,tt(i)?0:c-i,c);for(t=0,s=r-1;t<s;t++){Hn(e,h,f,o[t],o[t+1])}Hn(e,h,f,a,tt(i)?e.length:a+i);return h}Hn(e,h,f);return h}function Fn(t){const e=t.options.offset;const s=t._tickSize();const i=t._length/s+(e?0:1);const n=t._maxLength/s;return Math.floor(Math.min(i,n))}function zn(t,e,s){const i=$n(t);const n=e.length/s;if(!i){return Math.max(n,1)}const o=Tt(i);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>n){return e}}return Math.max(n,1)}function Nn(t){const e=[];let s,i;for(s=0,i=t.length;s<i;s++){if(t[s].major){e.push(s)}}return e}function Wn(t,e,s,i){let n=0;let o=s[0];let r;i=Math.ceil(i);for(r=0;r<t.length;r++){if(r===o){e.push(t[r]);n++;o=s[n*i]}}}function Hn(t,e,s,i,n){const o=ot(i,0);const r=Math.min(ot(n,t.length),t.length);let c=0;let a,h,f;s=Math.ceil(s);if(n){a=n-i;s=a/Math.floor(a/s)}f=o;while(f<0){c++;f=Math.round(o+c*s)}for(h=Math.max(o,0);h<r;h++){if(h===f){e.push(t[h]);c++;f=Math.round(o+c*s)}}}function $n(t){const e=t.length;let s,i;if(e<2){return false}for(i=t[0],s=1;s<e;++s){if(t[s]-t[s-1]!==i){return false}}return i}const Gn=t=>t==="left"?"right":t==="right"?"left":t;const Yn=(t,e,s)=>e==="top"||e==="left"?t[e]+s:t[e]-s;const Vn=(t,e)=>Math.min(e||t,t);function Xn(t,e){const s=[];const i=t.length/e;const n=t.length;let o=0;for(;o<n;o+=i){s.push(t[Math.floor(o)])}return s}function Un(t,e,s){const i=t.ticks.length;const n=Math.min(e,i-1);const o=t._startPixel;const r=t._endPixel;const c=1e-6;let a=t.getPixelForTick(n);let h;if(s){if(i===1){h=Math.max(a-o,r-a)}else if(e===0){h=(t.getPixelForTick(1)-a)/2}else{h=(a-t.getPixelForTick(n-1))/2}a+=n<e?h:-h;if(a<o-c||a>r+c){return}}return a}function Zn(t,e){ht(t,(t=>{const s=t.gc;const i=s.length/2;let n;if(i>e){for(n=0;n<i;++n){delete t.data[s[n]]}s.splice(0,i)}}))}function Kn(t){return t.drawTicks?t.tickLength:0}function Qn(t,e){if(!t.display){return 0}const s=ss(t.font,e);const i=es(t.padding);const n=et(t.text)?t.text.length:1;return n*s.lineHeight+i.height}function qn(t,e){return os(t,{scale:e,type:"scale"})}function Jn(t,e,s){return os(t,{tick:s,index:e,type:"tick"})}function to(t,e,s){let i=ce(t);if(s&&e!=="right"||!s&&e==="right"){i=Gn(i)}return i}function eo(t,e,s,i){const{top:n,left:o,bottom:r,right:c,chart:a}=t;const{chartArea:h,scales:f}=a;let l=0;let u,d,b;const p=r-n;const g=c-o;if(t.isHorizontal()){d=ae(i,o,c);if(st(s)){const t=Object.keys(s)[0];const i=s[t];b=f[t].getPixelForValue(i)+p-e}else if(s==="center"){b=(h.bottom+h.top)/2+p-e}else{b=Yn(t,s,e)}u=c-o}else{if(st(s)){const t=Object.keys(s)[0];const i=s[t];d=f[t].getPixelForValue(i)-g+e}else if(s==="center"){d=(h.left+h.right)/2-g+e}else{d=Yn(t,s,e)}b=ae(i,r,n);l=s==="left"?-jt:jt}return{titleX:d,titleY:b,maxWidth:u,rotation:l}}class so extends In{constructor(t){super();this.id=t.id;this.type=t.type;this.options=undefined;this.ctx=t.ctx;this.chart=t.chart;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this._margins={left:0,right:0,top:0,bottom:0};this.maxWidth=undefined;this.maxHeight=undefined;this.paddingTop=undefined;this.paddingBottom=undefined;this.paddingLeft=undefined;this.paddingRight=undefined;this.axis=undefined;this.labelRotation=undefined;this.min=undefined;this.max=undefined;this._range=undefined;this.ticks=[];this._gridLineItems=null;this._labelItems=null;this._labelSizes=null;this._length=0;this._maxLength=0;this._longestTextCache={};this._startPixel=undefined;this._endPixel=undefined;this._reversePixels=false;this._userMax=undefined;this._userMin=undefined;this._suggestedMax=undefined;this._suggestedMin=undefined;this._ticksLength=0;this._borderValue=0;this._cache={};this._dataLimitsCached=false;this.$context=undefined}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,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:i}=this;t=nt(t,Number.POSITIVE_INFINITY);e=nt(e,Number.NEGATIVE_INFINITY);s=nt(s,Number.POSITIVE_INFINITY);i=nt(i,Number.NEGATIVE_INFINITY);return{min:nt(t,s),max:nt(e,i),minDefined:it(t),maxDefined:it(e)}}getMinMax(t){let{min:e,max:s,minDefined:i,maxDefined:n}=this.getUserBounds();let o;if(i&&n){return{min:e,max:s}}const r=this.getMatchingVisibleMetas();for(let c=0,a=r.length;c<a;++c){o=r[c].controller.getMinMax(this,t);if(!i){e=Math.min(e,o.min)}if(!n){s=Math.max(s,o.max)}}e=n&&e>s?s:e;s=i&&e>s?e:s;return{min:nt(e,nt(s,e)),max:nt(s,nt(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){const e=this._labelItems||(this._labelItems=this._computeLabelItems(t));return e}beforeLayout(){this._cache={};this._dataLimitsCached=false}beforeUpdate(){at(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:i,grace:n,ticks:o}=this.options;const r=o.sampleSize;this.beforeUpdate();this.maxWidth=t;this.maxHeight=e;this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s);this.ticks=null;this._labelSizes=null;this._gridLineItems=null;this._labelItems=null;this.beforeSetDimensions();this.setDimensions();this.afterSetDimensions();this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom;if(!this._dataLimitsCached){this.beforeDataLimits();this.determineDataLimits();this.afterDataLimits();this._range=ns(this,n,i);this._dataLimitsCached=true}this.beforeBuildTicks();this.ticks=this.buildTicks()||[];this.afterBuildTicks();const c=r<this.ticks.length;this._convertTicksToLabels(c?Xn(this.ticks,r):this.ticks);this.configure();this.beforeCalculateLabelRotation();this.calculateLabelRotation();this.afterCalculateLabelRotation();if(o.display&&(o.autoSkip||o.source==="auto")){this.ticks=Tn(this,this.ticks);this._labelSizes=null;this.afterAutoSkip()}if(c){this._convertTicksToLabels(this.ticks)}this.beforeFit();this.fit();this.afterFit();this.afterUpdate()}configure(){let t=this.options.reverse;let e,s;if(this.isHorizontal()){e=this.left;s=this.right}else{e=this.top;s=this.bottom;t=!t}this._startPixel=e;this._endPixel=s;this._reversePixels=t;this._length=s-e;this._alignToPixels=this.options.alignToPixels}afterUpdate(){at(this.options.afterUpdate,[this])}beforeSetDimensions(){at(this.options.beforeSetDimensions,[this])}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=0;this.right=this.width}else{this.height=this.maxHeight;this.top=0;this.bottom=this.height}this.paddingLeft=0;this.paddingTop=0;this.paddingRight=0;this.paddingBottom=0}afterSetDimensions(){at(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext());at(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){at(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,i,n;for(s=0,i=t.length;s<i;s++){n=t[s];n.label=at(e.callback,[n.value,s,t],this)}}afterTickToLabelConversion(){at(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){at(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options;const e=t.ticks;const s=Vn(this.ticks.length,t.ticks.maxTicksLimit);const i=e.minRotation||0;const n=e.maxRotation;let o=i;let r,c,a;if(!this._isVisible()||!e.display||i>=n||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes();const f=h.widest.width;const l=h.highest.height;const u=Ut(this.chart.width-f,0,this.maxWidth);r=t.offset?this.maxWidth/s:u/(s-1);if(f+6>r){r=u/(s-(t.offset?.5:1));c=this.maxHeight-Kn(t.grid)-e.padding-Qn(t.title,this.chart.options.font);a=Math.sqrt(f*f+l*l);o=Ht(Math.min(Math.asin(Ut((h.highest.height+6)/r,-1,1)),Math.asin(Ut(c/a,-1,1))-Math.asin(Ut(l/a,-1,1))));o=Math.max(i,Math.min(n,o))}this.labelRotation=o}afterCalculateLabelRotation(){at(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){at(this.options.beforeFit,[this])}fit(){const t={width:0,height:0};const{chart:e,options:{ticks:s,title:i,grid:n}}=this;const o=this._isVisible();const r=this.isHorizontal();if(o){const o=Qn(i,e.options.font);if(r){t.width=this.maxWidth;t.height=Kn(n)+o}else{t.height=this.maxHeight;t.width=Kn(n)+o}if(s.display&&this.ticks.length){const{first:e,last:i,widest:n,highest:o}=this._getLabelSizes();const c=s.padding*2;const a=Wt(this.labelRotation);const h=Math.cos(a);const f=Math.sin(a);if(r){const e=s.mirror?0:f*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+c)}else{const e=s.mirror?0:h*n.width+f*o.height;t.width=Math.min(this.maxWidth,t.width+e+c)}this._calculatePadding(e,i,f,h)}}this._handleMargins();if(r){this.width=this._length=e.width-this._margins.left-this._margins.right;this.height=t.height}else{this.width=t.width;this.height=this._length=e.height-this._margins.top-this._margins.bottom}}_calculatePadding(t,e,s,i){const{ticks:{align:n,padding:o},position:r}=this.options;const c=this.labelRotation!==0;const a=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left;const h=this.right-this.getPixelForTick(this.ticks.length-1);let f=0;let l=0;if(c){if(a){f=i*t.width;l=s*e.height}else{f=s*t.height;l=i*e.width}}else if(n==="start"){l=e.width}else if(n==="end"){f=t.width}else if(n!=="inner"){f=t.width/2;l=e.width/2}this.paddingLeft=Math.max((f-r+o)*this.width/(this.width-r),0);this.paddingRight=Math.max((l-h+o)*this.width/(this.width-h),0)}else{let s=e.height/2;let i=t.height/2;if(n==="start"){s=0;i=t.height}else if(n==="end"){s=e.height;i=0}this.paddingTop=s+o;this.paddingBottom=i+o}}_handleMargins(){if(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(){at(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion();this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e<s;e++){if(tt(t[e].label)){t.splice(e,1);s--;e--}}this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;if(e<s.length){s=Xn(s,e)}this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:i,_longestTextCache:n}=this;const o=[];const r=[];const c=Math.floor(e/Vn(e,s));let a=0;let h=0;let f,l,u,d,b,p,g,m,y,x,v;for(f=0;f<e;f+=c){d=t[f].label;b=this._resolveTickFontOptions(f);i.font=p=b.string;g=n[p]=n[p]||{data:{},gc:[]};m=b.lineHeight;y=x=0;if(!tt(d)&&!et(d)){y=Pe(i,g.data,g.gc,y,d);x=m}else if(et(d)){for(l=0,u=d.length;l<u;++l){v=d[l];if(!tt(v)&&!et(v)){y=Pe(i,g.data,g.gc,y,v);x+=m}}}o.push(y);r.push(x);a=Math.max(y,a);h=Math.max(x,h)}Zn(n,e);const M=o.indexOf(a);const k=r.indexOf(h);const w=t=>({width:o[t]||0,height:r[t]||0});return{first:w(0),last:w(e-1),widest:w(M),highest:w(k),widths:o,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;if(t<0||t>e.length-1){return null}return this.getPixelForValue(e[t].value)}getPixelForDecimal(t){if(this._reversePixels){t=1-t}const e=this._startPixel+t*this._length;return Zt(this._alignToPixels?Ie(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=Jn(this.getContext(),t,s))}return this.$context||(this.$context=qn(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks;const e=Wt(this.labelRotation);const s=Math.abs(Math.cos(e));const i=Math.abs(Math.sin(e));const n=this._getLabelSizes();const o=t.autoSkipPadding||0;const r=n?n.widest.width+o:0;const c=n?n.highest.height+o:0;return this.isHorizontal()?c*s>r*i?r/s:c/i:c*i<r*s?c/s:r/i}_isVisible(){const t=this.options.display;if(t!=="auto"){return!!t}return this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis;const s=this.chart;const i=this.options;const{grid:n,position:o,border:r}=i;const c=n.offset;const a=this.isHorizontal();const h=this.ticks;const f=h.length+(c?1:0);const l=Kn(n);const u=[];const d=r.setContext(this.getContext());const b=d.display?d.width:0;const p=b/2;const g=function(t){return Ie(s,t,b)};let m,y,x,v;let M,k,w,_,A,O,S,R;if(o==="top"){m=g(this.bottom);k=this.bottom-l;_=m-p;O=g(t.top)+p;R=t.bottom}else if(o==="bottom"){m=g(this.top);O=t.top;R=g(t.bottom)-p;k=m+p;_=this.top+l}else if(o==="left"){m=g(this.right);M=this.right-l;w=m-p;A=g(t.left)+p;S=t.right}else if(o==="right"){m=g(this.left);A=t.left;S=g(t.right)-p;M=m+p;w=this.left+l}else if(e==="x"){if(o==="center"){m=g((t.top+t.bottom)/2+.5)}else if(st(o)){const t=Object.keys(o)[0];const e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}O=t.top;R=t.bottom;k=m+p;_=k+l}else if(e==="y"){if(o==="center"){m=g((t.left+t.right)/2)}else if(st(o)){const t=Object.keys(o)[0];const e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}M=m-p;w=M-l;A=t.left;S=t.right}const D=ot(i.ticks.maxTicksLimit,f);const j=Math.max(1,Math.ceil(f/D));for(y=0;y<f;y+=j){const t=this.getContext(y);const e=n.setContext(t);const i=r.setContext(t);const o=e.lineWidth;const h=e.color;const f=i.dash||[];const l=i.dashOffset;const d=e.tickWidth;const b=e.tickColor;const p=e.tickBorderDash||[];const g=e.tickBorderDashOffset;x=Un(this,y,c);if(x===undefined){continue}v=Ie(s,x,o);if(a){M=w=A=S=v}else{k=_=O=R=v}u.push({tx1:M,ty1:k,tx2:w,ty2:_,x1:A,y1:O,x2:S,y2:R,width:o,color:h,borderDash:f,borderDashOffset:l,tickWidth:d,tickColor:b,tickBorderDash:p,tickBorderDashOffset:g})}this._ticksLength=f;this._borderValue=m;return u}_computeLabelItems(t){const e=this.axis;const s=this.options;const{position:i,ticks:n}=s;const o=this.isHorizontal();const r=this.ticks;const{align:c,crossAlign:a,padding:h,mirror:f}=n;const l=Kn(s.grid);const u=l+h;const d=f?-h:u;const b=-Wt(this.labelRotation);const p=[];let g,m,y,x,v,M,k,w,_,A,O,S;let R="middle";if(i==="top"){M=this.bottom-d;k=this._getXAxisLabelAlignment()}else if(i==="bottom"){M=this.top+d;k=this._getXAxisLabelAlignment()}else if(i==="left"){const t=this._getYAxisLabelAlignment(l);k=t.textAlign;v=t.x}else if(i==="right"){const t=this._getYAxisLabelAlignment(l);k=t.textAlign;v=t.x}else if(e==="x"){if(i==="center"){M=(t.top+t.bottom)/2+u}else if(st(i)){const t=Object.keys(i)[0];const e=i[t];M=this.chart.scales[t].getPixelForValue(e)+u}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(i==="center"){v=(t.left+t.right)/2-u}else if(st(i)){const t=Object.keys(i)[0];const e=i[t];v=this.chart.scales[t].getPixelForValue(e)}k=this._getYAxisLabelAlignment(l).textAlign}if(e==="y"){if(c==="start"){R="top"}else if(c==="end"){R="bottom"}}const D=this._getLabelSizes();for(g=0,m=r.length;g<m;++g){y=r[g];x=y.label;const t=n.setContext(this.getContext(g));w=this.getPixelForTick(g)+n.labelOffset;_=this._resolveTickFontOptions(g);A=_.lineHeight;O=et(x)?x.length:1;const e=O/2;const s=t.color;const c=t.textStrokeColor;const h=t.textStrokeWidth;let l=k;if(o){v=w;if(k==="inner"){if(g===m-1){l=!this.options.reverse?"right":"left"}else if(g===0){l=!this.options.reverse?"left":"right"}else{l="center"}}if(i==="top"){if(a==="near"||b!==0){S=-O*A+A/2}else if(a==="center"){S=-D.highest.height/2-e*A+A}else{S=-D.highest.height+A/2}}else{if(a==="near"||b!==0){S=A/2}else if(a==="center"){S=D.highest.height/2-e*A}else{S=D.highest.height-O*A}}if(f){S*=-1}if(b!==0&&!t.showLabelBackdrop){v+=A/2*Math.sin(b)}}else{M=w;S=(1-O)*A/2}let u;if(t.showLabelBackdrop){const e=es(t.backdropPadding);const s=D.heights[g];const i=D.widths[g];let n=S-e.top;let o=0-e.left;switch(R){case"middle":n-=s/2;break;case"bottom":n-=s;break}switch(k){case"center":o-=i/2;break;case"right":o-=i;break;case"inner":if(g===m-1){o-=i}else if(g>0){o-=i/2}break}u={left:o,top:n,width:i+e.width,height:s+e.height,color:t.backdropColor}}p.push({label:x,font:_,textOffset:S,options:{rotation:b,color:s,strokeColor:c,strokeWidth:h,textAlign:l,textBaseline:R,translation:[v,M],backdrop:u}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;const s=-Wt(this.labelRotation);if(s){return t==="top"?"left":"right"}let i="center";if(e.align==="start"){i="left"}else if(e.align==="end"){i="right"}else if(e.align==="inner"){i="inner"}return i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:i,padding:n}}=this.options;const o=this._getLabelSizes();const r=t+n;const c=o.widest.width;let a;let h;if(e==="left"){if(i){h=this.right+n;if(s==="near"){a="left"}else if(s==="center"){a="center";h+=c/2}else{a="right";h+=c}}else{h=this.right-r;if(s==="near"){a="right"}else if(s==="center"){a="center";h-=c/2}else{a="left";h=this.left}}}else if(e==="right"){if(i){h=this.left+n;if(s==="near"){a="right"}else if(s==="center"){a="center";h-=c/2}else{a="left";h-=c}}else{h=this.left+r;if(s==="near"){a="left"}else if(s==="center"){a="center";h+=c/2}else{a="right";h=this.right}}}else{a="right"}return{textAlign:a,x:h}}_computeLabelArea(){if(this.options.ticks.mirror){return}const t=this.chart;const e=this.options.position;if(e==="left"||e==="right"){return{top:0,left:this.left,bottom:t.height,right:this.right}}if(e==="top"||e==="bottom"){return{top:this.top,left:0,bottom:this.bottom,right:t.width}}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:i,width:n,height:o}=this;if(e){t.save();t.fillStyle=e;t.fillRect(s,i,n,o);t.restore()}}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display){return 0}const s=this.ticks;const i=s.findIndex((e=>e.value===t));if(i>=0){const t=e.setContext(this.getContext(i));return t.lineWidth}return 0}drawGrid(t){const e=this.options.grid;const s=this.ctx;const i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const r=(t,e,i)=>{if(!i.width||!i.color){return}s.save();s.lineWidth=i.width;s.strokeStyle=i.color;s.setLineDash(i.borderDash||[]);s.lineDashOffset=i.borderDashOffset;s.beginPath();s.moveTo(t.x,t.y);s.lineTo(e.x,e.y);s.stroke();s.restore()};if(e.display){for(n=0,o=i.length;n<o;++n){const t=i[n];if(e.drawOnChartArea){r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t)}if(e.drawTicks){r({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:e,options:{border:s,grid:i}}=this;const n=s.setContext(this.getContext());const o=s.display?n.width:0;if(!o){return}const r=i.setContext(this.getContext(0)).lineWidth;const c=this._borderValue;let a,h,f,l;if(this.isHorizontal()){a=Ie(t,this.left,o)-o/2;h=Ie(t,this.right,r)+r/2;f=l=c}else{f=Ie(t,this.top,o)-o/2;l=Ie(t,this.bottom,r)+r/2;a=h=c}e.save();e.lineWidth=n.width;e.strokeStyle=n.color;e.beginPath();e.moveTo(a,f);e.lineTo(h,l);e.stroke();e.restore()}drawLabels(t){const e=this.options.ticks;if(!e.display){return}const s=this.ctx;const i=this._computeLabelArea();if(i){We(s,i)}const n=this.getLabelItems(t);for(const t of n){const e=t.options;const i=t.font;const n=t.label;const o=t.textOffset;Ve(s,n,0,o,i,e)}if(i){He(s)}}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:i}}=this;if(!s.display){return}const n=ss(s.font);const o=es(s.padding);const r=s.align;let c=n.lineHeight/2;if(e==="bottom"||e==="center"||st(e)){c+=o.bottom;if(et(s.text)){c+=n.lineHeight*(s.text.length-1)}}else{c+=o.top}const{titleX:a,titleY:h,maxWidth:f,rotation:l}=eo(this,c,e,r);Ve(t,s.text,0,0,n,{color:s.color,maxWidth:f,rotation:l,textAlign:to(r,e,i),textBaseline:"middle",translation:[a,h]})}draw(t){if(!this._isVisible()){return}this.drawBackground();this.drawGrid(t);this.drawBorder();this.drawTitle();this.drawLabels(t)}_layers(){const t=this.options;const e=t.ticks&&t.ticks.z||0;const s=ot(t.grid&&t.grid.z,-1);const i=ot(t.border&&t.border.z,0);if(!this._isVisible()||this.draw!==so.prototype.draw){return[{z:e,draw:t=>{this.draw(t)}}]}return[{z:s,draw:t=>{this.drawBackground();this.drawGrid(t);this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas();const s=this.axis+"AxisID";const i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];if(o[s]===this.id&&(!t||o.type===t)){i.push(o)}}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return ss(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class io{constructor(t,e,s){this.type=t;this.scope=e;this.override=s;this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;if(ro(e)){s=this.register(e)}const i=this.items;const n=t.id;const o=this.scope+"."+n;if(!n){throw new Error("class does not have id: "+t)}if(n in i){return o}i[n]=t;no(t,o,s);if(this.override){Ee.override(t.id,t.overrides)}return o}get(t){return this.items[t]}unregister(t){const e=this.items;const s=t.id;const i=this.scope;if(s in e){delete e[s]}if(i&&s in Ee[i]){delete Ee[i][s];if(this.override){delete Re[s]}}}}function no(t,e,s){const i=bt(Object.create(null),[s?Ee.get(s):{},Ee.get(e),t.defaults]);Ee.set(e,i);if(t.defaultRoutes){oo(e,t.defaultRoutes)}if(t.descriptors){Ee.describe(e,t.descriptors)}}function oo(t,e){Object.keys(e).forEach((s=>{const i=s.split(".");const n=i.pop();const o=[t].concat(i).join(".");const r=e[s].split(".");const c=r.pop();const a=r.join(".");Ee.route(o,n,a,c)}))}function ro(t){return"id"in t&&"defaults"in t}class co{constructor(){this.controllers=new io(vi,"datasets",true);this.elements=new io(In,"elements");this.plugins=new io(Object,"plugins");this.scales=new io(so,"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,e,s){[...e].forEach((e=>{const i=s||this._getRegistryForType(e);if(s||i.isForType(e)||i===this.plugins&&e.id){this._exec(t,i,e)}else{ht(e,(e=>{const i=s||this._getRegistryForType(e);this._exec(t,i,e)}))}}))}_exec(t,e,s){const i=Mt(t);at(s["before"+i],[],s);e[t](s);at(s["after"+i],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t)){return s}}return this.plugins}_get(t,e,s){const i=e.get(t);if(i===undefined){throw new Error('"'+t+'" is not a registered '+s+".")}return i}}var ao=new co;class ho{constructor(){this._init=[]}notify(t,e,s,i){if(e==="beforeInit"){this._init=this._createDescriptors(t,true);this._notify(this._init,t,"install")}const n=i?this._descriptors(t).filter(i):this._descriptors(t);const o=this._notify(n,t,e,s);if(e==="afterDestroy"){this._notify(n,t,"stop");this._notify(this._init,t,"uninstall")}return o}_notify(t,e,s,i){i=i||{};for(const n of t){const t=n.plugin;const o=t[s];const r=[e,i,n.options];if(at(o,r,t)===false&&i.cancelable){return false}}return true}invalidate(){if(!tt(this._cache)){this._oldCache=this._cache;this._cache=undefined}}_descriptors(t){if(this._cache){return this._cache}const e=this._cache=this._createDescriptors(t);this._notifyStateChanges(t);return e}_createDescriptors(t,e){const s=t&&t.config;const i=ot(s.options&&s.options.plugins,{});const n=fo(s);return i===false&&!e?[]:uo(t,n,i,e)}_notifyStateChanges(t){const e=this._oldCache||[];const s=this._cache;const i=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,s),t,"stop");this._notify(i(s,e),t,"start")}}function fo(t){const e={};const s=[];const i=Object.keys(ao.plugins.items);for(let t=0;t<i.length;t++){s.push(ao.getPlugin(i[t]))}const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];if(s.indexOf(i)===-1){s.push(i);e[i.id]=true}}return{plugins:s,localIds:e}}function lo(t,e){if(!e&&t===false){return null}if(t===true){return{}}return t}function uo(t,{plugins:e,localIds:s},i,n){const o=[];const r=t.getContext();for(const c of e){const e=c.id;const a=lo(i[e],n);if(a===null){continue}o.push({plugin:c,options:bo(t.config,{plugin:c,local:s[e]},a,r)})}return o}function bo(t,{plugin:e,local:s},i,n){const o=t.pluginScopeKeys(e);const r=t.getOptionScopes(i,o);if(s&&e.defaults){r.push(e.defaults)}return t.createResolver(r,n,[""],{scriptable:false,indexable:false,allKeys:true})}function po(t,e){const s=Ee.datasets[t]||{};const i=(e.datasets||{})[t]||{};return i.indexAxis||e.indexAxis||s.indexAxis||"x"}function go(t,e){let s=t;if(t==="_index_"){s=e}else if(t==="_value_"){s=e==="x"?"y":"x"}return s}function mo(t,e){return t===e?"_index_":"_value_"}function yo(t){if(t==="x"||t==="y"||t==="r"){return t}}function xo(t){if(t==="top"||t==="bottom"){return"x"}if(t==="left"||t==="right"){return"y"}}function vo(t,...e){if(yo(t)){return t}for(const s of e){const e=s.axis||xo(s.position)||t.length>1&&yo(t[0].toLowerCase());if(e){return e}}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Mo(t,e,s){if(s[e+"AxisID"]===t){return{axis:e}}}function ko(t,e){if(e.data&&e.data.datasets){const s=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(s.length){return Mo(t,"x",s[0])||Mo(t,"y",s[0])}}return{}}function wo(t,e){const s=Re[t.type]||{scales:{}};const i=e.scales||{};const n=po(t.type,e);const o=Object.create(null);Object.keys(i).forEach((e=>{const r=i[e];if(!st(r)){return console.error(`Invalid scale configuration for scale: ${e}`)}if(r._proxy){return console.warn(`Ignoring resolver passed as options for scale: ${e}`)}const c=vo(e,r,ko(e,t),Ee.scales[r.type]);const a=mo(c,n);const h=s.scales||{};o[e]=pt(Object.create(null),[{axis:c},r,h[c],h[a]])}));t.data.datasets.forEach((s=>{const n=s.type||t.type;const r=s.indexAxis||po(n,e);const c=Re[n]||{};const a=c.scales||{};Object.keys(a).forEach((t=>{const e=go(t,r);const n=s[e+"AxisID"]||e;o[n]=o[n]||Object.create(null);pt(o[n],[{axis:e},i[n],a[t]])}))}));Object.keys(o).forEach((t=>{const e=o[t];pt(e,[Ee.scales[e.type],Ee.scale])}));return o}function _o(t){const e=t.options||(t.options={});e.plugins=ot(e.plugins,{});e.scales=wo(t,e)}function Ao(t){t=t||{};t.datasets=t.datasets||[];t.labels=t.labels||[];return t}function Oo(t){t=t||{};t.data=Ao(t.data);_o(t);return t}const So=new Map;const Ro=new Set;function Do(t,e){let s=So.get(t);if(!s){s=e();So.set(t,s);Ro.add(s)}return s}const jo=(t,e,s)=>{const i=vt(e,s);if(i!==undefined){t.add(i)}};class Bo{constructor(t){this._config=Oo(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=Ao(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();_o(t)}clearCache(){this._scopeCache.clear();this._resolverCache.clear()}datasetScopeKeys(t){return Do(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Do(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Do(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;const s=this.type;return Do(`${s}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const s=this._scopeCache;let i=s.get(t);if(!i||e){i=new Map;s.set(t,i)}return i}getOptionScopes(t,e,s){const{options:i,type:n}=this;const o=this._cachedScopes(t,s);const r=o.get(e);if(r){return r}const c=new Set;e.forEach((e=>{if(t){c.add(t);e.forEach((e=>jo(c,t,e)))}e.forEach((t=>jo(c,i,t)));e.forEach((t=>jo(c,Re[n]||{},t)));e.forEach((t=>jo(c,Ee,t)));e.forEach((t=>jo(c,De,t)))}));const a=Array.from(c);if(a.length===0){a.push(Object.create(null))}if(Ro.has(e)){o.set(e,a)}return a}chartOptionScopes(){const{options:t,type:e}=this;return[t,Re[e]||{},Ee.datasets[e]||{},{type:e},Ee,De]}resolveNamedOptions(t,e,s,i=[""]){const n={$shared:true};const{resolver:o,subPrefixes:r}=Co(this._resolverCache,t,i);let c=o;if(Lo(o,e)){n.$shared=false;s=wt(s)?s():s;const e=this.createResolver(t,s,r);c=cs(o,s,e)}for(const t of e){n[t]=c[t]}return n}createResolver(t,e,s=[""],i){const{resolver:n}=Co(this._resolverCache,t,s);return st(e)?cs(n,e,undefined,i):n}}function Co(t,e,s){let i=t.get(e);if(!i){i=new Map;t.set(e,i)}const n=s.join();let o=i.get(n);if(!o){const t=rs(e,s);o={resolver:t,subPrefixes:s.filter((t=>!t.toLowerCase().includes("hover")))};i.set(n,o)}return o}const Eo=t=>st(t)&&Object.getOwnPropertyNames(t).some((e=>wt(t[e])));function Lo(t,e){const{isScriptable:s,isIndexable:i}=as(t);for(const n of e){const e=s(n);const o=i(n);const r=(o||e)&&t[n];if(e&&(wt(r)||Eo(r))||o&&et(r)){return true}}return false}var Po="4.4.1";const Io=["top","bottom","left","right","chartArea"];function To(t,e){return t==="top"||t==="bottom"||Io.indexOf(t)===-1&&e==="x"}function Fo(t,e){return function(s,i){return s[t]===i[t]?s[e]-i[e]:s[t]-i[t]}}function zo(t){const e=t.chart;const s=e.options.animation;e.notifyPlugins("afterRender");at(s&&s.onComplete,[t],e)}function No(t){const e=t.chart;const s=e.options.animation;at(s&&s.onProgress,[t],e)}function Wo(t){if(Os()&&typeof t==="string"){t=document.getElementById(t)}else if(t&&t.length){t=t[0]}if(t&&t.canvas){t=t.canvas}return t}const Ho={};const $o=t=>{const e=Wo(t);return Object.values(Ho).filter((t=>t.canvas===e)).pop()};function Go(t,e,s){const i=Object.keys(t);for(const n of i){const i=+n;if(i>=e){const o=t[n];delete t[n];if(s>0||i>e){t[i+s]=o}}}}function Yo(t,e,s,i){if(!s||t.type==="mouseout"){return null}if(i){return e}return t}function Vo(t,e,s){return t.options.clip?t[s]:e[s]}function Xo(t,e){const{xScale:s,yScale:i}=t;if(s&&i){return{left:Vo(s,e,"left"),right:Vo(s,e,"right"),top:Vo(i,e,"top"),bottom:Vo(i,e,"bottom")}}return e}class Uo{static defaults=Ee;static instances=Ho;static overrides=Re;static registry=ao;static version=Po;static getChart=$o;static register(...t){ao.add(...t);Zo()}static unregister(...t){ao.remove(...t);Zo()}constructor(t,e){const s=this.config=new Bo(e);const i=Wo(t);const n=$o(i);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 o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Pn(i));this.platform.updateConfig(s);const r=this.platform.acquireContext(i,o.aspectRatio);const c=r&&r.canvas;const a=c&&c.height;const h=c&&c.width;this.id=J();this.ctx=r;this.canvas=c;this.width=h;this.height=a;this._options=o;this._aspectRatio=this.aspectRatio;this._layers=[];this._metasets=[];this._stacks=undefined;this.boxes=[];this.currentDevicePixelRatio=undefined;this.chartArea=undefined;this._active=[];this._lastEvent=undefined;this._listeners={};this._responsiveListeners=undefined;this._sortedMetasets=[];this.scales={};this._plugins=new ho;this.$proxies={};this._hiddenIndices={};this.attached=false;this._animationsDisabled=undefined;this.$context=undefined;this._doResize=re((t=>this.update(t)),o.resizeDelay||0);this._dataChanges=[];Ho[this.id]=this;if(!r||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Us.listen(this,"complete",zo);Us.listen(this,"progress",No);this._initialize();if(this.attached){this.update()}}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:i,_aspectRatio:n}=this;if(!tt(t)){return t}if(e&&n){return n}return i?s/i:null}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 ao}_initialize(){this.notifyPlugins("beforeInit");if(this.options.responsive){this.resize()}else{zs(this,this.options.devicePixelRatio)}this.bindEvents();this.notifyPlugins("afterInit");return this}clear(){Te(this.canvas,this.ctx);return this}stop(){Us.stop(this);return this}resize(t,e){if(!Us.running(this)){this._resize(t,e)}else{this._resizeBeforeDraw={width:t,height:e}}}_resize(t,e){const s=this.options;const i=this.canvas;const n=s.maintainAspectRatio&&this.aspectRatio;const o=this.platform.getMaximumSize(i,t,e,n);const r=s.devicePixelRatio||this.platform.getDevicePixelRatio();const c=this.width?"resize":"attach";this.width=o.width;this.height=o.height;this._aspectRatio=this.aspectRatio;if(!zs(this,r,true)){return}this.notifyPlugins("resize",{size:o});at(s.onResize,[this,o],this);if(this.attached){if(this._doResize(c)){this.render()}}}ensureScalesHaveIDs(){const t=this.options;const e=t.scales||{};ht(e,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options;const e=t.scales;const s=this.scales;const i=Object.keys(s).reduce(((t,e)=>{t[e]=false;return t}),{});let n=[];if(e){n=n.concat(Object.keys(e).map((t=>{const s=e[t];const i=vo(t,s);const n=i==="r";const o=i==="x";return{options:s,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))}ht(n,(e=>{const n=e.options;const o=n.id;const r=vo(o,n);const c=ot(n.type,e.dtype);if(n.position===undefined||To(n.position,r)!==To(e.dposition)){n.position=e.dposition}i[o]=true;let a=null;if(o in s&&s[o].type===c){a=s[o]}else{const t=ao.getScale(c);a=new t({id:o,type:c,ctx:this.ctx,chart:this});s[a.id]=a}a.init(n,t)}));ht(i,((t,e)=>{if(!t){delete s[e]}}));ht(s,(t=>{un.configure(this,t,t.options);un.addBox(this,t)}))}_updateMetasets(){const t=this._metasets;const e=this.data.datasets.length;const s=t.length;t.sort(((t,e)=>t.index-e.index));if(s>e){for(let t=e;t<s;++t){this._destroyDatasetMeta(t)}t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(Fo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;if(t.length>e.length){delete this._stacks}t.forEach(((t,s)=>{if(e.filter((e=>e===t._dataset)).length===0){this._destroyDatasetMeta(s)}}))}buildOrUpdateControllers(){const t=[];const e=this.data.datasets;let s,i;this._removeUnreferencedMetasets();for(s=0,i=e.length;s<i;s++){const i=e[s];let n=this.getDatasetMeta(s);const o=i.type||this.config.type;if(n.type&&n.type!==o){this._destroyDatasetMeta(s);n=this.getDatasetMeta(s)}n.type=o;n.indexAxis=i.indexAxis||po(o,this.options);n.order=i.order||0;n.index=s;n.label=""+i.label;n.visible=this.isDatasetVisible(s);if(n.controller){n.controller.updateIndex(s);n.controller.linkScales()}else{const e=ao.getController(o);const{datasetElementType:i,dataElementType:r}=Ee.datasets[o];Object.assign(e,{dataElementType:ao.getElement(r),datasetElementType:i&&ao.getElement(i)});n.controller=new e(this,s);t.push(n.controller)}}this._updateMetasets();return t}_resetElements(){ht(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements();this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());const i=this._animationsDisabled=!s.animation;this._updateScales();this._checkEventBindings();this._updateHiddenIndices();this._plugins.invalidate();if(this.notifyPlugins("beforeUpdate",{mode:t,cancelable:true})===false){return}const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t);const s=!i&&n.indexOf(e)===-1;e.buildOrUpdateElements(s);o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=s.layout.autoPadding?o:0;this._updateLayout(o);if(!i){ht(n,(t=>{t.reset()}))}this._updateDatasets(t);this.notifyPlugins("afterUpdate",{mode:t});this._layers.sort(Fo("z","_idx"));const{_active:r,_lastEvent:c}=this;if(c){this._eventHandler(c,true)}else if(r.length){this._updateHoverStyles(r,r,true)}this.render()}_updateScales(){ht(this.scales,(t=>{un.removeBox(this,t)}));this.ensureScalesHaveIDs();this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options;const e=new Set(Object.keys(this._listeners));const s=new Set(t.events);if(!_t(e,s)||!!this._responsiveListeners!==t.responsive){this.unbindEvents();this.bindEvents()}}_updateHiddenIndices(){const{_hiddenIndices:t}=this;const e=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:n}of e){const e=s==="_removeElements"?-n:n;Go(t,i,e)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length){return}this._dataChanges=[];const e=this.data.datasets.length;const s=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(","))));const i=s(0);for(let t=1;t<e;t++){if(!_t(i,s(t))){return}}return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:true})===false){return}un.update(this,this.width,this.height,t);const e=this.chartArea;const s=e.width<=0||e.height<=0;this._layers=[];ht(this.boxes,(t=>{if(s&&t.position==="chartArea"){return}if(t.configure){t.configure()}this._layers.push(...t._layers())}),this);this._layers.forEach(((t,e)=>{t._idx=e}));this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:true})===false){return}for(let t=0,e=this.data.datasets.length;t<e;++t){this.getDatasetMeta(t).controller.configure()}for(let e=0,s=this.data.datasets.length;e<s;++e){this._updateDataset(e,wt(t)?t({datasetIndex:e}):t)}this.notifyPlugins("afterDatasetsUpdate",{mode:t})}_updateDataset(t,e){const s=this.getDatasetMeta(t);const i={meta:s,index:t,mode:e,cancelable:true};if(this.notifyPlugins("beforeDatasetUpdate",i)===false){return}s.controller._update(e);i.cancelable=false;this.notifyPlugins("afterDatasetUpdate",i)}render(){if(this.notifyPlugins("beforeRender",{cancelable:true})===false){return}if(Us.has(this)){if(this.attached&&!Us.running(this)){Us.start(this)}}else{this.draw();zo({chart:this})}}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e);this._resizeBeforeDraw=null}this.clear();if(this.width<=0||this.height<=0){return}if(this.notifyPlugins("beforeDraw",{cancelable:true})===false){return}const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t){e[t].draw(this.chartArea)}this._drawDatasets();for(;t<e.length;++t){e[t].draw(this.chartArea)}this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets;const s=[];let i,n;for(i=0,n=e.length;i<n;++i){const n=e[i];if(!t||n.visible){s.push(n)}}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(true)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:true})===false){return}const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e){this._drawDataset(t[e])}this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx;const s=t._clip;const i=!s.disabled;const n=Xo(t,this.chartArea);const o={meta:t,index:t.index,cancelable:true};if(this.notifyPlugins("beforeDatasetDraw",o)===false){return}if(i){We(e,{left:s.left===false?0:n.left-s.left,right:s.right===false?this.width:n.right+s.right,top:s.top===false?0:n.top-s.top,bottom:s.bottom===false?this.height:n.bottom+s.bottom})}t.controller.draw();if(i){He(e)}o.cancelable=false;this.notifyPlugins("afterDatasetDraw",o)}isPointInArea(t){return Ne(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,i){const n=Ui.modes[e];if(typeof n==="function"){return n(this,t,s,i)}return[]}getDatasetMeta(t){const e=this.data.datasets[t];const s=this._metasets;let i=s.filter((t=>t&&t._dataset===e)).pop();if(!i){i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:false};s.push(i)}return i}getContext(){return this.$context||(this.$context=os(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e){return false}const s=this.getDatasetMeta(t);return typeof s.hidden==="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const i=s?"show":"hide";const n=this.getDatasetMeta(t);const o=n.controller._resolveAnimations(undefined,i);if(kt(e)){n.data[e].hidden=!s;this.update()}else{this.setDatasetVisibility(t,s);o.update(n,{visible:s});this.update((e=>e.datasetIndex===t?i:undefined))}}hide(t,e){this._updateVisibility(t,e,false)}show(t,e){this._updateVisibility(t,e,true)}_destroyDatasetMeta(t){const e=this._metasets[t];if(e&&e.controller){e.controller._destroy()}delete this._metasets[t]}_stop(){let t,e;this.stop();Us.remove(this);for(t=0,e=this.data.datasets.length;t<e;++t){this._destroyDatasetMeta(t)}}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop();this.config.clearCache();if(t){this.unbindEvents();Te(t,e);this.platform.releaseContext(e);this.canvas=null;this.ctx=null}delete Ho[this.id];this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents();if(this.options.responsive){this.bindResponsiveEvents()}else{this.attached=true}}bindUserEvents(){const t=this._listeners;const e=this.platform;const s=(s,i)=>{e.addEventListener(this,s,i);t[s]=i};const i=(t,e,s)=>{t.offsetX=e;t.offsetY=s;this._eventHandler(t)};ht(this.options.events,(t=>s(t,i)))}bindResponsiveEvents(){if(!this._responsiveListeners){this._responsiveListeners={}}const t=this._responsiveListeners;const e=this.platform;const s=(s,i)=>{e.addEventListener(this,s,i);t[s]=i};const i=(s,i)=>{if(t[s]){e.removeEventListener(this,s,i);delete t[s]}};const n=(t,e)=>{if(this.canvas){this.resize(t,e)}};let o;const r=()=>{i("attach",r);this.attached=true;this.resize();s("resize",n);s("detach",o)};o=()=>{this.attached=false;i("resize",n);this._stop();this._resize(0,0);s("attach",r)};if(e.isAttached(this.canvas)){r()}else{o()}}unbindEvents(){ht(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)}));this._listeners={};ht(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)}));this._responsiveListeners=undefined}updateHoverStyle(t,e,s){const i=s?"set":"remove";let n,o,r,c;if(e==="dataset"){n=this.getDatasetMeta(t[0].datasetIndex);n.controller["_"+i+"DatasetHoverStyle"]()}for(r=0,c=t.length;r<c;++r){o=t[r];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;if(e){e[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[];const s=t.map((({datasetIndex:t,index:e})=>{const s=this.getDatasetMeta(t);if(!s){throw new Error("No dataset found at index "+t)}return{datasetIndex:t,element:s.data[e],index:e}}));const i=!ft(s,e);if(i){this._active=s;this._lastEvent=null;this._updateHoverStyles(s,e)}}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter((e=>e.plugin.id===t)).length===1}_updateHoverStyles(t,e,s){const i=this.options.hover;const n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index))));const o=n(e,t);const r=s?t:n(t,e);if(o.length){this.updateHoverStyle(o,i.mode,false)}if(r.length&&i.mode){this.updateHoverStyle(r,i.mode,true)}}_eventHandler(t,e){const s={event:t,replay:e,cancelable:true,inChartArea:this.isPointInArea(t)};const i=e=>(e.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,i)===false){return}const n=this._handleEvent(t,e,s.inChartArea);s.cancelable=false;this.notifyPlugins("afterEvent",s,i);if(n||s.changed){this.render()}return this}_handleEvent(t,e,s){const{_active:i=[],options:n}=this;const o=e;const r=this._getActiveElements(t,i,s,o);const c=At(t);const a=Yo(t,this._lastEvent,s,c);if(s){this._lastEvent=null;at(n.onHover,[t,r,this],this);if(c){at(n.onClick,[t,r,this],this)}}const h=!ft(r,i);if(h||e){this._active=r;this._updateHoverStyles(r,i,e)}this._lastEvent=a;return h}_getActiveElements(t,e,s,i){if(t.type==="mouseout"){return[]}if(!s){return e}const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,i)}}function Zo(){return ht(Uo.instances,(t=>t._plugins.invalidate()))}function Ko(t,e){const{x:s,y:i,base:n,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let c,a,h,f,l;if(t.horizontal){l=r/2;c=Math.min(s,n);a=Math.max(s,n);h=i-l;f=i+l}else{l=o/2;c=s-l;a=s+l;h=Math.min(i,n);f=Math.max(i,n)}return{left:c,top:h,right:a,bottom:f}}function Qo(t,e,s,i){return t?0:Ut(e,s,i)}function qo(t,e,s){const i=t.options.borderWidth;const n=t.borderSkipped;const o=Je(i);return{t:Qo(n.top,o.top,0,s),r:Qo(n.right,o.right,0,e),b:Qo(n.bottom,o.bottom,0,s),l:Qo(n.left,o.left,0,e)}}function Jo(t,e,s){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]);const n=t.options.borderRadius;const o=ts(n);const r=Math.min(e,s);const c=t.borderSkipped;const a=i||st(n);return{topLeft:Qo(!a||c.top||c.left,o.topLeft,0,r),topRight:Qo(!a||c.top||c.right,o.topRight,0,r),bottomLeft:Qo(!a||c.bottom||c.left,o.bottomLeft,0,r),bottomRight:Qo(!a||c.bottom||c.right,o.bottomRight,0,r)}}function tr(t){const e=Ko(t);const s=e.right-e.left;const i=e.bottom-e.top;const n=qo(t,s/2,i/2);const o=Jo(t,s/2,i/2);return{outer:{x:e.left,y:e.top,w:s,h:i,radius:o},inner:{x:e.left+n.l,y:e.top+n.t,w:s-n.l-n.r,h:i-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function er(t,e,s,i){const n=e===null;const o=s===null;const r=n&&o;const c=t&&!r&&Ko(t,i);return c&&(n||Kt(e,c.left,c.right))&&(o||Kt(s,c.top,c.bottom))}function sr(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function ir(t,e){t.rect(e.x,e.y,e.w,e.h)}function nr(t,e,s={}){const i=t.x!==s.x?-e:0;const n=t.y!==s.y?-e:0;const o=(t.x+t.w!==s.x+s.w?e:0)-i;const r=(t.y+t.h!==s.y+s.h?e:0)-n;return{x:t.x+i,y:t.y+n,w:t.w+o,h:t.h+r,radius:t.radius}}class or extends In{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:undefined};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super();this.options=undefined;this.horizontal=undefined;this.base=undefined;this.width=undefined;this.height=undefined;this.inflateAmount=undefined;if(t){Object.assign(this,t)}}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:i}}=this;const{inner:n,outer:o}=tr(this);const r=sr(o.radius)?Xe:ir;t.save();if(o.w!==n.w||o.h!==n.h){t.beginPath();r(t,nr(o,e,n));t.clip();r(t,nr(n,-e,o));t.fillStyle=s;t.fill("evenodd")}t.beginPath();r(t,nr(n,e));t.fillStyle=i;t.fill();t.restore()}inRange(t,e,s){return er(this,t,e,s)}inXRange(t,e){return er(this,t,null,e)}inYRange(t,e){return er(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:i,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+i)/2:e,y:n?s:(s+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const rr=["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)"];const cr=rr.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function ar(t){return rr[t%rr.length]}function hr(t){return cr[t%cr.length]}function fr(t,e){t.borderColor=ar(e);t.backgroundColor=hr(e);return++e}function lr(t,e){t.backgroundColor=t.data.map((()=>ar(e++)));return e}function ur(t,e){t.backgroundColor=t.data.map((()=>hr(e++)));return e}function dr(t){let e=0;return(s,i)=>{const n=t.getDatasetMeta(i).controller;if(n instanceof Fi){e=lr(s,e)}else if(n instanceof zi){e=ur(s,e)}else if(n){e=fr(s,e)}}}function br(t){let e;for(e in t){if(t[e].borderColor||t[e].backgroundColor){return true}}return false}function pr(t){return t&&(t.borderColor||t.backgroundColor)}var gr={id:"colors",defaults:{enabled:true,forceOverride:false},beforeLayout(t,e,s){if(!s.enabled){return}const{data:{datasets:i},options:n}=t.config;const{elements:o}=n;if(!s.forceOverride&&(br(i)||pr(n)||o&&br(o))){return}const r=dr(t);i.forEach(r)}};const mr=(t,e)=>{let{boxHeight:s=e,boxWidth:i=e}=t;if(t.usePointStyle){s=Math.min(s,e);i=t.pointStyleWidth||Math.min(i,e)}return{boxWidth:i,boxHeight:s,itemHeight:Math.max(e,s)}};const yr=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class xr extends In{constructor(t){super();this._added=false;this.legendHitBoxes=[];this._hoveredItem=null;this.doughnutMode=false;this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this.legendItems=undefined;this.columnSizes=undefined;this.lineWidths=undefined;this.maxHeight=undefined;this.maxWidth=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.height=undefined;this.width=undefined;this._margins=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,e,s){this.maxWidth=t;this.maxHeight=e;this._margins=s;this.setDimensions();this.buildLabels();this.fit()}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=this._margins.left;this.right=this.width}else{this.height=this.maxHeight;this.top=this._margins.top;this.bottom=this.height}}buildLabels(){const t=this.options.labels||{};let e=at(t.generateLabels,[this.chart],this)||[];if(t.filter){e=e.filter((e=>t.filter(e,this.chart.data)))}if(t.sort){e=e.sort(((e,s)=>t.sort(e,s,this.chart.data)))}if(this.options.reverse){e.reverse()}this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels;const i=ss(s.font);const n=i.size;const o=this._computeTitleHeight();const{boxWidth:r,itemHeight:c}=mr(s,n);let a,h;e.font=i.string;if(this.isHorizontal()){a=this.maxWidth;h=this._fitRows(o,n,r,c)+10}else{h=this.maxHeight;a=this._fitCols(o,i,r,c)+10}this.width=Math.min(a,t.maxWidth||this.maxWidth);this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,i){const{ctx:n,maxWidth:o,options:{labels:{padding:r}}}=this;const c=this.legendHitBoxes=[];const a=this.lineWidths=[0];const h=i+r;let f=t;n.textAlign="left";n.textBaseline="middle";let l=-1;let u=-h;this.legendItems.forEach(((t,d)=>{const b=s+e/2+n.measureText(t.text).width;if(d===0||a[a.length-1]+b+2*r>o){f+=h;a[a.length-(d>0?0:1)]=0;u+=h;l++}c[d]={left:0,top:u,row:l,width:b,height:i};a[a.length-1]+=b+r}));return f}_fitCols(t,e,s,i){const{ctx:n,maxHeight:o,options:{labels:{padding:r}}}=this;const c=this.legendHitBoxes=[];const a=this.columnSizes=[];const h=o-t;let f=r;let l=0;let u=0;let d=0;let b=0;this.legendItems.forEach(((t,o)=>{const{itemWidth:p,itemHeight:g}=vr(s,e,n,t,i);if(o>0&&u+g+2*r>h){f+=l+r;a.push({width:l,height:u});d+=l+r;b++;l=u=0}c[o]={left:d,top:u,col:b,width:p,height:g};l=Math.max(l,p);u+=g+r}));f+=l;a.push({width:l,height:u});return f}adjustHitBoxes(){if(!this.options.display){return}const t=this._computeTitleHeight();const{legendHitBoxes:e,options:{align:s,labels:{padding:i},rtl:n}}=this;const o=Gs(n,this.left,this.width);if(this.isHorizontal()){let n=0;let r=ae(s,this.left+i,this.right-this.lineWidths[n]);for(const c of e){if(n!==c.row){n=c.row;r=ae(s,this.left+i,this.right-this.lineWidths[n])}c.top+=this.top+t+i;c.left=o.leftForLtr(o.x(r),c.width);r+=c.width+i}}else{let n=0;let r=ae(s,this.top+t+i,this.bottom-this.columnSizes[n].height);for(const c of e){if(c.col!==n){n=c.col;r=ae(s,this.top+t+i,this.bottom-this.columnSizes[n].height)}c.top=r;c.left+=this.left+i;c.left=o.leftForLtr(o.x(c.left),c.width);r+=c.height+i}}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;We(t,this);this._draw();He(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:i}=this;const{align:n,labels:o}=t;const r=Ee.color;const c=Gs(t.rtl,this.left,this.width);const a=ss(o.font);const{padding:h}=o;const f=a.size;const l=f/2;let u;this.drawTitle();i.textAlign=c.textAlign("left");i.textBaseline="middle";i.lineWidth=.5;i.font=a.string;const{boxWidth:d,boxHeight:b,itemHeight:p}=mr(o,f);const g=function(t,e,s){if(isNaN(d)||d<=0||isNaN(b)||b<0){return}i.save();const n=ot(s.lineWidth,1);i.fillStyle=ot(s.fillStyle,r);i.lineCap=ot(s.lineCap,"butt");i.lineDashOffset=ot(s.lineDashOffset,0);i.lineJoin=ot(s.lineJoin,"miter");i.lineWidth=n;i.strokeStyle=ot(s.strokeStyle,r);i.setLineDash(ot(s.lineDash,[]));if(o.usePointStyle){const r={radius:b*Math.SQRT2/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:n};const a=c.xPlus(t,d/2);const h=e+l;ze(i,r,a,h,o.pointStyleWidth&&d)}else{const o=e+Math.max((f-b)/2,0);const r=c.leftForLtr(t,d);const a=ts(s.borderRadius);i.beginPath();if(Object.values(a).some((t=>t!==0))){Xe(i,{x:r,y:o,w:d,h:b,radius:a})}else{i.rect(r,o,d,b)}i.fill();if(n!==0){i.stroke()}}i.restore()};const m=function(t,e,s){Ve(i,s.text,t,e+p/2,a,{strikethrough:s.hidden,textAlign:c.textAlign(s.textAlign)})};const y=this.isHorizontal();const x=this._computeTitleHeight();if(y){u={x:ae(n,this.left+h,this.right-s[0]),y:this.top+h+x,line:0}}else{u={x:this.left+h,y:ae(n,this.top+x+h,this.bottom-e[0].height),line:0}}Ys(this.ctx,t.textDirection);const v=p+h;this.legendItems.forEach(((r,f)=>{i.strokeStyle=r.fontColor;i.fillStyle=r.fontColor;const b=i.measureText(r.text).width;const p=c.textAlign(r.textAlign||(r.textAlign=o.textAlign));const M=d+l+b;let k=u.x;let w=u.y;c.setWidth(this.width);if(y){if(f>0&&k+M+h>this.right){w=u.y+=v;u.line++;k=u.x=ae(n,this.left+h,this.right-s[u.line])}}else if(f>0&&w+v>this.bottom){k=u.x=k+e[u.line].width+h;u.line++;w=u.y=ae(n,this.top+x+h,this.bottom-e[u.line].height)}const _=c.x(k);g(_,w,r);k=he(p,k+d+l,y?k+M:this.right,t.rtl);m(c.x(k),w,r);if(y){u.x+=M+h}else if(typeof r.text!=="string"){const t=a.lineHeight;u.y+=wr(r,t)+h}else{u.y+=v}}));Vs(this.ctx,t.textDirection)}drawTitle(){const t=this.options;const e=t.title;const s=ss(e.font);const i=es(e.padding);if(!e.display){return}const n=Gs(t.rtl,this.left,this.width);const o=this.ctx;const r=e.position;const c=s.size/2;const a=i.top+c;let h;let f=this.left;let l=this.width;if(this.isHorizontal()){l=Math.max(...this.lineWidths);h=this.top+a;f=ae(t.align,f,this.right-l)}else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=a+ae(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=ae(r,f,f+l);o.textAlign=n.textAlign(ce(r));o.textBaseline="middle";o.strokeStyle=e.color;o.fillStyle=e.color;o.font=s.string;Ve(o,e.text,u,h,s)}_computeTitleHeight(){const t=this.options.title;const e=ss(t.font);const s=es(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,i,n;if(Kt(t,this.left,this.right)&&Kt(e,this.top,this.bottom)){n=this.legendHitBoxes;for(s=0;s<n.length;++s){i=n[s];if(Kt(t,i.left,i.left+i.width)&&Kt(e,i.top,i.top+i.height)){return this.legendItems[s]}}}return null}handleEvent(t){const e=this.options;if(!_r(t.type,e)){return}const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem;const n=yr(i,s);if(i&&!n){at(e.onLeave,[t,i,this],this)}this._hoveredItem=s;if(s&&!n){at(e.onHover,[t,s,this],this)}}else if(s){at(e.onClick,[t,s,this],this)}}}function vr(t,e,s,i,n){const o=Mr(i,t,e,s);const r=kr(n,i,e.lineHeight);return{itemWidth:o,itemHeight:r}}function Mr(t,e,s,i){let n=t.text;if(n&&typeof n!=="string"){n=n.reduce(((t,e)=>t.length>e.length?t:e))}return e+s.size/2+i.measureText(n).width}function kr(t,e,s){let i=t;if(typeof e.text!=="string"){i=wr(e,s)}return i}function wr(t,e){const s=t.text?t.text.length:0;return e*s}function _r(t,e){if((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)){return true}if(e.onClick&&(t==="click"||t==="mouseup")){return true}return false}var Ar={id:"legend",_element:xr,start(t,e,s){const i=t.legend=new xr({ctx:t.ctx,options:s,chart:t});un.configure(t,i,s);un.addBox(t,i)},stop(t){un.removeBox(t,t.legend);delete t.legend},beforeUpdate(t,e,s){const i=t.legend;un.configure(t,i,s);i.options=s},afterUpdate(t){const e=t.legend;e.buildLabels();e.adjustHitBoxes()},afterEvent(t,e){if(!e.replay){t.legend.handleEvent(e.event)}},defaults:{display:true,position:"top",align:"center",fullSize:true,reverse:false,weight:1e3,onClick(t,e,s){const i=e.datasetIndex;const n=s.chart;if(n.isDatasetVisible(i)){n.hide(i);e.hidden=true}else{n.show(i);e.hidden=false}},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets;const{labels:{usePointStyle:s,pointStyle:i,textAlign:n,color:o,useBorderRadius:r,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(s?0:undefined);const h=es(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:a.borderColor,pointStyle:i||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:r&&(c||a.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:false,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Or extends In{constructor(t){super();this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this._padding=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,e){const s=this.options;this.left=0;this.top=0;if(!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t;this.height=this.bottom=e;const i=et(s.text)?s.text.length:1;this._padding=es(s.padding);const n=i*ss(s.font).lineHeight+this._padding.height;if(this.isHorizontal()){this.height=n}else{this.width=n}}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:i,right:n,options:o}=this;const r=o.align;let c=0;let a,h,f;if(this.isHorizontal()){h=ae(r,s,n);f=e+t;a=n-s}else{if(o.position==="left"){h=s+t;f=ae(r,i,e);c=Ot*-.5}else{h=n-t;f=ae(r,e,i);c=Ot*.5}a=i-e}return{titleX:h,titleY:f,maxWidth:a,rotation:c}}draw(){const t=this.ctx;const e=this.options;if(!e.display){return}const s=ss(e.font);const i=s.lineHeight;const n=i/2+this._padding.top;const{titleX:o,titleY:r,maxWidth:c,rotation:a}=this._drawArgs(n);Ve(t,e.text,0,0,s,{color:e.color,maxWidth:c,rotation:a,textAlign:ce(e.align),textBaseline:"middle",translation:[o,r]})}}function Sr(t,e){const s=new Or({ctx:t.ctx,options:e,chart:t});un.configure(t,s,e);un.addBox(t,s);t.titleBlock=s}var Rr={id:"title",_element:Or,start(t,e,s){Sr(t,s)},stop(t){const e=t.titleBlock;un.removeBox(t,e);delete t.titleBlock},beforeUpdate(t,e,s){const i=t.titleBlock;un.configure(t,i,s);i.options=s},defaults:{align:"center",display:false,font:{weight:"bold"},fullSize:true,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};const Dr={average(t){if(!t.length){return false}let e,s;let i=0;let n=0;let o=0;for(e=0,s=t.length;e<s;++e){const s=t[e].element;if(s&&s.hasValue()){const t=s.tooltipPosition();i+=t.x;n+=t.y;++o}}return{x:i/o,y:n/o}},nearest(t,e){if(!t.length){return false}let s=e.x;let i=e.y;let n=Number.POSITIVE_INFINITY;let o,r,c;for(o=0,r=t.length;o<r;++o){const s=t[o].element;if(s&&s.hasValue()){const t=s.getCenterPoint();const i=Yt(e,t);if(i<n){n=i;c=s}}}if(c){const t=c.tooltipPosition();s=t.x;i=t.y}return{x:s,y:i}}};function jr(t,e){if(e){if(et(e)){Array.prototype.push.apply(t,e)}else{t.push(e)}}return t}function Br(t){if((typeof t==="string"||t instanceof String)&&t.indexOf("\n")>-1){return t.split("\n")}return t}function Cr(t,e){const{element:s,datasetIndex:i,index:n}=e;const o=t.getDatasetMeta(i).controller;const{label:r,value:c}=o.getLabelAndValue(n);return{chart:t,label:r,parsed:o.getParsed(n),raw:t.data.datasets[i].data[n],formattedValue:c,dataset:o.getDataset(),dataIndex:n,datasetIndex:i,element:s}}function Er(t,e){const s=t.chart.ctx;const{body:i,footer:n,title:o}=t;const{boxWidth:r,boxHeight:c}=e;const a=ss(e.bodyFont);const h=ss(e.titleFont);const f=ss(e.footerFont);const l=o.length;const u=n.length;const d=i.length;const b=es(e.padding);let p=b.height;let g=0;let m=i.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);m+=t.beforeBody.length+t.afterBody.length;if(l){p+=l*h.lineHeight+(l-1)*e.titleSpacing+e.titleMarginBottom}if(m){const t=e.displayColors?Math.max(c,a.lineHeight):a.lineHeight;p+=d*t+(m-d)*a.lineHeight+(m-1)*e.bodySpacing}if(u){p+=e.footerMarginTop+u*f.lineHeight+(u-1)*e.footerSpacing}let y=0;const x=function(t){g=Math.max(g,s.measureText(t).width+y)};s.save();s.font=h.string;ht(t.title,x);s.font=a.string;ht(t.beforeBody.concat(t.afterBody),x);y=e.displayColors?r+2+e.boxPadding:0;ht(i,(t=>{ht(t.before,x);ht(t.lines,x);ht(t.after,x)}));y=0;s.font=f.string;ht(t.footer,x);s.restore();g+=b.width;return{width:g,height:p}}function Lr(t,e){const{y:s,height:i}=e;if(s<i/2){return"top"}else if(s>t.height-i/2){return"bottom"}return"center"}function Pr(t,e,s,i){const{x:n,width:o}=i;const r=s.caretSize+s.caretPadding;if(t==="left"&&n+o+r>e.width){return true}if(t==="right"&&n-o-r<0){return true}}function Ir(t,e,s,i){const{x:n,width:o}=s;const{width:r,chartArea:{left:c,right:a}}=t;let h="center";if(i==="center"){h=n<=(c+a)/2?"left":"right"}else if(n<=o/2){h="left"}else if(n>=r-o/2){h="right"}if(Pr(h,t,e,s)){h="center"}return h}function Tr(t,e,s){const i=s.yAlign||e.yAlign||Lr(t,s);return{xAlign:s.xAlign||e.xAlign||Ir(t,e,s,i),yAlign:i}}function Fr(t,e){let{x:s,width:i}=t;if(e==="right"){s-=i}else if(e==="center"){s-=i/2}return s}function zr(t,e,s){let{y:i,height:n}=t;if(e==="top"){i+=s}else if(e==="bottom"){i-=n+s}else{i-=n/2}return i}function Nr(t,e,s,i){const{caretSize:n,caretPadding:o,cornerRadius:r}=t;const{xAlign:c,yAlign:a}=s;const h=n+o;const{topLeft:f,topRight:l,bottomLeft:u,bottomRight:d}=ts(r);let b=Fr(e,c);const p=zr(e,a,h);if(a==="center"){if(c==="left"){b+=h}else if(c==="right"){b-=h}}else if(c==="left"){b-=Math.max(f,u)+n}else if(c==="right"){b+=Math.max(l,d)+n}return{x:Ut(b,0,i.width-e.width),y:Ut(p,0,i.height-e.height)}}function Wr(t,e,s){const i=es(s.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function Hr(t){return jr([],Br(t))}function $r(t,e,s){return os(t,{tooltip:e,tooltipItems:s,type:"tooltip"})}function Gr(t,e){const s=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return s?t.override(s):t}const Yr={beforeTitle:q,title(t){if(t.length>0){const e=t[0];const s=e.chart.data.labels;const i=s?s.length:0;if(this&&this.options&&this.options.mode==="dataset"){return e.dataset.label||""}else if(e.label){return e.label}else if(i>0&&e.dataIndex<i){return s[e.dataIndex]}}return""},afterTitle:q,beforeBody:q,beforeLabel:q,label(t){if(this&&this.options&&this.options.mode==="dataset"){return t.label+": "+t.formattedValue||t.formattedValue}let e=t.dataset.label||"";if(e){e+=": "}const s=t.formattedValue;if(!tt(s)){e+=s}return e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex);const s=e.controller.getStyle(t.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex);const s=e.controller.getStyle(t.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:q,afterBody:q,beforeFooter:q,footer:q,afterFooter:q};function Vr(t,e,s,i){const n=t[e].call(s,i);if(typeof n==="undefined"){return Yr[e].call(s,i)}return n}class Xr extends In{static positioners=Dr;constructor(t){super();this.opacity=0;this._active=[];this._eventPosition=undefined;this._size=undefined;this._cachedAnimations=undefined;this._tooltipItems=[];this.$animations=undefined;this.$context=undefined;this.chart=t.chart;this.options=t.options;this.dataPoints=undefined;this.title=undefined;this.beforeBody=undefined;this.body=undefined;this.afterBody=undefined;this.footer=undefined;this.xAlign=undefined;this.yAlign=undefined;this.x=undefined;this.y=undefined;this.height=undefined;this.width=undefined;this.caretX=undefined;this.caretY=undefined;this.labelColors=undefined;this.labelPointStyles=undefined;this.labelTextColors=undefined}initialize(t){this.options=t;this._cachedAnimations=undefined;this.$context=undefined}_resolveAnimations(){const t=this._cachedAnimations;if(t){return t}const e=this.chart;const s=this.options.setContext(this.getContext());const i=s.enabled&&e.options.animation&&s.animations;const n=new qs(this.chart,i);if(i._cacheable){this._cachedAnimations=Object.freeze(n)}return n}getContext(){return this.$context||(this.$context=$r(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e;const i=Vr(s,"beforeTitle",this,t);const n=Vr(s,"title",this,t);const o=Vr(s,"afterTitle",this,t);let r=[];r=jr(r,Br(i));r=jr(r,Br(n));r=jr(r,Br(o));return r}getBeforeBody(t,e){return Hr(Vr(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e;const i=[];ht(t,(t=>{const e={before:[],lines:[],after:[]};const n=Gr(s,t);jr(e.before,Br(Vr(n,"beforeLabel",this,t)));jr(e.lines,Vr(n,"label",this,t));jr(e.after,Br(Vr(n,"afterLabel",this,t)));i.push(e)}));return i}getAfterBody(t,e){return Hr(Vr(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e;const i=Vr(s,"beforeFooter",this,t);const n=Vr(s,"footer",this,t);const o=Vr(s,"afterFooter",this,t);let r=[];r=jr(r,Br(i));r=jr(r,Br(n));r=jr(r,Br(o));return r}_createItems(t){const e=this._active;const s=this.chart.data;const i=[];const n=[];const o=[];let r=[];let c,a;for(c=0,a=e.length;c<a;++c){r.push(Cr(this.chart,e[c]))}if(t.filter){r=r.filter(((e,i,n)=>t.filter(e,i,n,s)))}if(t.itemSort){r=r.sort(((e,i)=>t.itemSort(e,i,s)))}ht(r,(e=>{const s=Gr(t.callbacks,e);i.push(Vr(s,"labelColor",this,e));n.push(Vr(s,"labelPointStyle",this,e));o.push(Vr(s,"labelTextColor",this,e))}));this.labelColors=i;this.labelPointStyles=n;this.labelTextColors=o;this.dataPoints=r;return r}update(t,e){const s=this.options.setContext(this.getContext());const i=this._active;let n;let o=[];if(!i.length){if(this.opacity!==0){n={opacity:0}}}else{const t=Dr[s.position].call(this,i,this._eventPosition);o=this._createItems(s);this.title=this.getTitle(o,s);this.beforeBody=this.getBeforeBody(o,s);this.body=this.getBody(o,s);this.afterBody=this.getAfterBody(o,s);this.footer=this.getFooter(o,s);const e=this._size=Er(this,s);const r=Object.assign({},t,e);const c=Tr(this.chart,s,r);const a=Nr(s,r,c,this.chart);this.xAlign=c.xAlign;this.yAlign=c.yAlign;n={opacity:1,x:a.x,y:a.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}this._tooltipItems=o;this.$context=undefined;if(n){this._resolveAnimations().update(this,n)}if(t&&s.external){s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}}drawCaret(t,e,s,i){const n=this.getCaretPosition(t,s,i);e.lineTo(n.x1,n.y1);e.lineTo(n.x2,n.y2);e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,s){const{xAlign:i,yAlign:n}=this;const{caretSize:o,cornerRadius:r}=s;const{topLeft:c,topRight:a,bottomLeft:h,bottomRight:f}=ts(r);const{x:l,y:u}=t;const{width:d,height:b}=e;let p,g,m,y,x,v;if(n==="center"){x=u+b/2;if(i==="left"){p=l;g=p-o;y=x+o;v=x-o}else{p=l+d;g=p+o;y=x-o;v=x+o}m=p}else{if(i==="left"){g=l+Math.max(c,h)+o}else if(i==="right"){g=l+d-Math.max(a,f)-o}else{g=this.caretX}if(n==="top"){y=u;x=y-o;p=g-o;m=g+o}else{y=u+b;x=y+o;p=g+o;m=g-o}v=y}return{x1:p,x2:g,x3:m,y1:y,y2:x,y3:v}}drawTitle(t,e,s){const i=this.title;const n=i.length;let o,r,c;if(n){const a=Gs(s.rtl,this.x,this.width);t.x=Wr(this,s.titleAlign,s);e.textAlign=a.textAlign(s.titleAlign);e.textBaseline="middle";o=ss(s.titleFont);r=s.titleSpacing;e.fillStyle=s.titleColor;e.font=o.string;for(c=0;c<n;++c){e.fillText(i[c],a.x(t.x),t.y+o.lineHeight/2);t.y+=o.lineHeight+r;if(c+1===n){t.y+=s.titleMarginBottom-r}}}}_drawColorBox(t,e,s,i,n){const o=this.labelColors[s];const r=this.labelPointStyles[s];const{boxHeight:c,boxWidth:a}=n;const h=ss(n.bodyFont);const f=Wr(this,"left",n);const l=i.x(f);const u=c<h.lineHeight?(h.lineHeight-c)/2:0;const d=e.y+u;if(n.usePointStyle){const e={radius:Math.min(a,c)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1};const s=i.leftForLtr(l,a)+a/2;const h=d+c/2;t.strokeStyle=n.multiKeyBackground;t.fillStyle=n.multiKeyBackground;Fe(t,e,s,h);t.strokeStyle=o.borderColor;t.fillStyle=o.backgroundColor;Fe(t,e,s,h)}else{t.lineWidth=st(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1;t.strokeStyle=o.borderColor;t.setLineDash(o.borderDash||[]);t.lineDashOffset=o.borderDashOffset||0;const e=i.leftForLtr(l,a);const s=i.leftForLtr(i.xPlus(l,1),a-2);const r=ts(o.borderRadius);if(Object.values(r).some((t=>t!==0))){t.beginPath();t.fillStyle=n.multiKeyBackground;Xe(t,{x:e,y:d,w:a,h:c,radius:r});t.fill();t.stroke();t.fillStyle=o.backgroundColor;t.beginPath();Xe(t,{x:s,y:d+1,w:a-2,h:c-2,radius:r});t.fill()}else{t.fillStyle=n.multiKeyBackground;t.fillRect(e,d,a,c);t.strokeRect(e,d,a,c);t.fillStyle=o.backgroundColor;t.fillRect(s,d+1,a-2,c-2)}}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:i}=this;const{bodySpacing:n,bodyAlign:o,displayColors:r,boxHeight:c,boxWidth:a,boxPadding:h}=s;const f=ss(s.bodyFont);let l=f.lineHeight;let u=0;const d=Gs(s.rtl,this.x,this.width);const b=function(s){e.fillText(s,d.x(t.x+u),t.y+l/2);t.y+=l+n};const p=d.textAlign(o);let g,m,y,x,v,M,k;e.textAlign=o;e.textBaseline="middle";e.font=f.string;t.x=Wr(this,p,s);e.fillStyle=s.bodyColor;ht(this.beforeBody,b);u=r&&p!=="right"?o==="center"?a/2+h:a+2+h:0;for(x=0,M=i.length;x<M;++x){g=i[x];m=this.labelTextColors[x];e.fillStyle=m;ht(g.before,b);y=g.lines;if(r&&y.length){this._drawColorBox(e,t,x,d,s);l=Math.max(f.lineHeight,c)}for(v=0,k=y.length;v<k;++v){b(y[v]);l=f.lineHeight}ht(g.after,b)}u=0;l=f.lineHeight;ht(this.afterBody,b);t.y-=n}drawFooter(t,e,s){const i=this.footer;const n=i.length;let o,r;if(n){const c=Gs(s.rtl,this.x,this.width);t.x=Wr(this,s.footerAlign,s);t.y+=s.footerMarginTop;e.textAlign=c.textAlign(s.footerAlign);e.textBaseline="middle";o=ss(s.footerFont);e.fillStyle=s.footerColor;e.font=o.string;for(r=0;r<n;++r){e.fillText(i[r],c.x(t.x),t.y+o.lineHeight/2);t.y+=o.lineHeight+s.footerSpacing}}}drawBackground(t,e,s,i){const{xAlign:n,yAlign:o}=this;const{x:r,y:c}=t;const{width:a,height:h}=s;const{topLeft:f,topRight:l,bottomLeft:u,bottomRight:d}=ts(i.cornerRadius);e.fillStyle=i.backgroundColor;e.strokeStyle=i.borderColor;e.lineWidth=i.borderWidth;e.beginPath();e.moveTo(r+f,c);if(o==="top"){this.drawCaret(t,e,s,i)}e.lineTo(r+a-l,c);e.quadraticCurveTo(r+a,c,r+a,c+l);if(o==="center"&&n==="right"){this.drawCaret(t,e,s,i)}e.lineTo(r+a,c+h-d);e.quadraticCurveTo(r+a,c+h,r+a-d,c+h);if(o==="bottom"){this.drawCaret(t,e,s,i)}e.lineTo(r+u,c+h);e.quadraticCurveTo(r,c+h,r,c+h-u);if(o==="center"&&n==="left"){this.drawCaret(t,e,s,i)}e.lineTo(r,c+f);e.quadraticCurveTo(r,c,r+f,c);e.closePath();e.fill();if(i.borderWidth>0){e.stroke()}}_updateAnimationTarget(t){const e=this.chart;const s=this.$animations;const i=s&&s.x;const n=s&&s.y;if(i||n){const s=Dr[t.position].call(this,this._active,this._eventPosition);if(!s){return}const o=this._size=Er(this,t);const r=Object.assign({},s,this._size);const c=Tr(e,t,r);const a=Nr(t,r,c,e);if(i._to!==a.x||n._to!==a.y){this.xAlign=c.xAlign;this.yAlign=c.yAlign;this.width=o.width;this.height=o.height;this.caretX=s.x;this.caretY=s.y;this._resolveAnimations().update(this,a)}}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s){return}this._updateAnimationTarget(e);const i={width:this.width,height:this.height};const n={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const o=es(e.padding);const r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;if(e.enabled&&r){t.save();t.globalAlpha=s;this.drawBackground(n,t,i,e);Ys(t,e.textDirection);n.y+=o.top;this.drawTitle(n,t,e);this.drawBody(n,t,e);this.drawFooter(n,t,e);Vs(t,e.textDirection);t.restore()}}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active;const i=t.map((({datasetIndex:t,index:e})=>{const s=this.chart.getDatasetMeta(t);if(!s){throw new Error("Cannot find a dataset at index "+t)}return{datasetIndex:t,element:s.data[e],index:e}}));const n=!ft(s,i);const o=this._positionChanged(i,e);if(n||o){this._active=i;this._eventPosition=e;this._ignoreReplayEvents=true;this.update(true)}}handleEvent(t,e,s=true){if(e&&this._ignoreReplayEvents){return false}this._ignoreReplayEvents=false;const i=this.options;const n=this._active||[];const o=this._getActiveElements(t,n,e,s);const r=this._positionChanged(o,t);const c=e||!ft(o,n)||r;if(c){this._active=o;if(i.enabled||i.external){this._eventPosition={x:t.x,y:t.y};this.update(true,e)}}return c}_getActiveElements(t,e,s,i){const n=this.options;if(t.type==="mouseout"){return[]}if(!i){return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)!==undefined))}const o=this.chart.getElementsAtEventForMode(t,n.mode,n,s);if(n.reverse){o.reverse()}return o}_positionChanged(t,e){const{caretX:s,caretY:i,options:n}=this;const o=Dr[n.position].call(this,t,e);return o!==false&&(s!==o.x||i!==o.y)}}var Ur={id:"tooltip",_element:Xr,positioners:Dr,afterInit(t,e,s){if(s){t.tooltip=new Xr({chart:t,options:s})}},beforeUpdate(t,e,s){if(t.tooltip){t.tooltip.initialize(s)}},reset(t,e,s){if(t.tooltip){t.tooltip.initialize(s)}},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const s={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...s,cancelable:true})===false){return}e.draw(t.ctx);t.notifyPlugins("afterTooltipDraw",s)}},afterEvent(t,e){if(t.tooltip){const s=e.replay;if(t.tooltip.handleEvent(e.event,s,e.inChartArea)){e.changed=true}}},defaults:{enabled:true,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,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:true,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:Yr},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:false,callbacks:{_scriptable:false,_indexable:false},animation:{_fallback:false},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Zr=(t,e,s,i)=>{if(typeof e==="string"){s=t.push(e)-1;i.unshift({index:s,label:e})}else if(isNaN(e)){s=null}return s};function Kr(t,e,s,i){const n=t.indexOf(e);if(n===-1){return Zr(t,e,s,i)}const o=t.lastIndexOf(e);return n!==o?s:n}const Qr=(t,e)=>t===null?null:Ut(Math.round(t),0,e);function qr(t){const e=this.getLabels();if(t>=0&&t<e.length){return e[t]}return t}class Jr extends so{static id="category";static defaults={ticks:{callback:qr}};constructor(t){super(t);this._startValue=undefined;this._valueRange=0;this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:s,label:i}of e){if(t[s]===i){t.splice(s,1)}}this._addedLabels=[]}super.init(t)}parse(t,e){if(tt(t)){return null}const s=this.getLabels();e=isFinite(e)&&s[e]===t?e:Kr(s,t,ot(e,t),this._addedLabels);return Qr(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(true);if(this.options.bounds==="ticks"){if(!t){s=0}if(!e){i=this.getLabels().length-1}}this.min=s;this.max=i}buildTicks(){const t=this.min;const e=this.max;const s=this.options.offset;const i=[];let n=this.getLabels();n=t===0&&e===n.length-1?n:n.slice(t,e+1);this._valueRange=Math.max(n.length-(s?0:1),1);this._startValue=this.min-(s?.5:0);for(let s=t;s<=e;s++){i.push({value:s})}return i}getLabelForValue(t){return qr.call(this,t)}configure(){super.configure();if(!this.isHorizontal()){this._reversePixels=!this._reversePixels}}getPixelForValue(t){if(typeof t!=="number"){t=this.parse(t)}return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;if(t<0||t>e.length-1){return null}return this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function tc(t,e){const s=[];const i=1e-14;const{bounds:n,step:o,min:r,max:c,precision:a,count:h,maxTicks:f,maxDigits:l,includeBounds:u}=t;const d=o||1;const b=f-1;const{min:p,max:g}=e;const m=!tt(r);const y=!tt(c);const x=!tt(h);const v=(g-p)/(l+1);let M=It((g-p)/b/d)*d;let k,w,_,A;if(M<i&&!m&&!y){return[{value:p},{value:g}]}A=Math.ceil(g/M)-Math.floor(p/M);if(A>b){M=It(A*M/b/d)*d}if(!tt(a)){k=Math.pow(10,a);M=Math.ceil(M*k)/k}if(n==="ticks"){w=Math.floor(p/M)*M;_=Math.ceil(g/M)*M}else{w=p;_=g}if(m&&y&&o&&zt((c-r)/o,M/1e3)){A=Math.round(Math.min((c-r)/M,f));M=(c-r)/A;w=r;_=c}else if(x){w=m?r:w;_=y?c:_;A=h-1;M=(_-w)/A}else{A=(_-w)/M;if(Pt(A,Math.round(A),M/1e3)){A=Math.round(A)}else{A=Math.ceil(A)}}const O=Math.max($t(M),$t(w));k=Math.pow(10,tt(a)?O:a);w=Math.round(w*k)/k;_=Math.round(_*k)/k;let S=0;if(m){if(u&&w!==r){s.push({value:r});if(w<r){S++}if(Pt(Math.round((w+S*M)*k)/k,r,ec(r,v,t))){S++}}else if(w<r){S++}}for(;S<A;++S){const t=Math.round((w+S*M)*k)/k;if(y&&t>c){break}s.push({value:t})}if(y&&u&&_!==c){if(s.length&&Pt(s[s.length-1].value,c,ec(c,v,t))){s[s.length-1].value=c}else{s.push({value:c})}}else if(!y||_===c){s.push({value:_})}return s}function ec(t,e,{horizontal:s,minRotation:i}){const n=Wt(i);const o=(s?Math.sin(n):Math.cos(n))||.001;const r=.75*e*(""+t).length;return Math.min(e/o,r)}class sc extends so{constructor(t){super(t);this.start=undefined;this.end=undefined;this._startValue=undefined;this._endValue=undefined;this._valueRange=0}parse(t,e){if(tt(t)){return null}if((typeof t==="number"||t instanceof Number)&&!isFinite(+t)){return null}return+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options;const{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:i,max:n}=this;const o=t=>i=e?i:t;const r=t=>n=s?n:t;if(t){const t=Lt(i);const e=Lt(n);if(t<0&&e<0){r(0)}else if(t>0&&e>0){o(0)}}if(i===n){let e=n===0?1:Math.abs(n*.05);r(n+e);if(!t){o(i-e)}}this.min=i;this.max=n}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t;let i;if(s){i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1;if(i>1e3){console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${i} ticks. Limiting to 1000.`);i=1e3}}else{i=this.computeTickLimit();e=e||11}if(e){i=Math.min(e,i)}return i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options;const e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==false};const n=this._range||this;const o=tc(i,n);if(t.bounds==="ticks"){Nt(o,this,"value")}if(t.reverse){o.reverse();this.start=this.max;this.end=this.min}else{this.start=this.min;this.end=this.max}return o}configure(){const t=this.ticks;let e=this.min;let s=this.max;super.configure();if(this.options.offset&&t.length){const i=(s-e)/Math.max(t.length-1,1)/2;e-=i;s+=i}this._startValue=e;this._endValue=s;this._valueRange=s-e}getLabelForValue(t){return we(t,this.chart.options.locale,this.options.ticks.format)}}class ic extends sc{static id="linear";static defaults={ticks:{callback:Oe.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(true);this.min=it(t)?t:0;this.max=it(e)?e:1;this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal();const e=t?this.width:this.height;const s=Wt(this.options.ticks.minRotation);const i=(t?Math.sin(s):Math.cos(s))||.001;const n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const nc=(t,e,s)=>({type:"bar",options:{plugins:{legend:{display:false},title:{display:true,text:["Trailing 30 Days","Gross Payments",n(t)],position:"top",align:"start"},tooltip:{displayColors:false,intersect:false,callbacks:{label:t=>{let i=t.dataIndex;let r=o(e[i].date,s);let c=n(e[i].value);return[r,c]}}}},scales:{x:{grid:{drawOnChartArea:false,drawTicks:false},ticks:{callback:t=>{if(t===0||t===e.length-1){return o(e[t].date,s)}}}},y:{display:false}}},data:{labels:e.map((()=>"")),datasets:[{label:"Gross Volume by Date",data:e.map((t=>t.value))}]}});const oc=':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-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-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}';const rc=class{constructor(e){t(this,e);this.accountId=undefined;this.authToken=undefined;this.data=undefined;this.total=undefined;this.dates=undefined;this.endDate=undefined;this.loading=true;this.errorMessage=""}updateOnPropChange(){this.fetchData()}connectedCallback(){this.fetchData()}componentDidRender(){this.renderChart()}async fetchData(){if(!this.accountId||!this.authToken){this.errorMessage="Can not fetch any data without an AccountID and an AuthToken";this.loading=false;return}this.loading=true;const t=i(this.authToken,process.env.PRIVATE_API_ORIGIN);const e=`account/${this.accountId}/reports/gross_volume`;const s=await t.get(e);if(!s.error){this.total=s===null||s===void 0?void 0:s.data.total;this.dates=s===null||s===void 0?void 0:s.data.dates.reverse();this.endDate=this.dates[this.dates.length-1].date}this.loading=false}renderChart(){if(this.chart){this.chart.update()}else if(this.chartRef&&this.endDate){Uo.register(gr,Ii,or,Jr,ic,Ar,Ur,Rr);this.chart=new Uo(this.chartRef.getContext("2d"),nc(this.total,this.dates,this.endDate));this.chart.render()}}render(){return e(s,null,this.errorMessage?r(this.errorMessage):e("canvas",{id:"chart",ref:t=>this.chartRef=t}))}static get watchers(){return{accountId:["updateOnPropChange"],authToken:["updateOnPropChange"]}}};rc.style=oc;export{rc as justifi_gross_payment_chart};
20
+ //# sourceMappingURL=p-222d357c.entry.js.map