@camera.ui/server 0.0.49 → 0.0.50-internal.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (873) hide show
  1. package/.prettierignore +12 -0
  2. package/.prettierrc.json +12 -0
  3. package/artillery.yaml +29 -0
  4. package/bin/cameraui-server.ts +11 -0
  5. package/dist/interface/assets/@xterm.DYP7pi_n.0.0.50-internal.0.css +32 -0
  6. package/dist/interface/assets/Adminpanel.BKek2EMH.0.0.50-internal.0.css +1 -0
  7. package/dist/interface/assets/Cameras.BDWZJqPN.0.0.50-internal.0.css +1 -0
  8. package/dist/interface/assets/Camview.BFUFMoNX.0.0.50-internal.0.css +1 -0
  9. package/dist/interface/assets/CuiConsole.DCYyxdVg.0.0.50-internal.0.css +1 -0
  10. package/dist/interface/assets/CuiPluginCard.yF8V0SZY.0.0.50-internal.0.css +1 -0
  11. package/dist/interface/assets/CuiTimeline.BkIwlYtw.0.0.50-internal.0.css +1 -0
  12. package/dist/interface/assets/Plugin.DJElsAn5.0.0.50-internal.0.css +1 -0
  13. package/dist/interface/assets/Plugins.0h77qnmN.0.0.50-internal.0.css +1 -0
  14. package/dist/interface/assets/Settings.CkgfRkQr.0.0.50-internal.0.css +1 -0
  15. package/dist/interface/assets/SettingsAccount.DeFul3eQ.0.0.50-internal.0.css +1 -0
  16. package/dist/interface/assets/main.Cip9LkS3.0.0.50-internal.0.css +1 -0
  17. package/dist/interface/assets/worker-base.jEXLGV2h.0.0.50-internal.0.js +1332 -0
  18. package/dist/interface/assets/worker-json.DgwNIOck.0.0.50-internal.0.js +1626 -0
  19. package/dist/interface/assets/worker-yaml.B3uUYINB.0.0.50-internal.0.js +5819 -0
  20. package/dist/interface/fonts/InterVariable.woff2 +0 -0
  21. package/dist/interface/index.html +48 -38
  22. package/dist/interface/js/@intlify.BkGPX90O.0.0.50-internal.0.js +15 -0
  23. package/dist/interface/js/@kurkle.D8fDXNIl.0.0.50-internal.0.js +6 -0
  24. package/dist/interface/js/@primeuix.BFAY2Bk9.0.0.50-internal.0.js +5722 -0
  25. package/dist/interface/js/@primevue.OhxoO3MD.0.0.50-internal.0.js +57 -0
  26. package/dist/interface/js/@tanstack.D1IL6eOv.0.0.50-internal.0.js +1 -0
  27. package/dist/interface/{@vee-validate.DHkwupr6.0.0.49.js → js/@vee-validate.BGPyWWTh.0.0.50-internal.0.js} +2 -2
  28. package/dist/interface/js/@vue.B5vqhCp2.0.0.50-internal.0.js +17 -0
  29. package/dist/interface/js/@vueuse.BsKtqdiG.0.0.50-internal.0.js +1 -0
  30. package/dist/interface/{@xterm.D6R4zI7m.0.0.49.js → js/@xterm.CAa7rpjv.0.0.50-internal.0.js} +8 -8
  31. package/dist/interface/js/Adminpanel.D93Kvbwp.0.0.50-internal.0.js +1 -0
  32. package/dist/interface/js/Camera.DF2l3OMA.0.0.50-internal.0.js +1 -0
  33. package/dist/interface/js/Cameras.YzvZccdv.0.0.50-internal.0.js +482 -0
  34. package/dist/interface/js/Cammesh.D-6dAROQ.0.0.50-internal.0.js +1 -0
  35. package/dist/interface/js/Camview.CB7_HnoQ.0.0.50-internal.0.js +1 -0
  36. package/dist/interface/js/Config.BwflsWTm.0.0.50-internal.0.js +2 -0
  37. package/dist/interface/js/Console.DZM8pN8Q.0.0.50-internal.0.js +4 -0
  38. package/dist/interface/js/CuiConsole.BXXU7Gth.0.0.50-internal.0.js +1 -0
  39. package/dist/interface/js/CuiPluginCard.YFOrpbVD.0.0.50-internal.0.js +4 -0
  40. package/dist/interface/js/CuiTimeline.VV5KSJd5.0.0.50-internal.0.js +1 -0
  41. package/dist/interface/js/FirstSteps.b-nvymgb.0.0.50-internal.0.js +1 -0
  42. package/dist/interface/js/Plugin.BOMpVEwM.0.0.50-internal.0.js +1 -0
  43. package/dist/interface/js/Plugins.DdPwaUDA.0.0.50-internal.0.js +1 -0
  44. package/dist/interface/js/Recordings.DhxjIW7e.0.0.50-internal.0.js +1 -0
  45. package/dist/interface/js/Settings.D24ttaPu.0.0.50-internal.0.js +1 -0
  46. package/dist/interface/js/SettingsAccount.ms3aqz4E.0.0.50-internal.0.js +1 -0
  47. package/dist/interface/js/SettingsAppearance.DsTjKXk1.0.0.50-internal.0.js +1 -0
  48. package/dist/interface/js/SettingsAppearance.vue_vue_type_script_setup_true_lang.CBQ6lL3T.0.0.50-internal.0.js +1 -0
  49. package/dist/interface/js/SettingsBackup.BPEc4Rjg.0.0.50-internal.0.js +1 -0
  50. package/dist/interface/js/SettingsRecordings.DgW7M0jj.0.0.50-internal.0.js +1 -0
  51. package/dist/interface/js/SettingsRemote.BL5nXbUT.0.0.50-internal.0.js +1 -0
  52. package/dist/interface/js/SettingsSystem.D7T0AIpm.0.0.50-internal.0.js +1 -0
  53. package/dist/interface/js/SettingsUsers.1u0vCOVG.0.0.50-internal.0.js +1 -0
  54. package/dist/interface/js/VersionsHandler.vue_vue_type_script_setup_true_lang.xDishkkS.0.0.50-internal.0.js +4 -0
  55. package/dist/interface/js/ace-builds.D1nmvCwb.0.0.50-internal.0.js +1090 -0
  56. package/dist/interface/js/ace.config.G96T2z54.0.0.50-internal.0.js +1 -0
  57. package/dist/interface/js/axios.DHr9lByg.0.0.50-internal.0.js +6 -0
  58. package/dist/interface/js/backup.B_Gzxtp_.0.0.50-internal.0.js +1 -0
  59. package/dist/interface/js/chart.js.CP_nMnnf.0.0.50-internal.0.js +13 -0
  60. package/dist/interface/js/close-circle.DYLuVIOg.0.0.50-internal.0.js +1 -0
  61. package/dist/interface/js/dnd-core.T9OeW7mu.0.0.50-internal.0.js +1 -0
  62. package/dist/interface/{draggabilly.C0hZWkL0.0.0.49.js → js/draggabilly.D3zGcBb3.0.0.50-internal.0.js} +1 -1
  63. package/dist/interface/js/engine.io-client.kITRnq-g.0.0.50-internal.0.js +1 -0
  64. package/dist/interface/js/fast-deep-equal.Bpc9mIsj.0.0.50-internal.0.js +1 -0
  65. package/dist/interface/js/highlight.js.BlSXU-Wb.0.0.50-internal.0.js +3 -0
  66. package/dist/interface/js/linkify-it.C3N1lWsJ.0.0.50-internal.0.js +1 -0
  67. package/dist/interface/js/main.D0YR3Jat.0.0.50-internal.0.js +31 -0
  68. package/dist/interface/{markdown-it.64FJJcTG.0.0.49.js → js/markdown-it.Dj0dt5s2.0.0.50-internal.0.js} +1 -1
  69. package/dist/interface/{nprogress.DkWvUoHh.0.0.49.js → js/nprogress.BwQWDcGj.0.0.50-internal.0.js} +1 -1
  70. package/dist/interface/js/perfect-debounce.l0sNRNKZ.0.0.50-internal.0.js +1 -0
  71. package/dist/interface/js/pinia.DRh7plEC.0.0.50-internal.0.js +5 -0
  72. package/dist/interface/js/primelocale.Bga3dOQu.0.0.50-internal.0.js +1 -0
  73. package/dist/interface/js/primevue.Cl58krXf.0.0.50-internal.0.js +142 -0
  74. package/dist/interface/{qrcode.BixA_YE2.0.0.49.js → js/qrcode.C1sDj6P8.0.0.50-internal.0.js} +1 -1
  75. package/dist/interface/js/react-dnd-touch-backend.BA4WhUJo.0.0.50-internal.0.js +1 -0
  76. package/dist/interface/js/refresh-rounded.D_SmhhUf.0.0.50-internal.0.js +1 -0
  77. package/dist/interface/js/rxjs.C-fTBwEO.0.0.50-internal.0.js +3 -0
  78. package/dist/interface/js/socket.io-client.DKrRxgjP.0.0.50-internal.0.js +1 -0
  79. package/dist/interface/js/socket.io-parser.EXj3YDH2.0.0.50-internal.0.js +1 -0
  80. package/dist/interface/js/system.CY8rGd-Q.0.0.50-internal.0.js +1 -0
  81. package/dist/interface/js/trash-fill.CMnCN3Oy.0.0.50-internal.0.js +1 -0
  82. package/dist/interface/{unidragger.C8ueS-PW.0.0.49.js → js/unidragger.D0w6Tqtt.0.0.50-internal.0.js} +1 -1
  83. package/dist/interface/js/uuid.C6aID195.0.0.50-internal.0.js +1 -0
  84. package/dist/interface/js/vee-validate.BeiObIH8.0.0.50-internal.0.js +5 -0
  85. package/dist/interface/js/vue-chartjs.DtdZdiYw.0.0.50-internal.0.js +1 -0
  86. package/dist/interface/js/vue-i18n.BW2bx_6z.0.0.50-internal.0.js +5 -0
  87. package/dist/interface/js/vue-inline-svg.BJkQGmKz.0.0.50-internal.0.js +1 -0
  88. package/dist/interface/js/vue-router.B2mOXHaC.0.0.50-internal.0.js +5 -0
  89. package/dist/interface/js/vue-zoomable.BKDyCJE7.0.0.50-internal.0.js +1 -0
  90. package/dist/interface/js/vue.l0sNRNKZ.0.0.50-internal.0.js +1 -0
  91. package/dist/interface/js/vue3-dnd.DRK24CBp.0.0.50-internal.0.js +1 -0
  92. package/dist/interface/js/zod.SKKegNRO.0.0.50-internal.0.js +1 -0
  93. package/dist/interface/js/zoom-out.DxvzgVEo.0.0.50-internal.0.js +1 -0
  94. package/dist/interface/manifest.webmanifest +1 -1
  95. package/dist/interface/pwa/favicon-32.ico +0 -0
  96. package/dist/interface/pwa/favicon-48.ico +0 -0
  97. package/dist/interface/sw.js +1 -1
  98. package/dist/server/package.json +57 -45
  99. package/dist/server/requirements.txt +12 -11
  100. package/dist/server/src/__init__.py +0 -0
  101. package/dist/server/src/_camera_ui_tools/__init__.py +0 -0
  102. package/dist/server/src/_camera_ui_tools/camera_ui_common/__init__.py +28 -0
  103. package/dist/server/src/_camera_ui_tools/camera_ui_common/camera_utils/utils.py +52 -0
  104. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/__init__.py +0 -0
  105. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/object_path.py +198 -0
  106. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/reactive.py +42 -0
  107. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/signal_handler.py +92 -0
  108. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/subscribed.py +21 -0
  109. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/task.py +39 -0
  110. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/thread.py +10 -0
  111. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/utils.py +91 -0
  112. package/dist/server/src/_camera_ui_tools/camera_ui_common/logger_service/__init__.py +0 -0
  113. package/dist/server/src/_camera_ui_tools/camera_ui_common/logger_service/ansicolor.py +62 -0
  114. package/dist/server/src/_camera_ui_tools/camera_ui_common/logger_service/logger.py +178 -0
  115. package/dist/server/src/_camera_ui_tools/camera_ui_common/logger_service/test.py +116 -0
  116. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/__init__.py +350 -0
  117. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/__init__.py +0 -0
  118. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/base.py +237 -0
  119. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/client.py +256 -0
  120. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/connection.py +784 -0
  121. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/errors.py +745 -0
  122. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/messaging.py +57 -0
  123. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/rpc.py +227 -0
  124. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/rpc_generator.py +584 -0
  125. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/constants.py +96 -0
  126. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/typings.py +218 -0
  127. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/__init__.py +0 -0
  128. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/connection_state.py +86 -0
  129. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/logger.py +30 -0
  130. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/metrics.py +152 -0
  131. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/packer.py +20 -0
  132. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/routing.py +75 -0
  133. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/rpc.py +177 -0
  134. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/subscriptions.py +24 -0
  135. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/tasks.py +39 -0
  136. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/uid.py +37 -0
  137. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/validate.py +119 -0
  138. package/dist/server/src/_camera_ui_tools/camera_ui_types/__init__.py +1360 -0
  139. package/dist/server/src/_camera_ui_tools/camera_ui_types/hybrid_observer.py +338 -0
  140. package/dist/server/src/_camera_ui_tools/camera_ui_types/test.py +196 -0
  141. package/dist/server/src/api/controllers/auth.controller.d.ts +2 -2
  142. package/dist/server/src/api/controllers/auth.controller.js +49 -43
  143. package/dist/server/src/api/controllers/auth.controller.js.map +1 -1
  144. package/dist/server/src/api/controllers/backup.controller.js +1 -2
  145. package/dist/server/src/api/controllers/backup.controller.js.map +1 -1
  146. package/dist/server/src/api/controllers/cameras.controller.d.ts +13 -11
  147. package/dist/server/src/api/controllers/cameras.controller.js +314 -105
  148. package/dist/server/src/api/controllers/cameras.controller.js.map +1 -1
  149. package/dist/server/src/api/controllers/plugins.controller.d.ts +8 -8
  150. package/dist/server/src/api/controllers/plugins.controller.js +208 -244
  151. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  152. package/dist/server/src/api/controllers/system.controller.d.ts +1 -0
  153. package/dist/server/src/api/controllers/system.controller.js +22 -8
  154. package/dist/server/src/api/controllers/system.controller.js.map +1 -1
  155. package/dist/server/src/api/controllers/users.controller.d.ts +2 -2
  156. package/dist/server/src/api/controllers/users.controller.js +13 -25
  157. package/dist/server/src/api/controllers/users.controller.js.map +1 -1
  158. package/dist/server/src/api/database/checks.js +2 -2
  159. package/dist/server/src/api/database/checks.js.map +1 -1
  160. package/dist/server/src/api/database/index.d.ts +4 -7
  161. package/dist/server/src/api/database/index.js +59 -86
  162. package/dist/server/src/api/database/index.js.map +1 -1
  163. package/dist/server/src/api/database/migration.js +5 -141
  164. package/dist/server/src/api/database/migration.js.map +1 -1
  165. package/dist/server/src/api/database/selfcheck.js +5 -5
  166. package/dist/server/src/api/database/selfcheck.js.map +1 -1
  167. package/dist/server/src/api/database/types.d.ts +17 -25
  168. package/dist/server/src/api/go2rtc/api/discover.d.ts +30 -0
  169. package/dist/server/src/api/go2rtc/api/discover.js +162 -0
  170. package/dist/server/src/api/go2rtc/api/discover.js.map +1 -0
  171. package/dist/server/src/api/go2rtc/api/index.d.ts +1 -1
  172. package/dist/server/src/api/go2rtc/api/index.js +15 -4
  173. package/dist/server/src/api/go2rtc/api/index.js.map +1 -1
  174. package/dist/server/src/api/go2rtc/api/streams.d.ts +3 -1
  175. package/dist/server/src/api/go2rtc/api/streams.js +66 -9
  176. package/dist/server/src/api/go2rtc/api/streams.js.map +1 -1
  177. package/dist/server/src/api/go2rtc/index.d.ts +2 -0
  178. package/dist/server/src/api/go2rtc/index.js +3 -0
  179. package/dist/server/src/api/go2rtc/index.js.map +1 -1
  180. package/dist/server/src/api/go2rtc/queue.js +3 -3
  181. package/dist/server/src/api/go2rtc/queue.js.map +1 -1
  182. package/dist/server/src/api/go2rtc/types.d.ts +66 -11
  183. package/dist/server/src/api/index.d.ts +4 -0
  184. package/dist/server/src/api/index.js +45 -9
  185. package/dist/server/src/api/index.js.map +1 -1
  186. package/dist/server/src/api/middlewares/authPermission.middleware.d.ts +1 -0
  187. package/dist/server/src/api/middlewares/authPermission.middleware.js +11 -2
  188. package/dist/server/src/api/middlewares/authPermission.middleware.js.map +1 -1
  189. package/dist/server/src/api/middlewares/authValidation.middleware.js +20 -12
  190. package/dist/server/src/api/middlewares/authValidation.middleware.js.map +1 -1
  191. package/dist/server/src/api/middlewares/pagination.middleware.js +45 -53
  192. package/dist/server/src/api/middlewares/pagination.middleware.js.map +1 -1
  193. package/dist/server/src/api/plugins/proxy.plugin.d.ts +14 -0
  194. package/dist/server/src/api/plugins/proxy.plugin.js +200 -0
  195. package/dist/server/src/api/plugins/proxy.plugin.js.map +1 -0
  196. package/dist/server/src/api/routes/cameras.routes.js +56 -30
  197. package/dist/server/src/api/routes/cameras.routes.js.map +1 -1
  198. package/dist/server/src/api/routes/plugins.routes.js +65 -63
  199. package/dist/server/src/api/routes/plugins.routes.js.map +1 -1
  200. package/dist/server/src/api/routes/system.routes.js +7 -1
  201. package/dist/server/src/api/routes/system.routes.js.map +1 -1
  202. package/dist/server/src/api/routes/users.routes.js +8 -8
  203. package/dist/server/src/api/routes/users.routes.js.map +1 -1
  204. package/dist/server/src/api/schemas/backup.schema.d.ts +3 -3
  205. package/dist/server/src/api/schemas/backup.schema.js +1 -1
  206. package/dist/server/src/api/schemas/backup.schema.js.map +1 -1
  207. package/dist/server/src/api/schemas/cameras.schema.d.ts +1413 -529
  208. package/dist/server/src/api/schemas/cameras.schema.js +228 -182
  209. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  210. package/dist/server/src/api/schemas/config.schema.d.ts +29 -41
  211. package/dist/server/src/api/schemas/config.schema.js +10 -21
  212. package/dist/server/src/api/schemas/config.schema.js.map +1 -1
  213. package/dist/server/src/api/schemas/go2rtc.schema.d.ts +194 -162
  214. package/dist/server/src/api/schemas/go2rtc.schema.js +33 -58
  215. package/dist/server/src/api/schemas/go2rtc.schema.js.map +1 -1
  216. package/dist/server/src/api/schemas/plugins.schema.d.ts +17 -17
  217. package/dist/server/src/api/schemas/plugins.schema.js +1 -1
  218. package/dist/server/src/api/schemas/plugins.schema.js.map +1 -1
  219. package/dist/server/src/api/schemas/storage.schema.d.ts +22 -0
  220. package/dist/server/src/api/schemas/storage.schema.js +5 -0
  221. package/dist/server/src/api/schemas/storage.schema.js.map +1 -0
  222. package/dist/server/src/api/schemas/system.schema.d.ts +171 -3
  223. package/dist/server/src/api/schemas/system.schema.js +30 -3
  224. package/dist/server/src/api/schemas/system.schema.js.map +1 -1
  225. package/dist/server/src/api/schemas/users.schema.d.ts +98 -254
  226. package/dist/server/src/api/schemas/users.schema.js +6 -6
  227. package/dist/server/src/api/schemas/users.schema.js.map +1 -1
  228. package/dist/server/src/api/services/auth.service.d.ts +5 -5
  229. package/dist/server/src/api/services/auth.service.js +26 -35
  230. package/dist/server/src/api/services/auth.service.js.map +1 -1
  231. package/dist/server/src/api/services/cameras.service.d.ts +11 -16
  232. package/dist/server/src/api/services/cameras.service.js +143 -310
  233. package/dist/server/src/api/services/cameras.service.js.map +1 -1
  234. package/dist/server/src/api/services/plugins.service.d.ts +3 -1
  235. package/dist/server/src/api/services/plugins.service.js +48 -50
  236. package/dist/server/src/api/services/plugins.service.js.map +1 -1
  237. package/dist/server/src/api/services/users.service.d.ts +1 -0
  238. package/dist/server/src/api/services/users.service.js +20 -14
  239. package/dist/server/src/api/services/users.service.js.map +1 -1
  240. package/dist/server/src/api/types/index.d.ts +57 -46
  241. package/dist/server/src/api/types/index.js +0 -4
  242. package/dist/server/src/api/types/index.js.map +1 -1
  243. package/dist/server/src/api/utils/cert.d.ts +5 -1
  244. package/dist/server/src/api/utils/cert.js +24 -26
  245. package/dist/server/src/api/utils/cert.js.map +1 -1
  246. package/dist/server/src/api/utils/constants.d.ts +4 -2
  247. package/dist/server/src/api/utils/constants.js +4 -2
  248. package/dist/server/src/api/utils/constants.js.map +1 -1
  249. package/dist/server/src/api/utils/fetch.d.ts +1 -1
  250. package/dist/server/src/api/utils/fetch.js +2 -2
  251. package/dist/server/src/api/utils/fetch.js.map +1 -1
  252. package/dist/server/src/api/websocket/index.d.ts +1 -0
  253. package/dist/server/src/api/websocket/index.js +14 -9
  254. package/dist/server/src/api/websocket/index.js.map +1 -1
  255. package/dist/server/src/api/websocket/nsp/logs.d.ts +10 -2
  256. package/dist/server/src/api/websocket/nsp/logs.js +75 -27
  257. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  258. package/dist/server/src/api/websocket/nsp/metrics.d.ts +20 -12
  259. package/dist/server/src/api/websocket/nsp/metrics.js +188 -117
  260. package/dist/server/src/api/websocket/nsp/metrics.js.map +1 -1
  261. package/dist/server/src/api/websocket/nsp/plugins.d.ts +1 -1
  262. package/dist/server/src/api/websocket/nsp/plugins.js +3 -5
  263. package/dist/server/src/api/websocket/nsp/plugins.js.map +1 -1
  264. package/dist/server/src/api/websocket/nsp/server.js +6 -0
  265. package/dist/server/src/api/websocket/nsp/server.js.map +1 -1
  266. package/dist/server/src/api/websocket/types.d.ts +4 -2
  267. package/dist/server/src/api.d.ts +3 -4
  268. package/dist/server/src/api.js +13 -13
  269. package/dist/server/src/api.js.map +1 -1
  270. package/dist/server/src/camera/classes.d.ts +2 -0
  271. package/dist/server/src/camera/classes.js +24 -0
  272. package/dist/server/src/camera/classes.js.map +1 -0
  273. package/dist/server/src/camera/controller.d.ts +30 -18
  274. package/dist/server/src/camera/controller.js +236 -202
  275. package/dist/server/src/camera/controller.js.map +1 -1
  276. package/dist/server/src/camera/device.d.ts +34 -0
  277. package/dist/server/src/camera/device.js +327 -0
  278. package/dist/server/src/camera/device.js.map +1 -0
  279. package/dist/server/src/camera/frameWorker.d.ts +32 -31
  280. package/dist/server/src/camera/frameWorker.js +257 -247
  281. package/dist/server/src/camera/frameWorker.js.map +1 -1
  282. package/dist/server/src/camera/index.d.ts +92 -0
  283. package/dist/server/src/camera/index.js +531 -0
  284. package/dist/server/src/camera/index.js.map +1 -0
  285. package/dist/server/src/camera/interfaces.d.ts +17 -0
  286. package/dist/server/src/camera/interfaces.js +99 -0
  287. package/dist/server/src/camera/interfaces.js.map +1 -0
  288. package/dist/server/src/camera/iou.d.ts +2 -0
  289. package/dist/server/src/camera/iou.js +123 -0
  290. package/dist/server/src/camera/iou.js.map +1 -0
  291. package/dist/server/src/camera/polygon.d.ts +4 -0
  292. package/dist/server/src/camera/polygon.js +192 -0
  293. package/dist/server/src/camera/polygon.js.map +1 -0
  294. package/dist/server/src/camera/python/__init__.py +0 -0
  295. package/dist/server/src/camera/python/classes.py +41 -0
  296. package/dist/server/src/camera/python/interfaces.py +130 -0
  297. package/dist/server/src/camera/python/iou.py +158 -0
  298. package/dist/server/src/camera/python/polygon.py +230 -0
  299. package/dist/server/src/camera/python/typings.py +50 -0
  300. package/dist/server/src/camera/python/video_frame.py +143 -0
  301. package/dist/server/src/camera/session.d.ts +37 -0
  302. package/dist/server/src/camera/session.js +160 -0
  303. package/dist/server/src/camera/session.js.map +1 -0
  304. package/dist/server/src/camera/streaming/fmp4-session.d.ts +17 -0
  305. package/dist/server/src/camera/streaming/fmp4-session.js +308 -0
  306. package/dist/server/src/camera/streaming/fmp4-session.js.map +1 -0
  307. package/dist/server/src/camera/streaming/peer-connection.d.ts +26 -0
  308. package/dist/server/src/camera/streaming/peer-connection.js +213 -0
  309. package/dist/server/src/camera/streaming/peer-connection.js.map +1 -0
  310. package/dist/server/src/camera/streaming/rtsp-session.d.ts +19 -0
  311. package/dist/server/src/camera/streaming/rtsp-session.js +253 -0
  312. package/dist/server/src/camera/streaming/rtsp-session.js.map +1 -0
  313. package/dist/server/src/camera/streaming/webrtc-connection.d.ts +44 -0
  314. package/dist/server/src/camera/streaming/webrtc-connection.js +177 -0
  315. package/dist/server/src/camera/streaming/webrtc-connection.js.map +1 -0
  316. package/dist/server/src/camera/streaming/werift-session.d.ts +19 -0
  317. package/dist/server/src/camera/streaming/werift-session.js +246 -0
  318. package/dist/server/src/camera/streaming/werift-session.js.map +1 -0
  319. package/dist/server/src/camera/types.d.ts +16 -10
  320. package/dist/server/src/camera/utils.d.ts +9 -0
  321. package/dist/server/src/camera/utils.js +416 -0
  322. package/dist/server/src/camera/utils.js.map +1 -0
  323. package/dist/server/src/camera/videoFrame.d.ts +18 -0
  324. package/dist/server/src/camera/videoFrame.js +88 -0
  325. package/dist/server/src/camera/videoFrame.js.map +1 -0
  326. package/dist/server/src/cloud/index.d.ts +12 -0
  327. package/dist/server/src/cloud/index.js +49 -0
  328. package/dist/server/src/cloud/index.js.map +1 -0
  329. package/dist/server/src/cloud/remote/cloudflare.d.ts +7 -0
  330. package/dist/server/src/cloud/remote/cloudflare.js +12 -0
  331. package/dist/server/src/cloud/remote/cloudflare.js.map +1 -0
  332. package/dist/server/src/cloud/remote/upnp.d.ts +7 -0
  333. package/dist/server/src/cloud/remote/upnp.js +12 -0
  334. package/dist/server/src/cloud/remote/upnp.js.map +1 -0
  335. package/dist/server/src/cloud/remote/utils.d.ts +3 -0
  336. package/dist/server/src/cloud/remote/utils.js +20 -0
  337. package/dist/server/src/cloud/remote/utils.js.map +1 -0
  338. package/dist/server/src/cloud/types.d.ts +15 -0
  339. package/dist/server/src/cloud/types.js +11 -0
  340. package/dist/server/src/cloud/types.js.map +1 -0
  341. package/dist/server/src/decoder/child.d.ts +1 -0
  342. package/dist/server/src/decoder/child.js +749 -0
  343. package/dist/server/src/decoder/child.js.map +1 -0
  344. package/dist/server/src/decoder/imageUtils.d.ts +22 -0
  345. package/dist/server/src/decoder/imageUtils.js +196 -0
  346. package/dist/server/src/decoder/imageUtils.js.map +1 -0
  347. package/dist/server/src/decoder/manager.d.ts +19 -0
  348. package/dist/server/src/decoder/manager.js +208 -0
  349. package/dist/server/src/decoder/manager.js.map +1 -0
  350. package/dist/server/src/decoder/python/__init__.py +0 -0
  351. package/dist/server/src/decoder/python/child.py +903 -0
  352. package/dist/server/src/decoder/python/image_utils.py +196 -0
  353. package/dist/server/src/decoder/python/pool.py +45 -0
  354. package/dist/server/src/decoder/python/typings.py +57 -0
  355. package/dist/server/src/decoder/python/utils.py +70 -0
  356. package/dist/server/src/decoder/types.d.ts +23 -0
  357. package/dist/server/src/decoder/types.js.map +1 -0
  358. package/dist/server/src/decoder/utils.d.ts +13 -0
  359. package/dist/server/src/decoder/utils.js +45 -0
  360. package/dist/server/src/decoder/utils.js.map +1 -0
  361. package/dist/server/src/decoder/wasm/build/decoder.d.ts +43 -0
  362. package/dist/server/src/decoder/wasm/build/decoder.js +108 -0
  363. package/dist/server/src/decoder/wasm/build/decoder.wasm +0 -0
  364. package/dist/server/src/decoder/worker.d.ts +1 -0
  365. package/dist/server/src/decoder/worker.js +79 -0
  366. package/dist/server/src/decoder/worker.js.map +1 -0
  367. package/dist/server/src/go2rtc/index.d.ts +1 -0
  368. package/dist/server/src/go2rtc/index.js +27 -9
  369. package/dist/server/src/go2rtc/index.js.map +1 -1
  370. package/dist/server/src/go2rtc/types.d.ts +5 -4
  371. package/dist/server/src/go2rtc/types.js +6 -2
  372. package/dist/server/src/go2rtc/types.js.map +1 -1
  373. package/dist/server/src/main.js +19 -5
  374. package/dist/server/src/main.js.map +1 -1
  375. package/dist/server/src/manager/coreManager.d.ts +16 -0
  376. package/dist/server/src/manager/coreManager.js +95 -0
  377. package/dist/server/src/manager/coreManager.js.map +1 -0
  378. package/dist/server/src/manager/deviceManager.d.ts +12 -0
  379. package/dist/server/src/manager/deviceManager.js +130 -0
  380. package/dist/server/src/manager/deviceManager.js.map +1 -0
  381. package/dist/server/src/manager/types.d.ts +15 -0
  382. package/dist/server/src/manager/types.js +2 -0
  383. package/dist/server/src/manager/types.js.map +1 -0
  384. package/dist/server/src/plugins/index.d.ts +3 -1
  385. package/dist/server/src/plugins/index.js +42 -21
  386. package/dist/server/src/plugins/index.js.map +1 -1
  387. package/dist/server/src/plugins/plugin.d.ts +3 -3
  388. package/dist/server/src/plugins/plugin.js +13 -20
  389. package/dist/server/src/plugins/plugin.js.map +1 -1
  390. package/dist/server/src/plugins/runtime/base.d.ts +54 -0
  391. package/dist/server/src/plugins/runtime/base.js +223 -0
  392. package/dist/server/src/plugins/runtime/base.js.map +1 -0
  393. package/dist/server/src/plugins/runtime/index.d.ts +5 -0
  394. package/dist/server/src/plugins/runtime/index.js +13 -0
  395. package/dist/server/src/plugins/runtime/index.js.map +1 -0
  396. package/dist/server/src/plugins/runtime/node/child.d.ts +22 -0
  397. package/dist/server/src/plugins/runtime/node/child.js +152 -0
  398. package/dist/server/src/plugins/runtime/node/child.js.map +1 -0
  399. package/dist/server/src/plugins/runtime/node/index.d.ts +7 -0
  400. package/dist/server/src/plugins/runtime/node/index.js +54 -0
  401. package/dist/server/src/plugins/runtime/node/index.js.map +1 -0
  402. package/dist/server/src/plugins/runtime/node/plugin.d.ts +24 -0
  403. package/dist/server/src/plugins/runtime/node/plugin.js +128 -0
  404. package/dist/server/src/plugins/runtime/node/plugin.js.map +1 -0
  405. package/dist/server/src/plugins/runtime/node/pluginApi.d.ts +16 -0
  406. package/dist/server/src/plugins/runtime/node/pluginApi.js +18 -0
  407. package/dist/server/src/plugins/runtime/node/pluginApi.js.map +1 -0
  408. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.d.ts +25 -0
  409. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js +230 -0
  410. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js.map +1 -0
  411. package/dist/server/src/plugins/runtime/node/proxy/coreManager.d.ts +16 -0
  412. package/dist/server/src/plugins/runtime/node/proxy/coreManager.js +98 -0
  413. package/dist/server/src/plugins/runtime/node/proxy/coreManager.js.map +1 -0
  414. package/dist/server/src/plugins/runtime/node/proxy/deviceManager.d.ts +19 -0
  415. package/dist/server/src/plugins/runtime/node/proxy/deviceManager.js +144 -0
  416. package/dist/server/src/plugins/runtime/node/proxy/deviceManager.js.map +1 -0
  417. package/dist/server/src/plugins/runtime/node/storage.d.ts +34 -0
  418. package/dist/server/src/plugins/runtime/node/storage.js +313 -0
  419. package/dist/server/src/plugins/runtime/node/storage.js.map +1 -0
  420. package/dist/server/src/plugins/runtime/node/storageController.d.ts +18 -0
  421. package/dist/server/src/plugins/runtime/node/storageController.js +67 -0
  422. package/dist/server/src/plugins/runtime/node/storageController.js.map +1 -0
  423. package/dist/server/src/plugins/runtime/python/__init__.py +0 -0
  424. package/dist/server/src/plugins/runtime/python/child.py +248 -0
  425. package/dist/server/src/plugins/runtime/python/index.d.ts +9 -0
  426. package/dist/server/src/plugins/runtime/python/index.js +57 -0
  427. package/dist/server/src/plugins/runtime/python/index.js.map +1 -0
  428. package/dist/server/src/plugins/runtime/python/namespaces.py +101 -0
  429. package/dist/server/src/plugins/runtime/python/plugin.py +155 -0
  430. package/dist/server/src/plugins/runtime/python/plugin_api.py +29 -0
  431. package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +1732 -0
  432. package/dist/server/src/plugins/runtime/python/proxy/core_manager.py +126 -0
  433. package/dist/server/src/plugins/runtime/python/proxy/device_manager.py +197 -0
  434. package/dist/server/src/plugins/runtime/python/schema.py +99 -0
  435. package/dist/server/src/plugins/runtime/python/storage.py +353 -0
  436. package/dist/server/src/plugins/runtime/python/storage_controller.py +102 -0
  437. package/dist/server/src/plugins/runtime/python/typings.py +195 -0
  438. package/dist/server/src/plugins/schema.d.ts +27 -34
  439. package/dist/server/src/plugins/schema.js +358 -369
  440. package/dist/server/src/plugins/schema.js.map +1 -1
  441. package/dist/server/src/plugins/types.d.ts +43 -1
  442. package/dist/server/src/plugins/types.js +16 -0
  443. package/dist/server/src/plugins/types.js.map +1 -1
  444. package/dist/server/src/plugins/worker.d.ts +12 -31
  445. package/dist/server/src/plugins/worker.js +89 -343
  446. package/dist/server/src/plugins/worker.js.map +1 -1
  447. package/dist/server/src/rpc/index.d.ts +32 -0
  448. package/dist/server/src/rpc/index.js +103 -0
  449. package/dist/server/src/rpc/index.js.map +1 -0
  450. package/dist/server/src/rpc/namespaces.d.ts +35 -0
  451. package/dist/server/src/rpc/namespaces.js +42 -0
  452. package/dist/server/src/rpc/namespaces.js.map +1 -0
  453. package/dist/server/src/{nats → rpc}/server.d.ts +6 -2
  454. package/dist/server/src/{nats → rpc}/server.js +76 -55
  455. package/dist/server/src/rpc/server.js.map +1 -0
  456. package/dist/server/src/rpc/types.d.ts +111 -0
  457. package/dist/server/src/rpc/types.js +2 -0
  458. package/dist/server/src/{nats → rpc}/types.js.map +1 -1
  459. package/dist/server/src/{nats → rpc}/utils.d.ts +1 -1
  460. package/dist/server/src/rpc/utils.js.map +1 -0
  461. package/dist/server/src/services/config/constants.js +12 -48
  462. package/dist/server/src/services/config/constants.js.map +1 -1
  463. package/dist/server/src/services/config/defaults.d.ts +12 -0
  464. package/dist/server/src/services/config/defaults.js +55 -0
  465. package/dist/server/src/services/config/defaults.js.map +1 -0
  466. package/dist/server/src/services/config/index.d.ts +57 -9
  467. package/dist/server/src/services/config/index.js +277 -130
  468. package/dist/server/src/services/config/index.js.map +1 -1
  469. package/dist/server/src/services/config/types.d.ts +10 -4
  470. package/dist/server/src/types.d.ts +3 -0
  471. package/dist/server/src/utils/path.d.ts +5 -0
  472. package/dist/server/src/utils/path.js +12 -0
  473. package/dist/server/src/utils/path.js.map +1 -0
  474. package/dist/server/src/utils/pythonInstaller.d.ts +46 -0
  475. package/dist/server/src/utils/pythonInstaller.js +463 -0
  476. package/dist/server/src/utils/pythonInstaller.js.map +1 -0
  477. package/eslint.config.js +103 -0
  478. package/localdeps.txt +10 -0
  479. package/mypy.ini +30 -0
  480. package/package.json +57 -45
  481. package/requirements.txt +15 -0
  482. package/ruff.toml +90 -0
  483. package/src/__init__.py +0 -0
  484. package/src/_camera_ui_tools/__init__.py +0 -0
  485. package/src/_camera_ui_tools/__pycache__/__init__.cpython-311.pyc +0 -0
  486. package/src/api/controllers/api.controller.ts +19 -0
  487. package/src/api/controllers/auth.controller.ts +294 -0
  488. package/src/api/controllers/backup.controller.ts +72 -0
  489. package/src/api/controllers/cameras.controller.ts +1029 -0
  490. package/src/api/controllers/config.controller.ts +102 -0
  491. package/src/api/controllers/files.controller.ts +35 -0
  492. package/src/api/controllers/frameWorkers.controller.ts +109 -0
  493. package/src/api/controllers/plugins.controller.ts +1206 -0
  494. package/src/api/controllers/system.controller.ts +273 -0
  495. package/src/api/controllers/users.controller.ts +648 -0
  496. package/src/api/database/checks.ts +268 -0
  497. package/src/api/database/constants.ts +8 -0
  498. package/src/api/database/index.ts +262 -0
  499. package/src/api/database/migration.ts +62 -0
  500. package/src/api/database/selfcheck.ts +492 -0
  501. package/src/api/database/types.ts +104 -0
  502. package/src/api/go2rtc/api/application.ts +48 -0
  503. package/src/api/go2rtc/api/config.ts +61 -0
  504. package/src/api/go2rtc/api/discover.ts +197 -0
  505. package/src/api/go2rtc/api/index.ts +49 -0
  506. package/src/api/go2rtc/api/snapshot.ts +44 -0
  507. package/src/api/go2rtc/api/streams.ts +168 -0
  508. package/src/api/go2rtc/index.ts +43 -0
  509. package/src/api/go2rtc/queue.ts +50 -0
  510. package/src/api/go2rtc/types.ts +174 -0
  511. package/src/api/index.ts +286 -0
  512. package/src/api/middlewares/authPermission.middleware.ts +46 -0
  513. package/src/api/middlewares/authValidation.middleware.ts +160 -0
  514. package/src/api/middlewares/pagination.middleware.ts +67 -0
  515. package/src/api/middlewares/socketAuth.middleware.ts +136 -0
  516. package/src/api/plugins/header.plugin.ts +15 -0
  517. package/src/api/plugins/logger.plugin.ts +44 -0
  518. package/src/api/plugins/proxy.plugin.ts +255 -0
  519. package/src/api/plugins/socket.plugin.ts +28 -0
  520. package/src/api/plugins/system.plugin.ts +48 -0
  521. package/src/api/plugins/useragent.plugin.ts +19 -0
  522. package/src/api/routes/api.routes.ts +10 -0
  523. package/src/api/routes/auth.routes.ts +56 -0
  524. package/src/api/routes/backup.routes.ts +28 -0
  525. package/src/api/routes/cameras.routes.ts +281 -0
  526. package/src/api/routes/config.routes.ts +66 -0
  527. package/src/api/routes/files.routes.ts +15 -0
  528. package/src/api/routes/frameWorkers.routes.ts +39 -0
  529. package/src/api/routes/index.ts +37 -0
  530. package/src/api/routes/plugins.routes.ts +420 -0
  531. package/src/api/routes/system.routes.ts +101 -0
  532. package/src/api/routes/users.routes.ts +167 -0
  533. package/src/api/schemas/backup.schema.ts +112 -0
  534. package/src/api/schemas/cameras.schema.ts +479 -0
  535. package/src/api/schemas/config.schema.ts +38 -0
  536. package/src/api/schemas/go2rtc.schema.ts +189 -0
  537. package/src/api/schemas/plugins.schema.ts +126 -0
  538. package/src/api/schemas/storage.schema.ts +11 -0
  539. package/src/api/schemas/system.schema.ts +45 -0
  540. package/src/api/schemas/users.schema.ts +185 -0
  541. package/src/api/services/auth.service.ts +210 -0
  542. package/src/api/services/backup.service.ts +144 -0
  543. package/src/api/services/cameras.service.ts +671 -0
  544. package/src/api/services/plugins.service.ts +470 -0
  545. package/src/api/services/system.service.ts +85 -0
  546. package/src/api/services/users.service.ts +276 -0
  547. package/src/api/types/index.ts +675 -0
  548. package/src/api/utils/cert.ts +254 -0
  549. package/src/api/utils/constants.ts +17 -0
  550. package/src/api/utils/fetch.ts +21 -0
  551. package/src/api/utils/moveFiles.ts +45 -0
  552. package/src/api/utils/parse.ts +17 -0
  553. package/src/api/websocket/index.ts +110 -0
  554. package/src/api/websocket/nsp/logs.ts +240 -0
  555. package/src/api/websocket/nsp/main.ts +27 -0
  556. package/src/api/websocket/nsp/metrics.ts +301 -0
  557. package/src/api/websocket/nsp/notifications.ts +43 -0
  558. package/src/api/websocket/nsp/plugins.ts +37 -0
  559. package/src/api/websocket/nsp/server.ts +220 -0
  560. package/src/api/websocket/nsp/status.ts +77 -0
  561. package/src/api/websocket/types.ts +55 -0
  562. package/src/api.ts +163 -0
  563. package/src/camera/classes.ts +32 -0
  564. package/src/camera/controller.ts +579 -0
  565. package/src/camera/device.ts +422 -0
  566. package/src/camera/frameWorker.ts +403 -0
  567. package/src/camera/index.ts +679 -0
  568. package/src/camera/interfaces.ts +95 -0
  569. package/src/camera/iou.ts +153 -0
  570. package/src/camera/polygon.ts +226 -0
  571. package/src/camera/python/__init__.py +0 -0
  572. package/src/camera/python/__pycache__/__init__.cpython-311.pyc +0 -0
  573. package/src/camera/python/__pycache__/classes.cpython-311.pyc +0 -0
  574. package/src/camera/python/__pycache__/delegate_controller.cpython-311.pyc +0 -0
  575. package/src/camera/python/__pycache__/interfaces.cpython-311.pyc +0 -0
  576. package/src/camera/python/__pycache__/iou.cpython-310.pyc +0 -0
  577. package/src/camera/python/__pycache__/iou.cpython-311.pyc +0 -0
  578. package/src/camera/python/__pycache__/iou2.cpython-310.pyc +0 -0
  579. package/src/camera/python/__pycache__/polygon.cpython-311.pyc +0 -0
  580. package/src/camera/python/__pycache__/typings.cpython-311.pyc +0 -0
  581. package/src/camera/python/__pycache__/video_frame.cpython-311.pyc +0 -0
  582. package/src/camera/python/classes.py +41 -0
  583. package/src/camera/python/interfaces.py +130 -0
  584. package/src/camera/python/iou.py +158 -0
  585. package/src/camera/python/polygon.py +230 -0
  586. package/src/camera/python/test/__pycache__/polygon.cpython-310.pyc +0 -0
  587. package/src/camera/python/test/iou_test.py +799 -0
  588. package/src/camera/python/test/polygon.py +238 -0
  589. package/src/camera/python/test/polygon_test.py +256 -0
  590. package/src/camera/python/test/polygon_test2.py +484 -0
  591. package/src/camera/python/typings.py +50 -0
  592. package/src/camera/python/video_frame.py +143 -0
  593. package/src/camera/session.ts +192 -0
  594. package/src/camera/streaming/fmp4-session.ts +390 -0
  595. package/src/camera/streaming/peer-connection.ts +273 -0
  596. package/src/camera/streaming/rtsp-session.ts +331 -0
  597. package/src/camera/streaming/webrtc-connection.ts +260 -0
  598. package/src/camera/streaming/werift-session.ts +317 -0
  599. package/src/camera/test/iou_test.ts +761 -0
  600. package/src/camera/test/polygon.test.ts +611 -0
  601. package/src/camera/test/polygon_test.ts +210 -0
  602. package/src/camera/types.ts +48 -0
  603. package/src/camera/utils.ts +489 -0
  604. package/src/camera/videoFrame.ts +123 -0
  605. package/src/cloud/index.ts +61 -0
  606. package/src/cloud/remote/cloudflare.ts +18 -0
  607. package/src/cloud/remote/upnp.ts +18 -0
  608. package/src/cloud/remote/utils.ts +24 -0
  609. package/src/cloud/types.ts +16 -0
  610. package/src/decoder/child.ts +883 -0
  611. package/src/decoder/imageUtils.ts +275 -0
  612. package/src/decoder/manager.ts +251 -0
  613. package/src/decoder/python/__init__.py +0 -0
  614. package/src/decoder/python/__pycache__/__init__.cpython-311.pyc +0 -0
  615. package/src/decoder/python/__pycache__/image_utils.cpython-311.pyc +0 -0
  616. package/src/decoder/python/__pycache__/typings.cpython-311.pyc +0 -0
  617. package/src/decoder/python/__pycache__/utils.cpython-311.pyc +0 -0
  618. package/src/decoder/python/child.py +903 -0
  619. package/src/decoder/python/image_utils.py +196 -0
  620. package/src/decoder/python/pool.py +45 -0
  621. package/src/decoder/python/test/group.py +62 -0
  622. package/src/decoder/python/test/motion.mp4 +0 -0
  623. package/src/decoder/python/test/motion2.mp4 +0 -0
  624. package/src/decoder/python/test/opencl.cl +70 -0
  625. package/src/decoder/python/test/opencl2.cl +130 -0
  626. package/src/decoder/python/test/test.py +427 -0
  627. package/src/decoder/python/test/test1.jpg +0 -0
  628. package/src/decoder/python/test/test1_resized.jpg +0 -0
  629. package/src/decoder/python/test/test2.jpg +0 -0
  630. package/src/decoder/python/test/test2.py +451 -0
  631. package/src/decoder/python/test/test2_resized.jpg +0 -0
  632. package/src/decoder/python/test/test3.jpg +0 -0
  633. package/src/decoder/python/test/utils.py +50 -0
  634. package/src/decoder/python/typings.py +57 -0
  635. package/src/decoder/python/utils.py +70 -0
  636. package/src/decoder/test/child.ts +117 -0
  637. package/src/decoder/test/ffmpeg.ts +371 -0
  638. package/src/decoder/test/test.ts +182 -0
  639. package/src/decoder/types.ts +27 -0
  640. package/src/decoder/utils.ts +64 -0
  641. package/src/decoder/wasm/asconfig.json +28 -0
  642. package/src/decoder/wasm/assembly/console.ts +1 -0
  643. package/src/decoder/wasm/assembly/index.ts +890 -0
  644. package/src/decoder/wasm/build/decoder.d.ts +43 -0
  645. package/src/decoder/wasm/build/decoder.js +108 -0
  646. package/src/decoder/wasm/build/decoder.wasm +0 -0
  647. package/src/decoder/wasm/tsconfig.json +5 -0
  648. package/src/decoder/worker.ts +113 -0
  649. package/src/go2rtc/index.ts +324 -0
  650. package/src/go2rtc/types.ts +88 -0
  651. package/src/main.ts +267 -0
  652. package/src/manager/coreManager.ts +78 -0
  653. package/src/manager/deviceManager.ts +132 -0
  654. package/src/manager/types.ts +17 -0
  655. package/src/plugins/index.ts +443 -0
  656. package/src/plugins/plugin.ts +177 -0
  657. package/src/plugins/runtime/base.ts +282 -0
  658. package/src/plugins/runtime/index.ts +15 -0
  659. package/src/plugins/runtime/node/child.ts +193 -0
  660. package/src/plugins/runtime/node/index.ts +67 -0
  661. package/src/plugins/runtime/node/plugin.ts +122 -0
  662. package/src/plugins/runtime/node/pluginApi.ts +27 -0
  663. package/src/plugins/runtime/node/proxy/cameraDevice.ts +299 -0
  664. package/src/plugins/runtime/node/proxy/coreManager.ts +128 -0
  665. package/src/plugins/runtime/node/proxy/deviceManager.ts +187 -0
  666. package/src/plugins/runtime/node/storage.ts +312 -0
  667. package/src/plugins/runtime/node/storageController.ts +91 -0
  668. package/src/plugins/runtime/python/__init__.py +0 -0
  669. package/src/plugins/runtime/python/__pycache__/__init__.cpython-311.pyc +0 -0
  670. package/src/plugins/runtime/python/__pycache__/camera_storage.cpython-311.pyc +0 -0
  671. package/src/plugins/runtime/python/__pycache__/config_service.cpython-311.pyc +0 -0
  672. package/src/plugins/runtime/python/__pycache__/constants.cpython-311.pyc +0 -0
  673. package/src/plugins/runtime/python/__pycache__/ipc.cpython-311.pyc +0 -0
  674. package/src/plugins/runtime/python/__pycache__/logger.cpython-311.pyc +0 -0
  675. package/src/plugins/runtime/python/__pycache__/message_queue.cpython-311.pyc +0 -0
  676. package/src/plugins/runtime/python/__pycache__/namespaces.cpython-311.pyc +0 -0
  677. package/src/plugins/runtime/python/__pycache__/plugin.cpython-311.pyc +0 -0
  678. package/src/plugins/runtime/python/__pycache__/plugin_api.cpython-311.pyc +0 -0
  679. package/src/plugins/runtime/python/__pycache__/plugin_logger.cpython-311.pyc +0 -0
  680. package/src/plugins/runtime/python/__pycache__/proxy_utils.cpython-311.pyc +0 -0
  681. package/src/plugins/runtime/python/__pycache__/schema.cpython-311.pyc +0 -0
  682. package/src/plugins/runtime/python/__pycache__/storage.cpython-311.pyc +0 -0
  683. package/src/plugins/runtime/python/__pycache__/storage_controller.cpython-311.pyc +0 -0
  684. package/src/plugins/runtime/python/__pycache__/typings.cpython-311.pyc +0 -0
  685. package/src/plugins/runtime/python/child.py +248 -0
  686. package/src/plugins/runtime/python/index.ts +73 -0
  687. package/src/plugins/runtime/python/namespaces.py +101 -0
  688. package/src/plugins/runtime/python/plugin.py +155 -0
  689. package/src/plugins/runtime/python/plugin_api.py +29 -0
  690. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-310.pyc +0 -0
  691. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-311.pyc +0 -0
  692. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-38.pyc +0 -0
  693. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-39.pyc +0 -0
  694. package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-311.pyc +0 -0
  695. package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-39.pyc +0 -0
  696. package/src/plugins/runtime/python/proxy/__pycache__/core_manager.cpython-311.pyc +0 -0
  697. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-310.pyc +0 -0
  698. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-311.pyc +0 -0
  699. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-38.pyc +0 -0
  700. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-39.pyc +0 -0
  701. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-310.pyc +0 -0
  702. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-311.pyc +0 -0
  703. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-38.pyc +0 -0
  704. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-39.pyc +0 -0
  705. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-310.pyc +0 -0
  706. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-311.pyc +0 -0
  707. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-38.pyc +0 -0
  708. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-39.pyc +0 -0
  709. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-310.pyc +0 -0
  710. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-311.pyc +0 -0
  711. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-38.pyc +0 -0
  712. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-39.pyc +0 -0
  713. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-310.pyc +0 -0
  714. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-311.pyc +0 -0
  715. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-38.pyc +0 -0
  716. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-39.pyc +0 -0
  717. package/src/plugins/runtime/python/proxy/camera_device.py +1732 -0
  718. package/src/plugins/runtime/python/proxy/core_manager.py +126 -0
  719. package/src/plugins/runtime/python/proxy/device_manager.py +197 -0
  720. package/src/plugins/runtime/python/schema.py +99 -0
  721. package/src/plugins/runtime/python/storage.py +353 -0
  722. package/src/plugins/runtime/python/storage_controller.py +102 -0
  723. package/src/plugins/runtime/python/typings.py +195 -0
  724. package/src/plugins/schema.ts +472 -0
  725. package/src/plugins/types.ts +60 -0
  726. package/src/plugins/worker.ts +250 -0
  727. package/src/rpc/index.ts +149 -0
  728. package/src/rpc/namespaces.ts +79 -0
  729. package/src/rpc/server.ts +422 -0
  730. package/src/rpc/types.ts +119 -0
  731. package/src/rpc/utils.ts +16 -0
  732. package/src/services/config/constants.ts +47 -0
  733. package/src/services/config/defaults.ts +57 -0
  734. package/src/services/config/index.ts +744 -0
  735. package/src/services/config/types.ts +211 -0
  736. package/src/services/logger/index.ts +96 -0
  737. package/src/types.ts +47 -0
  738. package/src/utils/path.ts +16 -0
  739. package/src/utils/pythonInstaller.ts +597 -0
  740. package/tsconfig.json +37 -0
  741. package/types/fastify.d.ts +14 -0
  742. package/updates.config.js +3 -0
  743. package/dist/interface/@intlify.Do1-T-x0.0.0.49.js +0 -15
  744. package/dist/interface/@mdi.CbjpODVZ.0.0.49.js +0 -1
  745. package/dist/interface/@tanstack.CgZ4BVuY.0.0.49.js +0 -1
  746. package/dist/interface/@vue.DeX8WChi.0.0.49.js +0 -17
  747. package/dist/interface/@vueform.WCJNykTK.0.0.49.js +0 -1
  748. package/dist/interface/@vueuse.fmA4o7MO.0.0.49.js +0 -1
  749. package/dist/interface/Account.D_hgF7as.0.0.49.js +0 -1
  750. package/dist/interface/Adminpanel.Cr2ysRnk.0.0.49.js +0 -2
  751. package/dist/interface/Appearance.DJPnnakw.0.0.49.js +0 -1
  752. package/dist/interface/Backup.DWrnTw65.0.0.49.js +0 -1
  753. package/dist/interface/Camera.Cm8bv5Jw.0.0.49.js +0 -1
  754. package/dist/interface/Cameras.BdMnnB_B.0.0.49.js +0 -1
  755. package/dist/interface/Camview.CvyTACeS.0.0.49.js +0 -1
  756. package/dist/interface/Config.R58trs6R.0.0.49.js +0 -1
  757. package/dist/interface/Console.ByS6OcfG.0.0.49.js +0 -4
  758. package/dist/interface/FirstSteps.BSZVBND8.0.0.49.js +0 -1
  759. package/dist/interface/NewCamera.CpKY8-_z.0.0.49.js +0 -469
  760. package/dist/interface/Plugin.ucDXXC6d.0.0.49.js +0 -1
  761. package/dist/interface/Plugins.Bl6Yy3fd.0.0.49.js +0 -1
  762. package/dist/interface/Recordings.Bm-_HDqk.0.0.49.js +0 -1
  763. package/dist/interface/Recordings.CVFqRJTQ.0.0.49.js +0 -1
  764. package/dist/interface/Settings.ClbXnv3j.0.0.49.js +0 -1
  765. package/dist/interface/System.BE0hX95Q.0.0.49.js +0 -4
  766. package/dist/interface/User.Ih1R_8u4.0.0.49.js +0 -1
  767. package/dist/interface/VConfigEditor.vue_vue_type_script_setup_true_lang.CAHg6HiL.0.0.49.js +0 -2
  768. package/dist/interface/VConsole.B9yVZ89i.0.0.49.js +0 -1
  769. package/dist/interface/VPlayer.DWJVzwuw.0.0.49.js +0 -4
  770. package/dist/interface/VPluginCard.pJNHjHpP.0.0.49.js +0 -4
  771. package/dist/interface/ace-builds.S1varnlI.0.0.49.js +0 -970
  772. package/dist/interface/apexcharts.BQn4Fbzn.0.0.49.js +0 -838
  773. package/dist/interface/assets/@vueform.0.0.49.CroAHJs8.css +0 -1
  774. package/dist/interface/assets/@xterm.0.0.49.CFbL2ovg.css +0 -32
  775. package/dist/interface/assets/Account.0.0.49.Bnw6Lbtd.css +0 -1
  776. package/dist/interface/assets/Adminpanel.0.0.49.a3t1v3MB.css +0 -1
  777. package/dist/interface/assets/Camera.0.0.49.Br9s6-lM.css +0 -1
  778. package/dist/interface/assets/Cameras.0.0.49.Buf1Dgce.css +0 -1
  779. package/dist/interface/assets/Camview.0.0.49.B7Cja2ry.css +0 -1
  780. package/dist/interface/assets/Config.0.0.49.DNGo2krN.css +0 -1
  781. package/dist/interface/assets/Console.0.0.49.Bh8l9QnM.css +0 -1
  782. package/dist/interface/assets/FirstSteps.0.0.49.Mu8VPl13.css +0 -1
  783. package/dist/interface/assets/NewCamera.0.0.49.DtjxW0Pf.css +0 -1
  784. package/dist/interface/assets/Plugin.0.0.49.YIpAU1_n.css +0 -1
  785. package/dist/interface/assets/Plugins.0.0.49.DXSoO9M1.css +0 -1
  786. package/dist/interface/assets/Settings.0.0.49.CVmui2kE.css +0 -1
  787. package/dist/interface/assets/User.0.0.49.BiGtIFqt.css +0 -1
  788. package/dist/interface/assets/VConsole.0.0.49.BCqKHpmJ.css +0 -1
  789. package/dist/interface/assets/VPlayer.0.0.49.C4lm2rVR.css +0 -1
  790. package/dist/interface/assets/VPluginCard.0.0.49.C8Lj6X-J.css +0 -1
  791. package/dist/interface/assets/main.0.0.49.OJngntGT.css +0 -1
  792. package/dist/interface/assets/vue3-toastify.0.0.49.DHXAGmwn.css +0 -1
  793. package/dist/interface/assets/vuetify.0.0.49.Dua9WSqa.css +0 -5
  794. package/dist/interface/axios.DIsA03vz.0.0.49.js +0 -6
  795. package/dist/interface/backup.DO02r0Uq.0.0.49.js +0 -1
  796. package/dist/interface/dnd-core.De50QAoi.0.0.49.js +0 -1
  797. package/dist/interface/engine.io-client.BkCVneko.0.0.49.js +0 -1
  798. package/dist/interface/fast-deep-equal.Cba0yG7P.0.0.49.js +0 -1
  799. package/dist/interface/fonts/Inter/Inter-Regular.ttf +0 -0
  800. package/dist/interface/highlight.js.B_E0LW5C.0.0.49.js +0 -2
  801. package/dist/interface/hookable.B8xFkYCm.0.0.49.js +0 -1
  802. package/dist/interface/linkify-it.B6s2BWlj.0.0.49.js +0 -1
  803. package/dist/interface/main.BBe3SGhH.0.0.49.js +0 -4
  804. package/dist/interface/perfect-debounce.Cp2ysxOb.0.0.49.js +0 -1
  805. package/dist/interface/pinia.ggULzsrQ.0.0.49.js +0 -5
  806. package/dist/interface/plugins.D11FBqVV.0.0.49.js +0 -1
  807. package/dist/interface/react-dnd-touch-backend.Bu6wFEmw.0.0.49.js +0 -1
  808. package/dist/interface/rxjs.BoFuGUYG.0.0.49.js +0 -3
  809. package/dist/interface/socket.io-client.DkEQDv7C.0.0.49.js +0 -1
  810. package/dist/interface/socket.io-parser.DIURoCw8.0.0.49.js +0 -1
  811. package/dist/interface/system.D_LabhBl.0.0.49.js +0 -1
  812. package/dist/interface/types.Cz9TaZAP.0.0.49.js +0 -1
  813. package/dist/interface/utils.mAKpSMLY.0.0.49.js +0 -1
  814. package/dist/interface/uuid.Ch9TGLTe.0.0.49.js +0 -1
  815. package/dist/interface/vee-validate.8pUAwQ7T.0.0.49.js +0 -5
  816. package/dist/interface/vue-i18n.CBqdKRmG.0.0.49.js +0 -5
  817. package/dist/interface/vue-inline-svg.ZWpe_tFT.0.0.49.js +0 -1
  818. package/dist/interface/vue-router.DvFvaoP2.0.0.49.js +0 -5
  819. package/dist/interface/vue3-apexcharts.BHSDC9pf.0.0.49.js +0 -1
  820. package/dist/interface/vue3-dnd.DbCy3Qbj.0.0.49.js +0 -1
  821. package/dist/interface/vue3-toastify.JJyrPHKk.0.0.49.js +0 -1
  822. package/dist/interface/vuetify.kkqUjVJA.0.0.49.js +0 -5
  823. package/dist/interface/zod.bkdEMpUp.0.0.49.js +0 -1
  824. package/dist/server/src/api/utils/cameraSource.d.ts +0 -6
  825. package/dist/server/src/api/utils/cameraSource.js +0 -51
  826. package/dist/server/src/api/utils/cameraSource.js.map +0 -1
  827. package/dist/server/src/api/websocket/go2rtc.d.ts +0 -21
  828. package/dist/server/src/api/websocket/go2rtc.js +0 -88
  829. package/dist/server/src/api/websocket/go2rtc.js.map +0 -1
  830. package/dist/server/src/api/websocket/nsp/proxy.d.ts +0 -27
  831. package/dist/server/src/api/websocket/nsp/proxy.js +0 -127
  832. package/dist/server/src/api/websocket/nsp/proxy.js.map +0 -1
  833. package/dist/server/src/nats/index.d.ts +0 -40
  834. package/dist/server/src/nats/index.js +0 -164
  835. package/dist/server/src/nats/index.js.map +0 -1
  836. package/dist/server/src/nats/proxy/cameraDevice.d.ts +0 -22
  837. package/dist/server/src/nats/proxy/cameraDevice.js +0 -249
  838. package/dist/server/src/nats/proxy/cameraDevice.js.map +0 -1
  839. package/dist/server/src/nats/proxy/coreManager.d.ts +0 -14
  840. package/dist/server/src/nats/proxy/coreManager.js +0 -68
  841. package/dist/server/src/nats/proxy/coreManager.js.map +0 -1
  842. package/dist/server/src/nats/proxy/deviceManager.d.ts +0 -14
  843. package/dist/server/src/nats/proxy/deviceManager.js +0 -101
  844. package/dist/server/src/nats/proxy/deviceManager.js.map +0 -1
  845. package/dist/server/src/nats/server.js.map +0 -1
  846. package/dist/server/src/nats/types.d.ts +0 -18
  847. package/dist/server/src/nats/utils.js.map +0 -1
  848. /package/dist/interface/assets/{Backup.0.0.49.CX0rT0QJ.css → SettingsBackup.CX0rT0QJ.0.0.50-internal.0.css} +0 -0
  849. /package/dist/interface/assets/{highlight.0.0.49.Ch2EwETz.css → highlight.Ch2EwETz.0.0.50-internal.0.css} +0 -0
  850. /package/dist/interface/assets/{logo-256.0.0.49.BCQk9H1-.png → logo-256.BCQk9H1-.0.0.50-internal.0.png} +0 -0
  851. /package/dist/interface/assets/{logo-512.0.0.49.DLKVOU2S.png → logo-512.DLKVOU2S.0.0.50-internal.0.png} +0 -0
  852. /package/dist/interface/assets/{logo.0.0.49.DmEiRk0z.png → logo.DmEiRk0z.0.0.50-internal.0.png} +0 -0
  853. /package/dist/interface/assets/{mode-json.0.0.49.Br7xisR1.js → mode-json.Br7xisR1.0.0.50-internal.0.js} +0 -0
  854. /package/dist/interface/assets/{mode-yaml.0.0.49.CIYL8U3d.js → mode-yaml.CIYL8U3d.0.0.50-internal.0.js} +0 -0
  855. /package/dist/interface/{@babel.l0sNRNKZ.0.0.49.js → js/@babel.l0sNRNKZ.0.0.50-internal.0.js} +0 -0
  856. /package/dist/interface/{@react-dnd.CcwRs9xb.0.0.49.js → js/@react-dnd.CcwRs9xb.0.0.50-internal.0.js} +0 -0
  857. /package/dist/interface/{@socket.io.Dkula2eQ.0.0.49.js → js/@socket.io.Dkula2eQ.0.0.50-internal.0.js} +0 -0
  858. /package/dist/interface/{birpc.l0sNRNKZ.0.0.49.js → js/birpc.l0sNRNKZ.0.0.50-internal.0.js} +0 -0
  859. /package/dist/interface/{compare-versions.DqEOhma6.0.0.49.js → js/compare-versions.DqEOhma6.0.0.50-internal.0.js} +0 -0
  860. /package/dist/interface/{dijkstrajs.C00ieaqj.0.0.49.js → js/dijkstrajs.C00ieaqj.0.0.50-internal.0.js} +0 -0
  861. /package/dist/interface/{engine.io-parser.BiEtp6m2.0.0.49.js → js/engine.io-parser.BiEtp6m2.0.0.50-internal.0.js} +0 -0
  862. /package/dist/interface/{entities.C20TfXL6.0.0.49.js → js/entities.C20TfXL6.0.0.50-internal.0.js} +0 -0
  863. /package/dist/interface/{ev-emitter.X5f1qa-c.0.0.49.js → js/ev-emitter.X5f1qa-c.0.0.50-internal.0.js} +0 -0
  864. /package/dist/interface/{get-size.D1dS-IaP.0.0.49.js → js/get-size.D1dS-IaP.0.0.50-internal.0.js} +0 -0
  865. /package/dist/interface/{vue.l0sNRNKZ.0.0.49.js → js/hookable.l0sNRNKZ.0.0.50-internal.0.js} +0 -0
  866. /package/dist/interface/{mdurl.k9Sl0PQj.0.0.49.js → js/mdurl.k9Sl0PQj.0.0.50-internal.0.js} +0 -0
  867. /package/dist/interface/{punycode.js.Dj65hjkv.0.0.49.js → js/punycode.js.Dj65hjkv.0.0.50-internal.0.js} +0 -0
  868. /package/dist/interface/{react-dnd-html5-backend.1HQjlkwI.0.0.49.js → js/react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.0.js} +0 -0
  869. /package/dist/interface/{redux.BFxtlG_c.0.0.49.js → js/redux.BFxtlG_c.0.0.50-internal.0.js} +0 -0
  870. /package/dist/interface/{tslib.9k7AwCpt.0.0.49.js → js/tslib.9k7AwCpt.0.0.50-internal.0.js} +0 -0
  871. /package/dist/interface/{uc.micro.kMc2yuuw.0.0.49.js → js/uc.micro.kMc2yuuw.0.0.50-internal.0.js} +0 -0
  872. /package/dist/server/src/{nats → decoder}/types.js +0 -0
  873. /package/dist/server/src/{nats → rpc}/utils.js +0 -0
@@ -0,0 +1 @@
1
+ import{b as e,m as o,c as r,t as l,d as a,w as s,e as m,f as t}from"./ace-builds.D1nmvCwb.0.0.50-internal.0.js";import"./@xterm.CAa7rpjv.0.0.50-internal.0.js";e.config.setModuleUrl("ace/mode/json",o);e.config.setModuleUrl("ace/mode/yaml",r);e.config.setModuleUrl("ace/theme/tomorrow",l);e.config.setModuleUrl("ace/theme/twilight",a);e.config.setModuleUrl("ace/mode/base",s);e.config.setModuleUrl("ace/mode/json_worker",m);e.config.setModuleUrl("ace/mode/yaml_worker",t);e.require("ace/ext/language_tools");
@@ -0,0 +1,6 @@
1
+ function xe(e,t){return function(){return e.apply(t,arguments)}}const{toString:Qe}=Object.prototype,{getPrototypeOf:le}=Object,{iterator:K,toStringTag:Ce}=Symbol,v=(e=>t=>{const n=Qe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),C=e=>(e=e.toLowerCase(),t=>v(t)===e),X=e=>t=>typeof t===e,{isArray:D}=Array,q=X("undefined");function Ze(e){return e!==null&&!q(e)&&e.constructor!==null&&!q(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ne=C("ArrayBuffer");function Ye(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ne(e.buffer),t}const et=X("string"),A=X("function"),Pe=X("number"),G=e=>e!==null&&typeof e=="object",tt=e=>e===!0||e===!1,z=e=>{if(v(e)!=="object")return!1;const t=le(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ce in e)&&!(K in e)},nt=C("Date"),rt=C("File"),st=C("Blob"),ot=C("FileList"),it=e=>G(e)&&A(e.pipe),at=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||A(e.append)&&((t=v(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},ct=C("URLSearchParams"),[lt,ut,ft,dt]=["ReadableStream","Request","Response","Headers"].map(C),pt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),D(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Fe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const U=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_e=e=>!q(e)&&e!==U;function re(){const{caseless:e}=_e(this)&&this||{},t={},n=(r,s)=>{const o=e&&Fe(t,s)||s;z(t[o])&&z(r)?t[o]=re(t[o],r):z(r)?t[o]=re({},r):D(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&H(arguments[r],n);return t}const ht=(e,t,n,{allOwnKeys:r}={})=>(H(t,(s,o)=>{n&&A(s)?e[o]=xe(s,n):e[o]=s},{allOwnKeys:r}),e),mt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},bt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&le(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},wt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Et=e=>{if(!e)return null;if(D(e))return e;let t=e.length;if(!Pe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Rt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&le(Uint8Array)),St=(e,t)=>{const r=(e&&e[K]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},gt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ot=C("HTMLFormElement"),Tt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),pe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),At=C("RegExp"),Ue=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};H(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},xt=e=>{Ue(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ct=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return D(e)?r(e):r(String(e).split(t)),n},Nt=()=>{},Pt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ft(e){return!!(e&&A(e.append)&&e[Ce]==="FormData"&&e[K])}const _t=e=>{const t=new Array(10),n=(r,s)=>{if(G(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=D(r)?[]:{};return H(r,(i,c)=>{const f=n(i,s+1);!q(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)},Ut=C("AsyncFunction"),Lt=e=>e&&(G(e)||A(e))&&A(e.then)&&A(e.catch),Le=((e,t)=>e?setImmediate:t?((n,r)=>(U.addEventListener("message",({source:s,data:o})=>{s===U&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),U.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",A(U.postMessage)),Bt=typeof queueMicrotask<"u"?queueMicrotask.bind(U):typeof process<"u"&&process.nextTick||Le,Dt=e=>e!=null&&A(e[K]),a={isArray:D,isArrayBuffer:Ne,isBuffer:Ze,isFormData:at,isArrayBufferView:Ye,isString:et,isNumber:Pe,isBoolean:tt,isObject:G,isPlainObject:z,isReadableStream:lt,isRequest:ut,isResponse:ft,isHeaders:dt,isUndefined:q,isDate:nt,isFile:rt,isBlob:st,isRegExp:At,isFunction:A,isStream:it,isURLSearchParams:ct,isTypedArray:Rt,isFileList:ot,forEach:H,merge:re,extend:ht,trim:pt,stripBOM:mt,inherits:yt,toFlatObject:bt,kindOf:v,kindOfTest:C,endsWith:wt,toArray:Et,forEachEntry:St,matchAll:gt,isHTMLForm:Ot,hasOwnProperty:pe,hasOwnProp:pe,reduceDescriptors:Ue,freezeMethods:xt,toObjectSet:Ct,toCamelCase:Tt,noop:Nt,toFiniteNumber:Pt,findKey:Fe,global:U,isContextDefined:_e,isSpecCompliantForm:Ft,toJSONObject:_t,isAsyncFn:Ut,isThenable:Lt,setImmediate:Le,asap:Bt,isIterable:Dt};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Be=m.prototype,De={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{De[e]={value:e}});Object.defineProperties(m,De);Object.defineProperty(Be,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(Be);return a.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const kt=null;function se(e){return a.isPlainObject(e)||a.isArray(e)}function ke(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function he(e,t,n){return e?e.concat(t).map(function(s,o){return s=ke(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function jt(e){return a.isArray(e)&&!e.some(se)}const qt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Q(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!a.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&jt(p)||(a.isFileList(p)||a.endsWith(y,"[]"))&&(w=a.toArray(p)))return y=ke(y),w.forEach(function(g,P){!(a.isUndefined(g)||g===null)&&t.append(i===!0?he([y],P,o):i===null?y:y+"[]",l(g))}),!1}return se(p)?!0:(t.append(he(h,y,o),l(p)),!1)}const d=[],b=Object.assign(qt,{defaultVisitor:u,convertValue:l,isVisitable:se});function R(p,y){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),a.forEach(p,function(w,S){(!(a.isUndefined(w)||w===null)&&s.call(t,w,a.isString(S)?S.trim():S,y,b))===!0&&R(w,y?y.concat(S):[S])}),d.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return R(e),t}function me(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ue(e,t){this._pairs=[],e&&Q(e,this,t)}const je=ue.prototype;je.append=function(t,n){this._pairs.push([t,n])};je.toString=function(t){const n=t?function(r){return t.call(this,r,me)}:me;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ht(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qe(e,t,n){if(!t)return e;const r=n&&n.encode||Ht;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new ue(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class ye{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const He={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},It=typeof URLSearchParams<"u"?URLSearchParams:ue,Mt=typeof FormData<"u"?FormData:null,zt=typeof Blob<"u"?Blob:null,$t={isBrowser:!0,classes:{URLSearchParams:It,FormData:Mt,Blob:zt},protocols:["http","https","file","blob","url","data"]},fe=typeof window<"u"&&typeof document<"u",oe=typeof navigator=="object"&&navigator||void 0,Jt=fe&&(!oe||["ReactNative","NativeScript","NS"].indexOf(oe.product)<0),Vt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wt=fe&&window.location.href||"http://localhost",Kt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fe,hasStandardBrowserEnv:Jt,hasStandardBrowserWebWorkerEnv:Vt,navigator:oe,origin:Wt},Symbol.toStringTag,{value:"Module"})),O={...Kt,...$t};function vt(e,t){return Q(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Xt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Ie(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Gt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Xt(r),s,n,0)}),n}return null}function Qt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const I={transitional:He,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Ie(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return vt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Q(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Qt(t)):t}],transformResponse:[function(t){const n=this.transitional||I.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});const Zt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yt=e=>{const t={};let n,r,s;return e&&e.split(`
2
+ `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Zt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},be=Symbol("internals");function j(e){return e&&String(e).trim().toLowerCase()}function $(e){return e===!1||e==null?e:a.isArray(e)?e.map($):String(e)}function en(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const tn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ee(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function nn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function rn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let x=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,f,l){const u=j(f);if(!u)throw new Error("header name must be a non-empty string");const d=a.findKey(s,u);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||f]=$(c))}const i=(c,f)=>a.forEach(c,(l,u)=>o(l,u,f));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!tn(t))i(Yt(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},f,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(f=c[l])?a.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=j(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return en(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=j(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ee(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=j(i),i){const c=a.findKey(r,i);c&&(!n||ee(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||ee(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=$(s),delete n[o];return}const c=t?nn(o):String(o).trim();c!==o&&delete n[o],n[c]=$(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[be]=this[be]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=j(i);r[c]||(rn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(x.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(x);function te(e,t){const n=this||I,r=t||n,s=x.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Me(e){return!!(e&&e.__CANCEL__)}function k(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(k,m,{__CANCEL__:!0});function ze(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function sn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function on(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const l=Date.now(),u=r[o];i||(i=l),n[s]=f,r[s]=l;let d=o,b=0;for(;d!==s;)b+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const R=u&&l-u;return R?Math.round(b*1e3/R):void 0}}function an(e,t){let n=0,r=1e3/t,s,o;const i=(l,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const V=(e,t,n=3)=>{let r=0;const s=on(50,250);return an(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=i-r,l=s(f),u=i<=c;r=i;const d={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&u?(c-i)/l:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(d)},n)},we=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ee=e=>(...t)=>a.asap(()=>e(...t)),cn=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,ln=O.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function un(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $e(e,t,n){let r=!un(t);return e&&(r||n==!1)?fn(e,t):t}const Re=e=>e instanceof x?{...e}:e;function B(e,t){t=t||{};const n={};function r(l,u,d,b){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:b},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,d,b){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,d,b)}else return r(l,u,d,b)}function o(l,u){if(!a.isUndefined(u))return r(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,d){if(d in t)return r(l,u);if(d in e)return r(void 0,l)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,u,d)=>s(Re(l),Re(u),d,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=f[u]||s,b=d(e[u],t[u],u);a.isUndefined(b)&&d!==c||(n[u]=b)}),n}const Je=e=>{const t=B({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=x.from(i),t.url=qe($e(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(a.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[l,...u]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&cn(t.url))){const l=s&&o&&ln.read(o);l&&i.set(s,l)}return t},dn=typeof XMLHttpRequest<"u",pn=dn&&function(e){return new Promise(function(n,r){const s=Je(e);let o=s.data;const i=x.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,u,d,b,R,p;function y(){R&&R(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function w(){if(!h)return;const g=x.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),T={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:g,config:e,request:h};ze(function(_){n(_),y()},function(_){r(_),y()},T),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new m("Request aborted",m.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||He;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),r(new m(P,T.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&a.forEach(i.toJSON(),function(P,T){h.setRequestHeader(T,P)}),a.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),l&&([b,p]=V(l,!0),h.addEventListener("progress",b)),f&&h.upload&&([d,R]=V(f),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",R)),(s.cancelToken||s.signal)&&(u=g=>{h&&(r(!g||g.type?new k(null,e,h):g),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const S=sn(s.url);if(S&&O.protocols.indexOf(S)===-1){r(new m("Unsupported protocol "+S+":",m.ERR_BAD_REQUEST,e));return}h.send(o||null)})},hn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof m?u:new k(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new m(`timeout ${t} of ms exceeded`,m.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},mn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},yn=async function*(e,t){for await(const n of bn(e))yield*mn(n,t)},bn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Se=(e,t,n,r)=>{const s=yn(e,t);let o=0,i,c=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){c(),f.close();return}let d=u.byteLength;if(n){let b=o+=d;n(b)}f.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},Z=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ve=Z&&typeof ReadableStream=="function",wn=Z&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),We=(e,...t)=>{try{return!!e(...t)}catch{return!1}},En=Ve&&We(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ge=64*1024,ie=Ve&&We(()=>a.isReadableStream(new Response("").body)),W={stream:ie&&(e=>e.body)};Z&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!W[t]&&(W[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new m(`Response type '${t}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const Rn=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(O.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await wn(e)).byteLength},Sn=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??Rn(t)},gn=Z&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:b}=Je(e);l=l?(l+"").toLowerCase():"text";let R=hn([s,o&&o.toAbortSignal()],i),p;const y=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let h;try{if(f&&En&&n!=="get"&&n!=="head"&&(h=await Sn(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(a.isFormData(r)&&(F=T.headers.get("content-type"))&&u.setContentType(F),T.body){const[_,M]=we(h,V(Ee(f)));r=Se(T.body,ge,_,M)}}a.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...b,signal:R,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let S=await fetch(p);const g=ie&&(l==="stream"||l==="response");if(ie&&(c||g&&y)){const T={};["status","statusText","headers"].forEach(de=>{T[de]=S[de]});const F=a.toFiniteNumber(S.headers.get("content-length")),[_,M]=c&&we(F,V(Ee(c),!0))||[];S=new Response(Se(S.body,ge,_,()=>{M&&M(),y&&y()}),T)}l=l||"text";let P=await W[a.findKey(W,l)||"text"](S,e);return!g&&y&&y(),await new Promise((T,F)=>{ze(T,F,{data:P,headers:x.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,e,p),{cause:w.cause||w}):m.from(w,w&&w.code,e,p)}}),ae={http:kt,xhr:pn,fetch:gn};a.forEach(ae,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Oe=e=>`- ${e}`,On=e=>a.isFunction(e)||e===null||e===!1,Ke={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!On(n)&&(r=ae[(i=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
4
+ `+o.map(Oe).join(`
5
+ `):" "+Oe(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ae};function ne(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new k(null,e)}function Te(e){return ne(e),e.headers=x.from(e.headers),e.data=te.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ke.getAdapter(e.adapter||I.adapter)(e).then(function(r){return ne(e),r.data=te.call(e,e.transformResponse,r),r.headers=x.from(r.headers),r},function(r){return Me(r)||(ne(e),r&&r.response&&(r.response.data=te.call(e,e.transformResponse,r.response),r.response.headers=x.from(r.response.headers))),Promise.reject(r)})}const ve="1.9.0",Y={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Y[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ae={};Y.transitional=function(t,n,r){function s(o,i){return"[Axios v"+ve+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!Ae[i]&&(Ae[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};Y.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Tn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new m("option "+o+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const J={assertOptions:Tn,validators:Y},N=J.validators;let L=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ye,response:new ye}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=B(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&J.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:J.assertOptions(s,{encode:N.function,serialize:N.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),J.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=x.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(f=f&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,d=0,b;if(!f){const p=[Te.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,l),b=p.length,u=Promise.resolve(n);d<b;)u=u.then(p[d++],p[d++]);return u}b=c.length;let R=n;for(d=0;d<b;){const p=c[d++],y=c[d++];try{R=p(R)}catch(h){y.call(this,h);break}}try{u=Te.call(this,R)}catch(p){return Promise.reject(p)}for(d=0,b=l.length;d<b;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=B(this.defaults,t);const n=$e(t.baseURL,t.url,t.allowAbsoluteUrls);return qe(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){L.prototype[t]=function(n,r){return this.request(B(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(B(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}L.prototype[t]=n(),L.prototype[t+"Form"]=n(!0)});let An=class Xe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new k(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Xe(function(s){t=s}),cancel:t}}};function xn(e){return function(n){return e.apply(null,n)}}function Cn(e){return a.isObject(e)&&e.isAxiosError===!0}const ce={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ce).forEach(([e,t])=>{ce[t]=e});function Ge(e){const t=new L(e),n=xe(L.prototype.request,t);return a.extend(n,L.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ge(B(e,s))},n}const E=Ge(I);E.Axios=L;E.CanceledError=k;E.CancelToken=An;E.isCancel=Me;E.VERSION=ve;E.toFormData=Q;E.AxiosError=m;E.Cancel=E.CanceledError;E.all=function(t){return Promise.all(t)};E.spread=xn;E.isAxiosError=Cn;E.mergeConfig=B;E.AxiosHeaders=x;E.formToJSON=e=>Ie(a.isHTMLForm(e)?new FormData(e):e);E.getAdapter=Ke.getAdapter;E.HttpStatusCode=ce;E.default=E;const{Axios:Fn,AxiosError:_n,CanceledError:Un,isCancel:Ln,CancelToken:Bn,VERSION:Dn,all:kn,Cancel:jn,isAxiosError:qn,spread:Hn,toFormData:In,AxiosHeaders:Mn,HttpStatusCode:zn,formToJSON:$n,getAdapter:Jn,mergeConfig:Vn}=E;export{_n as A,E as a};
@@ -0,0 +1 @@
1
+ import{a3 as a}from"./main.D0YR3Jat.0.0.50-internal.0.js";const r=async s=>(await a.post("/backup/download",{localStorage:s},{responseType:"arraybuffer"})).data,n=async s=>(await a.post("/backup/restore",s)).data;export{r as d,n as r};
@@ -0,0 +1,13 @@
1
+ var Ts=Object.defineProperty;var As=(i,t,e)=>t in i?Ts(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var w=(i,t,e)=>As(i,typeof t!="symbol"?t+"":t,e);import{C as Qi}from"./@kurkle.D8fDXNIl.0.0.50-internal.0.js";/*!
2
+ * Chart.js v4.4.9
3
+ * https://www.chartjs.org
4
+ * (c) 2025 Chart.js Contributors
5
+ * Released under the MIT License
6
+ */function Q(){}const Ls=(()=>{let i=0;return()=>i++})();function C(i){return i==null}function E(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function M(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function W(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Y(i,t){return W(i)?i:t}function T(i,t){return typeof i>"u"?t:i}const Is=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function L(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function O(i,t,e,s){let n,o,a;if(E(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(M(i))for(a=Object.keys(i),o=a.length,n=0;n<o;n++)t.call(e,i[a[n]],a[n])}function ne(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function oe(i){if(E(i))return i.map(oe);if(M(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=oe(i[e[n]]);return t}return i}function Zi(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Rs(i,t,e,s){if(!Zi(i))return;const n=t[i],o=e[i];M(n)&&M(o)?Bt(n,o,s):t[i]=oe(o)}function Bt(i,t,e){const s=E(t)?t:[t],n=s.length;if(!M(i))return i;e=e||{};const o=e.merger||Rs;let a;for(let r=0;r<n;++r){if(a=s[r],!M(a))continue;const l=Object.keys(a);for(let c=0,h=l.length;c<h;++c)o(l[c],i,a,e)}return i}function It(i,t){return Bt(i,t,{merger:zs})}function zs(i,t,e){if(!Zi(i))return;const s=t[i],n=e[i];M(s)&&M(n)?It(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=oe(n))}const He={"":i=>i,x:i=>i.x,y:i=>i.y};function Fs(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Es(i){const t=Fs(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function xt(i,t){return(He[t]||(He[t]=Es(t)))(i)}function Re(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Vt=i=>typeof i<"u",st=i=>typeof i=="function",We=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Bs(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const j=Math.PI,gt=2*j,ae=Number.POSITIVE_INFINITY,Vs=j/180,$=j/2,rt=j/4,$e=j*2/3,Ji=Math.log10,it=Math.sign;function ee(i,t,e){return Math.abs(i-t)<e}function Ue(i){const t=Math.round(i);i=ee(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Ji(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Ns(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function js(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function re(i){return!js(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Hs(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Ws(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ft(i){return i*(j/180)}function $s(i){return i*(180/j)}function Ke(i){if(!W(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Us(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*j&&(o+=gt),{angle:o,distance:n}}function Ks(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function lt(i){return(i%gt+gt)%gt}function Ys(i,t,e,s){const n=lt(i),o=lt(t),a=lt(e),r=lt(o-n),l=lt(a-n),c=lt(n-o),h=lt(n-a);return n===o||n===a||s||r>l&&c<h}function U(i,t,e){return Math.max(t,Math.min(e,i))}function Xs(i){return U(i,-32768,32767)}function Ye(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function ze(i,t,e){e=e||(a=>i[a]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const De=(i,t,e,s)=>ze(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),qs=(i,t,e)=>ze(i,e,s=>i[s][t]>=e);function Gs(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const ts=["push","pop","shift","splice","unshift"];function Qs(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ts.forEach(e=>{const s="_onData"+Re(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Xe(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(ts.forEach(o=>{delete i[o]}),delete i._chartjs)}function es(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const is=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function ss(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,is.call(window,()=>{s=!1,i.apply(t,e)}))}}function Zs(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const Js=i=>i==="start"?"left":i==="end"?"right":"center",qe=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,$t=i=>i===0||i===1,Ge=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*gt/e)),Qe=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*gt/e)+1,Rt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*$)+1,easeOutSine:i=>Math.sin(i*$),easeInOutSine:i=>-.5*(Math.cos(j*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>$t(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>$t(i)?i:Ge(i,.075,.3),easeOutElastic:i=>$t(i)?i:Qe(i,.075,.3),easeInOutElastic(i){return $t(i)?i:i<.5?.5*Ge(i*2,.1125,.45):.5+.5*Qe(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Rt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Rt.easeInBounce(i*2)*.5:Rt.easeOutBounce(i*2-1)*.5+.5};function ns(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ze(i){return ns(i)?i:new Qi(i)}function ge(i){return ns(i)?i:new Qi(i).saturate(.5).darken(.1).hexString()}const tn=["x","y","borderWidth","radius","tension"],en=["color","borderColor","backgroundColor"];function sn(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:en},numbers:{type:"number",properties:tn}}),i.describe("animations",{_fallback:"animation"}),i.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 nn(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Je=new Map;function on(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Je.get(e);return s||(s=new Intl.NumberFormat(i,t),Je.set(e,s)),s}function os(i,t,e){return on(t,e).format(i)}const an={values(i){return E(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=rn(i,e)}const a=Ji(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),os(i,s,l)}};function rn(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var as={formatters:an};function ln(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:as.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const mt=Object.create(null),Ce=Object.create(null);function zt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function pe(i,t,e){return typeof t=="string"?Bt(zt(i,t),e):Bt(zt(i,""),t)}class cn{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.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=(s,n)=>ge(n.backgroundColor),this.hoverBorderColor=(s,n)=>ge(n.borderColor),this.hoverColor=(s,n)=>ge(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return pe(this,t,e)}get(t){return zt(this,t)}describe(t,e){return pe(Ce,t,e)}override(t,e){return pe(mt,t,e)}route(t,e,s,n){const o=zt(this,t),a=zt(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[n];return M(l)?Object.assign({},c,l):T(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var I=new cn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[sn,nn,ln]);function hn(i){return!i||C(i.size)||C(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ti(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function ct(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function ei(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function ii(i,t,e,s){dn(i,t,e,s)}function dn(i,t,e,s,n){let o,a,r,l,c,h,d,u;const f=t.pointStyle,m=t.rotation,g=t.radius;let p=(m||0)*Vs;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(p),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:i.arc(e,s,g,0,gt),i.closePath();break;case"triangle":h=g,i.moveTo(e+Math.sin(p)*h,s-Math.cos(p)*g),p+=$e,i.lineTo(e+Math.sin(p)*h,s-Math.cos(p)*g),p+=$e,i.lineTo(e+Math.sin(p)*h,s-Math.cos(p)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,a=Math.cos(p+rt)*l,d=Math.cos(p+rt)*l,r=Math.sin(p+rt)*l,u=Math.sin(p+rt)*l,i.arc(e-d,s-r,c,p-j,p-$),i.arc(e+u,s-a,c,p-$,p),i.arc(e+d,s+r,c,p,p+$),i.arc(e-u,s+a,c,p+$,p+j),i.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,h=l,i.rect(e-h,s-l,2*h,2*l);break}p+=rt;case"rectRot":d=Math.cos(p)*g,a=Math.cos(p)*g,r=Math.sin(p)*g,u=Math.sin(p)*g,i.moveTo(e-d,s-r),i.lineTo(e+u,s-a),i.lineTo(e+d,s+r),i.lineTo(e-u,s+a),i.closePath();break;case"crossRot":p+=rt;case"cross":d=Math.cos(p)*g,a=Math.cos(p)*g,r=Math.sin(p)*g,u=Math.sin(p)*g,i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"star":d=Math.cos(p)*g,a=Math.cos(p)*g,r=Math.sin(p)*g,u=Math.sin(p)*g,i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a),p+=rt,d=Math.cos(p)*g,a=Math.cos(p)*g,r=Math.sin(p)*g,u=Math.sin(p)*g,i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"line":a=Math.cos(p)*g,r=Math.sin(p)*g,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(p)*g,s+Math.sin(p)*g);break;case!1:i.closePath();break}i.fill(),i.stroke()}}function rs(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function ls(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function cs(i){i.restore()}function un(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),C(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function fn(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(a,h),i.lineTo(r,h),i.stroke()}}function gn(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function si(i,t,e,s,n,o={}){const a=E(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,un(i,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&gn(i,o.backdrop),r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),C(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),fn(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function Te(i,t){const{x:e,y:s,w:n,h:o,radius:a}=t;i.arc(e+a.topLeft,s+a.topLeft,a.topLeft,1.5*j,j,!0),i.lineTo(e,s+o-a.bottomLeft),i.arc(e+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,j,$,!0),i.lineTo(e+n-a.bottomRight,s+o),i.arc(e+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,$,0,!0),i.lineTo(e+n,s+a.topRight),i.arc(e+n-a.topRight,s+a.topRight,a.topRight,0,-$,!0),i.lineTo(e+a.topLeft,s)}const pn=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,mn=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function bn(i,t){const e=(""+i).match(pn);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const _n=i=>+i||0;function hs(i,t){const e={},s=M(t),n=s?Object.keys(t):t,o=M(i)?s?a=>T(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=_n(o(a));return e}function ds(i){return hs(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Ft(i){return hs(i,["topLeft","topRight","bottomLeft","bottomRight"])}function nt(i){const t=ds(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function G(i,t){i=i||{},t=t||I.font;let e=T(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=T(i.style,t.style);s&&!(""+s).match(mn)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:T(i.family,t.family),lineHeight:bn(T(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:T(i.weight,t.weight),string:""};return n.string=hn(n),n}function Ut(i,t,e,s){let n,o,a;for(n=0,o=i.length;n<o;++n)if(a=i[n],a!==void 0&&a!==void 0)return a}function xn(i,t,e){const{min:s,max:n}=i,o=Is(t,(n-s)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function kt(i,t){return Object.assign(Object.create(i),t)}function Fe(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=ps("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>Fe([r,...i],t,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return fs(r,l,()=>On(l,t,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return oi(r).includes(l)},ownKeys(r){return oi(r)},set(r,l,c){const h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function yt(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:us(i,s),setContext:o=>yt(i,o,e,s),override:o=>yt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return fs(o,a,()=>vn(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function us(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:st(e)?e:()=>e,isIndexable:st(s)?s:()=>s}}const yn=(i,t)=>i?i+Re(t):t,Ee=(i,t)=>M(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function fs(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function vn(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i;let r=s[t];return st(r)&&a.isScriptable(t)&&(r=kn(t,r,i,e)),E(r)&&r.length&&(r=wn(t,r,i,a.isIndexable)),Ee(t,r)&&(r=yt(r,n,o&&o[t],a)),r}function kn(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=t(o,a||s);return r.delete(i),Ee(i,l)&&(l=Be(n._scopes,n,i,l)),l}function wn(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(M(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Be(c,n,i,h);t.push(yt(d,o,a&&a[i],r))}}return t}function gs(i,t,e){return st(i)?i(t,e):i}const Mn=(i,t)=>i===!0?t:typeof i=="string"?xt(t,i):void 0;function Sn(i,t,e,s,n){for(const o of t){const a=Mn(e,o);if(a){i.add(a);const r=gs(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==s)return r}else if(a===!1&&typeof s<"u"&&e!==s)return null}return!1}function Be(i,t,e,s){const n=t._rootScopes,o=gs(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=ni(r,a,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=ni(r,a,o,l,s),l===null)?!1:Fe(Array.from(r),[""],n,o,()=>Pn(t,e,s))}function ni(i,t,e,s,n){for(;e;)e=Sn(i,t,e,s,n);return e}function Pn(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return E(n)&&M(e)?e:n||{}}function On(i,t,e,s){let n;for(const o of t)if(n=ps(yn(o,i),e),typeof n<"u")return Ee(i,n)?Be(e,s,i,n):n}function ps(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function oi(i){let t=i._keys;return t||(t=i._keys=Dn(i._scopes)),t}function Dn(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function Ve(){return typeof window<"u"&&typeof document<"u"}function Ne(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function le(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const de=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Cn(i,t){return de(i).getPropertyValue(t)}const Tn=["top","right","bottom","left"];function pt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Tn[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const An=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Ln(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let a=!1,r,l;if(An(n,o,i.target))r=n,l=o;else{const c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function dt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=de(e),o=n.boxSizing==="border-box",a=pt(n,"padding"),r=pt(n,"border","width"),{x:l,y:c,box:h}=Ln(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:m}=t;return o&&(f-=a.width+r.width,m-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/m*e.height/s)}}function In(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&Ne(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=de(o),l=pt(r,"border","width"),c=pt(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=le(r.maxWidth,o,"clientWidth"),n=le(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||ae,maxHeight:n||ae}}const Kt=i=>Math.round(i*10)/10;function Rn(i,t,e,s){const n=de(i),o=pt(n,"margin"),a=le(n.maxWidth,i,"clientWidth")||ae,r=le(n.maxHeight,i,"clientHeight")||ae,l=In(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=pt(n,"border","width"),f=pt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=Kt(Math.min(c,a,l.maxWidth)),h=Kt(Math.min(h,r,l.maxHeight)),c&&!h&&(h=Kt(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=Kt(Math.floor(h*s))),{width:c,height:h}}function ai(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const zn=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};Ve()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i}();function ri(i,t){const e=Cn(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}const Fn=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},En=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function me(i,t,e){return i?Fn(t,e):En()}function Bn(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Vn(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Yt(i,t,e){return i.options.clip?i[e]:t[e]}function Nn(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:Yt(e,t,"left"),right:Yt(e,t,"right"),top:Yt(s,t,"top"),bottom:Yt(s,t,"bottom")}:t}function jn(i,t){const e=t._clip;if(e.disabled)return!1;const s=Nn(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}/*!
7
+ * Chart.js v4.4.9
8
+ * https://www.chartjs.org
9
+ * (c) 2025 Chart.js Contributors
10
+ * Released under the MIT License
11
+ */class Hn{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=is.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Z=new Hn;const li="transparent",Wn={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Ze(i||li),n=s.valid&&Ze(t||li);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class $n{constructor(t,e,s,n){const o=e[s];n=Ut([t.to,n,o,t.from]);const a=Ut([t.from,o,n]);this._active=!0,this._fn=t.fn||Wn[t.type||typeof a],this._easing=Rt[t.easing]||Rt.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=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Ut([t.to,e,n,t.from]),this._from=Ut([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<s),!this._active){this._target[n]=r,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}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",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class ms{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!M(t))return;const e=Object.keys(I.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!M(o))return;const a={};for(const r of e)a[r]=o[r];(E(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,e){const s=e.options,n=Kn(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Un(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new $n(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return Z.add(this._chart,s),!0}}function Un(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Kn(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function ci(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Yn(i,t,e){if(e===!1)return!1;const s=ci(i,e),n=ci(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function Xn(i){let t,e,s,n;return M(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function bs(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function hi(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let a,r,l,c;if(t===null)return;let h=!1;for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===e){if(h=!0,s.all)continue;break}c=i.values[l],W(c)&&(o||t===0||it(t)===it(c))&&(t+=c)}return!h&&!s.all?0:t}function qn(i,t){const{iScale:e,vScale:s}=t,n=e.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",a=Object.keys(i),r=new Array(a.length);let l,c,h;for(l=0,c=a.length;l<c;++l)h=a[l],r[l]={[n]:h,[o]:i[h]};return r}function be(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Gn(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Qn(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function Zn(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function di(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function ui(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Gn(o,a,s),d=t.length;let u;for(let f=0;f<d;++f){const m=t[f],{[l]:g,[c]:p}=m,b=m._stacks||(m._stacks={});u=b[c]=Zn(n,h,g),u[r]=p,u._top=di(u,a,!0,s.type),u._bottom=di(u,a,!1,s.type);const _=u._visualValues||(u._visualValues={});_[r]=p}}function _e(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function Jn(i,t){return kt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function to(i,t,e){return kt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Pt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const xe=i=>i==="reset"||i==="none",fi=(i,t)=>t?i:Object.assign({},i),eo=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:bs(e,!0),values:null};class Et{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=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=be(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Pt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,m)=>d==="x"?u:d==="r"?m:f,o=e.xAxisID=T(s.xAxisID,_e(t,"x")),a=e.yAxisID=T(s.yAxisID,_e(t,"y")),r=e.rAxisID=T(s.rAxisID,_e(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),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;this._data&&Xe(this._data,this),t._stacked&&Pt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(M(e)){const n=this._cachedMeta;this._data=qn(e,n)}else if(s!==e){if(s){Xe(s,this);const n=this._cachedMeta;Pt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Qs(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=be(e.vScale,e),e.stack!==s.stack&&(n=!0,Pt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(ui(this,e._parsed),e._stacked=be(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{E(n[t])?u=this.parseArrayData(s,n,t,e):M(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[r]===null||c&&d[r]<c[r];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}a&&ui(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),h=o===a,d=new Array(n);let u,f,m;for(u=0,f=n;u<f;++u)m=u+s,d[u]={[r]:h||o.parse(c[m],m),[l]:a.parse(e[m],m)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:a}=t,r=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],r[l]={x:o.parse(d[0],h),y:a.parse(d[1],h)};return r}parseObjectData(t,e,s,n){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(xt(f,r),u),y:a.parse(xt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:bs(n,!0),values:e._stacks[t.axis]._visualValues};return hi(r,a,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let a=o===null?NaN:o;const r=n&&s._stacks[e.axis];n&&r&&(n.values=r,a=hi(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,a=n.length,r=this._getOtherScale(t),l=eo(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Qn(r);let u,f;function m(){f=n[u];const g=f[r.axis];return!W(f[t.axis])||h>g||d<g}for(u=0;u<a&&!(!m()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!m()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],W(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Xn(T(this.options.clip,Yn(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||n.length-r,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const d=n[h];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=to(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Jn(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}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 n=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&Vt(s);if(r)return fi(r,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(I.elements[t]),m=()=>this.getContext(s,n,e),g=c.resolveNamedOptions(u,f,m,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(fi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}const c=new ms(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||xe(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){xe(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!xe(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.data,a=t+e;let r;const l=c=>{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&Pt(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}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){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}w(Et,"defaults",{}),w(Et,"datasetElementType",null),w(Et,"dataElementType",null);function io(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=es(s.sort((n,o)=>n-o))}return i._cache.$bar}function so(i){const t=i.iScale,e=io(t,i.type);let s=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(Vt(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n<o;++n)a=t.getPixelForValue(e[n]),l();for(r=void 0,n=0,o=t.ticks.length;n<o;++n)a=t.getPixelForTick(n),l();return s}function no(i,t,e,s){const n=e.barThickness;let o,a;return C(n)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=n*s,a=1),{chunk:o/s,ratio:a,start:t.pixels[i]-o/2}}function oo(i,t,e,s){const n=t.pixels,o=n[i];let a=i>0?n[i-1]:null,r=i<n.length-1?n[i+1]:null;const l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/s,ratio:e.barPercentage,start:c}}function ao(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),a=Math.min(n,o),r=Math.max(n,o);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function _s(i,t,e,s){return E(i)?ao(i,t,e,s):t[e.axis]=e.parse(i,s),t}function gi(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=r||n.parse(a[c],c),l.push(_s(u,d,o,c));return l}function ye(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function ro(i,t,e){return i!==0?it(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function lo(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function co(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:c,bottom:h}=lo(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[pi(h,a,r,l)]=!0,n=c)),o[pi(n,a,r,l)]=!0,i.borderSkipped=o}function pi(i,t,e,s){return s?(i=ho(i,t,e),i=mi(i,e,t)):i=mi(i,t,e),i}function ho(i,t,e){return i===t?e:i===e?t:i}function mi(i,t,e){return i==="start"?t:i==="end"?e:i}function uo(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class ve extends Et{parsePrimitiveData(t,e,s,n){return gi(t,e,s,n)}parseArrayData(t,e,s,n){return gi(t,e,s,n)}parseObjectData(t,e,s,n){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?r:l,h=a.axis==="x"?r:l,d=[];let u,f,m,g;for(u=s,f=s+n;u<f;++u)g=e[u],m={},m[o.axis]=o.parse(xt(g,c),u),d.push(_s(xt(g,h),m,a,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),a=o._custom,r=ye(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:r}}initialize(){this.enableOptionSharing=!0,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,n){const o=n==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const m=this.getParsed(f),g=o||C(m[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),p=this._calculateBarIndexPixels(f,h),b=(m._stacks||{})[r.axis],_={horizontal:c,base:g.base,enableBorderRadius:!b||ye(m._custom)||a===b._top||a===b._bottom,x:c?g.head:p.center,y:c?p.center:g.head,height:c?p.size:Math.abs(g.size),width:c?Math.abs(g.size):p.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const y=_.options||t[f].options;co(_,y,b,a),uo(_,y,h.ratio),this.updateElement(t[f],f,_,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=s.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(e),l=r&&r[s.axis],c=h=>{const d=h._parsed.find(f=>f[s.axis]===l),u=d&&d[h.vScale.axis];if(C(u)||isNaN(u))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||a.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&a.push(h.stack),h.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o<a;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const r=t.barThickness;return{min:r||so(e),pixels:n,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:n},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),c=l._custom,h=ye(c);let d=l[e.axis],u=0,f=s?this.applyStack(e,l,s):d,m,g;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&it(d)!==it(c.barEnd)&&(u=0),u+=d);const p=!C(o)&&!h?o:u;let b=e.getPixelForValue(p);if(this.chart.getDataVisibility(t)?m=e.getPixelForValue(u+f):m=b,g=m-b,Math.abs(g)<a){g=ro(g,e,r)*a,d===r&&(b-=g/2);const _=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),v=Math.min(_,y),x=Math.max(_,y);b=Math.max(Math.min(b,x),v),m=b+g,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(m)-e.getValueForPixel(b))}if(b===e.getPixelForValue(r)){const _=it(g)*e.getLineWidthForValue(r)/2;b+=_,g-=_}return{size:g,base:b,head:m,center:m+g/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,a=T(n.maxBarThickness,1/0);let r,l;if(e.grouped){const c=o?this._getStackCount(t):e.stackCount,h=n.barThickness==="flex"?oo(t,e,n,c):no(t,e,n,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=h.start+h.chunk*d+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else r=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&!s[o].hidden&&s[o].draw(this._ctx)}}w(ve,"id","bar"),w(ve,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),w(ve,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function ht(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class je{constructor(t){w(this,"options");this.options=t||{}}static override(t){Object.assign(je.prototype,t)}init(){}formats(){return ht()}parse(){return ht()}format(){return ht()}add(){return ht()}diff(){return ht()}startOf(){return ht()}endOf(){return ht()}}var fo={_date:je};function go(i,t,e,s){const{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const c=r._reversePixels?qs:De;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const u=c(o,t,e-d),f=c(o,t,e+d);return{lo:u.lo,hi:f.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:u}=i,f=u.slice(0,h.lo+1).reverse().findIndex(g=>!C(g[d.axis]));h.lo-=Math.max(0,f);const m=u.slice(h.hi).findIndex(g=>!C(g[d.axis]));h.hi+=Math.max(0,m)}return h}}return{lo:0,hi:o.length-1}}function ue(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:c,data:h}=o[r],{lo:d,hi:u}=go(o[r],t,a,n);for(let f=d;f<=u;++f){const m=h[f];m.skip||s(m,c,f)}}}function po(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,a=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function ke(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||ue(i,e,t,function(r,l,c){!n&&!rs(r,i.chartArea,0)||r.inRange(t.x,t.y,s)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function mo(i,t,e,s){let n=[];function o(a,r,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],s),{angle:d}=Us(a,{x:t.x,y:t.y});Ys(d,c,h)&&n.push({element:a,datasetIndex:r,index:l})}return ue(i,e,t,o),n}function bo(i,t,e,s,n,o){let a=[];const r=po(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,n);if(s&&!f)return;const m=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(m))&&!f)return;const p=r(t,m);p<l?(a=[{element:h,datasetIndex:d,index:u}],l=p):p===l&&a.push({element:h,datasetIndex:d,index:u})}return ue(i,e,t,c),a}function we(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?mo(i,t,e,n):bo(i,t,e,s,n,o)}function bi(i,t,e,s,n){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return ue(i,e,t,(l,c,h)=>{l[a]&&l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var _o={modes:{index(i,t,e,s){const n=dt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?ke(i,n,o,s,a):we(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=dt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?ke(i,n,o,s,a):we(i,n,o,!1,s,a);if(r.length>0){const l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(i,t,e,s){const n=dt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return ke(i,n,o,s,a)},nearest(i,t,e,s){const n=dt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return we(i,n,o,e.intersect,s,a)},x(i,t,e,s){const n=dt(t,i);return bi(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=dt(t,i);return bi(i,n,"y",e.intersect,s)}}};const xs=["left","top","right","bottom"];function Ot(i,t){return i.filter(e=>e.pos===t)}function _i(i,t){return i.filter(e=>xs.indexOf(e.pos)===-1&&e.box.axis===t)}function Dt(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function xo(i){const t=[];let e,s,n,o,a,r;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:a,stackWeight:r=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return t}function yo(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!xs.includes(n))continue;const a=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function vo(i,t){const e=yo(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,a,r;for(o=0,a=i.length;o<a;++o){r=i[o];const{fullSize:l}=r.box,c=e[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*s:l&&t.availableWidth,r.height=n):(r.width=s,r.height=h?h*n:l&&t.availableHeight)}return e}function ko(i){const t=xo(i),e=Dt(t.filter(c=>c.box.fullSize),!0),s=Dt(Ot(t,"left"),!0),n=Dt(Ot(t,"right")),o=Dt(Ot(t,"top"),!0),a=Dt(Ot(t,"bottom")),r=_i(t,"x"),l=_i(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Ot(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function xi(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function ys(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function wo(i,t,e,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!M(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&ys(a,o.getPadding());const r=Math.max(0,t.outerWidth-xi(a,i,"left","right")),l=Math.max(0,t.outerHeight-xi(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Mo(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function So(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function At(i,t,e,s){const n=[];let o,a,r,l,c,h;for(o=0,a=i.length,c=0;o<a;++o){r=i[o],l=r.box,l.update(r.width||t.w,r.height||t.h,So(r.horizontal,t));const{same:d,other:u}=wo(t,e,r,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(r)}return c&&At(n,t,e,s)||h}function Xt(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function yi(i,t,e,s){const n=e.padding;let{x:o,y:a}=t;for(const r of i){const l=r.box,c=s[r.stack]||{placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){const d=t.w*h,u=c.size||l.height;Vt(c.start)&&(a=c.start),l.fullSize?Xt(l,n.left,a,e.outerWidth-n.right-n.left,u):Xt(l,t.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*h,u=c.size||l.width;Vt(c.start)&&(o=c.start),l.fullSize?Xt(l,o,n.top,u,e.outerHeight-n.bottom-n.top):Xt(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var qt={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;const n=nt(i.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),r=ko(i.boxes),l=r.vertical,c=r.horizontal;O(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,p)=>p.box.options&&p.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);ys(u,nt(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),m=vo(l.concat(c),d);At(r.fullSize,f,d,m),At(l,f,d,m),At(c,f,d,m)&&At(l,f,d,m),Mo(f),yi(r.leftAndTop,f,d,m),f.x+=f.w,f.y+=f.h,yi(r.rightAndBottom,f,d,m),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},O(r.chartArea,g=>{const p=g.box;Object.assign(p,i.chartArea),p.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class vs{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Po extends vs{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ie="$chartjs",Oo={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},vi=i=>i===null||i==="";function Do(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[ie]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",vi(n)){const o=ri(i,"width");o!==void 0&&(i.width=o)}if(vi(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=ri(i,"height");o!==void 0&&(i.height=o)}return i}const ks=zn?{passive:!0}:!1;function Co(i,t,e){i&&i.addEventListener(t,e,ks)}function To(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,ks)}function Ao(i,t){const e=Oo[i.type]||i.type,{x:s,y:n}=dt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function ce(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Lo(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ce(r.addedNodes,s),a=a&&!ce(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Io(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ce(r.removedNodes,s),a=a&&!ce(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Nt=new Map;let ki=0;function ws(){const i=window.devicePixelRatio;i!==ki&&(ki=i,Nt.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Ro(i,t){Nt.size||window.addEventListener("resize",ws),Nt.set(i,t)}function zo(i){Nt.delete(i),Nt.size||window.removeEventListener("resize",ws)}function Fo(i,t,e){const s=i.canvas,n=s&&Ne(s);if(!n)return;const o=ss((r,l)=>{const c=n.clientWidth;e(r,l),c<n.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),Ro(i,o),a}function Me(i,t,e){e&&e.disconnect(),t==="resize"&&zo(i)}function Eo(i,t,e){const s=i.canvas,n=ss(o=>{i.ctx!==null&&e(Ao(o,i))},i);return Co(s,t,n),n}class Bo extends vs{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Do(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[ie])return!1;const s=e[ie].initial;["height","width"].forEach(o=>{const a=s[o];C(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[ie],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:Lo,detach:Io,resize:Fo}[e]||Eo;n[e]=a(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Me,detach:Me,resize:Me}[e]||To)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Rn(t,e,s,n)}isAttached(t){const e=t&&Ne(t);return!!(e&&e.isConnected)}}function Vo(i){return!Ve()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Po:Bo}class vt{constructor(){w(this,"x");w(this,"y");w(this,"active",!1);w(this,"options");w(this,"$animations")}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return re(this.x)&&re(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}w(vt,"defaults",{}),w(vt,"defaultRoutes");function No(i,t){const e=i.options.ticks,s=jo(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Wo(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return $o(t,c,o,a/n),c;const h=Ho(o,t,n);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(Gt(t,c,h,C(f)?0:r-f,r),d=0,u=a-1;d<u;d++)Gt(t,c,h,o[d],o[d+1]);return Gt(t,c,h,l,C(f)?t.length:l+f),c}return Gt(t,c,h),c}function jo(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function Ho(i,t,e){const s=Uo(i),n=t.length/e;if(!s)return Math.max(n,1);const o=Ns(s);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>n)return l}return Math.max(n,1)}function Wo(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function $o(i,t,e,s){let n=0,o=e[0],a;for(s=Math.ceil(s),a=0;a<i.length;a++)a===o&&(t.push(i[a]),n++,o=e[n*s])}function Gt(i,t,e,s,n){const o=T(s,0),a=Math.min(T(n,i.length),i.length);let r=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,e=l/Math.floor(l/e)),h=o;h<0;)r++,h=Math.round(o+r*e);for(c=Math.max(o,0);c<a;c++)c===h&&(t.push(i[c]),r++,h=Math.round(o+r*e))}function Uo(i){const t=i.length;let e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const Ko=i=>i==="left"?"right":i==="right"?"left":i,wi=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Mi=(i,t)=>Math.min(t||i,i);function Si(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function Yo(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,a=i._endPixel,r=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,a-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-r||l>a+r)))return l}function Xo(i,t){O(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Ct(i){return i.drawTicks?i.tickLength:0}function Pi(i,t){if(!i.display)return 0;const e=G(i.font,t),s=nt(i.padding);return(E(i.text)?i.text.length:1)*e.lineHeight+s.height}function qo(i,t){return kt(i,{scale:t,type:"scale"})}function Go(i,t,e){return kt(i,{tick:e,index:t,type:"tick"})}function Qo(i,t,e){let s=Js(i);return(e&&t!=="right"||!e&&t==="right")&&(s=Ko(s)),s}function Zo(i,t,e,s){const{top:n,left:o,bottom:a,right:r,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,m;const g=a-n,p=r-o;if(i.isHorizontal()){if(f=qe(s,o,r),M(e)){const b=Object.keys(e)[0],_=e[b];m=h[b].getPixelForValue(_)+g-t}else e==="center"?m=(c.bottom+c.top)/2+g-t:m=wi(i,e,t);u=r-o}else{if(M(e)){const b=Object.keys(e)[0],_=e[b];f=h[b].getPixelForValue(_)-p+t}else e==="center"?f=(c.left+c.right)/2-p+t:f=wi(i,e,t);m=qe(s,a,n),d=e==="left"?-$:$}return{titleX:f,titleY:m,maxWidth:u,rotation:d}}class wt extends vt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=Y(t,Number.POSITIVE_INFINITY),e=Y(e,Number.NEGATIVE_INFINITY),s=Y(s,Number.POSITIVE_INFINITY),n=Y(n,Number.NEGATIVE_INFINITY),{min:Y(t,s),max:Y(e,n),minDefined:W(t),maxDefined:W(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),a;if(n&&o)return{min:e,max:s};const r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),n||(e=Math.min(e,a.min)),o||(s=Math.max(s,a.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:Y(e,Y(s,e)),max:Y(s,Y(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.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,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=xn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?Si(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=No(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,s;this.isHorizontal()?(e=this.left,s=this.right):(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(){L(this.options.afterUpdate,[this])}beforeSetDimensions(){L(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){L(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),L(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){L(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=L(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){L(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){L(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=Mi(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let a=n,r,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=U(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-Ct(t.grid)-e.padding-Pi(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=$s(Math.min(Math.asin(U((h.highest.height+6)/r,-1,1)),Math.asin(U(l/c,-1,1))-Math.asin(U(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=Pi(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Ct(o)+l):(t.height=this.maxHeight,t.width=Ct(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,m=ft(this.labelRotation),g=Math.cos(m),p=Math.sin(m);if(r){const b=s.mirror?0:p*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=s.mirror?0:g*d.width+p*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,p,g)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(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++)C(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;e<s.length&&(s=Si(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:n,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/Mi(e,s));let c=0,h=0,d,u,f,m,g,p,b,_,y,v,x;for(d=0;d<e;d+=l){if(m=t[d].label,g=this._resolveTickFontOptions(d),n.font=p=g.string,b=o[p]=o[p]||{data:{},gc:[]},_=g.lineHeight,y=v=0,!C(m)&&!E(m))y=ti(n,b.data,b.gc,y,m),v=_;else if(E(m))for(u=0,f=m.length;u<f;++u)x=m[u],!C(x)&&!E(x)&&(y=ti(n,b.data,b.gc,y,x),v+=_);a.push(y),r.push(v),c=Math.max(y,c),h=Math.max(v,h)}Xo(o,e);const S=a.indexOf(c),k=r.indexOf(h),P=D=>({width:a[D]||0,height:r[D]||0});return{first:P(0),last:P(e-1),widest:P(S),highest:P(k),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Xs(this._alignToPixels?ct(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=Go(this.getContext(),t,s))}return this.$context||(this.$context=qo(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ft(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*s>r*n?r/s:l/n:l*n<r*s?l/s:r/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Ct(o),f=[],m=r.setContext(this.getContext()),g=m.display?m.width:0,p=g/2,b=function(B){return ct(s,B,g)};let _,y,v,x,S,k,P,D,R,z,F,K;if(a==="top")_=b(this.bottom),k=this.bottom-u,D=_-p,z=b(t.top)+p,K=t.bottom;else if(a==="bottom")_=b(this.top),z=t.top,K=b(t.bottom)-p,k=_+p,D=this.top+u;else if(a==="left")_=b(this.right),S=this.right-u,P=_-p,R=b(t.left)+p,F=t.right;else if(a==="right")_=b(this.left),R=t.left,F=b(t.right)-p,S=_+p,P=this.left+u;else if(e==="x"){if(a==="center")_=b((t.top+t.bottom)/2+.5);else if(M(a)){const B=Object.keys(a)[0],H=a[B];_=b(this.chart.scales[B].getPixelForValue(H))}z=t.top,K=t.bottom,k=_+p,D=k+u}else if(e==="y"){if(a==="center")_=b((t.left+t.right)/2);else if(M(a)){const B=Object.keys(a)[0],H=a[B];_=b(this.chart.scales[B].getPixelForValue(H))}S=_-p,P=S-u,R=t.left,F=t.right}const tt=T(n.ticks.maxTicksLimit,d),A=Math.max(1,Math.ceil(d/tt));for(y=0;y<d;y+=A){const B=this.getContext(y),H=o.setContext(B),jt=r.setContext(B),Ht=H.lineWidth,bt=H.color,Wt=jt.dash||[],_t=jt.dashOffset,Mt=H.tickWidth,ot=H.tickColor,St=H.tickBorderDash||[],at=H.tickBorderDashOffset;v=Yo(this,y,l),v!==void 0&&(x=ct(s,v,Ht),c?S=P=R=F=x:k=D=z=K=x,f.push({tx1:S,ty1:k,tx2:P,ty2:D,x1:R,y1:z,x2:F,y2:K,width:Ht,color:bt,borderDash:Wt,borderDashOffset:_t,tickWidth:Mt,tickColor:ot,tickBorderDash:St,tickBorderDashOffset:at}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Ct(s.grid),f=u+h,m=d?-h:f,g=-ft(this.labelRotation),p=[];let b,_,y,v,x,S,k,P,D,R,z,F,K="middle";if(n==="top")S=this.bottom-m,k=this._getXAxisLabelAlignment();else if(n==="bottom")S=this.top+m,k=this._getXAxisLabelAlignment();else if(n==="left"){const A=this._getYAxisLabelAlignment(u);k=A.textAlign,x=A.x}else if(n==="right"){const A=this._getYAxisLabelAlignment(u);k=A.textAlign,x=A.x}else if(e==="x"){if(n==="center")S=(t.top+t.bottom)/2+f;else if(M(n)){const A=Object.keys(n)[0],B=n[A];S=this.chart.scales[A].getPixelForValue(B)+f}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")x=(t.left+t.right)/2-f;else if(M(n)){const A=Object.keys(n)[0],B=n[A];x=this.chart.scales[A].getPixelForValue(B)}k=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?K="top":l==="end"&&(K="bottom"));const tt=this._getLabelSizes();for(b=0,_=r.length;b<_;++b){y=r[b],v=y.label;const A=o.setContext(this.getContext(b));P=this.getPixelForTick(b)+o.labelOffset,D=this._resolveTickFontOptions(b),R=D.lineHeight,z=E(v)?v.length:1;const B=z/2,H=A.color,jt=A.textStrokeColor,Ht=A.textStrokeWidth;let bt=k;a?(x=P,k==="inner"&&(b===_-1?bt=this.options.reverse?"left":"right":b===0?bt=this.options.reverse?"right":"left":bt="center"),n==="top"?c==="near"||g!==0?F=-z*R+R/2:c==="center"?F=-tt.highest.height/2-B*R+R:F=-tt.highest.height+R/2:c==="near"||g!==0?F=R/2:c==="center"?F=tt.highest.height/2-B*R:F=tt.highest.height-z*R,d&&(F*=-1),g!==0&&!A.showLabelBackdrop&&(x+=R/2*Math.sin(g))):(S=P,F=(1-z)*R/2);let Wt;if(A.showLabelBackdrop){const _t=nt(A.backdropPadding),Mt=tt.heights[b],ot=tt.widths[b];let St=F-_t.top,at=0-_t.left;switch(K){case"middle":St-=Mt/2;break;case"bottom":St-=Mt;break}switch(k){case"center":at-=ot/2;break;case"right":at-=ot;break;case"inner":b===_-1?at-=ot:b>0&&(at-=ot/2);break}Wt={left:at,top:St,width:ot+_t.width,height:Mt+_t.height,color:A.backdropColor}}p.push({label:v,font:D,textOffset:F,options:{rotation:g,color:H,strokeColor:jt,strokeWidth:Ht,textAlign:bt,textBaseline:K,translation:[x,S],backdrop:Wt}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ft(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,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:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){const l=n[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),a=s.display?o.width:0;if(!a)return;const r=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=ct(t,this.left,a)-a/2,h=ct(t,this.right,r)+r/2,d=u=l):(d=ct(t,this.top,a)-a/2,u=ct(t,this.bottom,r)+r/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&ls(s,n);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,c=a.label,h=a.textOffset;si(s,c,0,h,l,r)}n&&cs(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=G(s.font),a=nt(s.padding),r=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||M(e)?(l+=a.bottom,E(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=Zo(this,l,e,r);si(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:Qo(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=T(t.grid&&t.grid.z,-1),n=T(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==wt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[s]===this.id&&(!t||r.type===t)&&n.push(r)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return G(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Qt{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;ea(e)&&(s=this.register(e));const n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Jo(t,a,s),this.override&&I.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in I[n]&&(delete I[n][s],this.override&&delete mt[s])}}function Jo(i,t,e){const s=Bt(Object.create(null),[e?I.get(e):{},I.get(t),i.defaults]);I.set(t,s),i.defaultRoutes&&ta(t,i.defaultRoutes),i.descriptors&&I.describe(t,i.descriptors)}function ta(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");I.route(o,n,l,r)})}function ea(i){return"id"in i&&"defaults"in i}class ia{constructor(){this.controllers=new Qt(Et,"datasets",!0),this.elements=new Qt(vt,"elements"),this.plugins=new Qt(Object,"plugins"),this.scales=new Qt(wt,"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(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):O(n,a=>{const r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){const n=Re(t);L(s["before"+n],[],s),e[t](s),L(s["after"+n],[],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 n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var q=new ia;class sa{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(const o of t){const a=o.plugin,r=a[s],l=[e,n,o.options];if(L(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){C(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,n=T(s.options&&s.options.plugins,{}),o=na(s);return n===!1&&!e?[]:aa(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function na(i){const t={},e=[],s=Object.keys(q.plugins.items);for(let o=0;o<s.length;o++)e.push(q.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const a=n[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function oa(i,t){return!t&&i===!1?null:i===!0?{}:i}function aa(i,{plugins:t,localIds:e},s,n){const o=[],a=i.getContext();for(const r of t){const l=r.id,c=oa(s[l],n);c!==null&&o.push({plugin:r,options:ra(i.config,{plugin:r,local:e[l]},c,a)})}return o}function ra(i,{plugin:t,local:e},s,n){const o=i.pluginScopeKeys(t),a=i.getOptionScopes(s,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ae(i,t){const e=I.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function la(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function ca(i,t){return i===t?"_index_":"_value_"}function Oi(i){if(i==="x"||i==="y"||i==="r")return i}function ha(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Le(i,...t){if(Oi(i))return i;for(const e of t){const s=e.axis||ha(e.position)||i.length>1&&Oi(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Di(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function da(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return Di(i,"x",e[0])||Di(i,"y",e[0])}return{}}function ua(i,t){const e=mt[i.type]||{scales:{}},s=t.scales||{},n=Ae(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{const r=s[a];if(!M(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Le(a,r,da(a,i),I.scales[r.type]),c=ca(l,n),h=e.scales||{};o[a]=It(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,l=a.indexAxis||Ae(r,t),h=(mt[r]||{}).scales||{};Object.keys(h).forEach(d=>{const u=la(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),It(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];It(r,[I.scales[r.type],I.scale])}),o}function Ms(i){const t=i.options||(i.options={});t.plugins=T(t.plugins,{}),t.scales=ua(i,t)}function Ss(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function fa(i){return i=i||{},i.data=Ss(i.data),Ms(i),i}const Ci=new Map,Ps=new Set;function Zt(i,t){let e=Ci.get(i);return e||(e=t(),Ci.set(i,e),Ps.add(e)),e}const Tt=(i,t,e)=>{const s=xt(t,e);s!==void 0&&i.add(s)};class ga{constructor(t){this._config=fa(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=Ss(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(),Ms(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Zt(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Zt(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Zt(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return Zt(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Tt(l,t,d))),h.forEach(d=>Tt(l,n,d)),h.forEach(d=>Tt(l,mt[o]||{},d)),h.forEach(d=>Tt(l,I,d)),h.forEach(d=>Tt(l,Ce,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ps.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,mt[e]||{},I.datasets[e]||{},{type:e},I,Ce]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Ti(this._resolverCache,t,n);let l=a;if(ma(a,e)){o.$shared=!1,s=st(s)?s():s;const c=this.createResolver(t,s,r);l=yt(a,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=Ti(this._resolverCache,t,s);return M(e)?yt(o,e,void 0,n):o}}function Ti(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:Fe(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}const pa=i=>M(i)&&Object.getOwnPropertyNames(i).some(t=>st(i[t]));function ma(i,t){const{isScriptable:e,isIndexable:s}=us(i);for(const n of t){const o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(st(r)||pa(r))||a&&E(r))return!0}return!1}var ba="4.4.9";const _a=["top","bottom","left","right","chartArea"];function Ai(i,t){return i==="top"||i==="bottom"||_a.indexOf(i)===-1&&t==="x"}function Li(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Ii(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),L(e&&e.onComplete,[i],t)}function xa(i){const t=i.chart,e=t.options.animation;L(e&&e.onProgress,[i],t)}function Os(i){return Ve()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const se={},Ri=i=>{const t=Os(i);return Object.values(se).filter(e=>e.canvas===t).pop()};function ya(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function va(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}class ut{static register(...t){q.add(...t),zi()}static unregister(...t){q.remove(...t),zi()}constructor(t,e){const s=this.config=new ga(e),n=Os(t),o=Ri(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Vo(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Ls(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new sa,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Zs(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],se[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Z.listen(this,"complete",Ii),Z.listen(this,"progress",xa),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return C(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return q}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ai(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ei(this.canvas,this.ctx),this}stop(){return Z.stop(this),this}resize(t,e){Z.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,ai(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),L(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};O(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=Le(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),O(o,a=>{const r=a.options,l=r.id,c=Le(l,r),h=T(r.type,a.dtype);(r.position===void 0||Ai(r.position,c)!==Ai(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=q.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),O(n,(a,r)=>{a||delete s[r]}),O(s,a=>{qt.configure(this,a,a.options),qt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(Li("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let a=this.getDatasetMeta(s);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(s),a=this.getDatasetMeta(s)),a.type=r,a.indexAxis=o.indexAxis||Ae(r,this.options),a.order=o.order||0,a.index=s,a.label=""+o.label,a.visible=this.isDatasetVisible(s),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{const l=q.getController(r),{datasetElementType:c,dataElementType:h}=I.datasets[r];Object.assign(l,{dataElementType:q.getElement(h),datasetElementType:c&&q.getElement(c)}),a.controller=new l(this,s),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){O(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()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),n||O(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Li("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){O(this.scales,t=>{qt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!We(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const a=s==="_removeElements"?-o:o;ya(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!We(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;qt.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],O(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,st(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Z.has(this)?this.attached&&!Z.running(this)&&Z.start(this):(this.draw(),Ii({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const a=e[n];(!t||a.visible)&&s.push(a)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)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,s={meta:t,index:t.index,cancelable:!0},n=jn(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&ls(e,n),t.controller.draw(),n&&cs(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return rs(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=_o.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=kt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;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 n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);Vt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Z.remove(this),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(),t&&(this.unbindEvents(),ei(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete se[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};O(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){O(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},O(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:o,index:a})=>{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!ne(s,e)&&(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 n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=Bs(t),c=va(t,this._lastEvent,s,l);s&&(this._lastEvent=null,L(o.onHover,[t,r,this],this),l&&L(o.onClick,[t,r,this],this));const h=!ne(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}w(ut,"defaults",I),w(ut,"instances",se),w(ut,"overrides",mt),w(ut,"registry",q),w(ut,"version",ba),w(ut,"getChart",Ri);function zi(){return O(ut.instances,i=>i._plugins.invalidate())}function Ds(i,t){const{x:e,y:s,base:n,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,l,c,h,d;return i.horizontal?(d=a/2,r=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,r=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:r,top:c,right:l,bottom:h}}function et(i,t,e,s){return i?0:U(t,e,s)}function ka(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=ds(s);return{t:et(n.top,o.top,0,e),r:et(n.right,o.right,0,t),b:et(n.bottom,o.bottom,0,e),l:et(n.left,o.left,0,t)}}function wa(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Ft(n),a=Math.min(t,e),r=i.borderSkipped,l=s||M(n);return{topLeft:et(!l||r.top||r.left,o.topLeft,0,a),topRight:et(!l||r.top||r.right,o.topRight,0,a),bottomLeft:et(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:et(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Ma(i){const t=Ds(i),e=t.right-t.left,s=t.bottom-t.top,n=ka(i,e/2,s/2),o=wa(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-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 Se(i,t,e,s){const n=t===null,o=e===null,r=i&&!(n&&o)&&Ds(i,s);return r&&(n||Ye(t,r.left,r.right))&&(o||Ye(e,r.top,r.bottom))}function Sa(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Pa(i,t){i.rect(t.x,t.y,t.w,t.h)}function Pe(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,a=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+a,radius:i.radius}}class Oe extends vt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:a}=Ma(this),r=Sa(a.radius)?Te:Pa;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,Pe(a,e,o)),t.clip(),r(t,Pe(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,Pe(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Se(this,t,e,s)}inXRange(t,e){return Se(this,t,null,e)}inYRange(t,e){return Se(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}w(Oe,"id","bar"),w(Oe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),w(Oe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const Lt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;t<e;++t){const r=i[t].element;if(r&&r.hasValue()){const l=r.tooltipPosition();s.add(l.x),n+=l.y,++o}}return o===0||s.size===0?!1:{x:[...s].reduce((r,l)=>r+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o<a;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Ks(t,c);h<n&&(n=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function X(i,t){return t&&(E(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function J(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
12
+ `)>-1?i.split(`
13
+ `):i}function Oa(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Fi(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=G(t.bodyFont),c=G(t.titleFont),h=G(t.footerFont),d=o.length,u=n.length,f=s.length,m=nt(t.padding);let g=m.height,p=0,b=s.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const y=function(v){p=Math.max(p,e.measureText(v).width+_)};return e.save(),e.font=c.string,O(i.title,y),e.font=l.string,O(i.beforeBody.concat(i.afterBody),y),_=t.displayColors?a+2+t.boxPadding:0,O(s,v=>{O(v.before,y),O(v.lines,y),O(v.after,y)}),_=0,e.font=h.string,O(i.footer,y),e.restore(),p+=m.width,{width:p,height:g}}function Da(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function Ca(i,t,e,s){const{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function Ta(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),Ca(c,i,t,e)&&(c="center"),c}function Ei(i,t,e){const s=e.yAlign||t.yAlign||Da(i,e);return{xAlign:e.xAlign||t.xAlign||Ta(i,t,e,s),yAlign:s}}function Aa(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function La(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Bi(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Ft(a);let m=Aa(t,r);const g=La(t,l,c);return l==="center"?r==="left"?m+=c:r==="right"&&(m-=c):r==="left"?m-=Math.max(h,u)+n:r==="right"&&(m+=Math.max(d,f)+n),{x:U(m,0,s.width-t.width),y:U(g,0,s.height-t.height)}}function Jt(i,t,e){const s=nt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function Vi(i){return X([],J(i))}function Ia(i,t,e){return kt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Ni(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Cs={beforeTitle:Q,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:Q,beforeBody:Q,beforeLabel:Q,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return C(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Q,afterBody:Q,beforeFooter:Q,footer:Q,afterFooter:Q};function V(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?Cs[t].call(e,s):n}class Ie extends vt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new ms(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Ia(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=V(s,"beforeTitle",this,t),o=V(s,"title",this,t),a=V(s,"afterTitle",this,t);let r=[];return r=X(r,J(n)),r=X(r,J(o)),r=X(r,J(a)),r}getBeforeBody(t,e){return Vi(V(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return O(t,o=>{const a={before:[],lines:[],after:[]},r=Ni(s,o);X(a.before,J(V(r,"beforeLabel",this,o))),X(a.lines,V(r,"label",this,o)),X(a.after,J(V(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return Vi(V(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=V(s,"beforeFooter",this,t),o=V(s,"footer",this,t),a=V(s,"afterFooter",this,t);let r=[];return r=X(r,J(n)),r=X(r,J(o)),r=X(r,J(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;l<c;++l)r.push(Oa(this.chart,e[l]));return t.filter&&(r=r.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),O(r,h=>{const d=Ni(t.callbacks,h);n.push(V(d,"labelColor",this,h)),o.push(V(d,"labelPointStyle",this,h)),a.push(V(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=Lt[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const l=this._size=Fi(this,s),c=Object.assign({},r,l),h=Ei(this.chart,s,c),d=Bi(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Ft(r),{x:u,y:f}=t,{width:m,height:g}=e;let p,b,_,y,v,x;return o==="center"?(v=f+g/2,n==="left"?(p=u,b=p-a,y=v+a,x=v-a):(p=u+m,b=p+a,y=v-a,x=v+a),_=p):(n==="left"?b=u+Math.max(l,h)+a:n==="right"?b=u+m-Math.max(c,d)-a:b=this.caretX,o==="top"?(y=f,v=y-a,p=b-a,_=b+a):(y=f+g,v=y+a,p=b+a,_=b-a),x=y),{x1:p,x2:b,x3:_,y1:y,y2:v,y3:x}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,l;if(o){const c=me(s.rtl,this.x,this.width);for(t.x=Jt(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=G(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=s.titleMarginBottom-r)}}_drawColorBox(t,e,s,n,o){const a=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=G(o.bodyFont),d=Jt(this,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,m=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation},p=n.leftForLtr(u,c)+c/2,b=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,ii(t,g,p,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,ii(t,g,p,b)}else{t.lineWidth=M(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const g=n.leftForLtr(u,c),p=n.leftForLtr(n.xPlus(u,1),c-2),b=Ft(a.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Te(t,{x:g,y:m,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Te(t,{x:p,y:m+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,m,c,l),t.strokeRect(g,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(p,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=G(s.bodyFont);let u=d.lineHeight,f=0;const m=me(s.rtl,this.x,this.width),g=function(P){e.fillText(P,m.x(t.x+f),t.y+u/2),t.y+=u+o},p=m.textAlign(a);let b,_,y,v,x,S,k;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Jt(this,p,s),e.fillStyle=s.bodyColor,O(this.beforeBody,g),f=r&&p!=="right"?a==="center"?c/2+h:c+2+h:0,v=0,S=n.length;v<S;++v){for(b=n[v],_=this.labelTextColors[v],e.fillStyle=_,O(b.before,g),y=b.lines,r&&y.length&&(this._drawColorBox(e,t,v,m,s),u=Math.max(d.lineHeight,l)),x=0,k=y.length;x<k;++x)g(y[x]),u=d.lineHeight;O(b.after,g)}f=0,u=d.lineHeight,O(this.afterBody,g),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let a,r;if(o){const l=me(s.rtl,this.x,this.width);for(t.x=Jt(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",a=G(s.footerFont),e.fillStyle=s.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:m}=Ft(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,s,n),e.lineTo(r+c-u,l),e.quadraticCurveTo(r+c,l,r+c,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(r+c,l+h-m),e.quadraticCurveTo(r+c,l+h,r+c-m,l+h),a==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(r+f,l+h),e.quadraticCurveTo(r,l+h,r,l+h-f),a==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=Lt[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=Fi(this,t),l=Object.assign({},a,this._size),c=Ei(e,t,l),h=Bi(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=nt(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),Bn(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Vn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!ne(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!ne(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=Lt[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}w(Ie,"positioners",Lt);var $a={id:"tooltip",_element:Ie,positioners:Lt,afterInit(i,t,e){e&&(i.tooltip=new Ie({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Cs},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Ra=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function za(i,t,e,s){const n=i.indexOf(t);if(n===-1)return Ra(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const Fa=(i,t)=>i===null?null:U(Math.round(i),0,t);function ji(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class Hi extends wt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(C(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:za(s,t,T(e,t),this._addedLabels),Fa(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){return ji.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}w(Hi,"id","category"),w(Hi,"defaults",{ticks:{callback:ji}});function Ea(i,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,m=h-1,{min:g,max:p}=t,b=!C(a),_=!C(r),y=!C(c),v=(p-g)/(d+1);let x=Ue((p-g)/m/f)*f,S,k,P,D;if(x<1e-14&&!b&&!_)return[{value:g},{value:p}];D=Math.ceil(p/x)-Math.floor(g/x),D>m&&(x=Ue(D*x/m/f)*f),C(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),n==="ticks"?(k=Math.floor(g/x)*x,P=Math.ceil(p/x)*x):(k=g,P=p),b&&_&&o&&Hs((r-a)/o,x/1e3)?(D=Math.round(Math.min((r-a)/x,h)),x=(r-a)/D,k=a,P=r):y?(k=b?a:k,P=_?r:P,D=c-1,x=(P-k)/D):(D=(P-k)/x,ee(D,Math.round(D),x/1e3)?D=Math.round(D):D=Math.ceil(D));const R=Math.max(Ke(x),Ke(k));S=Math.pow(10,C(l)?R:l),k=Math.round(k*S)/S,P=Math.round(P*S)/S;let z=0;for(b&&(u&&k!==a?(e.push({value:a}),k<a&&z++,ee(Math.round((k+z*x)*S)/S,a,Wi(a,v,i))&&z++):k<a&&z++);z<D;++z){const F=Math.round((k+z*x)*S)/S;if(_&&F>r)break;e.push({value:F})}return _&&u&&P!==r?e.length&&ee(e[e.length-1].value,r,Wi(r,v,i))?e[e.length-1].value=r:e.push({value:r}):(!_||P===r)&&e.push({value:P}),e}function Wi(i,t,{horizontal:e,minRotation:s}){const n=ft(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Ba extends wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return C(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){const l=it(n),c=it(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={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!==!1},o=this._range||this,a=Ea(n,o);return t.bounds==="ticks"&&Ws(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return os(t,this.chart.options.locale,this.options.ticks.format)}}class $i extends Ba{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=ft(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}w($i,"id","linear"),w($i,"defaults",{ticks:{callback:as.formatters.numeric}});const fe={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},N=Object.keys(fe);function Ui(i,t){return i-t}function Ki(i,t){if(C(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return typeof s=="function"&&(a=s(a)),W(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(re(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function Yi(i,t,e,s){const n=N.length;for(let o=N.indexOf(i);o<n-1;++o){const a=fe[N[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=s)return N[o]}return N[n-1]}function Va(i,t,e,s,n){for(let o=N.length-1;o>=N.indexOf(e);o--){const a=N[o];if(fe[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return N[e?N.indexOf(e):0]}function Na(i){for(let t=N.indexOf(i)+1,e=N.length;t<e;++t)if(fe[N[t]].common)return N[t]}function Xi(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=ze(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function ja(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function qi(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],n[r]=a,s.push({value:r,major:!1});return o===0||!e?s:ja(i,s,n,e)}class he extends wt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const s=t.time||(t.time={}),n=this._adapter=new fo._date(t.adapters.date);n.init(e),It(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Ki(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!r&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=W(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=W(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=this.max,r=Gs(n,o,a);return this._unit=e.unit||(s.autoSkip?Yi(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Va(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:Na(this._unit),this.initOffsets(n),t.reverse&&r.reverse(),qi(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=U(e,0,a),s=U(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||Yi(o.minUnit,e,s,this._getLabelCapacity(e)),r=T(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=re(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const m=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,r,a),f++)Xi(h,u,m);return(u===s||n.bounds==="ticks"||f===1)&&Xi(h,u,m),Object.keys(h).sort(Ui).map(g=>+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.ticks.callback;if(a)return L(a,[t,e,s],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=ft(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:s*o+r*a,h:s*a+r*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,qi(this,[t],this._majorUnit),n),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(Ki(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return es(t.sort(Ui))}}w(he,"id","time"),w(he,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function te(i,t,e){let s=0,n=i.length-1,o,a,r,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=De(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=De(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class Gi extends he{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=te(e,this.min),this._tableRange=te(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a<r;++a)c=t[a],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a<r;++a)h=n[a+1],l=n[a-1],c=n[a],Math.round((h+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o}_generate(){const t=this.min,e=this.max;let s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(te(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return te(this._table,s*this._tableRange+this._minPos,!0)}}w(Gi,"id","timeseries"),w(Gi,"defaults",he.defaults);export{ve as B,ut as C,$i as L,Hi as a,Oe as b,$a as p};
@@ -0,0 +1 @@
1
+ import{F as o,c as t,d as n,e as r}from"./@vue.B5vqhCp2.0.0.50-internal.0.js";const c={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function s(a,e){return n(),t("svg",c,e[0]||(e[0]=[r("path",{fill:"currentColor",d:"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41z"},null,-1)]))}const L=o({name:"mdi-close-circle",render:s});export{L as _};
@@ -0,0 +1 @@
1
+ import{c as j}from"./redux.BFxtlG_c.0.0.50-internal.0.js";import{i as s,a as M}from"./@react-dnd.CcwRs9xb.0.0.50-internal.0.js";function H(t,e,r){return e.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,t)}function N(t,e){return t.filter(r=>r!==e)}function U(t){return typeof t=="object"}function L(t,e){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};t.forEach(n),e.forEach(n);const i=[];return r.forEach((o,c)=>{o===1&&i.push(c)}),i}function k(t,e){return t.filter(r=>e.indexOf(r)>-1)}const E="dnd-core/INIT_COORDS",p="dnd-core/BEGIN_DRAG",I="dnd-core/PUBLISH_DRAG_SOURCE",h="dnd-core/HOVER",y="dnd-core/DROP",S="dnd-core/END_DRAG";function _(t,e){return{type:E,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const V={type:E,payload:{clientOffset:null,sourceClientOffset:null}};function B(t){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:c}=n,u=t.getMonitor(),l=t.getRegistry();t.dispatch(_(o)),q(r,u,l);const f=W(r,u);if(f==null){t.dispatch(V);return}let b=null;if(o){if(!c)throw new Error("getSourceClientOffset must be defined");F(c),b=c(f)}t.dispatch(_(o,b));const D=l.getSource(f).beginDrag(u,f);if(D==null)return;X(D),l.pinSource(f);const $=l.getSourceType(f);return{type:p,payload:{itemType:$,item:D,sourceId:f,clientOffset:o||null,sourceClientOffset:b||null,isSourcePublic:!!i}}}}function q(t,e,r){s(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){s(r.getSource(n),"Expected sourceIds to be registered.")})}function F(t){s(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function X(t){s(U(t),"Item must be an object.")}function W(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function J(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){z(t,i,r[i])})}return t}function Q(t){return function(r={}){const n=t.getMonitor(),i=t.getRegistry();Y(n),ee(n).forEach((c,u)=>{const l=Z(c,u,i,n),f={type:y,payload:{dropResult:J({},r,l)}};t.dispatch(f)})}}function Y(t){s(t.isDragging(),"Cannot call drop while not dragging."),s(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Z(t,e,r,n){const i=r.getTarget(t);let o=i?i.drop(n,t):void 0;return K(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function K(t){s(typeof t>"u"||U(t),"Drop result must either be an object or undefined.")}function ee(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function te(t){return function(){const r=t.getMonitor(),n=t.getRegistry();re(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:S}}}function re(t){s(t.isDragging(),"Cannot call endDrag while not dragging.")}function T(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function ne(t){return function(r,{clientOffset:n}={}){ie(r);const i=r.slice(0),o=t.getMonitor(),c=t.getRegistry(),u=o.getItemType();return se(i,c,u),oe(i,o,c),ce(i,o,c),{type:h,payload:{targetIds:i,clientOffset:n||null}}}}function ie(t){s(Array.isArray(t),"Expected targetIds to be an array.")}function oe(t,e,r){s(e.isDragging(),"Cannot call hover while not dragging."),s(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const i=t[n];s(t.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(i);s(o,"Expected targetIds to be registered.")}}function se(t,e,r){for(let n=t.length-1;n>=0;n--){const i=t[n],o=e.getTargetType(i);T(o,r)||t.splice(n,1)}}function ce(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function ue(t){return function(){if(t.getMonitor().isDragging())return{type:I}}}function ae(t){return{beginDrag:B(t),publishDragSource:ue(t),hover:ne(t),drop:Q(t),endDrag:te(t)}}class fe{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(o){return(...c)=>{const u=o.apply(e,c);typeof u<"u"&&r(u)}}const i=ae(this);return Object.keys(i).reduce((o,c)=>{const u=i[c];return o[c]=n(u),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function le(t,e){return{x:t.x+e.x,y:t.y+e.y}}function G(t,e){return{x:t.x-e.x,y:t.y-e.y}}function de(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:G(le(e,n),r)}function ge(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:G(e,r)}const g=[],C=[];g.__IS_NONE__=!0;C.__IS_ALL__=!0;function pe(t,e){return t===g?!1:t===C||typeof e>"u"?!0:k(e,t).length>0}class he{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;s(typeof e=="function","listener must be a function."),s(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const c=this.store.getState(),u=c.stateId;try{u===i||u===i+1&&!pe(c.dirtyHandlerIds,n)||e()}finally{i=u}};return this.store.subscribe(o)}subscribeToOffsetChange(e){s(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return s(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(s(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();return T(n,i)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(s(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),i=this.getItemType();return n!==i?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),o=this.getItemType();if(o&&!T(i,o))return!1;const c=this.getTargetIds();if(!c.length)return!1;const u=c.indexOf(e);return n?u===c.length-1:u>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return de(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ge(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const R="dnd-core/ADD_SOURCE",v="dnd-core/ADD_TARGET",x="dnd-core/REMOVE_SOURCE",O="dnd-core/REMOVE_TARGET";function ye(t){return{type:R,payload:{sourceId:t}}}function Se(t){return{type:v,payload:{targetId:t}}}function Oe(t){return{type:x,payload:{sourceId:t}}}function be(t){return{type:O,payload:{targetId:t}}}function De(t){s(typeof t.canDrag=="function","Expected canDrag to be a function."),s(typeof t.beginDrag=="function","Expected beginDrag to be a function."),s(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Te(t){s(typeof t.canDrop=="function","Expected canDrop to be a function."),s(typeof t.hover=="function","Expected hover to be a function."),s(typeof t.drop=="function","Expected beginDrag to be a function.")}function m(t,e){if(e&&Array.isArray(t)){t.forEach(r=>m(r,!1));return}s(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var a;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(a||(a={}));let me=0;function Ee(){return me++}function Ie(t){const e=Ee().toString();switch(t){case a.SOURCE:return`S${e}`;case a.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function w(t){switch(t[0]){case"S":return a.SOURCE;case"T":return a.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function P(t,e){const r=t.entries();let n=!1;do{const{done:i,value:[,o]}=r.next();if(o===e)return!0;n=!!i}while(!n);return!1}class Ce{addSource(e,r){m(e),De(r);const n=this.addHandler(a.SOURCE,e,r);return this.store.dispatch(ye(n)),n}addTarget(e,r){m(e,!0),Te(r);const n=this.addHandler(a.TARGET,e,r);return this.store.dispatch(Se(n)),n}containsHandler(e){return P(this.dragSources,e)||P(this.dropTargets,e)}getSource(e,r=!1){return s(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return s(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return w(e)===a.SOURCE}isTargetId(e){return w(e)===a.TARGET}removeSource(e){s(this.getSource(e),"Expected an existing source."),this.store.dispatch(Oe(e)),M(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){s(this.getTarget(e),"Expected an existing target."),this.store.dispatch(be(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);s(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){s(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const i=Ie(e);return this.types.set(i,r),e===a.SOURCE?this.dragSources.set(i,n):e===a.TARGET&&this.dropTargets.set(i,n),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Re=(t,e)=>t===e;function ve(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function xe(t,e,r=Re){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function _e(t=g,e){switch(e.type){case h:break;case R:case v:case O:case x:return g;case p:case I:case S:case y:default:return C}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,i=L(r,n);if(!(i.length>0||!xe(r,n)))return g;const c=n[n.length-1],u=r[r.length-1];return c!==u&&(c&&i.push(c),u&&i.push(u)),i}function we(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){we(t,i,r[i])})}return t}const A={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ae(t=A,e){const{payload:r}=e;switch(e.type){case E:case p:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case h:return ve(t.clientOffset,r.clientOffset)?t:Pe({},t,{clientOffset:r.clientOffset});case S:case y:return A;default:return t}}function Ue(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ue(t,i,r[i])})}return t}const Ge={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function $e(t=Ge,e){const{payload:r}=e;switch(e.type){case p:return d({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case I:return d({},t,{isSourcePublic:!0});case h:return d({},t,{targetIds:r.targetIds});case O:return t.targetIds.indexOf(r.targetId)===-1?t:d({},t,{targetIds:N(t.targetIds,r.targetId)});case y:return d({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case S:return d({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function je(t=0,e){switch(e.type){case R:case v:return t+1;case x:case O:return t-1;default:return t}}function Me(t=0){return t+1}function He(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){He(t,i,r[i])})}return t}function Le(t={},e){return{dirtyHandlerIds:_e(t.dirtyHandlerIds,{type:e.type,payload:Ne({},e.payload,{prevTargetIds:H(t,"dragOperation.targetIds",[])})}),dragOffset:Ae(t.dragOffset,e),refCount:je(t.refCount,e),dragOperation:$e(t.dragOperation,e),stateId:Me(t.stateId)}}function Fe(t,e=void 0,r={},n=!1){const i=ke(n),o=new he(i,new Ce(i)),c=new fe(i,o),u=t(c,e,r);return c.receiveBackend(u),c}function ke(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return j(Le,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}export{Fe as c};
@@ -1,4 +1,4 @@
1
- import{g as $}from"./@xterm.D6R4zI7m.0.0.49.js";import{r as q}from"./get-size.D1dS-IaP.0.0.49.js";import{r as M}from"./unidragger.C8ueS-PW.0.0.49.js";var f={exports:{}};/*!
1
+ import{g as $}from"./@xterm.CAa7rpjv.0.0.50-internal.0.js";import{r as q}from"./get-size.D1dS-IaP.0.0.50-internal.0.js";import{r as M}from"./unidragger.D0w6Tqtt.0.0.50-internal.0.js";var f={exports:{}};/*!
2
2
  * Draggabilly v3.0.0
3
3
  * Make that shiz draggable
4
4
  * https://draggabilly.desandro.com
@@ -0,0 +1 @@
1
+ import{d as L,a as O,e as B,b as H,c as U,f as F,p as x}from"./engine.io-parser.BiEtp6m2.0.0.50-internal.0.js";import{E as y}from"./@socket.io.Dkula2eQ.0.0.50-internal.0.js";const _=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),a=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),I="arraybuffer";function E(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}const N=a.setTimeout,A=a.clearTimeout;function w(r,e){e.useNativeTimers?(r.setTimeoutFn=N.bind(a),r.clearTimeoutFn=A.bind(a)):(r.setTimeoutFn=a.setTimeout.bind(a),r.clearTimeoutFn=a.clearTimeout.bind(a))}const W=1.33;function D(r){return typeof r=="string"?M(r):Math.ceil((r.byteLength||r.size)*W)}function M(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function R(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function X(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function z(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let o=t[s].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class J extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class b extends y{constructor(e){super(),this.writable=!1,w(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new J(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=X(e);return t.length?"?"+t:""}}class V extends b{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};O(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,B(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=R()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let P=!1;try{P=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const j=P;function $(){}class G extends V{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class h extends y{constructor(e,t,s){super(),this.createRequest=e,w(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=E(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var i;s.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=h.requestsCount++,h.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete h.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}h.requestsCount=0;h.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",k);else if(typeof addEventListener=="function"){const r="onpagehide"in a?"pagehide":"unload";addEventListener(r,k,!1)}}function k(){for(let r in h.requests)h.requests.hasOwnProperty(r)&&h.requests[r].abort()}const K=function(){const r=q({xdomain:!1});return r&&r.responseType!==null}();class Q extends G{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=K&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new h(q,this.uri(),e)}}function q(r){const e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||j))return new XMLHttpRequest}catch{}if(!e)try{return new a[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const C=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Y extends b{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=C?{}:E(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;H(s,this.supportsBinary,o=>{try{this.doWrite(s,o)}catch{}i&&_(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const m=a.WebSocket||a.MozWebSocket;class Z extends Y{createSocket(e,t,s){return C?new m(e,t,s):t?new m(e,t):new m(e)}doWrite(e,t){this.ws.send(t)}}class ee extends b{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=U(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=F();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const o=()=>{s.read().then(({done:l,value:d})=>{l||(this.onPacket(d),o())}).catch(l=>{})};o();const n={type:"open"};this.query.sid&&(n.data=`{"sid":"${this.query.sid}"}`),this._writer.write(n).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&_(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const te={websocket:Z,webtransport:ee,polling:Q},se=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,re=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function S(r){if(r.length>8e3)throw"URI too long";const e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=se.exec(r||""),o={},n=14;for(;n--;)o[re[n]]=i[n]||"";return t!=-1&&s!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=ie(o,o.path),o.queryKey=oe(o,o.query),o}function ie(r,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function oe(r,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,o){i&&(t[i]=o)}),t}const g=typeof addEventListener=="function"&&typeof removeEventListener=="function",f=[];g&&addEventListener("offline",()=>{f.forEach(r=>r())},!1);class c extends y{constructor(e,t){if(super(),this.binaryType=I,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=S(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=S(t.host).host);w(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const i=s.prototype.name;this.transports.push(i),this._transportsByName[i]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=z(this.opts.query)),g&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},f.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=x,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",c.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(t+=D(i)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,_(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,i){if(typeof t=="function"&&(i=t,t=void 0),typeof s=="function"&&(i=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const o={type:e,data:t,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(c.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),g&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=f.indexOf(this._offlineEventListener);s!==-1&&f.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}c.protocol=x;class ne extends c{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;c.priorWebsocketSuccess=!1;const i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",p=>{if(!s)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;c.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(T(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const u=new Error("probe error");u.transport=t.name,this.emitReserved("upgradeError",u)}}))};function o(){s||(s=!0,T(),t.close(),t=null)}const n=p=>{const u=new Error("probe error: "+p);u.transport=t.name,o(),this.emitReserved("upgradeError",u)};function l(){n("transport closed")}function d(){n("socket closed")}function v(p){t&&p.name!==t.name&&o()}const T=()=>{t.removeListener("open",i),t.removeListener("error",n),t.removeListener("close",l),this.off("close",d),this.off("upgrading",v)};t.once("open",i),t.once("error",n),t.once("close",l),this.once("close",d),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}class ce extends ne{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}}export{ce as S,w as i,_ as n,S as p};
@@ -0,0 +1 @@
1
+ import{g as l}from"./@xterm.CAa7rpjv.0.0.50-internal.0.js";var o,c;function a(){return c||(c=1,o=function n(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var u,e,f;if(Array.isArray(r)){if(u=r.length,u!=t.length)return!1;for(e=u;e--!==0;)if(!n(r[e],t[e]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(f=Object.keys(r),u=f.length,u!==Object.keys(t).length)return!1;for(e=u;e--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[e]))return!1;for(e=u;e--!==0;){var s=f[e];if(!n(r[s],t[s]))return!1}return!0}return r!==r&&t!==t}),o}var p=a();const O=l(p);export{O as e};