@weing-dev/ui-kit-primitive 0.0.0 → 0.0.2

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 (495) hide show
  1. package/dist/App.d.ts +2 -0
  2. package/dist/components/Accordion/Accordion.context.d.ts +24 -0
  3. package/dist/components/Accordion/Accordion.d.ts +24 -0
  4. package/dist/components/Avatar/Avatar.d.ts +35 -0
  5. package/dist/components/Badge/Badge.d.ts +17 -0
  6. package/dist/components/BarCode/BarCode.d.ts +13 -0
  7. package/dist/components/Breadcrumb/Breadcrumb.d.ts +33 -0
  8. package/dist/components/Button/Button.colors.d.ts +295 -0
  9. package/dist/components/Button/Button.context.d.ts +22 -0
  10. package/dist/components/Button/Button.d.ts +24 -0
  11. package/dist/components/Button/Button.type.d.ts +10 -0
  12. package/dist/components/Calendar/Calendar.context.d.ts +56 -0
  13. package/dist/components/Calendar/Calendar.d.ts +72 -0
  14. package/dist/components/Calendar/dayjs.util.d.ts +99 -0
  15. package/dist/components/Cascader/Cacader.data.d.ts +6 -0
  16. package/dist/components/Cascader/Cascader.context.d.ts +31 -0
  17. package/dist/components/Cascader/Cascader.d.ts +54 -0
  18. package/dist/components/Cascader/Cascader.hook.d.ts +95 -0
  19. package/dist/components/Chart/Chart.d.ts +19 -0
  20. package/dist/components/Chips/Chips.colors.d.ts +171 -0
  21. package/dist/components/Chips/Chips.d.ts +16 -0
  22. package/dist/components/Comment/Comment.d.ts +21 -0
  23. package/dist/components/Dialog/Dialog.d.ts +2 -0
  24. package/dist/components/Divider/Divider.d.ts +13 -0
  25. package/dist/components/Editor/Editor.context.d.ts +8 -0
  26. package/dist/components/Editor/Editor.d.ts +16 -0
  27. package/dist/components/Form/CheckBox/CheckBox.context.d.ts +28 -0
  28. package/dist/components/Form/CheckBox/CheckBox.d.ts +33 -0
  29. package/dist/components/Form/CheckBox/Checkbox.colors.d.ts +33 -0
  30. package/dist/components/Form/Dropdown/Dropdown.colors.d.ts +114 -0
  31. package/dist/components/Form/Dropdown/Dropdown.context.d.ts +47 -0
  32. package/dist/components/Form/Dropdown/Dropdown.d.ts +59 -0
  33. package/dist/components/Form/OTPInput/OTPInput.context.d.ts +16 -0
  34. package/dist/components/Form/OTPInput/OTPInput.d.ts +15 -0
  35. package/dist/components/Form/Radio/Radio.colors.d.ts +33 -0
  36. package/dist/components/Form/Radio/Radio.context.d.ts +26 -0
  37. package/dist/components/Form/Radio/Radio.d.ts +30 -0
  38. package/dist/components/Form/Switch/Switch.colors.d.ts +33 -0
  39. package/dist/components/Form/Switch/Switch.context.d.ts +24 -0
  40. package/dist/components/Form/Switch/Switch.d.ts +28 -0
  41. package/dist/components/Form/TextArea/TextArea.colors.d.ts +67 -0
  42. package/dist/components/Form/TextArea/TextArea.context.d.ts +45 -0
  43. package/dist/components/Form/TextArea/TextArea.d.ts +37 -0
  44. package/dist/components/Form/TextInput/TextInput.colors.d.ts +67 -0
  45. package/dist/components/Form/TextInput/TextInput.context.d.ts +52 -0
  46. package/dist/components/Form/TextInput/TextInput.d.ts +33 -0
  47. package/dist/components/GlobalStyle/GlobalStyle.d.ts +2 -0
  48. package/dist/components/HelperText/HelperText.d.ts +28 -0
  49. package/dist/components/Icon/Icon.d.ts +13 -0
  50. package/dist/components/Icons/Add.d.ts +3 -0
  51. package/dist/components/Icons/AddAPhoto.d.ts +3 -0
  52. package/dist/components/Icons/ApprovalInactive.d.ts +3 -0
  53. package/dist/components/Icons/ArrowRight.d.ts +3 -0
  54. package/dist/components/Icons/AttachFile.d.ts +3 -0
  55. package/dist/components/Icons/Cancle.d.ts +3 -0
  56. package/dist/components/Icons/CancleFilled.d.ts +3 -0
  57. package/dist/components/Icons/Cart.d.ts +3 -0
  58. package/dist/components/Icons/CartFilled.d.ts +3 -0
  59. package/dist/components/Icons/Check.d.ts +3 -0
  60. package/dist/components/Icons/CheckBoxRound.d.ts +3 -0
  61. package/dist/components/Icons/CheckCircle.d.ts +3 -0
  62. package/dist/components/Icons/Close.d.ts +3 -0
  63. package/dist/components/Icons/Company.d.ts +3 -0
  64. package/dist/components/Icons/Download.d.ts +3 -0
  65. package/dist/components/Icons/DragHandle.d.ts +3 -0
  66. package/dist/components/Icons/Eco.d.ts +3 -0
  67. package/dist/components/Icons/EditSquare.d.ts +3 -0
  68. package/dist/components/Icons/Error.d.ts +3 -0
  69. package/dist/components/Icons/ErrorFilled.d.ts +3 -0
  70. package/dist/components/Icons/ExpandAll.d.ts +3 -0
  71. package/dist/components/Icons/ExpandLess.d.ts +3 -0
  72. package/dist/components/Icons/ExpandMore.d.ts +3 -0
  73. package/dist/components/Icons/Factory.d.ts +3 -0
  74. package/dist/components/Icons/FileUpload.d.ts +3 -0
  75. package/dist/components/Icons/FilecheckInactive.d.ts +3 -0
  76. package/dist/components/Icons/GoBefore.d.ts +3 -0
  77. package/dist/components/Icons/GoNext.d.ts +3 -0
  78. package/dist/components/Icons/HamburgerMenu.d.ts +3 -0
  79. package/dist/components/Icons/ImagecheckPlay.d.ts +3 -0
  80. package/dist/components/Icons/Inventory.d.ts +3 -0
  81. package/dist/components/Icons/KakaoTalk.d.ts +3 -0
  82. package/dist/components/Icons/ListAll.d.ts +3 -0
  83. package/dist/components/Icons/LocalShipping.d.ts +3 -0
  84. package/dist/components/Icons/Logout.d.ts +3 -0
  85. package/dist/components/Icons/Menu.d.ts +3 -0
  86. package/dist/components/Icons/Minus.d.ts +3 -0
  87. package/dist/components/Icons/ModeEdit.d.ts +3 -0
  88. package/dist/components/Icons/More.d.ts +3 -0
  89. package/dist/components/Icons/Naver.d.ts +3 -0
  90. package/dist/components/Icons/NaverBlog.d.ts +3 -0
  91. package/dist/components/Icons/OrderApprove.d.ts +3 -0
  92. package/dist/components/Icons/OrderInactive.d.ts +3 -0
  93. package/dist/components/Icons/OrderPlay.d.ts +3 -0
  94. package/dist/components/Icons/Outward.d.ts +3 -0
  95. package/dist/components/Icons/PayApprove.d.ts +3 -0
  96. package/dist/components/Icons/PayInactive.d.ts +3 -0
  97. package/dist/components/Icons/Personcard.d.ts +3 -0
  98. package/dist/components/Icons/PrintInactive.d.ts +3 -0
  99. package/dist/components/Icons/PrintPlay.d.ts +3 -0
  100. package/dist/components/Icons/Product.d.ts +3 -0
  101. package/dist/components/Icons/Search.d.ts +3 -0
  102. package/dist/components/Icons/Settings.d.ts +3 -0
  103. package/dist/components/Icons/ShippingDone.d.ts +3 -0
  104. package/dist/components/Icons/SupportAgent.d.ts +3 -0
  105. package/dist/components/Icons/SwapVert.d.ts +3 -0
  106. package/dist/components/Icons/Task.d.ts +3 -0
  107. package/dist/components/Icons/Upload.d.ts +3 -0
  108. package/dist/components/Icons/User.d.ts +3 -0
  109. package/dist/components/Icons/Warning.d.ts +3 -0
  110. package/dist/components/Icons/WarningAmber.d.ts +3 -0
  111. package/dist/components/Icons/WarningFilled.d.ts +3 -0
  112. package/dist/components/Icons/index.d.ts +62 -0
  113. package/dist/components/LNB/LNB.context.d.ts +22 -0
  114. package/dist/components/LNB/LNB.d.ts +48 -0
  115. package/dist/components/LNB/makeNavigation.d.ts +21 -0
  116. package/dist/components/Label/Label.colors.d.ts +219 -0
  117. package/dist/components/Label/Label.d.ts +10 -0
  118. package/dist/components/LazyImage/LazyImage.d.ts +10 -0
  119. package/dist/components/List/List.d.ts +22 -0
  120. package/dist/components/MobilePicker/MobilePicker.context.d.ts +11 -0
  121. package/dist/components/MobilePicker/MobilePicker.d.ts +47 -0
  122. package/dist/components/Modal/Modal.d.ts +9 -0
  123. package/dist/components/Pagination/Pagination.colors.d.ts +75 -0
  124. package/dist/components/Pagination/Pagination.context.d.ts +18 -0
  125. package/dist/components/Pagination/Pagination.d.ts +29 -0
  126. package/dist/components/Popup/Popup.context.d.ts +7 -0
  127. package/dist/components/Popup/Popup.d.ts +41 -0
  128. package/dist/components/QRCode/QRCode.d.ts +11 -0
  129. package/dist/components/ScrollCalendar/ScrollCalendar.context.d.ts +14 -0
  130. package/dist/components/ScrollCalendar/ScrollCalendar.d.ts +32 -0
  131. package/dist/components/ScrollSpy/ScrollSpy.d.ts +8 -0
  132. package/dist/components/Sheet/Sheet.context.d.ts +22 -0
  133. package/dist/components/Sheet/Sheet.d.ts +16 -0
  134. package/dist/components/Slider/Slider.backup.d.ts +35 -0
  135. package/dist/components/Slider/Slider.context.d.ts +36 -0
  136. package/dist/components/Slider/Slider.d.ts +41 -0
  137. package/dist/components/Stepper/Stepper.context.d.ts +22 -0
  138. package/dist/components/Stepper/Stepper.d.ts +24 -0
  139. package/dist/components/Tab/Tab.colors.d.ts +5 -0
  140. package/dist/components/Tab/Tab.context.d.ts +26 -0
  141. package/dist/components/Tab/Tab.d.ts +34 -0
  142. package/dist/components/Tab/cx.d.ts +2 -0
  143. package/dist/components/Table/Table.context.d.ts +10 -0
  144. package/dist/components/Table/Table.d.ts +32 -0
  145. package/dist/components/Table/Table.hook.d.ts +6 -0
  146. package/dist/components/Thumbnail/Thumbnail.context.d.ts +27 -0
  147. package/dist/components/Thumbnail/Thumbnail.d.ts +39 -0
  148. package/dist/components/TimeInput/TimeInput.colors.d.ts +67 -0
  149. package/dist/components/TimeInput/TimeInput.context.d.ts +47 -0
  150. package/dist/components/TimeInput/TimeInput.d.ts +47 -0
  151. package/dist/components/WeeklyCalendar/WeeklyCalendar.context.d.ts +70 -0
  152. package/dist/components/WeeklyCalendar/WeeklyCalendar.d.ts +31 -0
  153. package/dist/components/WeeklyCalendar/dayjs.util.d.ts +100 -0
  154. package/dist/components/WeeklyCalendar/weeklyCalendar.util.d.ts +76 -0
  155. package/dist/components/WisywygEditor/Quill/Editor.d.ts +15 -0
  156. package/dist/constant/locale.constant.d.ts +1 -0
  157. package/dist/hooks/useColorScheme.d.ts +4 -0
  158. package/dist/hooks/useElementRect.d.ts +19 -0
  159. package/dist/hooks/useIntersectionObserver.d.ts +7 -0
  160. package/dist/index.css +7 -0
  161. package/dist/index.d.ts +44 -0
  162. package/dist/index.js +51685 -0
  163. package/dist/index.umd.cjs +203 -0
  164. package/dist/styles/baseColor.d.ts +264 -0
  165. package/dist/styles/color.d.ts +6 -0
  166. package/dist/styles/color2.d.ts +102 -0
  167. package/dist/utils/aws.util.d.ts +60 -0
  168. package/dist/utils/common.utill.d.ts +4 -0
  169. package/package.json +9 -4
  170. package/eslint.config.js +0 -29
  171. package/index.html +0 -13
  172. package/scripts/icons/setIcon.cjs +0 -151
  173. package/scripts/icons/svg-template.cjs +0 -18
  174. package/scripts/icons/svgo-config.json +0 -9
  175. package/scripts/icons/svgr-config.json +0 -16
  176. package/src/@types/color.d.ts +0 -51
  177. package/src/@types/common.d.ts +0 -6
  178. package/src/@types/extends/react.extends.d.ts +0 -7
  179. package/src/@types/quill-image-resize-module-react/index.d.ts +0 -1
  180. package/src/App.tsx +0 -84
  181. package/src/assets/react.svg +0 -1
  182. package/src/components/Accordion/Accordion.context.tsx +0 -62
  183. package/src/components/Accordion/Accordion.module.scss +0 -163
  184. package/src/components/Accordion/Accordion.tsx +0 -242
  185. package/src/components/Accordion/README.md +0 -408
  186. package/src/components/Accordion/images/as_trigger.gif +0 -0
  187. package/src/components/Accordion/images/closed.png +0 -0
  188. package/src/components/Accordion/images/open.png +0 -0
  189. package/src/components/Accordion/images/thumbnail1.png +0 -0
  190. package/src/components/Accordion/images/thumbnail2.png +0 -0
  191. package/src/components/Accordion/images/thumbnail3.png +0 -0
  192. package/src/components/Avatar/Avatar.module.scss +0 -47
  193. package/src/components/Avatar/Avatar.tsx +0 -230
  194. package/src/components/Avatar/README.md +0 -333
  195. package/src/components/Badge/Badge.module.scss +0 -49
  196. package/src/components/Badge/Badge.tsx +0 -87
  197. package/src/components/Badge/README.md +0 -223
  198. package/src/components/BarCode/BarCode.module.scss +0 -0
  199. package/src/components/BarCode/BarCode.tsx +0 -153
  200. package/src/components/Breadcrumb/Breadcrumb.module.scss +0 -36
  201. package/src/components/Breadcrumb/Breadcrumb.tsx +0 -114
  202. package/src/components/Breadcrumb/README.md +0 -339
  203. package/src/components/Button/Button.colors.tsx +0 -322
  204. package/src/components/Button/Button.context.tsx +0 -47
  205. package/src/components/Button/Button.module.scss +0 -156
  206. package/src/components/Button/Button.tsx +0 -190
  207. package/src/components/Button/Button.type.ts +0 -11
  208. package/src/components/Calendar/Calendar.context.tsx +0 -138
  209. package/src/components/Calendar/Calendar.module.scss +0 -116
  210. package/src/components/Calendar/Calendar.tsx +0 -440
  211. package/src/components/Calendar/dayjs.util.ts +0 -312
  212. package/src/components/Cascader/Cacader.data.ts +0 -1185
  213. package/src/components/Cascader/Cascader.context.tsx +0 -61
  214. package/src/components/Cascader/Cascader.hook.ts +0 -502
  215. package/src/components/Cascader/Cascader.module.scss +0 -143
  216. package/src/components/Cascader/Cascader.tsx +0 -281
  217. package/src/components/Cascader/README.md +0 -735
  218. package/src/components/Chart/Chart.module.scss +0 -0
  219. package/src/components/Chart/Chart.tsx +0 -230
  220. package/src/components/Chart/README.md +0 -85
  221. package/src/components/Chart/images/barChart.png +0 -0
  222. package/src/components/Chips/Chips.colors.tsx +0 -185
  223. package/src/components/Chips/Chips.module.scss +0 -49
  224. package/src/components/Chips/Chips.tsx +0 -78
  225. package/src/components/Comment/Comment.module.scss +0 -14
  226. package/src/components/Comment/Comment.tsx +0 -105
  227. package/src/components/Dialog/Dialog.module.scss +0 -0
  228. package/src/components/Dialog/Dialog.tsx +0 -12
  229. package/src/components/Divider/Divider.module.scss +0 -12
  230. package/src/components/Divider/Divider.tsx +0 -33
  231. package/src/components/Editor/Editor.context.tsx +0 -12
  232. package/src/components/Editor/Editor.module.scss +0 -40
  233. package/src/components/Editor/Editor.tsx +0 -174
  234. package/src/components/Form/CheckBox/CheckBox.context.tsx +0 -56
  235. package/src/components/Form/CheckBox/CheckBox.module.scss +0 -81
  236. package/src/components/Form/CheckBox/CheckBox.tsx +0 -196
  237. package/src/components/Form/CheckBox/Checkbox.colors.tsx +0 -42
  238. package/src/components/Form/Dropdown/Dropdown.colors.tsx +0 -125
  239. package/src/components/Form/Dropdown/Dropdown.context.tsx +0 -62
  240. package/src/components/Form/Dropdown/Dropdown.module.scss +0 -133
  241. package/src/components/Form/Dropdown/Dropdown.tsx +0 -404
  242. package/src/components/Form/OTPInput/OTPInput.context.tsx +0 -104
  243. package/src/components/Form/OTPInput/OTPInput.module.scss +0 -22
  244. package/src/components/Form/OTPInput/OTPInput.tsx +0 -67
  245. package/src/components/Form/Radio/Radio.colors.tsx +0 -42
  246. package/src/components/Form/Radio/Radio.context.tsx +0 -40
  247. package/src/components/Form/Radio/Radio.module.scss +0 -61
  248. package/src/components/Form/Radio/Radio.tsx +0 -174
  249. package/src/components/Form/Switch/Switch.colors.tsx +0 -42
  250. package/src/components/Form/Switch/Switch.context.tsx +0 -50
  251. package/src/components/Form/Switch/Switch.module.scss +0 -53
  252. package/src/components/Form/Switch/Switch.tsx +0 -151
  253. package/src/components/Form/TextArea/TextArea.colors.tsx +0 -76
  254. package/src/components/Form/TextArea/TextArea.context.tsx +0 -97
  255. package/src/components/Form/TextArea/TextArea.module.scss +0 -138
  256. package/src/components/Form/TextArea/TextArea.tsx +0 -246
  257. package/src/components/Form/TextInput/TextInput.colors.tsx +0 -76
  258. package/src/components/Form/TextInput/TextInput.context.tsx +0 -106
  259. package/src/components/Form/TextInput/TextInput.module.scss +0 -160
  260. package/src/components/Form/TextInput/TextInput.tsx +0 -225
  261. package/src/components/GlobalStyle/GlobalStyle.tsx +0 -20
  262. package/src/components/HelperText/HelperText.module.scss +0 -28
  263. package/src/components/HelperText/HelperText.tsx +0 -130
  264. package/src/components/Icon/Icon.tsx +0 -29
  265. package/src/components/Icons/Add.tsx +0 -20
  266. package/src/components/Icons/AddAPhoto.tsx +0 -21
  267. package/src/components/Icons/ApprovalInactive.tsx +0 -26
  268. package/src/components/Icons/ArrowRight.tsx +0 -24
  269. package/src/components/Icons/AttachFile.tsx +0 -20
  270. package/src/components/Icons/Cancle.tsx +0 -20
  271. package/src/components/Icons/CancleFilled.tsx +0 -20
  272. package/src/components/Icons/Cart.tsx +0 -20
  273. package/src/components/Icons/CartFilled.tsx +0 -20
  274. package/src/components/Icons/Check.tsx +0 -20
  275. package/src/components/Icons/CheckBoxRound.tsx +0 -21
  276. package/src/components/Icons/CheckCircle.tsx +0 -35
  277. package/src/components/Icons/Close.tsx +0 -20
  278. package/src/components/Icons/Company.tsx +0 -20
  279. package/src/components/Icons/Download.tsx +0 -20
  280. package/src/components/Icons/DragHandle.tsx +0 -20
  281. package/src/components/Icons/Eco.tsx +0 -20
  282. package/src/components/Icons/EditSquare.tsx +0 -20
  283. package/src/components/Icons/Error.tsx +0 -20
  284. package/src/components/Icons/ErrorFilled.tsx +0 -20
  285. package/src/components/Icons/ExpandAll.tsx +0 -20
  286. package/src/components/Icons/ExpandLess.tsx +0 -20
  287. package/src/components/Icons/ExpandMore.tsx +0 -20
  288. package/src/components/Icons/Factory.tsx +0 -20
  289. package/src/components/Icons/FileUpload.tsx +0 -20
  290. package/src/components/Icons/FilecheckInactive.tsx +0 -22
  291. package/src/components/Icons/GoBefore.tsx +0 -20
  292. package/src/components/Icons/GoNext.tsx +0 -20
  293. package/src/components/Icons/HamburgerMenu.tsx +0 -20
  294. package/src/components/Icons/ImagecheckPlay.tsx +0 -27
  295. package/src/components/Icons/Inventory.tsx +0 -20
  296. package/src/components/Icons/KakaoTalk.tsx +0 -22
  297. package/src/components/Icons/ListAll.tsx +0 -20
  298. package/src/components/Icons/LocalShipping.tsx +0 -20
  299. package/src/components/Icons/Logout.tsx +0 -20
  300. package/src/components/Icons/Menu.tsx +0 -20
  301. package/src/components/Icons/Minus.tsx +0 -18
  302. package/src/components/Icons/ModeEdit.tsx +0 -25
  303. package/src/components/Icons/More.tsx +0 -20
  304. package/src/components/Icons/Naver.tsx +0 -20
  305. package/src/components/Icons/NaverBlog.tsx +0 -22
  306. package/src/components/Icons/OrderApprove.tsx +0 -20
  307. package/src/components/Icons/OrderInactive.tsx +0 -20
  308. package/src/components/Icons/OrderPlay.tsx +0 -20
  309. package/src/components/Icons/Outward.tsx +0 -20
  310. package/src/components/Icons/PayApprove.tsx +0 -24
  311. package/src/components/Icons/PayInactive.tsx +0 -24
  312. package/src/components/Icons/Personcard.tsx +0 -20
  313. package/src/components/Icons/PrintInactive.tsx +0 -24
  314. package/src/components/Icons/PrintPlay.tsx +0 -24
  315. package/src/components/Icons/Product.tsx +0 -20
  316. package/src/components/Icons/Search.tsx +0 -20
  317. package/src/components/Icons/Settings.tsx +0 -20
  318. package/src/components/Icons/ShippingDone.tsx +0 -20
  319. package/src/components/Icons/SupportAgent.tsx +0 -20
  320. package/src/components/Icons/SwapVert.tsx +0 -21
  321. package/src/components/Icons/Task.tsx +0 -20
  322. package/src/components/Icons/Upload.tsx +0 -20
  323. package/src/components/Icons/User.tsx +0 -20
  324. package/src/components/Icons/Warning.tsx +0 -20
  325. package/src/components/Icons/WarningAmber.tsx +0 -21
  326. package/src/components/Icons/WarningFilled.tsx +0 -20
  327. package/src/components/Icons/index.ts +0 -62
  328. package/src/components/LNB/LNB.context.tsx +0 -32
  329. package/src/components/LNB/LNB.module.scss +0 -99
  330. package/src/components/LNB/LNB.tsx +0 -190
  331. package/src/components/LNB/README.md +0 -411
  332. package/src/components/LNB/makeNavigation.ts +0 -51
  333. package/src/components/LNB/navigation.d.ts +0 -15
  334. package/src/components/LNB/navigation.json +0 -211
  335. package/src/components/Label/Label.colors.tsx +0 -241
  336. package/src/components/Label/Label.module.scss +0 -31
  337. package/src/components/Label/Label.tsx +0 -54
  338. package/src/components/LazyImage/LazyImage.module.scss +0 -6
  339. package/src/components/LazyImage/LazyImage.tsx +0 -107
  340. package/src/components/List/List.module.scss +0 -81
  341. package/src/components/List/List.tsx +0 -91
  342. package/src/components/List/README.md +0 -87
  343. package/src/components/MobilePicker/MobilePicker.context.tsx +0 -22
  344. package/src/components/MobilePicker/MobilePicker.module.scss +0 -57
  345. package/src/components/MobilePicker/MobilePicker.tsx +0 -336
  346. package/src/components/MobilePicker/README.md +0 -159
  347. package/src/components/Modal/Modal.tsx +0 -77
  348. package/src/components/Modal/README.md +0 -130
  349. package/src/components/Pagination/Pagination.colors.tsx +0 -85
  350. package/src/components/Pagination/Pagination.context.tsx +0 -28
  351. package/src/components/Pagination/Pagination.module.scss +0 -60
  352. package/src/components/Pagination/Pagination.tsx +0 -234
  353. package/src/components/Popup/Popup.context.tsx +0 -15
  354. package/src/components/Popup/Popup.module.scss +0 -53
  355. package/src/components/Popup/Popup.tsx +0 -116
  356. package/src/components/Popup/README.md +0 -170
  357. package/src/components/QRCode/QRCode.module.scss +0 -2
  358. package/src/components/QRCode/QRCode.tsx +0 -61
  359. package/src/components/ScrollCalendar/ScrollCalendar.context.tsx +0 -26
  360. package/src/components/ScrollCalendar/ScrollCalendar.module.scss +0 -42
  361. package/src/components/ScrollCalendar/ScrollCalendar.tsx +0 -448
  362. package/src/components/ScrollSpy/README.md +0 -62
  363. package/src/components/ScrollSpy/ScrollSpy.tsx +0 -130
  364. package/src/components/Sheet/README.md +0 -92
  365. package/src/components/Sheet/Sheet.context.tsx +0 -23
  366. package/src/components/Sheet/Sheet.module.scss +0 -68
  367. package/src/components/Sheet/Sheet.tsx +0 -146
  368. package/src/components/Slider/README.md +0 -639
  369. package/src/components/Slider/Slider.backup.tsx +0 -477
  370. package/src/components/Slider/Slider.context.tsx +0 -67
  371. package/src/components/Slider/Slider.module.scss +0 -123
  372. package/src/components/Slider/Slider.tsx +0 -467
  373. package/src/components/Stepper/README.md +0 -320
  374. package/src/components/Stepper/Stepper.context.tsx +0 -49
  375. package/src/components/Stepper/Stepper.module.scss +0 -163
  376. package/src/components/Stepper/Stepper.tsx +0 -219
  377. package/src/components/Tab/Tab.colors.tsx +0 -54
  378. package/src/components/Tab/Tab.context.tsx +0 -64
  379. package/src/components/Tab/Tab.module.scss +0 -239
  380. package/src/components/Tab/Tab.tsx +0 -123
  381. package/src/components/Tab/cx.ts +0 -6
  382. package/src/components/Table/README.md +0 -162
  383. package/src/components/Table/Table.context.tsx +0 -23
  384. package/src/components/Table/Table.hook.ts +0 -51
  385. package/src/components/Table/Table.module.scss +0 -83
  386. package/src/components/Table/Table.tsx +0 -147
  387. package/src/components/Thumbnail/README.md +0 -302
  388. package/src/components/Thumbnail/Thumbnail.context.tsx +0 -42
  389. package/src/components/Thumbnail/Thumbnail.module.scss +0 -149
  390. package/src/components/Thumbnail/Thumbnail.tsx +0 -391
  391. package/src/components/TimeInput/README.md +0 -118
  392. package/src/components/TimeInput/TimeInput.colors.tsx +0 -76
  393. package/src/components/TimeInput/TimeInput.context.tsx +0 -58
  394. package/src/components/TimeInput/TimeInput.module.scss +0 -211
  395. package/src/components/TimeInput/TimeInput.tsx +0 -411
  396. package/src/components/WeeklyCalendar/WeeklyCalendar.context.tsx +0 -88
  397. package/src/components/WeeklyCalendar/WeeklyCalendar.module.scss +0 -225
  398. package/src/components/WeeklyCalendar/WeeklyCalendar.tsx +0 -772
  399. package/src/components/WeeklyCalendar/dayjs.util.ts +0 -336
  400. package/src/components/WeeklyCalendar/weeklyCalendar.util.ts +0 -583
  401. package/src/components/WisywygEditor/Quill/Editor.tsx +0 -148
  402. package/src/constant/locale.constant.ts +0 -6
  403. package/src/globals.scss +0 -80
  404. package/src/hooks/useColorScheme.tsx +0 -48
  405. package/src/hooks/useElementRect.tsx +0 -128
  406. package/src/hooks/useIntersectionObserver.tsx +0 -33
  407. package/src/index.css +0 -17
  408. package/src/index.ts +0 -187
  409. package/src/main.tsx +0 -10
  410. package/src/styles/_fontSize.mixin.scss +0 -57
  411. package/src/styles/_fontWeight.mixin.scss +0 -15
  412. package/src/styles/_lineHeight.mixin.scss +0 -57
  413. package/src/styles/_scrollbar.mixin.scss +0 -49
  414. package/src/styles/baseColor.ts +0 -297
  415. package/src/styles/color.ts +0 -272
  416. package/src/styles/color2.ts +0 -200
  417. package/src/styles/scrollbar.README.md +0 -72
  418. package/src/styles/typography.scss +0 -170
  419. package/src/utils/aws.util.ts +0 -180
  420. package/src/utils/common.utill.ts +0 -45
  421. package/src/vite-env.d.ts +0 -1
  422. package/tsconfig.app.json +0 -24
  423. package/tsconfig.json +0 -29
  424. package/tsconfig.node.json +0 -10
  425. package/tsconfig.node.tsbuildinfo +0 -1
  426. package/tsconfig.tsbuildinfo +0 -1
  427. package/vite.config.d.ts +0 -2
  428. package/vite.config.js +0 -47
  429. package/vite.config.ts +0 -50
  430. /package/{src/App.css → dist/main.d.ts} +0 -0
  431. /package/{public → dist}/static/icon/Add.svg +0 -0
  432. /package/{public → dist}/static/icon/ApprovalInactive.svg +0 -0
  433. /package/{public → dist}/static/icon/ArrowRight.svg +0 -0
  434. /package/{public → dist}/static/icon/Cancle Filled.svg +0 -0
  435. /package/{public → dist}/static/icon/Cancle.svg +0 -0
  436. /package/{public → dist}/static/icon/Cart Filled.svg +0 -0
  437. /package/{public → dist}/static/icon/Cart.svg +0 -0
  438. /package/{public → dist}/static/icon/Check.svg +0 -0
  439. /package/{public → dist}/static/icon/CheckBoxRound.svg +0 -0
  440. /package/{public → dist}/static/icon/Company.svg +0 -0
  441. /package/{public → dist}/static/icon/DragHandle.svg +0 -0
  442. /package/{public → dist}/static/icon/Eco.svg +0 -0
  443. /package/{public → dist}/static/icon/EditSquare.svg +0 -0
  444. /package/{public → dist}/static/icon/Error Filled.svg +0 -0
  445. /package/{public → dist}/static/icon/Error.svg +0 -0
  446. /package/{public → dist}/static/icon/File Upload.svg +0 -0
  447. /package/{public → dist}/static/icon/FilecheckInactive.svg +0 -0
  448. /package/{public → dist}/static/icon/Go Before.svg +0 -0
  449. /package/{public → dist}/static/icon/Go Next.svg +0 -0
  450. /package/{public → dist}/static/icon/Hamburger Menu.svg +0 -0
  451. /package/{public → dist}/static/icon/ImagecheckPlay.svg +0 -0
  452. /package/{public → dist}/static/icon/Kakao Talk.svg +0 -0
  453. /package/{public → dist}/static/icon/Minus.svg +0 -0
  454. /package/{public → dist}/static/icon/Naver Blog.svg +0 -0
  455. /package/{public → dist}/static/icon/Naver.svg +0 -0
  456. /package/{public → dist}/static/icon/OrderApprove.svg +0 -0
  457. /package/{public → dist}/static/icon/OrderInactive.svg +0 -0
  458. /package/{public → dist}/static/icon/OrderPlay.svg +0 -0
  459. /package/{public → dist}/static/icon/PayApprove.svg +0 -0
  460. /package/{public → dist}/static/icon/PayInactive.svg +0 -0
  461. /package/{public → dist}/static/icon/PrintInactive.svg +0 -0
  462. /package/{public → dist}/static/icon/PrintPlay.svg +0 -0
  463. /package/{public → dist}/static/icon/Search.svg +0 -0
  464. /package/{public → dist}/static/icon/ShippingDone.svg +0 -0
  465. /package/{public → dist}/static/icon/Support Agent.svg +0 -0
  466. /package/{public → dist}/static/icon/Task.svg +0 -0
  467. /package/{public → dist}/static/icon/User.svg +0 -0
  468. /package/{public → dist}/static/icon/Warning Filled.svg +0 -0
  469. /package/{public → dist}/static/icon/Warning.svg +0 -0
  470. /package/{public → dist}/static/icon/add_a_photo.svg +0 -0
  471. /package/{public → dist}/static/icon/attach_file.svg +0 -0
  472. /package/{public → dist}/static/icon/check_circle.svg +0 -0
  473. /package/{public → dist}/static/icon/close.svg +0 -0
  474. /package/{public → dist}/static/icon/download.svg +0 -0
  475. /package/{public → dist}/static/icon/expand all.svg +0 -0
  476. /package/{public → dist}/static/icon/expand_less.svg +0 -0
  477. /package/{public → dist}/static/icon/expand_more.svg +0 -0
  478. /package/{public → dist}/static/icon/factory.svg +0 -0
  479. /package/{public → dist}/static/icon/inventory.svg +0 -0
  480. /package/{public → dist}/static/icon/listAll.svg +0 -0
  481. /package/{public → dist}/static/icon/local_shipping.svg +0 -0
  482. /package/{public → dist}/static/icon/logout.svg +0 -0
  483. /package/{public → dist}/static/icon/menu.svg +0 -0
  484. /package/{public → dist}/static/icon/mode_edit.svg +0 -0
  485. /package/{public → dist}/static/icon/more.svg +0 -0
  486. /package/{public → dist}/static/icon/outward.svg +0 -0
  487. /package/{public → dist}/static/icon/personcard.svg +0 -0
  488. /package/{public → dist}/static/icon/product.svg +0 -0
  489. /package/{public → dist}/static/icon/settings.svg +0 -0
  490. /package/{public → dist}/static/icon/swap_vert.svg +0 -0
  491. /package/{public → dist}/static/icon/upload.svg +0 -0
  492. /package/{public → dist}/static/icon/warning_amber.svg +0 -0
  493. /package/{public → dist}/static/image/Thumbnail.png +0 -0
  494. /package/{public → dist}/vite.svg +0 -0
  495. /package/{public → dist}/weing_logo_final.png +0 -0
@@ -0,0 +1,203 @@
1
+ (function(ye,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(ye=typeof globalThis<"u"?globalThis:ye||self,x(ye["ui-kit-primitive"]={},ye.React,ye.ReactDOM))})(this,function(ye,x,Pr){"use strict";var Rxe=Object.defineProperty;var Ixe=(ye,x,Pr)=>x in ye?Rxe(ye,x,{enumerable:!0,configurable:!0,writable:!0,value:Pr}):ye[x]=Pr;var U=(ye,x,Pr)=>Ixe(ye,typeof x!="symbol"?x+"":x,Pr);var Cg,To,kx,Sg,Eg;function uw(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Po=uw(x),X$=uw(Pr);var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ss(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Lg={exports:{}},xc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var dw;function Q$(){if(dw)return xc;dw=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var a in s)a!=="key"&&(i[a]=s[a])}else i=s;return s=i.ref,{$$typeof:t,type:r,key:o,ref:s!==void 0?s:null,props:i}}return xc.Fragment=e,xc.jsx=n,xc.jsxs=n,xc}var wc={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var hw;function J$(){return hw||(hw=1,process.env.NODE_ENV!=="production"&&function(){function t(N){if(N==null)return null;if(typeof N=="function")return N.$$typeof===q?null:N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case k:return"Fragment";case _:return"Portal";case A:return"Profiler";case E:return"StrictMode";case R:return"Suspense";case H:return"SuspenseList"}if(typeof N=="object")switch(typeof N.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),N.$$typeof){case P:return(N.displayName||"Context")+".Provider";case $:return(N._context.displayName||"Context")+".Consumer";case O:var he=N.render;return N=N.displayName,N||(N=he.displayName||he.name||"",N=N!==""?"ForwardRef("+N+")":"ForwardRef"),N;case z:return he=N.displayName||null,he!==null?he:t(N.type)||"Memo";case j:he=N._payload,N=N._init;try{return t(N(he))}catch{}}return null}function e(N){return""+N}function n(N){try{e(N);var he=!1}catch{he=!0}if(he){he=console;var me=he.error,Oe=typeof Symbol=="function"&&Symbol.toStringTag&&N[Symbol.toStringTag]||N.constructor.name||"Object";return me.call(he,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Oe),e(N)}}function r(){}function s(){if(oe===0){te=console.log,ue=console.info,Ce=console.warn,be=console.error,Te=console.group,de=console.groupCollapsed,Le=console.groupEnd;var N={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}oe++}function i(){if(oe--,oe===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},N,{value:te}),info:W({},N,{value:ue}),warn:W({},N,{value:Ce}),error:W({},N,{value:be}),group:W({},N,{value:Te}),groupCollapsed:W({},N,{value:de}),groupEnd:W({},N,{value:Le})})}0>oe&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function o(N){if(Z===void 0)try{throw Error()}catch(me){var he=me.stack.trim().match(/\n( *(at )?)/);Z=he&&he[1]||"",Be=-1<me.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<me.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+Z+N+Be}function a(N,he){if(!N||ot)return"";var me=Et.get(N);if(me!==void 0)return me;ot=!0,me=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var Oe=null;Oe=Q.H,Q.H=null,s();try{var at={DetermineComponentFrameRoot:function(){try{if(he){var fr=function(){throw Error()};if(Object.defineProperty(fr.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fr,[])}catch(Zt){var ns=Zt}Reflect.construct(N,[],fr)}else{try{fr.call()}catch(Zt){ns=Zt}N.call(fr.prototype)}}else{try{throw Error()}catch(Zt){ns=Zt}(fr=N())&&typeof fr.catch=="function"&&fr.catch(function(){})}}catch(Zt){if(Zt&&ns&&typeof Zt.stack=="string")return[Zt.stack,ns.stack]}return[null,null]}};at.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Ze=Object.getOwnPropertyDescriptor(at.DetermineComponentFrameRoot,"name");Ze&&Ze.configurable&&Object.defineProperty(at.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Ee=at.DetermineComponentFrameRoot(),mt=Ee[0],gn=Ee[1];if(mt&&gn){var Qe=mt.split(`
20
+ `),Ht=gn.split(`
21
+ `);for(Ee=Ze=0;Ze<Qe.length&&!Qe[Ze].includes("DetermineComponentFrameRoot");)Ze++;for(;Ee<Ht.length&&!Ht[Ee].includes("DetermineComponentFrameRoot");)Ee++;if(Ze===Qe.length||Ee===Ht.length)for(Ze=Qe.length-1,Ee=Ht.length-1;1<=Ze&&0<=Ee&&Qe[Ze]!==Ht[Ee];)Ee--;for(;1<=Ze&&0<=Ee;Ze--,Ee--)if(Qe[Ze]!==Ht[Ee]){if(Ze!==1||Ee!==1)do if(Ze--,Ee--,0>Ee||Qe[Ze]!==Ht[Ee]){var Mr=`
22
+ `+Qe[Ze].replace(" at new "," at ");return N.displayName&&Mr.includes("<anonymous>")&&(Mr=Mr.replace("<anonymous>",N.displayName)),typeof N=="function"&&Et.set(N,Mr),Mr}while(1<=Ze&&0<=Ee);break}}}finally{ot=!1,Q.H=Oe,i(),Error.prepareStackTrace=me}return Qe=(Qe=N?N.displayName||N.name:"")?o(Qe):"",typeof N=="function"&&Et.set(N,Qe),Qe}function l(N){if(N==null)return"";if(typeof N=="function"){var he=N.prototype;return a(N,!(!he||!he.isReactComponent))}if(typeof N=="string")return o(N);switch(N){case R:return o("Suspense");case H:return o("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case O:return N=a(N.render,!1),N;case z:return l(N.type);case j:he=N._payload,N=N._init;try{return l(N(he))}catch{}}return""}function c(){var N=Q.A;return N===null?null:N.getOwner()}function u(N){if(B.call(N,"key")){var he=Object.getOwnPropertyDescriptor(N,"key").get;if(he&&he.isReactWarning)return!1}return N.key!==void 0}function d(N,he){function me(){Qn||(Qn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",he))}me.isReactWarning=!0,Object.defineProperty(N,"key",{get:me,configurable:!0})}function h(){var N=t(this.type);return As[N]||(As[N]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),N=this.props.ref,N!==void 0?N:null}function f(N,he,me,Oe,at,Ze){return me=Ze.ref,N={$$typeof:C,type:N,key:he,props:Ze,_owner:at},(me!==void 0?me:null)!==null?Object.defineProperty(N,"ref",{enumerable:!1,get:h}):Object.defineProperty(N,"ref",{enumerable:!1,value:null}),N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(N,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N}function p(N,he,me,Oe,at,Ze){if(typeof N=="string"||typeof N=="function"||N===k||N===A||N===E||N===R||N===H||N===F||typeof N=="object"&&N!==null&&(N.$$typeof===j||N.$$typeof===z||N.$$typeof===P||N.$$typeof===$||N.$$typeof===O||N.$$typeof===se||N.getModuleId!==void 0)){var Ee=he.children;if(Ee!==void 0)if(Oe)if(ne(Ee)){for(Oe=0;Oe<Ee.length;Oe++)m(Ee[Oe],N);Object.freeze&&Object.freeze(Ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(Ee,N)}else Ee="",(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(Ee+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),N===null?Oe="null":ne(N)?Oe="array":N!==void 0&&N.$$typeof===C?(Oe="<"+(t(N.type)||"Unknown")+" />",Ee=" Did you accidentally export a JSX literal instead of a component?"):Oe=typeof N,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Oe,Ee);if(B.call(he,"key")){Ee=t(N);var mt=Object.keys(he).filter(function(Qe){return Qe!=="key"});Oe=0<mt.length?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}",ts[Ee+Oe]||(mt=0<mt.length?"{"+mt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
+ let props = %s;
24
+ <%s {...props} />
25
+ React keys must be passed directly to JSX without using spread:
26
+ let props = %s;
27
+ <%s key={someKey} {...props} />`,Oe,Ee,mt,Ee),ts[Ee+Oe]=!0)}if(Ee=null,me!==void 0&&(n(me),Ee=""+me),u(he)&&(n(he.key),Ee=""+he.key),"key"in he){me={};for(var gn in he)gn!=="key"&&(me[gn]=he[gn])}else me=he;return Ee&&d(me,typeof N=="function"?N.displayName||N.name||"Unknown":N),f(N,Ee,Ze,at,c(),me)}function m(N,he){if(typeof N=="object"&&N&&N.$$typeof!==tn){if(ne(N))for(var me=0;me<N.length;me++){var Oe=N[me];g(Oe)&&y(Oe,he)}else if(g(N))N._store&&(N._store.validated=1);else if(N===null||typeof N!="object"?me=null:(me=V&&N[V]||N["@@iterator"],me=typeof me=="function"?me:null),typeof me=="function"&&me!==N.entries&&(me=me.call(N),me!==N))for(;!(N=me.next()).done;)g(N.value)&&y(N.value,he)}}function g(N){return typeof N=="object"&&N!==null&&N.$$typeof===C}function y(N,he){if(N._store&&!N._store.validated&&N.key==null&&(N._store.validated=1,he=v(he),!gt[he])){gt[he]=!0;var me="";N&&N._owner!=null&&N._owner!==c()&&(me=null,typeof N._owner.tag=="number"?me=t(N._owner.type):typeof N._owner.name=="string"&&(me=N._owner.name),me=" It was passed a child from "+me+".");var Oe=Q.getCurrentStack;Q.getCurrentStack=function(){var at=l(N.type);return Oe&&(at+=Oe()||""),at},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',he,me),Q.getCurrentStack=Oe}}function v(N){var he="",me=c();return me&&(me=t(me.type))&&(he=`
28
+
29
+ Check the render method of \``+me+"`."),he||(N=t(N))&&(he=`
30
+
31
+ Check the top-level render call using <`+N+">."),he}var b=x,C=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),P=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),V=Symbol.iterator,q=Symbol.for("react.client.reference"),Q=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,W=Object.assign,se=Symbol.for("react.client.reference"),ne=Array.isArray,oe=0,te,ue,Ce,be,Te,de,Le;r.__reactDisabledLog=!0;var Z,Be,ot=!1,Et=new(typeof WeakMap=="function"?WeakMap:Map),tn=Symbol.for("react.client.reference"),Qn,As={},ts={},gt={};wc.Fragment=k,wc.jsx=function(N,he,me,Oe,at){return p(N,he,me,!1,Oe,at)},wc.jsxs=function(N,he,me,Oe,at){return p(N,he,me,!0,Oe,at)}}()),wc}process.env.NODE_ENV==="production"?Lg.exports=Q$():Lg.exports=J$();var S=Lg.exports,fw={exports:{}};/*!
32
+ Copyright (c) 2018 Jed Watson.
33
+ Licensed under the MIT License (MIT), see
34
+ http://jedwatson.github.io/classnames
35
+ */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(i=s(i,r.call(this,a)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return this&&this[i]||i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(this,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var o="";for(var a in i)e.call(i,a)&&i[a]&&(o=s(o,this&&this[a]||a));return o}function s(i,o){return o?i?i+" "+o:i+o:i}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(fw);var eP=fw.exports;const qe=ss(eP),tP={ButtonIcon:"_ButtonIcon_q7rz5_2",ButtonRoot:"_ButtonRoot_q7rz5_5",circle:"_circle_q7rz5_12",isFitted:"_isFitted_q7rz5_17",link:"_link_q7rz5_20",large:"_large_q7rz5_24",medium:"_medium_q7rz5_27",small:"_small_q7rz5_30",ButtonText:"_ButtonText_q7rz5_40"},nP=Object.freeze(Object.defineProperty({__proto__:null,Add:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11.75 13.25H6v-1.5h5.75V6h1.5v5.75H19v1.5h-5.75V19h-1.5v-5.75Z",fill:t.color||"#1C1B1F"})}),AddAPhoto:t=>S.jsx("svg",{viewBox:"0 0 24 24",fill:"none",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M21.5 6.5H18.33L16.5 4.5H10.5V6.5H15.62L17.45 8.5H21.5V20.5H5.5V11.5H3.5V20.5C3.5 21.6 4.4 22.5 5.5 22.5H21.5C22.6 22.5 23.5 21.6 23.5 20.5V8.5C23.5 7.4 22.6 6.5 21.5 6.5ZM8.5 14.5C8.5 17.26 10.74 19.5 13.5 19.5C16.26 19.5 18.5 17.26 18.5 14.5C18.5 11.74 16.26 9.5 13.5 9.5C10.74 9.5 8.5 11.74 8.5 14.5ZM13.5 11.5C15.15 11.5 16.5 12.85 16.5 14.5C16.5 16.15 15.15 17.5 13.5 17.5C11.85 17.5 10.5 16.15 10.5 14.5C10.5 12.85 11.85 11.5 13.5 11.5ZM5.5 6.5H8.5V4.5H5.5V1.5H3.5V4.5H0.5V6.5H3.5V9.5H5.5V6.5Z",fill:"#C4CDD5"})}),ApprovalInactive:t=>S.jsxs("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 10.312V21.5h10.232a6.456 6.456 0 0 1-.558-1.5H4v-8.675L7 10v1.95l5-2V12h8v.174a6.46 6.46 0 0 1 1.5.558V10.5l-.942-7.615h-2.116l-1 7.615H13.5V7.74l-5 2V7.76l-6 2.552Zm10.385 4.912v-.993h-1.77v3.538h.926c.103-.92.397-1.782.844-2.545Zm-4 2.545h-1.77v-3.538h1.77v3.538Z",fill:t.color||"#121416"}),S.jsx("path",{d:"M16.904 20.298h.884v-3.623h-.884v3.623Zm2.308 0h.884v-3.623h-.884v3.623Zm-.712 2.675c-1.249 0-2.31-.437-3.187-1.31C14.438 20.79 14 19.731 14 18.486s.438-2.303 1.313-3.177C16.19 14.438 17.252 14 18.5 14c1.249 0 2.31.437 3.186 1.31.876.873 1.314 1.931 1.314 3.176s-.438 2.304-1.314 3.177c-.875.873-1.937 1.31-3.186 1.31Z",fill:t.color||"#121416"})]}),ArrowRight:t=>S.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("g",{id:"keyboard_arrow_right",children:S.jsx("path",{id:"Vector",d:"M7.49961 13.2292L10.7329 9.99583L7.49961 6.7625C7.17461 6.4375 7.17461 5.9125 7.49961 5.5875C7.82461 5.2625 8.34961 5.2625 8.67461 5.5875L12.4996 9.4125C12.8246 9.7375 12.8246 10.2625 12.4996 10.5875L8.67461 14.4125C8.34961 14.7375 7.82461 14.7375 7.49961 14.4125C7.18294 14.0875 7.17461 13.5542 7.49961 13.2292Z",fill:t.color||"#1C252E"})})}),AttachFile:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11.5 22c-1.527 0-2.825-.515-3.895-1.545C6.535 19.425 6 18.175 6 16.705V5.845c0-1.057.391-1.962 1.173-2.715C7.956 2.377 8.896 2 9.995 2c1.098 0 2.038.377 2.82 1.13.783.753 1.174 1.658 1.174 2.715v9.797c0 .671-.24 1.239-.722 1.702-.481.463-1.07.695-1.767.695-.697 0-1.286-.232-1.767-.695a2.271 2.271 0 0 1-.722-1.702V5.845h1.245v9.797c0 .34.119.625.357.854.239.23.534.345.887.345s.648-.115.887-.345c.238-.23.357-.514.357-.853V5.845c0-.74-.265-1.367-.797-1.88-.532-.511-1.183-.767-1.953-.767s-1.421.256-1.953.768a2.51 2.51 0 0 0-.796 1.88v10.86c0 1.13.415 2.096 1.246 2.896.831.8 1.834 1.2 3.009 1.2 1.175 0 2.178-.4 3.009-1.2.831-.8 1.246-1.766 1.246-2.897V5.845H17v10.86c0 1.47-.535 2.72-1.605 3.75C14.325 21.485 13.027 22 11.5 22Z",fill:t.color||"#1C1B1F"})}),Cancle:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m8.9 17.154 3.6-3.6 3.6 3.6 1.054-1.054-3.6-3.6 3.6-3.6L16.1 7.846l-3.6 3.6-3.6-3.6L7.846 8.9l3.6 3.6-3.6 3.6L8.9 17.154ZM12.502 22a9.255 9.255 0 0 1-3.705-.748 9.598 9.598 0 0 1-3.018-2.03 9.591 9.591 0 0 1-2.03-3.016A9.245 9.245 0 0 1 3 12.502c0-1.314.25-2.55.748-3.705a9.597 9.597 0 0 1 2.03-3.018 9.592 9.592 0 0 1 3.016-2.03A9.245 9.245 0 0 1 12.498 3c1.314 0 2.55.25 3.705.748a9.597 9.597 0 0 1 3.018 2.03 9.592 9.592 0 0 1 2.03 3.016A9.245 9.245 0 0 1 22 12.498c0 1.314-.25 2.55-.748 3.705a9.598 9.598 0 0 1-2.03 3.018 9.592 9.592 0 0 1-3.016 2.03 9.245 9.245 0 0 1-3.704.749Zm-.002-1.5c2.233 0 4.125-.775 5.675-2.325 1.55-1.55 2.325-3.442 2.325-5.675 0-2.233-.775-4.125-2.325-5.675C16.625 5.275 14.733 4.5 12.5 4.5c-2.233 0-4.125.775-5.675 2.325C5.275 8.375 4.5 10.267 4.5 12.5c0 2.233.775 4.125 2.325 5.675 1.55 1.55 3.442 2.325 5.675 2.325Z",fill:t.color||"#121416"})}),CancleFilled:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m8.9 17.154 3.6-3.6 3.6 3.6 1.054-1.054-3.6-3.6 3.6-3.6L16.1 7.846l-3.6 3.6-3.6-3.6L7.846 8.9l3.6 3.6-3.6 3.6L8.9 17.154ZM12.502 22a9.255 9.255 0 0 1-3.705-.748 9.598 9.598 0 0 1-3.018-2.03 9.591 9.591 0 0 1-2.03-3.016A9.245 9.245 0 0 1 3 12.502c0-1.314.25-2.55.748-3.705a9.597 9.597 0 0 1 2.03-3.018 9.592 9.592 0 0 1 3.016-2.03A9.245 9.245 0 0 1 12.498 3c1.314 0 2.55.25 3.705.748a9.597 9.597 0 0 1 3.018 2.03 9.592 9.592 0 0 1 2.03 3.016A9.245 9.245 0 0 1 22 12.498c0 1.314-.25 2.55-.748 3.705a9.598 9.598 0 0 1-2.03 3.018 9.592 9.592 0 0 1-3.016 2.03 9.245 9.245 0 0 1-3.704.749Z",fill:t.color||"#121416"})}),Cart:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M7.015 22c-.507 0-.938-.177-1.296-.531a1.733 1.733 0 0 1-.535-1.277c0-.497.18-.92.54-1.27a1.8 1.8 0 0 1 1.302-.527c.506 0 .938.178 1.295.532.358.354.536.779.536 1.276s-.18.92-.541 1.271A1.8 1.8 0 0 1 7.015 22Zm10.204 0c-.507 0-.939-.177-1.296-.531a1.733 1.733 0 0 1-.535-1.277c0-.497.18-.92.54-1.27a1.8 1.8 0 0 1 1.302-.527c.506 0 .938.178 1.295.532.358.354.536.779.536 1.276s-.18.92-.541 1.271a1.8 1.8 0 0 1-1.301.526ZM5.694 5.48 8.5 11.186h7.347l3.189-5.708H5.694Zm-.765-1.503h15.027c.39 0 .688.176.891.526a.98.98 0 0 1 0 1.051l-3.444 6.083a2.24 2.24 0 0 1-.729.763 1.778 1.778 0 0 1-.98.288h-7.73l-1.428 2.604H19.06v1.502H6.765c-.714 0-1.228-.234-1.543-.701-.315-.468-.31-.993.013-1.577l1.632-2.954-3.877-8.06H1V2h2.985l.944 1.977Z",fill:t.color||"#121416"})}),CartFilled:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M7.015 22c-.507 0-.938-.177-1.296-.531a1.733 1.733 0 0 1-.535-1.277c0-.497.18-.92.54-1.27a1.8 1.8 0 0 1 1.302-.527c.506 0 .938.178 1.295.532.358.354.536.779.536 1.276s-.18.92-.541 1.271A1.8 1.8 0 0 1 7.015 22Zm10.204 0c-.507 0-.939-.177-1.296-.531a1.733 1.733 0 0 1-.535-1.277c0-.497.18-.92.54-1.27a1.8 1.8 0 0 1 1.302-.527c.506 0 .938.178 1.295.532.358.354.536.779.536 1.276s-.18.92-.541 1.271a1.8 1.8 0 0 1-1.301.526ZM4.929 3.977h15.027c.39 0 .688.176.891.526a.98.98 0 0 1 0 1.051l-3.444 6.083a2.24 2.24 0 0 1-.729.763 1.778 1.778 0 0 1-.98.288h-7.73l-1.428 2.604H19.06v1.502H6.765c-.714 0-1.228-.234-1.543-.701-.315-.468-.31-.993.013-1.577l1.632-2.954-3.877-8.06H1V2h2.985l.944 1.977Z",fill:t.color||"#121416"})}),Check:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M9.482 17 4 11.809l1.099-1.04 4.383 4.15L18.902 6 20 7.04 9.482 17Z",fill:t.color||"#121416"})}),CheckBoxRound:t=>S.jsx("svg",{viewBox:"0 0 18 18",fill:"none",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0ZM7.71 13.29C7.32 13.68 6.69 13.68 6.3 13.29L2.71 9.7C2.32 9.31 2.32 8.68 2.71 8.29C3.1 7.9 3.73 7.9 4.12 8.29L7 11.17L13.88 4.29C14.27 3.9 14.9 3.9 15.29 4.29C15.68 4.68 15.68 5.31 15.29 5.7L7.71 13.29Z",fill:t.color||"#1C252E"})}),CheckCircle:t=>S.jsxs("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("mask",{id:"Icon/check_circle__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:24,height:24,children:S.jsx("path",{fill:"#D9D9D9",d:"M0 0h24v24H0z"})}),S.jsx("g",{mask:"url(#Icon/check_circle__a)",children:S.jsx("path",{d:"m11.08 16.754 6.724-6.723-1.054-1.054-5.67 5.67-2.85-2.85-1.053 1.053 3.904 3.904ZM12.503 22a9.255 9.255 0 0 1-3.705-.748 9.598 9.598 0 0 1-3.018-2.03 9.591 9.591 0 0 1-2.03-3.016A9.245 9.245 0 0 1 3 12.502c0-1.314.25-2.55.748-3.705a9.597 9.597 0 0 1 2.03-3.018 9.592 9.592 0 0 1 3.016-2.03A9.245 9.245 0 0 1 12.498 3c1.314 0 2.55.25 3.705.748a9.597 9.597 0 0 1 3.018 2.03 9.592 9.592 0 0 1 2.03 3.016A9.245 9.245 0 0 1 22 12.498c0 1.314-.25 2.55-.748 3.705a9.598 9.598 0 0 1-2.03 3.018 9.592 9.592 0 0 1-3.016 2.03 9.245 9.245 0 0 1-3.704.749Zm-.002-1.5c2.233 0 4.125-.775 5.675-2.325 1.55-1.55 2.325-3.442 2.325-5.675 0-2.233-.775-4.125-2.325-5.675C16.625 5.275 14.733 4.5 12.5 4.5s-4.125.775-5.675 2.325C5.275 8.375 4.5 10.267 4.5 12.5c0 2.233.775 4.125 2.325 5.675 1.55 1.55 3.442 2.325 5.675 2.325Z",fill:t.color||"#121416"})})]}),Close:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M6.03 18 5 16.97l5.47-5.47L5 6.03 6.03 5l5.47 5.47L16.97 5 18 6.03l-5.47 5.47L18 16.97 16.97 18l-5.47-5.47L6.03 18Z",fill:t.color||"#121416"})}),Company:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M3 21V7.125h4.125V3h9.75v8.25H21V21h-7.675v-4.125h-2.65V21H3Zm1.5-1.5h2.625v-2.625H4.5V19.5Zm0-4.125h2.625V12.75H4.5v2.625Zm0-4.125h2.625V8.625H4.5v2.625Zm4.125 4.125h2.625V12.75H8.625v2.625Zm0-4.125h2.625V8.625H8.625v2.625Zm0-4.125h2.625V4.5H8.625v2.625Zm4.125 8.25h2.625V12.75H12.75v2.625Zm0-4.125h2.625V8.625H12.75v2.625Zm0-4.125h2.625V4.5H12.75v2.625ZM16.875 19.5H19.5v-2.625h-2.625V19.5Zm0-4.125H19.5V12.75h-2.625v2.625Z",fill:t.color||"#121416"})}),Download:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M6.808 19c-.505 0-.933-.173-1.283-.519A1.715 1.715 0 0 1 5 17.213V14.55h1.5v2.662a.29.29 0 0 0 .096.21.296.296 0 0 0 .212.094h11.384a.296.296 0 0 0 .212-.095.29.29 0 0 0 .096-.21v-2.66H20v2.66c0 .5-.175.923-.525 1.269-.35.346-.778.519-1.283.519H6.808Zm5.692-3.84-4.27-4.22 1.055-1.073 2.465 2.437V4h1.5v8.304l2.465-2.437 1.054 1.072-4.269 4.22Z",fill:t.color||"#121416"})}),DragHandle:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M3 16v-1.556h18V16H3Zm0-5.444V9h18v1.556H3Z",fill:t.color||"#121416"})}),Eco:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11.132 21c-.702 0-1.36-.067-1.97-.2a6.927 6.927 0 0 1-1.694-.598 30.696 30.696 0 0 1 2.196-5.744c.929-1.853 2.18-3.402 3.752-4.648a14.914 14.914 0 0 0-4.882 3.738 12.952 12.952 0 0 0-2.823 5.433 3.372 3.372 0 0 0-.188-.174 3.38 3.38 0 0 1-.189-.175A7.833 7.833 0 0 1 3 13.025a8.68 8.68 0 0 1 .653-3.315 8.429 8.429 0 0 1 1.882-2.816c1.289-1.312 2.962-2.164 5.02-2.554 2.058-.39 5.137-.445 9.237-.162.318 3.954.272 6.986-.138 9.096-.41 2.11-1.285 3.83-2.623 5.16a8.418 8.418 0 0 1-2.736 1.906 7.91 7.91 0 0 1-3.163.66Z",fill:t.color||"#121416"})}),EditSquare:t=>S.jsx("svg",{viewBox:"0 0 20 20",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M4.422 17.084c-.42 0-.777-.146-1.068-.438a1.454 1.454 0 0 1-.438-1.069V4.424c0-.421.146-.778.438-1.07a1.454 1.454 0 0 1 1.068-.437h7.214l-1.25 1.25H4.422a.245.245 0 0 0-.176.08.245.245 0 0 0-.08.177v11.153c0 .065.027.123.08.177.054.053.112.08.176.08h11.154a.245.245 0 0 0 .176-.08.245.245 0 0 0 .08-.177V9.561l1.25-1.25v7.266c0 .421-.145.778-.437 1.07a1.454 1.454 0 0 1-1.069.437H4.422Zm3.494-5v-2.86l7.55-7.55c.129-.13.271-.224.426-.283a1.313 1.313 0 0 1 .944 0c.15.059.288.15.412.275l1.046 1.043c.12.13.214.272.278.428.065.156.097.314.097.474 0 .16-.027.316-.082.466-.055.151-.148.29-.277.42l-7.573 7.587H7.915Zm1.25-1.25h1.038l5.194-5.194-.519-.52-.556-.535-5.157 5.157v1.092Z",fill:t.color||"#1C1B1F"})}),Error:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M12.5 17.23a.78.78 0 0 0 .575-.232.781.781 0 0 0 .233-.575.781.781 0 0 0-.232-.575.782.782 0 0 0-.576-.233.781.781 0 0 0-.575.233.781.781 0 0 0-.233.575c0 .229.078.42.232.576a.781.781 0 0 0 .576.232Zm-.75-3.653h1.5v-6h-1.5v6ZM12.502 22a9.255 9.255 0 0 1-3.705-.748 9.598 9.598 0 0 1-3.018-2.03 9.591 9.591 0 0 1-2.03-3.016A9.245 9.245 0 0 1 3 12.502c0-1.314.25-2.55.748-3.705a9.597 9.597 0 0 1 2.03-3.018 9.592 9.592 0 0 1 3.016-2.03A9.245 9.245 0 0 1 12.498 3c1.314 0 2.55.25 3.705.748a9.597 9.597 0 0 1 3.018 2.03 9.592 9.592 0 0 1 2.03 3.016A9.245 9.245 0 0 1 22 12.498c0 1.314-.25 2.55-.748 3.705a9.598 9.598 0 0 1-2.03 3.018 9.592 9.592 0 0 1-3.016 2.03 9.245 9.245 0 0 1-3.704.749Zm-.002-1.5c2.233 0 4.125-.775 5.675-2.325 1.55-1.55 2.325-3.442 2.325-5.675 0-2.233-.775-4.125-2.325-5.675C16.625 5.275 14.733 4.5 12.5 4.5c-2.233 0-4.125.775-5.675 2.325C5.275 8.375 4.5 10.267 4.5 12.5c0 2.233.775 4.125 2.325 5.675 1.55 1.55 3.442 2.325 5.675 2.325Z",fill:t.color||"#121416"})}),ErrorFilled:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M12 17a.8.8 0 0 0 .588-.237.797.797 0 0 0 .237-.588.8.8 0 0 0-.237-.588.797.797 0 0 0-.587-.237.8.8 0 0 0-.588.237.797.797 0 0 0-.238.588c0 .233.079.43.237.587A.797.797 0 0 0 12 17Zm-.675-3.825h1.5V6.85h-1.5v6.325ZM12.007 22a9.68 9.68 0 0 1-3.888-.788 10.162 10.162 0 0 1-3.181-2.15 10.155 10.155 0 0 1-2.15-3.183A9.698 9.698 0 0 1 2 11.988c0-1.38.263-2.678.788-3.892a10.006 10.006 0 0 1 2.15-3.171c.908-.9 1.969-1.612 3.183-2.137A9.698 9.698 0 0 1 12.012 2c1.38 0 2.678.263 3.892.788a10.111 10.111 0 0 1 3.171 2.137c.9.9 1.613 1.958 2.137 3.175A9.721 9.721 0 0 1 22 11.993a9.68 9.68 0 0 1-.788 3.888 10.214 10.214 0 0 1-2.137 3.177c-.9.905-1.958 1.622-3.175 2.15a9.672 9.672 0 0 1-3.893.792Z",fill:t.color||"#121416"})}),ExpandAll:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11.5 21 6 15.436l1.04-1.052 4.46 4.493 4.46-4.493L17 15.436 11.5 21ZM7.055 8.6 6 7.565 11.5 2 17 7.564 15.945 8.6 11.5 4.123 7.055 8.601Z",fill:t.color||"#1C1B1F"})}),ExpandLess:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M7.025 15 6 13.9 11.5 8l5.5 5.9-1.025 1.1-4.475-4.8L7.025 15Z",fill:t.color||"#121416"})}),ExpandMore:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11.5 15 6 9.1 7.025 8l4.475 4.8L15.975 8 17 9.1 11.5 15Z",fill:t.color||"#121416"})}),Factory:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M3.5 19.497H6v-8.019h11v8.019h2.5V8.822l-8-3.207-8 3.207v10.675ZM2 21V7.807L11.5 4 21 7.807V21h-5.5v-8.018h-8V21H2Zm6.779 0v-1.773h1.77V21h-1.77Zm1.836-3.007V16.22h1.77v1.773h-1.77ZM12.452 21v-1.773h1.77V21h-1.77Z",fill:t.color||"#121416"})}),FileUpload:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11.3 18.95h1.5v-5.025l2.05 2.05 1.05-1.05-3.9-3.8-3.85 3.85 1.05 1.05 2.1-2.1v5.025ZM5.5 22c-.4 0-.75-.15-1.05-.45-.3-.3-.45-.65-.45-1.05v-17c0-.4.15-.75.45-1.05.3-.3.65-.45 1.05-.45h9.025L20 7.475V20.5c0 .4-.15.75-.45 1.05-.3.3-.65.45-1.05.45h-13Zm8.275-13.85V3.5H5.5v17h13V8.15h-4.725Z",fill:t.color||"#121416"})}),FilecheckInactive:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5 22c-1.533 0-2.833-.533-3.9-1.6C6.533 19.333 6 18.033 6 16.5V6c0-1.1.392-2.042 1.175-2.825C7.958 2.392 8.9 2 10 2s2.042.392 2.825 1.175C13.608 3.958 14 4.9 14 6v7.81a6.482 6.482 0 0 0-1.977 4.141A2.731 2.731 0 0 1 11.5 18c-.7 0-1.292-.242-1.775-.725C9.242 16.792 9 16.2 9 15.5V6h1.5v9.5c0 .283.096.52.287.712.192.192.43.288.713.288s.52-.096.713-.288a.968.968 0 0 0 .287-.712V6c0-.7-.242-1.292-.725-1.775C11.292 3.742 10.7 3.5 10 3.5s-1.292.242-1.775.725C7.742 4.708 7.5 5.3 7.5 6v10.5c0 1.1.392 2.042 1.175 2.825.783.783 1.725 1.175 2.825 1.175.273 0 .537-.024.79-.073.154.497.366.967.628 1.405-.448.112-.92.168-1.418.168Zm5.5-9.826a6.456 6.456 0 0 0-1.5.558V6H17v6.174Zm.788 8.124h-.884v-3.623h.884v3.623Zm2.308 0h-.884v-3.623h.884v3.623Zm-4.783 1.365c.876.873 1.938 1.31 3.187 1.31 1.249 0 2.31-.437 3.186-1.31.876-.873 1.314-1.932 1.314-3.177s-.438-2.303-1.314-3.177C20.811 14.438 19.75 14 18.5 14c-1.249 0-2.31.437-3.187 1.31-.875.873-1.313 1.931-1.313 3.176s.438 2.304 1.313 3.177Z",fill:t.color||"#121416"})}),GoBefore:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M16 15.975 14.9 17 9 11.5 14.9 6 16 7.025 11.2 11.5l4.8 4.475Z",fill:t.color||"#121416"})}),GoNext:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M16 11.5 10.1 17 9 15.975l4.8-4.475L9 7.025 10.1 6l5.9 5.5Z",fill:t.color||"#121416"})}),HamburgerMenu:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M3 18v-1.5h18V18H3Zm0-5.25v-1.5h18v1.5H3ZM3 7.5V6h18v1.5H3Z",fill:t.color||"#121416"})}),ImagecheckPlay:t=>S.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 19.975C4.375 20.325 4.80257 20.5 5.3077 20.5H12.3135C12.159 20.0218 12.0585 19.5194 12.0189 19H5.3077C5.23077 19 5.16024 18.9679 5.09612 18.9038C5.03202 18.8397 4.99997 18.7692 4.99997 18.6923V5.3077C4.99997 5.23077 5.03202 5.16024 5.09612 5.09613C5.16024 5.03203 5.23077 4.99998 5.3077 4.99998H18.6923C18.7692 4.99998 18.8397 5.03203 18.9038 5.09613C18.9679 5.16024 19 5.23077 19 5.3077V12.0189C19.5194 12.0584 20.0218 12.159 20.5 12.3135V5.3077C20.5 4.80257 20.325 4.375 19.975 4.025C19.625 3.675 19.1974 3.5 18.6923 3.5H5.3077C4.80257 3.5 4.375 3.675 4.025 4.025C3.675 4.375 3.5 4.80257 3.5 5.3077V18.6923C3.5 19.1974 3.675 19.625 4.025 19.975ZM14.6895 13.2335L14.0384 12.3654L11.2308 16.0192L9.23075 13.4616L6.75003 16.75H12.2383C12.6379 15.3172 13.516 14.084 14.6895 13.2335Z",fill:"#ABADB0"}),S.jsx("path",{d:"M17.3269 20.7008L20.875 18.4864L17.3269 16.272V20.7008ZM18.5 22.9727C17.2513 22.9727 16.1891 22.5362 15.3135 21.6632C14.4378 20.7902 14 19.7313 14 18.4864C14 17.2414 14.4378 16.1825 15.3135 15.3095C16.1891 14.4365 17.2513 14 18.5 14C19.7487 14 20.8109 14.4365 21.6865 15.3095C22.5622 16.1825 23 17.2414 23 18.4864C23 19.7313 22.5622 20.7902 21.6865 21.6632C20.8109 22.5362 19.7487 22.9727 18.5 22.9727Z",fill:"#ABADB0"})]}),Inventory:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m15.178 21.054-3.962-3.968 1.07-1.071 2.892 2.897 5.753-5.763L22 14.22l-6.822 6.834Zm5.073-9.727H18.73v-4.77a.3.3 0 0 0-.097-.214.298.298 0 0 0-.215-.098h-2.225v2.658H7.06V6.245H4.834a.298.298 0 0 0-.214.098.3.3 0 0 0-.098.215v13.605a.3.3 0 0 0 .098.215.298.298 0 0 0 .214.097h5.777V22H4.834c-.506 0-.938-.18-1.296-.538a1.772 1.772 0 0 1-.538-1.3V6.559c0-.507.18-.94.538-1.3.358-.358.79-.538 1.296-.538h4.471c.14-.495.428-.906.862-1.231A2.37 2.37 0 0 1 11.626 3c.56 0 1.053.163 1.482.489.429.325.713.736.854 1.231h4.455c.506 0 .938.18 1.297.539.358.359.537.792.537 1.299v4.77Zm-8.625-4.965c.261 0 .48-.088.654-.263a.89.89 0 0 0 .263-.656.89.89 0 0 0-.263-.655.888.888 0 0 0-.654-.263.888.888 0 0 0-.655.263.89.89 0 0 0-.262.655c0 .262.087.48.262.656a.888.888 0 0 0 .655.263Z",fill:t.color||"#121416"})}),KakaoTalk:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C6.478 3 2 6.522 2 10.866c0 2.7 1.733 5.086 4.367 6.493l-1.111 4.13c-.1.36.31.652.622.438l4.866-3.263c.412.045.823.068 1.256.068 5.522 0 10-3.522 10-7.866C22 6.522 17.522 3 12 3Z",fill:t.color||"#121416"})}),ListAll:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M12.5 10.5h4.808V9H12.5v1.5Zm0 5.5h4.808v-1.5H12.5V16Zm-3-4.635c.447 0 .829-.157 1.143-.472.315-.315.472-.696.472-1.143 0-.447-.157-.829-.472-1.143A1.557 1.557 0 0 0 9.5 8.135c-.447 0-.829.157-1.143.472a1.557 1.557 0 0 0-.472 1.143c0 .447.157.829.472 1.143.314.315.696.472 1.143.472Zm0 5.5c.447 0 .829-.157 1.143-.472.315-.315.472-.696.472-1.143 0-.447-.157-.829-.472-1.143a1.557 1.557 0 0 0-1.143-.472c-.447 0-.829.157-1.143.472a1.557 1.557 0 0 0-.472 1.143c0 .447.157.828.472 1.143.314.315.696.472 1.143.472ZM5.808 21c-.505 0-.933-.175-1.283-.525A1.745 1.745 0 0 1 4 19.192V5.808c0-.505.175-.933.525-1.283.35-.35.778-.525 1.283-.525h13.384c.505 0 .933.175 1.283.525.35.35.525.778.525 1.283v13.384c0 .505-.175.933-.525 1.283-.35.35-.778.525-1.283.525H5.808Zm0-1.5h13.384a.294.294 0 0 0 .212-.096.294.294 0 0 0 .096-.212V5.808a.294.294 0 0 0-.096-.212.294.294 0 0 0-.212-.096H5.808a.294.294 0 0 0-.212.096.294.294 0 0 0-.096.212v13.384c0 .077.032.148.096.212a.294.294 0 0 0 .212.096Z",fill:t.color||"#121416"})}),LocalShipping:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M5.433 20a2.65 2.65 0 0 1-1.96-.816 2.715 2.715 0 0 1-.805-1.98H1V6.8c0-.503.172-.93.517-1.278A1.71 1.71 0 0 1 2.782 5H16.2v3.793h2.616L22 13.103v4.1h-1.782a2.71 2.71 0 0 1-.807 1.981 2.657 2.657 0 0 1-1.962.816 2.65 2.65 0 0 1-1.96-.816 2.714 2.714 0 0 1-.805-1.98H8.202c0 .778-.27 1.439-.808 1.982A2.66 2.66 0 0 1 5.433 20Zm.002-1.494c.361 0 .667-.126.915-.378.25-.251.374-.56.374-.925s-.125-.674-.374-.925a1.238 1.238 0 0 0-.915-.378c-.361 0-.667.126-.915.378-.25.251-.374.56-.374.925s.125.674.374.925c.248.252.554.378.915.378Zm-2.957-2.797h.713c.21-.37.513-.679.909-.928.396-.25.841-.375 1.335-.375.481 0 .923.123 1.326.37.402.246.708.557.918.933h7.043V6.494H2.782a.288.288 0 0 0-.209.096.294.294 0 0 0-.095.21v8.909Zm14.973 2.797c.362 0 .667-.126.916-.378.249-.251.373-.56.373-.925s-.124-.674-.373-.925a1.238 1.238 0 0 0-.916-.378c-.361 0-.666.126-.915.378-.25.251-.374.56-.374.925s.125.674.374.925c.249.252.554.378.915.378Zm-1.25-4.79h4.415l-2.558-3.429H16.2v3.43Z",fill:t.color||"#121416"})}),Logout:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M21.076 13.25H9.14v-1.5h11.938l-1.842-1.82 1.067-1.084L24 12.5l-3.698 3.654-1.067-1.085 1.841-1.819Zm-5.232-3.885V5.808a.298.298 0 0 0-.311-.308H5.83a.298.298 0 0 0-.311.308v13.384a.298.298 0 0 0 .31.308h9.704a.298.298 0 0 0 .311-.308v-3.557h1.519v3.557c0 .499-.18.925-.537 1.278-.357.353-.788.53-1.293.53H5.83c-.505 0-.936-.177-1.294-.53A1.731 1.731 0 0 1 4 19.192V5.808c0-.499.179-.925.536-1.278.358-.353.789-.53 1.294-.53h9.703c.505 0 .936.177 1.293.53.358.353.537.779.537 1.278v3.557h-1.519Z",fill:t.color||"#121416"})}),Menu:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M3 17v-1.464h17V17H3Zm0-4.768v-1.464h17v1.464H3Zm0-4.768V6h17v1.464H3Z",fill:t.color||"#121416"})}),Minus:t=>S.jsx("svg",{fill:"none",viewBox:"0 0 20 20",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M4.168 10.409V9.062h11.667v1.347H4.168Z",fill:"#fff"})}),ModeEdit:t=>S.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("path",{d:"M2.99854 17.4613V20.5013C2.99854 20.7813 3.21854 21.0013 3.49854 21.0013H6.53854C6.66854 21.0013 6.79854 20.9513 6.88854 20.8513L17.8085 9.94128L14.0585 6.19128L3.14854 17.1013C3.04854 17.2013 2.99854 17.3213 2.99854 17.4613Z",fill:"white"}),S.jsx("path",{d:"M20.7085 5.63128L18.3685 3.29128C17.9785 2.90128 17.3485 2.90128 16.9585 3.29128L15.1285 5.12128L18.8785 8.87128L20.7085 7.04128C21.0985 6.65128 21.0985 6.02128 20.7085 5.63128Z",fill:"white"})]}),More:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11.5 20c-.412 0-.766-.151-1.06-.455a1.514 1.514 0 0 1-.44-1.093c0-.425.147-.79.44-1.093a1.423 1.423 0 0 1 1.06-.454c.412 0 .766.151 1.06.454.293.303.44.668.44 1.093 0 .426-.147.79-.44 1.093A1.423 1.423 0 0 1 11.5 20Zm0-5.952c-.412 0-.766-.152-1.06-.455A1.514 1.514 0 0 1 10 12.5c0-.426.147-.79.44-1.093a1.423 1.423 0 0 1 1.06-.455c.412 0 .766.152 1.06.455.293.303.44.667.44 1.093 0 .426-.147.79-.44 1.093a1.423 1.423 0 0 1-1.06.455Zm0-5.953c-.412 0-.766-.151-1.06-.454A1.514 1.514 0 0 1 10 6.548c0-.426.147-.79.44-1.093A1.423 1.423 0 0 1 11.5 5c.412 0 .766.152 1.06.455.293.303.44.667.44 1.093 0 .425-.147.79-.44 1.093a1.423 1.423 0 0 1-1.06.454Z",fill:t.color||"#121416"})}),Naver:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M14.493 12.492 9.303 5H5v14h4.507v-7.493L14.697 19H19V5h-4.507v7.492Z",fill:t.color||"#121416"})}),NaverBlog:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.053 4h11.888C19.624 4 21 5.364 21 7.031v7.318c0 1.661-1.37 3.025-3.053 3.025h-4.244l-.723 1.238-.711 1.22a.338.338 0 0 1-.584 0l-.711-1.22-.723-1.238H6.053C4.376 17.374 3 16.016 3 14.35V7.026C3 5.364 4.37 4 6.053 4ZM7.67 9.15c-.319 0-.617.163-.848.44V8H6v4.905h.822v-.345c.231.27.524.44.848.44.734 0 1.33-.86 1.33-1.921 0-1.063-.59-1.929-1.33-1.929Zm-.165 2.883c-.303 0-.565-.237-.678-.582a1.274 1.274 0 0 1-.062-.38c0-.135.021-.263.062-.378.113-.345.375-.582.678-.582.411 0 .74.426.74.96 0 .535-.329.962-.74.962ZM13.5 9c-.828 0-1.5.894-1.5 2V9.511c-.08-.486-.419-.851-.419-.851C10.838 7.91 10 8.004 10 8.004v.98s.585.068.696.555V13H12v-2c0 1.106.672 2 1.5 2s1.5-.894 1.5-2c0-1.106-.667-2-1.5-2Zm0 2.958c-.396 0-.719-.43-.719-.958s.323-.958.719-.958c.396 0 .719.43.719.958s-.318.958-.719.958Zm4.4-2.601V9.07H19v3.543c-.075.446-.414.784-.414.784-.734.688-1.555.6-1.555.6v-.9c.76 0 .869-.477.869-.477v-.485c-.299.223-.68.357-1.093.357-.999 0-1.807-.784-1.807-1.746S15.808 9 16.806 9c.408 0 .788.134 1.094.357Zm-1.881 1.383c0 .49.441.892.991.892.387 0 .727-.198.89-.497a.858.858 0 0 0 .102-.395.8.8 0 0 0-.102-.395 1.015 1.015 0 0 0-.89-.497c-.543 0-.991.401-.991.892Z",fill:t.color||"#121416"})}),OrderApprove:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m16.823 19.488 3.158-3.113-.839-.836-2.319 2.272-.965-.972-.839.851 1.804 1.798ZM5.885 8.35h11.23V6.854H5.885v1.495ZM17.5 22c-1.249 0-2.31-.436-3.187-1.31-.875-.873-1.313-1.93-1.313-3.176s.438-2.304 1.313-3.177c.876-.873 1.938-1.31 3.187-1.31 1.249 0 2.31.437 3.186 1.31.876.873 1.314 1.932 1.314 3.177s-.438 2.303-1.314 3.177C19.811 21.564 18.75 22 17.5 22ZM3 20.83V4.803c0-.497.177-.922.53-1.274A1.741 1.741 0 0 1 4.808 3h13.384c.499 0 .925.176 1.278.528.353.352.53.777.53 1.274v6.29a5.561 5.561 0 0 0-1.5-.426V4.803a.293.293 0 0 0-.096-.21.295.295 0 0 0-.212-.097H4.808a.295.295 0 0 0-.212.096.293.293 0 0 0-.096.211v13.701h6.21c.064.394.158.772.281 1.135.124.363.29.707.495 1.033l-.092.092-1.317-1.16-1.423 1.227-1.423-1.227-1.423 1.227-1.423-1.227L3 20.83Zm2.885-4.735h4.892a5.52 5.52 0 0 1 .465-1.496H5.885v1.496Zm0-3.873h7.205a5.915 5.915 0 0 1 1.631-1.05 5.456 5.456 0 0 1 1.942-.445H5.885v1.495Z",fill:t.color||"#121416"})}),OrderInactive:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M15.904 19.326h.884v-3.624h-.884v3.624Zm2.308 0h.884v-3.624h-.884v3.624ZM5.885 8.349h11.23V6.854H5.885v1.495ZM17.5 22c-1.249 0-2.31-.436-3.187-1.31-.875-.873-1.313-1.93-1.313-3.176s.438-2.304 1.313-3.177c.876-.873 1.938-1.31 3.187-1.31 1.249 0 2.31.437 3.186 1.31.876.873 1.314 1.932 1.314 3.177s-.438 2.303-1.314 3.177C19.811 21.564 18.75 22 17.5 22ZM3 20.83V4.803c0-.497.177-.922.53-1.274A1.741 1.741 0 0 1 4.808 3h13.384c.499 0 .925.176 1.278.528.353.352.53.777.53 1.274v6.29a5.561 5.561 0 0 0-1.5-.426V4.803a.293.293 0 0 0-.096-.21.295.295 0 0 0-.212-.097H4.808a.295.295 0 0 0-.212.096.293.293 0 0 0-.096.211v13.701h6.21c.064.394.158.772.281 1.135.124.363.29.707.495 1.033l-.092.092-1.317-1.16-1.423 1.227-1.423-1.227-1.423 1.227-1.423-1.227L3 20.83Zm2.885-4.735h4.892a5.52 5.52 0 0 1 .465-1.496H5.885v1.496Zm0-3.873h7.205a5.915 5.915 0 0 1 1.631-1.05 5.456 5.456 0 0 1 1.942-.445H5.885v1.495Z",fill:t.color||"#121416"})}),OrderPlay:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m16.327 19.728 3.548-2.214-3.548-2.215v4.43ZM5.885 8.35h11.23V6.854H5.885v1.495ZM17.5 22c-1.249 0-2.31-.436-3.187-1.31-.875-.873-1.313-1.93-1.313-3.176s.438-2.304 1.313-3.177c.876-.873 1.938-1.31 3.187-1.31 1.249 0 2.31.437 3.186 1.31.876.873 1.314 1.932 1.314 3.177s-.438 2.303-1.314 3.177C19.811 21.564 18.75 22 17.5 22ZM3 20.83V4.803c0-.497.177-.922.53-1.274A1.741 1.741 0 0 1 4.808 3h13.384c.499 0 .925.176 1.278.528.353.352.53.777.53 1.274v6.29a5.561 5.561 0 0 0-1.5-.426V4.803a.293.293 0 0 0-.096-.21.295.295 0 0 0-.212-.097H4.808a.295.295 0 0 0-.212.096.293.293 0 0 0-.096.211v13.701h6.21c.064.394.158.772.281 1.135.124.363.29.707.495 1.033l-.092.092-1.317-1.16-1.423 1.227-1.423-1.227-1.423 1.227-1.423-1.227L3 20.83Zm2.885-4.735h4.892a5.52 5.52 0 0 1 .465-1.496H5.885v1.496Zm0-3.873h7.205a5.915 5.915 0 0 1 1.631-1.05 5.456 5.456 0 0 1 1.942-.445H5.885v1.495Z",fill:t.color||"#121416"})}),Outward:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M6.011 17 5 15.989l9.527-9.537H5.866V5H17v11.134h-1.452V7.473L6.01 17Z",fill:t.color||"#121416"})}),PayApprove:t=>S.jsxs("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("path",{d:"M4.308 19.5c-.505 0-.933-.175-1.283-.525a1.745 1.745 0 0 1-.525-1.283V6.308c0-.505.175-.933.525-1.283.35-.35.778-.525 1.283-.525h15.384c.505 0 .933.175 1.283.525.35.35.525.778.525 1.283v5.288H4v6.096c0 .077.032.148.096.212a.294.294 0 0 0 .212.096h9.288v1.5H4.308ZM4 8.404h16V6.308a.294.294 0 0 0-.096-.212.294.294 0 0 0-.212-.096H4.308a.294.294 0 0 0-.212.096.294.294 0 0 0-.096.212v2.096Z",fill:t.color||"#121416"}),S.jsx("path",{d:"m18.823 19.461 3.158-3.113-.839-.836-2.319 2.271-.965-.972-.839.852 1.804 1.798Zm.677 2.512c-1.249 0-2.31-.437-3.186-1.31C15.438 19.79 15 18.731 15 17.486s.438-2.304 1.314-3.177C17.189 13.438 18.25 13 19.5 13c1.249 0 2.31.437 3.186 1.31.876.872 1.314 1.931 1.314 3.176s-.438 2.304-1.314 3.177c-.875.873-1.937 1.31-3.186 1.31Z",fill:t.color||"#121416"})]}),PayInactive:t=>S.jsxs("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("path",{d:"M4.308 19.5c-.505 0-.933-.175-1.283-.525a1.745 1.745 0 0 1-.525-1.283V6.308c0-.505.175-.933.525-1.283.35-.35.778-.525 1.283-.525h15.384c.505 0 .933.175 1.283.525.35.35.525.778.525 1.283v5.288H4v6.096c0 .077.032.148.096.212a.294.294 0 0 0 .212.096h9.288v1.5H4.308ZM4 8.404h16V6.308a.294.294 0 0 0-.096-.212.294.294 0 0 0-.212-.096H4.308a.294.294 0 0 0-.212.096.294.294 0 0 0-.096.212v2.096Z",fill:t.color||"#121416"}),S.jsx("path",{d:"M17.904 19.298h.884v-3.623h-.884v3.623Zm2.308 0h.884v-3.623h-.884v3.623Zm-.712 2.675c-1.249 0-2.31-.437-3.186-1.31C15.438 19.79 15 18.731 15 17.486s.438-2.304 1.314-3.177C17.189 13.438 18.25 13 19.5 13c1.249 0 2.31.437 3.186 1.31.876.872 1.314 1.931 1.314 3.176s-.438 2.304-1.314 3.177c-.875.873-1.937 1.31-3.186 1.31Z",fill:t.color||"#121416"})]}),Personcard:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M3.808 22c-.505 0-.933-.175-1.283-.525A1.745 1.745 0 0 1 2 20.192V9.808c0-.505.175-.933.525-1.283.35-.35.778-.525 1.283-.525H9V4.5c0-.415.146-.77.438-1.062A1.446 1.446 0 0 1 10.5 3h2c.415 0 .77.146 1.062.438.292.293.438.647.438 1.062V8h5.192c.505 0 .933.175 1.283.525.35.35.525.778.525 1.283v10.384c0 .505-.175.933-.525 1.283-.35.35-.778.525-1.283.525H3.808Zm0-1.5h15.384a.3.3 0 0 0 .221-.087.3.3 0 0 0 .087-.22V9.807a.3.3 0 0 0-.087-.221.3.3 0 0 0-.22-.087H14v.385c0 .409-.148.76-.443 1.056a1.443 1.443 0 0 1-1.057.444h-2c-.409 0-.761-.148-1.057-.444A1.443 1.443 0 0 1 9 9.885V9.5H3.808a.3.3 0 0 0-.221.087.3.3 0 0 0-.087.22v10.385a.3.3 0 0 0 .087.221.3.3 0 0 0 .22.087Zm1.846-2.288h5.692v-.297c0-.257-.071-.494-.213-.71a1.429 1.429 0 0 0-.59-.505 4.997 4.997 0 0 0-2.042-.43 4.997 4.997 0 0 0-2.043.43c-.252.12-.448.289-.59.505a1.265 1.265 0 0 0-.214.71v.297Zm7.846-1.52h4V15.5h-4v1.192Zm-5-1.192c.372 0 .69-.131.952-.394.263-.263.394-.58.394-.952s-.131-.69-.394-.952a1.297 1.297 0 0 0-.952-.394c-.372 0-.69.131-.952.394-.263.263-.394.58-.394.952s.131.689.394.952.58.394.952.394Zm5-1.5h4v-1.192h-4V14Zm-3-4.115h2V4.5h-2v5.385Z",fill:t.color||"#121416"})}),PrintInactive:t=>S.jsxs("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("path",{d:"M17.404 19.298h.884v-3.623h-.884v3.623Zm2.308 0h.884v-3.623h-.884v3.623ZM19 21.973c-1.249 0-2.31-.437-3.187-1.31-.875-.873-1.313-1.932-1.313-3.177s.438-2.304 1.313-3.177C16.69 13.438 17.752 13 19 13c1.249 0 2.31.437 3.186 1.31.876.872 1.314 1.931 1.314 3.176s-.438 2.304-1.314 3.177c-.875.873-1.937 1.31-3.186 1.31Z",fill:t.color||"#121416"}),S.jsx("path",{d:"M6.5 20.5v-4H2.79v-5.692c0-.709.242-1.302.726-1.782.483-.479 1.075-.718 1.774-.718h13.423c.708 0 1.302.24 1.78.718.48.48.72 1.073.72 1.782v.81a6.382 6.382 0 0 0-.72-.29c-.25-.082-.51-.14-.78-.17v-.289c0-.283-.096-.53-.288-.743a.922.922 0 0 0-.712-.318H5.289a.968.968 0 0 0-.713.287.967.967 0 0 0-.287.713V15H6.5v-1.77h8.012a4.618 4.618 0 0 0-.912 1.5H8V19h5.437c.084.277.207.539.368.785.16.247.323.485.485.715H6.5ZM16 8.308v-3H8v3H6.5v-4.5h11v4.5H16Z",fill:t.color||"#121416"})]}),PrintPlay:t=>S.jsxs("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:[S.jsx("path",{d:"m17.827 19.728 3.548-2.214-3.548-2.215v4.43ZM19 22c-1.249 0-2.31-.436-3.187-1.31-.875-.873-1.313-1.931-1.313-3.176s.438-2.304 1.313-3.177c.876-.873 1.938-1.31 3.187-1.31 1.249 0 2.31.437 3.186 1.31.876.873 1.314 1.932 1.314 3.177s-.438 2.303-1.314 3.177C21.311 21.564 20.25 22 19 22Z",fill:t.color||"#121416"}),S.jsx("path",{d:"M6.5 20.5v-4H2.79v-5.692c0-.709.242-1.302.726-1.782.483-.479 1.075-.718 1.774-.718h13.423c.708 0 1.302.24 1.78.718.48.48.72 1.073.72 1.782v.81a6.382 6.382 0 0 0-.72-.29c-.25-.082-.51-.14-.78-.17v-.289c0-.283-.096-.53-.288-.743a.922.922 0 0 0-.712-.318H5.289a.968.968 0 0 0-.713.287.967.967 0 0 0-.287.713V15H6.5v-1.77h8.012a4.618 4.618 0 0 0-.912 1.5H8V19h5.437c.084.277.207.539.368.785.16.247.323.485.485.715H6.5ZM16 8.308v-3H8v3H6.5v-4.5h11v4.5H16Z",fill:t.color||"#121416"})]}),Product:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M4.808 22c-.499 0-.925-.177-1.278-.53A1.741 1.741 0 0 1 3 20.192V8.994a1.903 1.903 0 0 1-.72-.645A1.69 1.69 0 0 1 2 7.385V4.808c0-.499.177-.925.53-1.278.353-.353.779-.53 1.278-.53h15.384c.499 0 .925.177 1.278.53.353.353.53.779.53 1.278v2.577c0 .364-.093.685-.28.964a1.904 1.904 0 0 1-.72.645v11.198c0 .499-.177.925-.53 1.278-.353.353-.779.53-1.278.53H4.808ZM4.5 9.192v10.952a.33.33 0 0 0 .11.255.391.391 0 0 0 .275.101h13.307a.3.3 0 0 0 .221-.087.3.3 0 0 0 .087-.22v-11h-14Zm-.692-1.5h15.384a.3.3 0 0 0 .221-.086.3.3 0 0 0 .087-.221V4.808a.3.3 0 0 0-.087-.221.3.3 0 0 0-.22-.087H3.807a.3.3 0 0 0-.221.087.3.3 0 0 0-.087.22v2.578a.3.3 0 0 0 .087.22.3.3 0 0 0 .22.087Zm4.884 6.24h5.616V12.5H8.692v1.433Z",fill:t.color||"#121416"})}),Search:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m19.9 21-6.575-6.575c-.5.433-1.083.77-1.749 1.012a6.183 6.183 0 0 1-2.126.363c-1.803 0-3.328-.625-4.577-1.875S3 11.167 3 9.4c0-1.767.625-3.275 1.875-4.525C6.125 3.625 7.638 3 9.412 3c1.775 0 3.284.625 4.525 1.875 1.242 1.25 1.863 2.76 1.863 4.529 0 .714-.117 1.404-.35 2.071a6.343 6.343 0 0 1-1.05 1.875L21 19.9 19.9 21ZM9.425 14.3c1.354 0 2.505-.48 3.453-1.438S14.3 10.75 14.3 9.4s-.474-2.504-1.422-3.463C11.93 4.98 10.78 4.5 9.425 4.5c-1.368 0-2.53.48-3.489 1.438C4.98 6.896 4.5 8.05 4.5 9.4s.479 2.504 1.436 3.463c.958.958 2.121 1.437 3.489 1.437Z",fill:t.color||"#121416"})}),Settings:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m10.167 21-.385-3.046a5.364 5.364 0 0 1-1.596-.896L5.333 18.25 3 14.25l2.467-1.844a4.955 4.955 0 0 1-.05-.448 6.922 6.922 0 0 1 0-.882c.01-.147.027-.307.05-.482L3 8.75l2.333-3.98 2.843 1.182c.243-.191.504-.366.78-.524a5.26 5.26 0 0 1 .816-.382L10.167 2h4.666l.385 3.056c.303.109.578.236.824.382.245.145.493.317.743.514l2.882-1.183L22 8.75l-2.506 1.873c.036.162.056.313.06.453.002.14.004.282.004.424 0 .136-.003.274-.01.414a2.86 2.86 0 0 1-.07.482l2.487 1.854-2.333 4-2.847-1.202c-.25.198-.505.372-.766.524-.26.152-.527.276-.8.372L14.832 21h-4.666Zm2.345-6.5a2.94 2.94 0 0 0 2.147-.876c.59-.584.886-1.292.886-2.124 0-.832-.295-1.54-.886-2.124a2.941 2.941 0 0 0-2.147-.876c-.852 0-1.57.292-2.156.876A2.89 2.89 0 0 0 9.48 11.5c0 .832.292 1.54.877 2.124.586.584 1.304.876 2.156.876Zm0-1.5a1.47 1.47 0 0 1-1.075-.438 1.439 1.439 0 0 1-.442-1.062c0-.417.148-.77.442-1.063A1.47 1.47 0 0 1 12.512 10c.42 0 .779.146 1.074.438.295.291.442.645.442 1.062 0 .417-.147.77-.442 1.063a1.47 1.47 0 0 1-1.074.437Zm-1.023 6.5h1.987l.364-2.679a5.673 5.673 0 0 0 1.414-.568 6.235 6.235 0 0 0 1.236-.947l2.512 1.044.995-1.7-2.193-1.635c.084-.259.142-.512.172-.761a6.189 6.189 0 0 0 0-1.508 3.872 3.872 0 0 0-.172-.742l2.213-1.654-.996-1.7-2.54 1.06a5.37 5.37 0 0 0-1.217-.948 5.258 5.258 0 0 0-1.434-.583L13.51 3.5h-2.006l-.335 2.67c-.516.12-.992.304-1.429.553-.437.249-.854.57-1.25.962L5.979 6.65l-.996 1.7 2.184 1.61a3.612 3.612 0 0 0-.177.74 6.215 6.215 0 0 0 0 1.575c.033.25.09.497.167.74L4.983 14.65l.996 1.7L8.48 15.3c.384.39.794.709 1.23.958.438.248.92.44 1.45.573l.328 2.669Z",fill:t.color||"#121416"})}),ShippingDone:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M5.433 23a2.65 2.65 0 0 1-1.96-.816 2.715 2.715 0 0 1-.805-1.98H1V9.8c0-.503.172-.93.517-1.278A1.71 1.71 0 0 1 2.782 8H16.2v3.793h2.616L22 16.103v4.1h-1.782a2.71 2.71 0 0 1-.807 1.981 2.657 2.657 0 0 1-1.962.816 2.65 2.65 0 0 1-1.96-.816 2.714 2.714 0 0 1-.805-1.98H8.202c0 .778-.27 1.439-.808 1.982A2.66 2.66 0 0 1 5.433 23Zm.002-1.494c.361 0 .667-.126.915-.378.25-.251.374-.56.374-.925s-.125-.674-.374-.925a1.238 1.238 0 0 0-.915-.378c-.361 0-.667.126-.915.378-.25.251-.374.56-.374.925s.125.674.374.925c.248.252.554.378.915.378Zm-2.957-2.797h.713c.21-.37.513-.679.909-.928.396-.25.841-.375 1.335-.375.481 0 .923.123 1.326.37.402.246.708.557.918.933h7.043V9.494H2.782a.288.288 0 0 0-.209.096.294.294 0 0 0-.095.21v8.909Zm14.973 2.797c.362 0 .667-.126.916-.378.249-.251.373-.56.373-.925s-.124-.674-.373-.925a1.238 1.238 0 0 0-.916-.378c-.361 0-.666.126-.915.378-.25.251-.374.56-.374.925s.125.674.374.925c.249.252.554.378.915.378Zm-1.25-4.79h4.415l-2.558-3.429H16.2v3.43ZM8 3.399 10.447 6 15 1.111 13.965 0l-3.518 3.778L9.035 2.26 8 3.4Z",fill:t.color||"#121416"})}),SupportAgent:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M11 21v-1.5h8.5v-7.6a6.51 6.51 0 0 0-.625-2.787A8.017 8.017 0 0 0 17.2 6.75c-.7-.683-1.5-1.23-2.4-1.638a6.705 6.705 0 0 0-5.6 0c-.9.409-1.7.955-2.4 1.638a8.017 8.017 0 0 0-1.675 2.363A6.51 6.51 0 0 0 4.5 11.9V18H4c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 2 16v-2c0-.383.092-.72.275-1.012.183-.292.425-.53.725-.713l.075-1.325c.15-1.217.496-2.317 1.037-3.3a8.784 8.784 0 0 1 2.026-2.5 9.1 9.1 0 0 1 2.725-1.588A8.93 8.93 0 0 1 12 3c1.1 0 2.154.188 3.162.563a8.803 8.803 0 0 1 2.713 1.6 9.11 9.11 0 0 1 2.012 2.5c.542.974.888 2.062 1.038 3.262l.075 1.3c.3.15.542.37.725.662.183.292.275.613.275.963v2.3c0 .367-.092.692-.275.975-.183.283-.425.5-.725.65V19.5c0 .413-.147.766-.44 1.06-.294.293-.647.44-1.06.44H11Zm-2-7.25a.72.72 0 0 1-.525-.225.734.734 0 0 1-.225-.537c0-.209.075-.384.225-.525a.755.755 0 0 1 .537-.213.731.731 0 0 1 .738.75c0 .2-.072.375-.216.525A.71.71 0 0 1 9 13.75Zm6 0a.72.72 0 0 1-.525-.225.734.734 0 0 1-.225-.537c0-.209.075-.384.225-.525a.756.756 0 0 1 .537-.213c.209 0 .384.072.525.216a.731.731 0 0 1 .213.534c0 .2-.072.375-.216.525a.71.71 0 0 1-.534.225Zm-8.975-1.3c-.067-.983.07-1.875.412-2.675.342-.8.8-1.48 1.375-2.038A6.05 6.05 0 0 1 9.8 6.45c.75-.3 1.5-.45 2.25-.45 1.517 0 2.792.48 3.825 1.438 1.033.958 1.667 2.154 1.9 3.587-1.567-.017-2.946-.438-4.137-1.263a8.32 8.32 0 0 1-2.763-3.212 7.985 7.985 0 0 1-1.688 3.587 7.78 7.78 0 0 1-3.162 2.313Z",fill:t.color||"#121416"})}),SwapVert:t=>S.jsx("svg",{viewBox:"0 0 24 24",fill:"none",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M16 17.01V10H14V17.01H11L15 21L19 17.01H16ZM9 3L5 6.99H8V14H10V6.99H13L9 3ZM16 17.01V10H14V17.01H11L15 21L19 17.01H16ZM9 3L5 6.99H8V14H10V6.99H13L9 3Z",fill:t.color||"#1C252E"})}),Task:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"m10.85 17.625 5.725-5.725-.975-.975-4.75 4.75L8.275 13.1l-.975.975 3.55 3.55ZM5.5 22c-.4 0-.75-.15-1.05-.45-.3-.3-.45-.65-.45-1.05v-17c0-.4.15-.75.45-1.05.3-.3.65-.45 1.05-.45h9.025L20 7.475V20.5c0 .4-.15.75-.45 1.05-.3.3-.65.45-1.05.45h-13Zm8.275-13.85V3.5H5.5v17h13V8.15h-4.725Z",fill:t.color||"#121416"})}),Upload:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M6.808 19c-.505 0-.933-.173-1.283-.519A1.715 1.715 0 0 1 5 17.213V14.55h1.5v2.662a.29.29 0 0 0 .096.21.296.296 0 0 0 .212.094h11.384a.296.296 0 0 0 .212-.095.29.29 0 0 0 .096-.21v-2.66H20v2.66c0 .5-.175.923-.525 1.269-.35.346-.778.519-1.283.519H6.808Zm4.942-3.84V6.855L9.285 9.293 8.23 8.22 12.5 4l4.27 4.22-1.055 1.073-2.465-2.438v8.305h-1.5Z",fill:t.color||"#121416"})}),User:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M5.55 17.625c1.05-.733 2.092-1.296 3.125-1.688A9.302 9.302 0 0 1 12 15.35c1.183 0 2.296.196 3.338.588 1.041.391 2.087.954 3.137 1.687.733-.9 1.254-1.808 1.563-2.725A9.036 9.036 0 0 0 20.5 12c0-2.417-.813-4.438-2.438-6.063C16.438 4.313 14.418 3.5 12 3.5c-2.417 0-4.438.813-6.063 2.438C4.313 7.563 3.5 9.582 3.5 12a8.81 8.81 0 0 0 .475 2.9c.317.917.842 1.825 1.575 2.725Zm6.445-4.875c-.963 0-1.774-.33-2.432-.992-.659-.662-.988-1.474-.988-2.438 0-.963.33-1.774.992-2.433.662-.658 1.474-.987 2.438-.987.963 0 1.774.33 2.432.992.659.662.988 1.474.988 2.438 0 .963-.33 1.774-.992 2.432-.662.659-1.474.988-2.438.988Zm.017 9.25a9.705 9.705 0 0 1-3.887-.788 10.144 10.144 0 0 1-3.188-2.15 10.162 10.162 0 0 1-2.15-3.181A9.68 9.68 0 0 1 2 11.993c0-1.379.263-2.672.788-3.88a10.183 10.183 0 0 1 2.15-3.175 10.162 10.162 0 0 1 3.181-2.15A9.68 9.68 0 0 1 12.007 2c1.379 0 2.672.263 3.88.788a10.183 10.183 0 0 1 3.175 2.15 10.18 10.18 0 0 1 2.15 3.175c.526 1.21.788 2.5.788 3.875s-.262 2.67-.788 3.887a10.143 10.143 0 0 1-2.15 3.188 10.18 10.18 0 0 1-3.175 2.15 9.622 9.622 0 0 1-3.875.787ZM12 20.5a9.16 9.16 0 0 0 2.688-.4c.874-.267 1.737-.733 2.587-1.4a10.9 10.9 0 0 0-2.6-1.375A7.875 7.875 0 0 0 12 16.85c-.9 0-1.792.158-2.675.475a10.9 10.9 0 0 0-2.6 1.375c.85.667 1.713 1.133 2.588 1.4.874.267 1.77.4 2.687.4Zm0-9.25c.567 0 1.03-.18 1.387-.537.359-.359.538-.821.538-1.388s-.18-1.03-.538-1.387C13.03 7.579 12.567 7.4 12 7.4c-.567 0-1.03.18-1.387.537-.359.359-.538.821-.538 1.388s.18 1.03.538 1.388c.358.358.82.537 1.387.537Z",fill:t.color||"#121416"})}),Warning:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M2 20 12 3l10 17H2Zm2.55-1.457h14.9L12 5.914 4.55 18.543ZM12 17.385a.777.777 0 0 0 .797-.785.777.777 0 0 0-.797-.785.777.777 0 0 0-.797.785c0 .222.076.409.23.559.152.15.341.226.567.226Zm-.74-2.541h1.48V9.987h-1.48v4.857Z",fill:t.color||"#121416"})}),WarningAmber:t=>S.jsx("svg",{viewBox:"0 0 32 32",fill:"none",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M16 7.32495L26.04 24.6716H5.96L16 7.32495ZM3.65333 23.3383C2.62667 25.1116 3.90667 27.3383 5.96 27.3383H26.04C28.0933 27.3383 29.3733 25.1116 28.3467 23.3383L18.3067 5.99162C17.28 4.21829 14.72 4.21829 13.6933 5.99162L3.65333 23.3383ZM14.6667 14.005V16.6716C14.6667 17.405 15.2667 18.005 16 18.005C16.7333 18.005 17.3333 17.405 17.3333 16.6716V14.005C17.3333 13.2716 16.7333 12.6716 16 12.6716C15.2667 12.6716 14.6667 13.2716 14.6667 14.005ZM14.6667 20.6716H17.3333V23.3383H14.6667V20.6716Z",fill:"#C4CDD5"})}),WarningFilled:t=>S.jsx("svg",{viewBox:"0 0 24 24",width:t.width||24,height:t.height||24,style:t.style||{},onClick:t.onClick,...t,children:S.jsx("path",{d:"M1 21 12 2l11 19H1Zm11.104-2.925a.738.738 0 0 0 .746-.754.738.738 0 0 0-.754-.746.738.738 0 0 0-.746.754.738.738 0 0 0 .754.746ZM11.35 15.3h1.5V9.7h-1.5v5.6Z",fill:t.color||"#121416"})})},Symbol.toStringTag,{value:"Module"})),Ke=t=>{const{name:e,size:n=24,color:r,...s}=t,i=nP[e];return S.jsx(i,{width:n,height:n,color:r??"var(--simentic-on-surface, #121416)",...s})},Dr={shapeType:"square",colorType:"primary",variant:"contained",isLoading:!1,loadingText:"Loading...",disabled:!1,size:"medium",isFitted:!1},Zd=x.createContext(Dr),rP=t=>{const{children:e,...n}=t;return S.jsx(Zd.Provider,{value:{...Dr,...n},children:e})},ae={red:{Red1:"#fff1f0",Red2:"#ffdbd8",Red3:"#ffbbbc",Red4:"#ff8587",Red5:"#ff4d56",Red6:"#f5222d",Red7:"#d6231d",Red8:"#b71d18",Red9:"#7a0916",Red10:"#5c0011"},lightGreen:{LightGreen1:"#e3ffe2",LightGreen2:"#d3fcd2",LightGreen3:"#a4f6a2",LightGreen4:"#77ed8b",LightGreen5:"#32d970",LightGreen6:"#1cc95c",LightGreen7:"#10a564",LightGreen8:"#118d57",LightGreen9:"#065e49",LightGreen10:"#04503e"},cyanBlue:{CyanBlue1:"#e2fffa",CyanBlue2:"#cafdf5",CyanBlue3:"#9ff6f6",CyanBlue4:"#61f3f3",CyanBlue5:"#3bdff2",CyanBlue6:"#00b8d9",CyanBlue7:"#1c87b6",CyanBlue8:"#006c9c",CyanBlue9:"#003768",CyanBlue10:"#00284c"},purple:{Purple1:"#f9f0ff",Purple2:"#efd6ff",Purple3:"#d7a8ff",Purple4:"#c684ff",Purple5:"#a65dff",Purple6:"#8e33ff",Purple7:"#642ac1",Purple8:"#5119b7",Purple9:"#27097a",Purple10:"#120338"},gold:{Gold1:"#fffbe6",Gold2:"#fff5cc",Gold3:"#ffe99e",Gold4:"#ffd666",Gold5:"#ffc53d",Gold6:"#ffab00",Gold7:"#d48806",Gold8:"#b76e00",Gold9:"#7a4100",Gold10:"#623501"},blue:{Blue1:"#e6f7ff",Blue2:"#cde9fd",Blue3:"#a1d3f7",Blue4:"#6bb1f8",Blue5:"#3592f0",Blue6:"#0c68e9",Blue7:"#075bd1",Blue8:"#063ba7",Blue9:"#021d6f",Blue10:"#001941"},grey:{Grey1:"#fdfeff",Grey2:"#f9fafb",Grey3:"#f4f6f8",Grey4:"#dfe3e8",Grey5:"#c4cdd5",Grey6:"#919eab",Grey7:"#637381",Grey8:"#454f5b",Grey9:"#1c252e",Grey10:"#141a21"},deepGreen:{DeepGreen1:"#ebfff0",DeepGreen2:"#c8fad6",DeepGreen3:"#92f1ad",DeepGreen4:"#5be49b",DeepGreen5:"#14c489",DeepGreen6:"#00a76f",DeepGreen7:"#019362",DeepGreen8:"#007867",DeepGreen9:"#004b50",DeepGreen10:"#00373b"},blackBlack:"#000000",whiteWhite:"#ffffff"},we={red:{Lighter:ae.red.Red2,Light:ae.red.Red4,Main:ae.red.Red6,Dark:ae.red.Red8,Darker:ae.red.Red10},lightGreen:{Lighter:ae.lightGreen.LightGreen2,Light:ae.lightGreen.LightGreen4,Main:ae.lightGreen.LightGreen6,Dark:ae.lightGreen.LightGreen8,Darker:ae.lightGreen.LightGreen10},cyanBlue:{Lighter:ae.cyanBlue.CyanBlue2,Light:ae.cyanBlue.CyanBlue4,Main:ae.cyanBlue.CyanBlue6,Dark:ae.cyanBlue.CyanBlue8,Darker:ae.cyanBlue.CyanBlue10},purple:{Lighter:ae.purple.Purple2,Light:ae.purple.Purple4,Main:ae.purple.Purple6,Dark:ae.purple.Purple8,Darker:ae.purple.Purple10},gold:{Lighter:ae.gold.Gold2,Light:ae.gold.Gold4,Main:ae.gold.Gold6,Dark:ae.gold.Gold8,Darker:ae.gold.Gold10},blue:{Lighter:ae.blue.Blue2,Light:ae.blue.Blue4,Main:ae.blue.Blue6,Dark:ae.blue.Blue8,Darker:ae.blue.Blue10},deepGreen:{Lighter:ae.deepGreen.DeepGreen2,Light:ae.deepGreen.DeepGreen4,Main:ae.deepGreen.DeepGreen6,Dark:ae.deepGreen.DeepGreen8,Darker:ae.deepGreen.DeepGreen10},whiteMain:ae.whiteWhite,blackMain:ae.blackBlack},le={red4:"#f5222d0a",red8:"#f5222d14",red12:"#f5222d1e",red16:"#f5222d28",red20:"#f5222d33",red24:"#f5222d3d",red32:"#f5222d51",red40:"#f5222d66",red48:"#f5222d7a",lightGreen4:"#1cc95c0a",lightGreen8:"#1cc95c14",lightGreen12:"#1cc95c1e",lightGreen16:"#1cc95c28",lightGreen20:"#1cc95c33",lightGreen24:"#1cc95c3d",lightGreen32:"#1cc95c51",lightGreen40:"#1cc95c66",lightGreen48:"#1cc95c7a",cyanBlue4:"#00b8d90a",cyanBlue8:"#00b8d914",cyanBlue12:"#00b8d91e",cyanBlue16:"#00b8d928",cyanBlue20:"#00b8d933",cyanBlue24:"#00b8d93d",cyanBlue32:"#00b8d951",cyanBlue40:"#00b8d966",cyanBlue48:"#00b8d97a",purple4:"#8e33ff0a",purple8:"#8e33ff14",purple12:"#8e33ff1e",purple16:"#8e33ff28",purple20:"#8e33ff33",purple24:"#8e33ff3d",purple32:"#8e33ff51",purple40:"#8e33ff66",purple48:"#8e33ff7a",gold4:"#ffab000a",gold8:"#ffab0014",gold12:"#ffab001e",gold16:"#ffab0028",gold20:"#ffab0033",gold24:"#ffab003d",gold32:"#ffab0051",gold40:"#ffab0066",gold48:"#ffab007a",blue4:"#0c68e90a",blue8:"#0c68e914",blue12:"#0c68e91e",blue16:"#0c68e928",blue20:"#0c68e933",blue24:"#0c68e93d",blue32:"#0c68e951",blue40:"#0c68e966",blue48:"#0c68e97a",grey4:"#919eab0a",grey8:"#919eab14",grey12:"#919eab1e",grey16:"#919eab28",grey20:"#919eab33",grey24:"#919eab3d",grey32:"#919eab51",grey40:"#919eab66",grey48:"#919eab7a",grey56:"#919eab8e",grey64:"#919eaba3",grey72:"#919eabb7",grey80:"#919eabcc",black8:"#00000014",black12:"#0000001e",black16:"#00000028",black20:"#00000033",black24:"#0000003d",black32:"#00000051",black40:"#00000066",black48:"#0000007a",black56:"#0000008e",black64:"#000000a3",black72:"#000000b7",black80:"#000000cc",white8:"#ffffff14",white12:"#ffffff1e",white16:"#ffffff28",white20:"#ffffff33",white24:"#ffffff3d",white32:"#ffffff51",white40:"#ffffff66",white48:"#ffffff7a",white56:"#ffffff8e",white64:"#ffffffa3",white72:"#ffffffb7",white80:"#ffffffcc",deepGreen4:"#00a76f0a",deepGreen8:"#00a76f14",deepGreen12:"#00a76f1e",deepGreen16:"#00a76f28",deepGreen20:"#00a76f33",deepGreen24:"#00a76f3d",deepGreen32:"#00a76f51",deepGreen40:"#00a76f66",deepGreen48:"#00a76f7a",primary4:"#00a76f0a",primary8:"#00a76f14",primary12:"#00a76f1e",primary16:"#00a76f28",primary20:"#00a76f33",primary24:"#00a76f3d",primary32:"#00a76f51",primary40:"#00a76f66",primary48:"#00a76f7a"},T={light:{textPrimary:ae.grey.Grey9,textSecondary:ae.grey.Grey7,textTertiary:ae.grey.Grey6,textDisabled:ae.grey.Grey5,backgroundDefault:ae.whiteWhite,backgroundPaper:ae.whiteWhite,backgroundSecond:le.grey8,backgroundNeutral:ae.grey.Grey2,shadow8:le.grey8,shadow12:le.grey12,shadow20:le.grey20,componentTextfieldFilled:le.grey8,componentTextfieldUnderline:le.grey40,componentTextfieldOutline:le.grey24,actionHover:le.grey16,actionDisabled:le.grey40,actionDisabledBackground:le.grey16,actionSelected:le.grey16,actionFocus:le.grey48,textError:ae.red.Red6,textSuccess:ae.lightGreen.LightGreen6,actionAction:ae.grey.Grey6,textWarning:ae.gold.Gold6,textContrast:ae.whiteWhite,inheritColor:ae.whiteWhite,inheritBgcolor:ae.grey.Grey9,inheritHover:ae.grey.Grey8,swapDarkLightRed:ae.red.Red8,swapDarkLightLightGreen:ae.lightGreen.LightGreen8,swapDarkLightDeepGreen:ae.deepGreen.DeepGreen8,swapDarkLightCyanBlue:ae.cyanBlue.CyanBlue8,swapDarkLightPurple:ae.purple.Purple8,swapDarkLightGold:ae.gold.Gold8,swapDarkLightBlue:ae.blue.Blue8,swapDarkLightPrimary:ae.deepGreen.DeepGreen8},dark:{textPrimary:ae.whiteWhite,textSecondary:ae.grey.Grey5,textTertiary:ae.grey.Grey6,textDisabled:ae.grey.Grey7,backgroundDefault:ae.grey.Grey10,backgroundPaper:ae.grey.Grey9,backgroundSecond:ae.grey.Grey8,backgroundNeutral:le.grey12,shadow8:le.black8,shadow12:le.black12,shadow20:le.black20,componentTextfieldFilled:le.grey8,componentTextfieldUnderline:le.grey40,componentTextfieldOutline:le.grey24,actionHover:le.grey16,actionDisabled:le.grey40,actionDisabledBackground:le.grey20,actionSelected:le.grey16,actionFocus:le.grey8,textError:ae.red.Red6,textSuccess:ae.lightGreen.LightGreen6,actionAction:ae.grey.Grey5,textWarning:ae.gold.Gold6,textContrast:ae.blackBlack,inheritColor:ae.grey.Grey9,inheritBgcolor:ae.whiteWhite,inheritHover:ae.grey.Grey5,swapDarkLightRed:ae.red.Red4,swapDarkLightLightGreen:ae.lightGreen.LightGreen4,swapDarkLightDeepGreen:ae.deepGreen.DeepGreen4,swapDarkLightCyanBlue:ae.cyanBlue.CyanBlue4,swapDarkLightPurple:ae.purple.Purple4,swapDarkLightGold:ae.gold.Gold4,swapDarkLightBlue:ae.blue.Blue4,swapDarkLightPrimary:ae.deepGreen.DeepGreen4},primary:{pLighter:we.deepGreen.Lighter,pLight:we.deepGreen.Light,pMain:we.deepGreen.Main,pDark:we.deepGreen.Dark,pDarker:we.deepGreen.Darker,p4:le.deepGreen4,p8:le.deepGreen8,p12:le.deepGreen12,p16:le.deepGreen16,p20:le.deepGreen20,p24:le.deepGreen24,p32:le.deepGreen32,p40:le.deepGreen40,p48:le.deepGreen48,pContrastText:we.whiteMain}},Na=t=>{const e=Object.keys(t),n=(r,s)=>Object.keys(r).reduce((i,o)=>{const a=r[o];return typeof a=="object"?i.concat(n(a,`${s}${o}`)):i.concat(`--${s}${o}: ${a};
36
+ `)},"");return e.reduce((r,s)=>{const i=t[s];return typeof i=="object"?r.concat(n(i,s)):r.concat(`--${s.replace(/_/g,"-")}: ${i};
37
+ `)},"")};Na(T.light),Na(T.dark),Na(T.primary),Na(ae),Na(we),Na(le);const sP=t=>`var(--${t.replace(/_/g,"-")})`,pw=(t,e)=>`var(--${t}${e.replace(/_/g,"-")})`,iP=(t,e)=>`${t.replace(/_/g,"-")}, ${e})`.replace(/(\))(\\,)/,"$2").replace(/(\d.)/g,"-$1");Object.keys(T.light).reduce((t,e)=>{const n=T.light[e];if(typeof n!="string"){const r=Object.keys(n).reduce((s,i)=>{const o=n[i];return s[i]=Array.isArray(o)?iP(pw(e,i.replace(/_/g,"-").replace(/^[a-z]/,a=>`-${a}`).replace(/([A-Z])/g,a=>`-${a.toLocaleLowerCase()}`).replace(/(\d.)/g,"-$1")),o[1]):pw(e,i.replace(/_/g,"-").replace(/^[a-z]/,a=>`-${a}`).replace(/([A-Z])/g,a=>`-${a.toLocaleLowerCase()}`).replace(/(\d.)/g,"-$1")),s},{});return t[e]=r,t}return t[e]=sP(e),t},{});const Bg=(t="square")=>{const e=x.useMemo(()=>({square:{primary:{contained:{backgroundColor:T.primary.pMain,color:T.primary.pContrastText,borderColor:"transparent",hover:{backgroundColor:T.primary.pDark,color:T.primary.pContrastText,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:T.primary.pMain,borderColor:T.primary.p48,hover:{backgroundColor:T.primary.p8,color:T.primary.pMain,borderColor:T.primary.pMain}},soft:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightPrimary, ${T.light.swapDarkLightPrimary})`,borderColor:"transparent",hover:{backgroundColor:T.primary.p16,color:`var(--swapDarkLightPrimary, ${T.light.swapDarkLightPrimary})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:T.primary.pMain,borderColor:"transparent",hover:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightDeepGreen, ${T.light.swapDarkLightDeepGreen})`,borderColor:"transparent"}}},inherit:{contained:{backgroundColor:`var(--inheritBgcolor, ${T.light.inheritBgcolor})`,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent",hover:{backgroundColor:`var(--inheritHover, ${T.light.inheritHover})`,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:le.grey32,hover:{backgroundColor:`var(--actionHover, ${T.light.actionHover})`,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:`var(--textSecondary, ${T.light.textSecondary})`}},soft:{backgroundColor:le.grey8,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent",hover:{backgroundColor:le.grey24,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent",hover:{backgroundColor:`var(--actionHover, ${T.light.actionHover})`,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"}}},red:{contained:{backgroundColor:we.red.Main,color:T.primary.pContrastText,borderColor:"transparent",hover:{backgroundColor:we.red.Dark,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:we.red.Main,borderColor:le.red48,hover:{backgroundColor:le.red8,color:we.red.Main,borderColor:we.red.Main}},soft:{backgroundColor:le.red8,color:`var(--swapDarkLightRed, ${T.light.swapDarkLightRed})`,borderColor:"transparent",hover:{backgroundColor:le.red16,color:`var(--swapDarkLightRed, ${T.light.swapDarkLightRed})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:we.red.Main,borderColor:"transparent",hover:{backgroundColor:le.red8,color:we.red.Dark,borderColor:"transparent"}}},disabled:{contained:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`},soft:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"},text:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}}},round:{primary:{contained:{backgroundColor:T.primary.pMain,color:T.primary.pContrastText,borderColor:"transparent",hover:{backgroundColor:T.primary.pDark,color:T.primary.pContrastText,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:T.primary.pMain,borderColor:T.primary.p48,hover:{backgroundColor:T.primary.p8,color:T.primary.pMain,borderColor:T.primary.p48}},soft:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightPrimary, ${T.light.swapDarkLightPrimary})`,borderColor:"transparent",hover:{backgroundColor:T.primary.p16,color:`var(--swapDarkLightPrimary, ${T.light.swapDarkLightPrimary})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:T.primary.pMain,borderColor:"transparent",hover:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightDeepGreen, ${T.light.swapDarkLightDeepGreen})`,borderColor:"transparent"}}},inherit:{contained:{backgroundColor:`var(--inheritBgcolor, ${T.light.inheritBgcolor})`,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent",hover:{backgroundColor:`var(--inheritHover, ${T.light.inheritHover})`,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:le.grey32,hover:{backgroundColor:`var(--actionHover, ${T.light.actionHover})`,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:le.grey32}},soft:{backgroundColor:le.grey8,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent",hover:{backgroundColor:le.grey24,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent",hover:{backgroundColor:`var(--actionHover, ${T.light.actionHover})`,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"}}},red:{contained:{backgroundColor:we.red.Main,color:T.primary.pContrastText,borderColor:"transparent",hover:{backgroundColor:we.red.Dark,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:we.red.Main,borderColor:le.red48,hover:{backgroundColor:le.red8,color:we.red.Main,borderColor:le.red48}},soft:{backgroundColor:le.red8,color:`var(--swapDarkLightRed, ${T.light.swapDarkLightRed})`,borderColor:"transparent",hover:{backgroundColor:le.red16,color:`var(--swapDarkLightRed, ${T.light.swapDarkLightRed})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:we.red.Main,borderColor:"transparent",hover:{backgroundColor:le.red8,color:we.red.Dark,borderColor:"transparent"}}},disabled:{contained:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`},soft:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"},text:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}}}}),[]);return{primary:e[t].primary,inherit:e[t].inherit,disabled:e[t].disabled,red:e[t].red}},jg=qe.bind(tP),oP={Text:t=>{const{className:e}=t,{isLoading:n,loadingText:r,spinner:s,colorType:i}=x.use(Zd),{size:o,variant:a,disabled:l}=x.use(Zd),u=Bg()[l?"disabled":i];return S.jsx("span",{className:jg("ButtonText",a,o,e,{disabled:l}),style:{"--color":u[a].color},children:n?S.jsxs(x.Fragment,{children:[s,r]}):t.children})},Icon:t=>{const{className:e,name:n,color:r}=t,{size:s,disabled:i,variant:o,colorType:a}=x.use(Zd),c=Bg()[i?"disabled":a],u=x.useMemo(()=>{switch(s){case"large":return 24;default:return 20}},[s]);return S.jsx(Ke,{name:n,className:jg("ButtonIcon",s,e,{disabled:i}),color:r??c[o].color,size:u})},Root:t=>{const{children:e,shapeType:n=Dr.shapeType,colorType:r=Dr.colorType,variant:s=Dr.variant,isLoading:i=Dr.isLoading,spinner:o=Dr.spinner,loadingText:a=Dr.loadingText,disabled:l=Dr.disabled,size:c=Dr.size,isFitted:u=Dr.isFitted,radius:d=8,rounded:h,circle:f,...p}=t,m=x.useMemo(()=>({...Dr,...t,shapeType:n,colorType:r,variant:s,isLoading:i,spinner:o,loadingText:a,disabled:l,size:c,isFitted:u}),[t,n,r,s,i,o,a,l,c,u]),g=Bg(n),y=g[r],v=l?g.disabled[s].backgroundColor:y[s].backgroundColor,b=l?g.disabled[s].borderColor:y[s].borderColor,C=y[s].hover.color,_=y[s].hover.backgroundColor,k=y[s].hover.backgroundColor,E=y[s].hover.borderColor;return S.jsx(rP,{...m,children:S.jsx("button",{...p,className:jg("ButtonRoot",s,c,p.className,{loading:i,disabled:l,rounded:h,circle:f,isFitted:u}),style:{"--radius":`${d}px`,"--default-color":v,"--hover-color":C,"--active-color":_,"--hover-bg-color":k,"--border-color":b,"--hover-border-color":E,...p.style},disabled:l,onClick:t.onClick,children:e})})}},aP={CommentWrapper:"_CommentWrapper_17h79_1",Caption:"_Caption_17h79_10"},gw=qe.bind(aP),lP=t=>{const{children:e,status:n,errorColor:r="var(--Simentic-Error, #B3261E)",successColor:s="var(--Simentic-Success, #00B54A)",warningColor:i="var(--Simentic-Warning, #E9A802)",defaultColor:o="var(--Simentic-On-Surface-Variant, #505254)",infoColor:a="var(--Simentic-Info, #0076FF)",size:l=14}=t,c=x.useMemo(()=>(d=>{switch(d){case"error":return S.jsx(Ke,{name:"ErrorFilled",size:l,color:r});case"warning":return S.jsx(Ke,{name:"Warning",size:l,color:i});case"success":return S.jsx(Ke,{name:"Check",size:l,color:s});case"info":return S.jsx(Ke,{name:"ErrorFilled",size:l,color:a});case"default":return S.jsx(Ke,{name:"Error",size:l,color:o});default:return null}})(n),[n,l,r,i,s,a,o]),u=x.useMemo(()=>{switch(n){case"error":return r;case"warning":return i;case"success":return s;case"info":return a;case"default":return o;default:return}},[o,r,a,n,s,i]);return S.jsxs("div",{className:gw("CommentWrapper",n),children:[c,S.jsx("span",{className:gw("Caption"),style:{color:u},children:e})]})},cP={HelperText:"_HelperText_6urso_1",error:"_error_6urso_11",success:"_success_6urso_14",warning:"_warning_6urso_17",info:"_info_6urso_20",hint:"_hint_6urso_23"},uP=qe.bind(cP),La=t=>{const{className:e,status:n,size:r,iconName:s,errorColor:i="var(--textError, #F5222D)",successColor:o="var(--textSuccess, #1CC95C)",warningColor:a="var(--textWarning, #FFAB00)",hintColor:l="var(--textSecondary, #637381)",infoColor:c="var(--Simentic-Info, #0076FF)",iconVisible:u=!0}=t,d=x.useMemo(()=>(h=>{switch(h){case"error":return S.jsx(Ke,{name:s??"Error",size:r||14,color:i});case"warning":return S.jsx(Ke,{name:s??"Warning",size:r||14,color:a});case"success":return S.jsx(Ke,{name:s??"Check",size:r||14,color:o});case"info":return S.jsx(Ke,{name:s??"ErrorFilled",size:r||14,color:c});case"hint":return S.jsx(Ke,{name:s??"Check",size:r||14,color:l});default:return null}})(n),[n,r,s,i,a,o,c,l]);return S.jsxs("p",{className:uP("HelperText",n,e),style:{"--error-color":i,"--warning-color":a,"--success-color":o,"--hint-color":l,"--info-color":c},children:[u?d:null,t.children]})},dP={Divider:"_Divider_1w80l_1",small:"_small_1w80l_5",large:"_large_1w80l_8"},hP=qe.bind(dP),mw=t=>{const{className:e,color:n,size:r,verticalGap:s}=t;return S.jsx("div",{className:hP("Divider",r,e),style:{backgroundColor:n,height:typeof r=="number"?r:void 0,marginTop:s,marginBottom:s}})},fP={Unset:"_Unset_hr4h9_2",Root:"_Root_hr4h9_6",transition:"_transition_hr4h9_15",contained:"_contained_hr4h9_20",outlined:"_outlined_hr4h9_24",adaptived:"_adaptived_hr4h9_27",open:"_open_hr4h9_31",bottomLined:"_bottomLined_hr4h9_34",sideLined:"_sideLined_hr4h9_43",shadow:"_shadow_hr4h9_52",disabled:"_disabled_hr4h9_57",unset:"_unset_hr4h9_69",Trigger:"_Trigger_hr4h9_77",TriggerIcon:"_TriggerIcon_hr4h9_91",Item:"_Item_hr4h9_112"},yw={disabled:!1,autoClosed:!0,variant:"contained",transition:!0},Fg=x.createContext(yw),pP=t=>{const{children:e}=t;return S.jsx(Fg.Provider,{value:{...yw,...t},children:e})},Xd=qe.bind(fP),gP={Root:t=>{const{children:e,className:n,open:r,variant:s="contained",disabled:i=!1,autoClosed:o=!0,transition:a=!0,onClick:l}=t,[c,u]=x.useState(!1),[d,h]=x.useState(!1),f=x.useId(),p=x.useRef(null),m=x.useRef(null),g=x.useCallback(()=>{i||(r===void 0&&(u==null||u(C=>!C)),d||h==null||h(!0),l==null||l())},[i,r,d,u,l,h]),y=x.useMemo(()=>r??c,[r,c]),v=x.useMemo(()=>({...t,id:t.id??f,open:y,"#triggerRef":m,"#firstClick":d,onClick:g}),[t,f,y,d,g]),b=x.useCallback(C=>{var k,E;const _=C.target;(k=p.current)!=null&&k.contains(_)||(E=m.current)==null||E.click()},[]);return x.useEffect(()=>{if(!(i||!y)&&o)return document.addEventListener("click",b),()=>{document.removeEventListener("click",b)}},[i,y,o,b]),S.jsx(pP,{...v,children:S.jsx("div",{ref:p,className:Xd(s==="unset"?"Unset":"Root",n,s,{open:y,transition:!!a,disabled:i}),style:{...typeof a!="boolean"&&{transitionDuration:`${+((a==null?void 0:a.duration)??250)/1e3}s`,transitionTimingFunction:(a==null?void 0:a.timingFC)??"ease-in-out"}},children:e})})},Trigger:t=>{const{as:e,children:n,className:r}=t,{id:s,open:i,disabled:o,transition:a,onClick:l,onChange:c,"#triggerRef":u}=x.useContext(Fg),d={hidden:!0,type:"checkbox",defaultChecked:i,id:s,disabled:o,onClick:l,onChange:c};return e?S.jsxs("label",{htmlFor:s,children:[S.jsx("input",{ref:u,...d}),e({id:s,open:i,disabled:o})]}):S.jsxs("label",{htmlFor:s,className:Xd("Trigger",r,{disabled:o}),children:[S.jsx("input",{ref:u,...d}),n,S.jsx(Ke,{name:"ExpandMore",className:Xd("TriggerIcon",{open:i,transition:!!a})})]})},Item:t=>{const{children:e,className:n}=t,r=x.useRef(null),s=x.useContext(Fg),{open:i,disabled:o,transition:a,"#firstClick":l}=s;return x.useEffect(()=>{if(!r.current||!a)return;const u=window.getComputedStyle(r.current).paddingBottom,d=`${Array.from(r.current.childNodes).reduce((p,m)=>p+m.scrollHeight,+u.split("px")[0])}`,h={duration:typeof a=="boolean"?250:(a==null?void 0:a.duration)??250,easing:typeof a=="boolean"?"ease-in-out":(a==null?void 0:a.timingFC)??"ease-in-out"},f=(...p)=>{r.current&&r.current.animate(p,h)};if(i){if(!l)return;f({maxHeight:0,opacity:0,marginBottom:`-${u}`},{maxHeight:`${d}px`,opacity:1,marginBottom:0})}else{if(!l)return;f({maxHeight:`${r.current.scrollHeight}px`,opacity:1,marginBottom:0},{maxHeight:0,opacity:0,marginBottom:`-${u}`})}},[l,a,i]),S.jsx("div",{ref:r,className:Xd("Item",n,{open:i,disabled:o,transition:!!a}),children:e})}},mP={List:"_List_oqxbn_2",Link:"_Link_oqxbn_7",href:"_href_oqxbn_12",focused:"_focused_oqxbn_15",Separator:"_Separator_oqxbn_18",Ellipsis:"_Ellipsis_oqxbn_21"},_c=qe.bind(mP),yP={List:t=>{const{children:e,className:n,separator:r}=t,s=x.Children.toArray(e),i=r?s.flatMap((o,a)=>a<s.length-1?[o,x.cloneElement(r,{key:`separator-${a}`})]:[o]):s;return S.jsx("div",{className:_c("List",n),children:i})},Link:t=>{const{children:e,className:n,href:r,focused:s=!1,onClick:i,as:o}=t,a=x.useCallback(l=>{(!r||s)&&l.preventDefault(),i==null||i(l)},[r,s,i]);return o?o({className:_c("Link",n,{href:r,focused:s}),href:r,focused:s,onClick:a}):S.jsx("a",{...r&&!s&&{href:r},className:_c("Link",n,{href:r,focused:s}),onClick:a,children:e})},Separator:t=>{const{className:e}=t;return S.jsx(Ke,{name:"GoNext",className:_c("Separator",e)})},Ellipsis:t=>{const{className:e,onClick:n}=t;return S.jsx(Ke,{name:"More",className:_c("Ellipsis",e),onClick:n})}},bP={Progress:"_Progress_mgxlv_1",Mark:"_Mark_mgxlv_12",Point:"_Point_mgxlv_20",Label:"_Label_mgxlv_28",active:"_active_mgxlv_37",Value:"_Value_mgxlv_40",Thumb:"_Thumb_mgxlv_49",labelAlwaysOn:"_labelAlwaysOn_mgxlv_88",isDragging:"_isDragging_mgxlv_92",hidden:"_hidden_mgxlv_96",readOnly:"_readOnly_mgxlv_100",disabled:"_disabled_mgxlv_103",invert:"_invert_mgxlv_107"},bw={readOnly:!1,disabled:!1,invert:!1,min:0,max:100,step:10,labelAlwaysOn:!1,markActiveEffect:!0,defaultValue:[10],scale:t=>t},Qd=x.createContext(bw),vP=t=>{const{children:e}=t;return S.jsx(Qd.Provider,{value:{...bw,...t},children:e})},Do=qe.bind(bP),xP=t=>{const{className:e,as:n}=t,{progressRef:r,marks:s,markActiveEffect:i,defaultValue:o,max:a,min:l,invert:c}=x.useContext(Qd),u=x.useCallback(d=>{if(!i)return!1;if(r!=null&&r.current&&o&&a!==void 0&&l!==void 0){const h=a-l,f=o.map(p=>(p-l)/h*100);return f.length>1?c?d<=Math.min(...f)||d>=Math.max(...f):d>=Math.min(...f)&&d<=Math.max(...f):c?d>=Math.max(...f):d<=Math.max(...f)}return!1},[i,r,o,l,a,c]);return s==null?void 0:s.map(({value:d,label:h},f)=>S.jsx("div",{className:Do("Mark",e),style:{left:`${d}%`},children:n?n({label:h,active:u(d)}):S.jsx("div",{className:Do("Point"),children:S.jsx("div",{className:Do("Label",{active:u(d)}),children:h})})},f))},vw=t=>{const{index:e=0,children:n,className:r,as:s}=t,{progressRef:i,min:o,max:a,step:l,defaultValue:c,labelAlwaysOn:u,draggingIndex:d,label:h,scale:f,onChange:p,setDefaultValue:m}=x.useContext(Qd),g=x.useMemo(()=>{if(i!=null&&i.current&&c!==void 0&&a!==void 0&&o!==void 0){const b=i.current.getBoundingClientRect().width,C=c[e],_=a-o;return(C-o)/_*b}},[i,e,c,o,a]),y=x.useMemo(()=>{if(h!==null)return(h==null?void 0:h((f==null?void 0:f((c==null?void 0:c[e])??0))??0))??(f==null?void 0:f((c==null?void 0:c[e])??0))},[e,c,f,h]);return x.useEffect(()=>{!p&&m&&m(v=>{const b=[...v];return e!==0&&a!==void 0&&(b[e]=b[e-1]+(l??10)>a?a:b[e-1]+(l??10)),b})},[e,a,l,p,m]),S.jsx("div",{className:Do("Thumb",r),style:{transform:`translate(calc(-50% + ${g}px), calc(-50% + var(--progress-progress-height) / 2))`},children:s?s({labelAlwaysOn:u,hidden:h===null,isDragging:d===e,value:y,children:n}):S.jsx("div",{className:Do("Point",{labelAlwaysOn:u,hidden:h===null,isDragging:d===e}),"data-value":y,children:n})})},wP={Root:t=>{const{children:e}=t;if(t.step!==void 0&&t.step<=0)throw new Error("step은 양수여야 합니다!");const n=x.useRef(null),[r,s]=x.useState([t.min??0]),[i,o]=x.useState(),a=x.useMemo(()=>({...t,progressRef:n,defaultValue:r,draggingIndex:i,setDefaultValue:s,setDraggingIndex:o}),[t,r,i,s,o]);return x.useEffect(()=>{t.defaultValue&&s(t.defaultValue)},[t.defaultValue]),S.jsx(vP,{...a,children:e})},Progress:t=>{const{children:e,color:n="#688DEE",className:r,valueClassName:s}=t,{max:i,min:o,step:a,progressRef:l,readOnly:c,disabled:u,invert:d,defaultValue:h,draggingIndex:f,onChange:p,setDefaultValue:m,setDraggingIndex:g}=x.useContext(Qd),y=x.useMemo(()=>{if(l!=null&&l.current&&h&&i!==void 0&&o!==void 0){if((h==null?void 0:h.length)<2){const j=h[0],F=i-o;return{width:`${(j-o)/F*100}%`}}const E=Math.min(...h),A=Math.max(...h),$=i-o,P=(A-o)/$*100,O=(E-o)/$*100,H=l.current.getBoundingClientRect().width,z=O/100*H;return{width:`${P-O}%`,transform:`translateX(${z}px)`}}},[l,h,i,o]),v=x.useCallback(E=>{if(l!=null&&l.current&&i!==void 0&&o!==void 0&&a!==void 0){const A=l.current.getBoundingClientRect(),$=A.width,O=(E-A.left)/$;let R=o+O*(i-o);return R=Math.round(R/a)*a,Math.max(o,Math.min(R,i))}return 0},[l,i,o,a]),b=x.useCallback((E,A)=>{if(a===void 0||o===void 0||i===void 0)return;const $=P=>{const O=[...P];if(E!==0&&A<=O[0]&&O[0]===o)return O;if(E!==O.length-1&&A>=O[O.length-1]&&O[O.length-1]===i)return O;if(O[E]=A,A>=O[E+1])for(let R=E+1;R<O.length;R++){if(O[R]+a>i){O[R]=i;break}O[R]+=a}if(A<=O[E-1])for(let R=E-1;R>=0;R--){if(O[R]-a<o){O[R]=o;break}O[R]-=a}return O};p?p({idx:E,value:A,step:a,min:o,max:i,defaultSetChangeHandler:$}):m==null||m($)},[p,m,a,o,i]),C=x.useCallback(E=>{if(E.preventDefault(),c||u)return;const A=v(E.clientX);let $=0,P=1/0;h==null||h.forEach((O,R)=>{const H=Math.abs(A-O);H<P&&(P=H,$=R)}),g==null||g($),b($,A)},[c,u,h,v,g,b]),_=x.useCallback(E=>{if(E.preventDefault(),!(c||u)&&f!==void 0){const A=v(E.clientX);b(f,A)}},[c,u,f,v,b]),k=x.useCallback(()=>{c||u||g==null||g(void 0)},[c,u,g]);return x.useEffect(()=>(f!==void 0?(window.addEventListener("mousemove",_),window.addEventListener("mouseup",k)):(window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",k)),()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",k)}),[f,_,k]),S.jsxs("div",{ref:l,className:Do("Progress",r,{readOnly:c,disabled:u,invert:d}),onMouseDown:C,style:{"--progress-value-color":n},children:[S.jsx("div",{className:Do("Value",s),style:y}),x.Children.map(e,(E,A)=>x.isValidElement(E)&&E.type===vw?x.cloneElement(E,{index:A}):E)]})},Thumb:vw,Marks:xP},_P={Root:"_Root_2c5kt_1",row:"_row_2c5kt_7",column:"_column_2c5kt_10",Divider:"_Divider_2c5kt_15",isTop:"_isTop_2c5kt_24",Desc:"_Desc_2c5kt_37",Title:"_Title_2c5kt_44",Content:"_Content_2c5kt_51",Point:"_Point_2c5kt_57",Step:"_Step_2c5kt_71",block:"_block_2c5kt_76",inline:"_inline_2c5kt_85",left:"_left_2c5kt_92",active:"_active_2c5kt_108",StepWrap:"_StepWrap_2c5kt_118",linear:"_linear_2c5kt_144"},xw={activeStep:null,linear:!0},zg=x.createContext(xw),CP=t=>{const{children:e}=t;return S.jsx(zg.Provider,{value:{...xw,...t},children:e})},ln=qe.bind(_P),ww=t=>{const{children:e}=t,{direction:n}=x.useContext(zg);switch(n){case"row":return S.jsx("div",{className:ln("Content"),children:e});case"column":return S.jsx(S.Fragment,{children:e})}},_w=t=>{const{className:e,index:n,title:r,desc:s,point:i}=t,{activeStep:o,contentsPosition:a,direction:l,linear:c,onClick:u}=x.useContext(zg),[d,h,f,p]=x.useMemo(()=>a?[["top","left"].includes(a),["bottom","right"].includes(a),["left","right"].includes(a),["top","bottom"].includes(a)]:[],[a]),m=x.useMemo(()=>n===void 0?!1:o===n,[n,o]),g=x.useCallback(()=>{n!==void 0&&u&&(c||u(n))},[n,c,u]),y=x.useCallback(v=>typeof v=="function",[]);if(n!==void 0)return S.jsxs("div",{className:ln("StepWrap",l,a,{linear:c,inline:f,active:m}),onClick:g,children:[S.jsxs("div",{className:ln("Step",e,l,a,{block:p,inline:f,active:m}),children:[d&&S.jsxs(ww,{children:[y(r)?r({index:n,active:m,defaultClassName:ln("Title")}):S.jsx("div",{className:ln("Title"),children:S.jsx("span",{children:r??n})}),!(l==="column"&&f)&&(y(s)?s({index:n,active:m,defaultClassName:ln("Desc")}):S.jsx("div",{className:ln("Desc"),children:S.jsx("span",{children:s??n})}))]}),y(i)?i({index:n,active:m,defaultClassName:ln("Point")}):S.jsx("div",{className:ln("Point"),children:S.jsx("span",{children:i??n})}),h&&S.jsxs(ww,{children:[y(r)?r({index:n,active:m,defaultClassName:ln("Title")}):S.jsx("div",{className:ln("Title"),children:S.jsx("span",{children:r??n})}),!(l==="column"&&f)&&(y(s)?s({index:n,active:m,defaultClassName:ln("Desc")}):S.jsx("div",{className:ln("Desc"),children:S.jsx("span",{children:s??n})}))]})]}),l==="column"&&f&&(y(s)?s({index:n,active:m,defaultClassName:ln("Desc")}):S.jsx("div",{className:ln("Desc"),children:S.jsx("span",{children:s??n})}))]})},SP={Root:t=>{const{children:e,className:n,direction:r="row",contentsPosition:s="bottom",lineAs:i}=t,o=x.useMemo(()=>({direction:r,contentsPosition:s,...t}),[t,r,s]);return S.jsx(CP,{...o,children:S.jsx("div",{className:ln("Root",r,n),children:x.Children.map(e,(a,l)=>x.isValidElement(a)&&a.type===_w?S.jsxs(x.Fragment,{children:[l!==0&&(i?i({defaultClassName:ln("Divider",r,{isTop:s==="top"}),direction:r,contentsPosition:s,index:l}):r==="row"&&S.jsx(mw,{className:ln("Divider",r,{isTop:s==="top"}),size:r==="row"?1:void 0})),x.cloneElement(a,{index:l})]}):a)})})},Step:_w},EP={Wrap:"_Wrap_r1qra_2",square:"_square_r1qra_13",circle:"_circle_r1qra_16",Badge:"_Badge_r1qra_20",dot:"_dot_r1qra_32",hidden:"_hidden_r1qra_38",Standalone:"_Standalone_r1qra_41"},Hg=qe.bind(EP),AP=t=>{const{children:e,className:n,overlap:r=null,dot:s=!1,value:i=0,max:o=100,badgeColor:a="crimson",as:l,...c}=t,u=h=>S.jsx("div",{className:Hg("Badge",h,{dot:s,hidden:i==null}),style:{backgroundColor:a},children:S.jsx("span",{children:!s&&(typeof i=="number"&&i>o?`${o}+`:i)})}),d=h=>l==null?void 0:l({dot:s,value:i,max:o,badgeColor:a,defaultClassName:Hg("Badge",h,{dot:s,hidden:i==null})});return x.Children.count(e)===0?l?d("Standalone"):u("Standalone"):S.jsxs("div",{className:Hg("Wrap",r,n),...c,children:[l?d():u(),e]})},TP={Group:"_Group_e8604_2",GroupItem:"_GroupItem_e8604_5",Item:"_Item_e8604_8",rounded:"_rounded_e8604_22",circle:"_circle_e8604_25",Text:"_Text_e8604_28",AvatarImage:"_AvatarImage_e8604_37"},kP=()=>`#${Math.floor(Math.random()*16777216).toString(16).padStart(6,"0").toUpperCase()}`,Cw=t=>{const e=t.replace("#",""),n=parseInt(e,16),r=n>>16&255,s=n>>8&255,i=n&255;return(r*299+s*587+i*114)/1e3>128?"#000000":"#ffffff"},Sw=t=>{const e=[{value:1e12,prefix:"T"},{value:1e9,prefix:"G"},{value:1e6,prefix:"M"},{value:1e3,prefix:"k"},{value:1,prefix:""}];for(const{value:n,prefix:r}of e)if(Math.abs(t)>=n)return Math.round(t/n)+r;return t.toString()},ti=qe.bind(TP),MP=t=>{const{children:e,className:n,itemClassName:r,max:s=4,total:i,itemSize:o,restCounterProps:a}=t;return S.jsxs("div",{className:ti("Group",n),children:[x.Children.map(e,(l,c)=>{if(x.isValidElement(l))switch(!0){case c===s:return i!==void 0?void 0:S.jsx("div",{className:ti("GroupItem",r),style:{zIndex:`${s+1-c}`},children:x.cloneElement(l,{...a,src:"",alt:`+${Sw(x.Children.count(e)-s+1)}`,nameAbbreviation:!1,size:o})});case c>s:return;default:return S.jsx("div",{className:ti("GroupItem",r),style:{zIndex:`${s+1-c}`},children:x.cloneElement(l,{...l.props instanceof Object?{...l.props,size:o}:{}})})}}),i&&x.Children.count(e)<i&&S.jsx("div",{className:ti("GroupItem"),style:{zIndex:`${s+1-x.Children.count(e)}`},children:S.jsx(Ew,{...a,src:"",alt:`+${Sw(i)}`,size:o,nameAbbreviation:!1})})]})},Ew=t=>{const{className:e,variant:n="circle",nameAbbreviation:r=!0,size:s=40,as:i,...o}=t,[a,l]=x.useState(!1),[c,u]=x.useState(!1),d=x.useRef(null),[h,f]=x.useState("");x.useEffect(()=>{f(kP())},[]);const p=x.useCallback(g=>{u(!0),o.onError&&o.onError(g)},[o]),m=x.useCallback(g=>g.split(" ").map(y=>y[0]).join("").toUpperCase(),[]);return x.useEffect(()=>{if(a&&d.current){const g=d.current;if(g&&(c||!o.src)){const y=g.scrollWidth,v=g.offsetHeight,b=Math.min(s/y,s/v);g.style.transform=`scale(${b===1?b:b*.8})`}}},[a,s,c,o.src,h]),x.useEffect(()=>{l(!0)},[]),S.jsx("div",{className:ti("Item",n,e),style:{"--bgColor":h,"--size":`${s}px`},children:i?i({isError:c,nameAbbreviation:r,abbreviateName:m,src:o.src,alt:o.alt,textColor:Cw(h),abberviateDefaultClassName:ti("Text"),imgDefaultClassName:ti("AvatarImage"),onError:p}):c||!o.src?S.jsx("span",{...o,ref:d,className:ti("Text"),style:{...o.style,color:Cw(h)},children:r?m((o==null?void 0:o.alt)??""):o==null?void 0:o.alt}):S.jsx("img",{...o,className:ti("AvatarImage"),onError:p})})},OP={Item:Ew,Group:MP};function $P(t,e,n){const[r,s]=x.useState(null);return x.useEffect(()=>{const i=t||window,o=()=>{let c={id:null,score:-1/0};const u=(t==null?void 0:t.getBoundingClientRect())||{top:0,left:0,width:window.innerWidth,height:window.innerHeight},d=u.left+u.width/2,h=u.top+u.height/2;e.forEach(f=>{if(!f)return;const p=f,m=p.getBoundingClientRect(),g=m.left+m.width/2,y=m.top+m.height/2,v=Math.abs(d-g),b=Math.abs(h-y),C=v/(u.width/2),_=b/(u.height/2),k=Math.max(m.left,u.left),E=Math.min(m.right,u.left+u.width),A=Math.max(m.top,u.top),$=Math.min(m.bottom,u.top+u.height),P=Math.max(0,E-k),O=Math.max(0,$-A),R=P*O,H=m.width*m.height,z=R/H,j=1-Math.min(1,(C+_)/2),F=z*(1+j);F>c.score&&z>.1&&(c={id:p.id,score:F})}),c.score>0&&s(c.id)},a=setTimeout(o,100),l=setInterval(o,500);return i.addEventListener("scroll",o),window.addEventListener("resize",o),o(),()=>{i.removeEventListener("scroll",o),window.removeEventListener("resize",o),clearTimeout(a),clearInterval(l)}},[t,e]),n==="index"&&r?e.findIndex(i=>(i==null?void 0:i.id)===r):r}const PP={useScrollSpy:$P},DP={Root:"_Root_1d59i_1",Menu:"_Menu_1d59i_6",Column:"_Column_1d59i_15",columnOpenAnimation:"_columnOpenAnimation_1d59i_33",Item:"_Item_1d59i_57",title:"_title_1d59i_70",divider:"_divider_1d59i_78",isSelected:"_isSelected_1d59i_89",GoNext:"_GoNext_1d59i_93",disabled:"_disabled_1d59i_96",ItemText:"_ItemText_1d59i_106"},RP={options:[],showChildrenCount:!1,columnPositionFromParent:!1,columnOpenAnimation:!1,maxColumnView:6},Vg=x.createContext(RP),IP=t=>{const{children:e}=t;return S.jsx(Vg.Provider,{value:{...t},children:e})};function NP(t){const[e,n]=x.useState({absolute:{top:0,left:0,bottom:0,right:0},relative:{top:0,left:0,bottom:0,right:0},width:0,height:0}),r=x.useRef(null);return x.useEffect(()=>{const s=t.current;if(!s)return;const i=l=>{const c=/(auto|scroll)/,u=f=>window.getComputedStyle(f),d=f=>c.test(u(f).overflow+u(f).overflowY+u(f).overflowX);let h=l.parentElement;for(;h;){if(d(h))return h;h=h.parentElement}return null},o=()=>{const l=s.getBoundingClientRect(),c=s.offsetParent||s.parentElement,u=(c==null?void 0:c.getBoundingClientRect())||{top:0,left:0,bottom:0,right:0,width:0,height:0},d=i(s),h=(d==null?void 0:d.scrollTop)||0,f=(d==null?void 0:d.scrollLeft)||0;n({absolute:{top:l.top+window.scrollY,left:l.left+window.scrollX,bottom:l.bottom+window.scrollY,right:l.right+window.scrollX},relative:{top:s.offsetTop-h,left:s.offsetLeft-f,bottom:u.height-(s.offsetTop+s.offsetHeight-h),right:u.width-(s.offsetLeft+s.offsetWidth-f)},width:l.width,height:l.height})};r.current=new ResizeObserver(o),r.current.observe(s);const a=i(s);return window.addEventListener("scroll",o),window.addEventListener("resize",o),a&&a.addEventListener("scroll",o),o(),()=>{r.current&&r.current.disconnect(),window.removeEventListener("scroll",o),window.removeEventListener("resize",o),a&&a.removeEventListener("scroll",o)}},[t]),e}function LP(t){const{options:e,multiple:n=!1}=t,[r,s]=x.useState([]),[i,o]=x.useState([]),a=x.useCallback(({options:g,targetId:y,parents:v=[]})=>{var b,C;for(const _ of g){if(_.id===y)return(b=_.children)!=null&&b.length?null:{parent:v[v.length-1],target:_};if((C=_.children)!=null&&C.length){const k=a({options:_.children,targetId:y,parents:[...v,_]});if(k)return k}}return null},[]),l=x.useMemo(()=>{const g=[];if(g[0]=e,r.length>0){let y=e;r.forEach((v,b)=>{const C=y.find(_=>_.id===v.id);C!=null&&C.children&&C.children.length>0&&(y=C.children,g[b+1]=y)})}return g},[r,e]),c=x.useMemo(()=>i.reduce((g,y)=>{const v=y.filter(b=>{var C;return!((C=b.children)!=null&&C.length)});return[...g,...v]},[]),[i]),u=g=>{var _,k,E,A,$,P;const{option:y,level:v}=g,b={...y,parentId:v>0?(_=r[v-1])==null?void 0:_.id:void 0},C=(k=i[v])==null?void 0:k.some(O=>O.id===y.id);if(C){if(((E=i[v])==null?void 0:E.some(R=>R.id===y.id))&&((A=r[v])==null?void 0:A.id)!==y.id&&((($=y.children)==null?void 0:$.length)??0)>0){s(R=>{const H=[...R];return H[v]=b,H.splice(v+1),H});return}(P=y.children)!=null&&P.length||o(R=>{const H=[...R];H[v]=H[v].filter(j=>j.id!==y.id);const z=j=>j.some(F=>{var V,q;return!((V=F.children)!=null&&V.length)&&H.some(Q=>Q.some(B=>B.id===F.id))||((q=F.children)==null?void 0:q.length)&&z(F.children)});for(let j=v-1;j>=0;j--)H[j]&&(H[j]=H[j].filter(F=>{var V;return(V=F.children)!=null&&V.length?z(F.children):!0}));return H.filter(j=>j.length>0)})}s(O=>{var H;const R=[...O];return((H=O[v])==null?void 0:H.id)===y.id||C?R.splice(v):(R[v]=b,R.splice(v+1)),R})},d=x.useCallback(g=>{const{id:y}=g;o(v=>{var C;if(v.some(_=>_.some(k=>k.id===y)))return v.filter(_=>!_.some(k=>k.id===y));{const _=a({options:e,targetId:y});return _?((C=v[0])==null?void 0:C.some(E=>E.id===_.parent.id))?[v[0],[...v[1]||[],_.target]]:[[_.parent],[...v[1]||[],_.target]]:v}})},[e,a]),h=x.useCallback(g=>{const{active:y=!0,selected:v=!0}=g??{};y&&s([]),v&&o([])},[]),f=x.useCallback(g=>{const{id:y}=g;o(v=>{const b=[...v];let C=-1,_=-1;if(b.forEach((k,E)=>{const A=k.findIndex($=>$.id===y);A!==-1&&(C=E,_=A)}),C!==-1){const k=b[C][_];b[C].splice(_,1),(($,P)=>{for(let O=P;O<b.length;O++)b[O]=b[O].filter(R=>{var z;return((z=a({options:e,targetId:R.id}))==null?void 0:z.parent.id)!==$})})(k.id,C+1);const A=$=>{if($<0)return;const P=b[$];P&&(b[$]=P.filter(O=>b.slice($+1).some(H=>H.some(z=>{var j;return((j=a({options:e,targetId:z.id}))==null?void 0:j.parent.id)===O.id}))),A($-1))};return A(C-1),b.filter($=>$.length>0)}return b})},[e,a]),p=x.useCallback(g=>{const{level:y=0}=g||{};s(v=>{const b=[...v];return b.splice(y,b.length-y),b})},[]);return x.useEffect(()=>{var y;if(!n){const v=r.map(b=>[b]);o(v);return}const g=r.at(-1);(!(g!=null&&g.children)||((y=g.children)==null?void 0:y.length)===0)&&o(v=>{const b=[...v],C=v.some(_=>_.some(k=>k.id===(g==null?void 0:g.id)));return r.forEach((_,k)=>{b[k]||(b[k]=[]),k===r.length-1?C?b[k]=b[k].filter(E=>E.id!==_.id):b[k].push(_):b[k].some(E=>E.id===_.id)||b[k].push(_)}),b.filter(_=>_.length>0)})},[r,n]),{activeOptions:r,selectedOptions:i,columns:l,selectedResult:c,selectHandler:u,selectByIdHandler:d,resetAll:h,resetSelectedById:f,resetActiveOptions:p}}const ni=qe.bind(DP),BP={Root:t=>{const{children:e,options:n,selectedOptions:r,activeOptions:s,showChildrenCount:i,columnPositionFromParent:o,columnOpenAnimation:a,maxColumnView:l,onSelect:c,...u}=t,[d,h]=x.useState([]),f=x.useMemo(()=>({options:n,selectedOptions:r,activeOptions:s,showChildrenCount:i,columnPositionFromParent:o,columnOpenAnimation:a,maxColumnView:l,onSelect:c,selectedOptionTop:d,setSelectedOptionTop:h}),[n,r,s,i,o,a,l,c,d,h]);return S.jsx(IP,{...f,children:S.jsx("div",{...u,className:ni("Root",u.className),children:e})})},Menu:t=>{const{children:e,as:n,...r}=t;return n?n({defaultClassName:ni("Menu",r.className)}):S.jsx("div",{...r,className:ni("Menu",r.className),children:e})},Column:t=>{const{index:e,children:n,as:r,...s}=t,{columnPositionFromParent:i,columnOpenAnimation:o,maxColumnView:a,selectedOptionTop:l}=x.useContext(Vg),c=i&&((l==null?void 0:l.length)??0)>0?e===0?0:(l==null?void 0:l.slice(0,e).reduce((u,d)=>u+d,0))??0:0;return r?r({defaultClassName:ni("Column",s.className,{columnOpenAnimation:o}),maxColumnView:a,columnPositionFromParent:i,selectedOptionTop:l,index:e,topOffset:c}):S.jsx("div",{...s,className:ni("Column",s.className,{columnOpenAnimation:o}),style:{...s.style,"--max-column-view":a,"--selected-option-top":i?`${((l==null?void 0:l.length)??0)>0?e===0?0:Math.max(0,c):0}px`:"0px"},children:n})},Item:t=>{var g,y,v,b;const{option:e,level:n,as:r,...s}=t,{activeOptions:i,selectedOptions:o,showChildrenCount:a=!1,onSelect:l,setSelectedOptionTop:c}=x.useContext(Vg),u=x.useRef(null),d=((g=i==null?void 0:i[n])==null?void 0:g.id)===e.id||((y=o==null?void 0:o[n])==null?void 0:y.find(C=>C.id===e.id)),h=e.disabled,f=e.role,p=NP(u),m=x.useCallback(()=>{h||f==="title"||(l==null||l({option:e,level:n}),c==null||c(C=>{const _=[...C];return _[n]=p.relative.top,_}))},[e,n,h,f,p,l,c]);return r?r({option:e,level:n,disabled:h,role:f,showChildrenCount:a,ref:u,isSelected:!!d,defaultClassName:ni("Item",s.className,f,{isSelected:d,disabled:h}),onClick:m}):S.jsxs("div",{...s,onClick:m,ref:u,className:ni("Item",s.className,f,{isSelected:d,disabled:h}),children:[S.jsx("span",{className:ni("ItemText"),children:`${e.label}${a?` (${((v=e.children)==null?void 0:v.length)??0})`:""}`}),f!=="title"&&(((b=e.children)==null?void 0:b.length)??0)>0&&S.jsx(Ke,{name:"GoNext",className:ni("GoNext")})]})},useCascader:LP},jP={CheckBoxRoot:"_CheckBoxRoot_8w0hw_2",checked:"_checked_8w0hw_8",CheckBoxTrigger:"_CheckBoxTrigger_8w0hw_8",CheckBoxIcon:"_CheckBoxIcon_8w0hw_8",disabled:"_disabled_8w0hw_17",CheckBoxRound:"_CheckBoxRound_8w0hw_20",CheckBoxLabel:"_CheckBoxLabel_8w0hw_49"},Aw={value:"",checked:!1,onChange:()=>{},name:"",indeterminated:!1,disabled:!1,readOnly:!1,id:""},Jd=x.createContext(Aw),FP=({children:t,...e})=>S.jsx(Jd.Provider,{value:{...Aw,...e},children:t}),Tw=()=>{const t={backgroundColor:T.primary.pMain,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent",hover:{backgroundColor:T.primary.pDark,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabled, ${T.light.actionDisabled})`,color:`var(--actionDisabled, ${T.light.actionDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`}},e={backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:`var(--textTertiary, ${T.light.textTertiary})`,hover:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:`var(--textSecondary, ${T.light.textSecondary})`},disabled:{backgroundColor:"transparent",color:`var(--actionDisabled, ${T.light.actionDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`}};return{selected:t,unselected:e}},Cc=qe.bind(jP),zP={Root:t=>{const{className:e,id:n,value:r}=t,s=o=>{var a,l;if(t.disabled)return!1;try{(a=t.onChange)==null||a.call(t,Array.isArray(r)?r.includes(o.target.id)?r.filter(c=>c!==o.target.id):[...r,o.target.id]:o.target.id)}catch{(l=t.onChange)==null||l.call(t,o)}o.stopPropagation()},i=Array.isArray(r)?r.includes(n??""):r===n;return S.jsx(FP,{...t,onChange:s,checked:i,children:S.jsx("label",{htmlFor:n,className:Cc("CheckBoxRoot",e,{checked:i,disabled:t.disabled}),children:t.children})})},Label:t=>{const{className:e,children:n}=t,{checked:r,disabled:s}=x.useContext(Jd),i=Tw(),o=x.useMemo(()=>r?"selected":"unselected",[r]);return S.jsx("span",{className:Cc("CheckBoxLabel",e),style:{"--color":s?i[o].disabled.color:i[o].color},children:n})},HelperText:t=>{const{status:e}=x.useContext(Jd);return S.jsx(La,{...t,status:e})},Trigger:t=>{const{as:e,className:n,checkedClassName:r,indeterminated:s}=t,{value:i,name:o,onChange:a,id:l,disabled:c,checked:u}=x.useContext(Jd),d=Tw(),h=x.useMemo(()=>u?"selected":"unselected",[u]);return e?S.jsxs(x.Fragment,{children:[S.jsx("input",{id:l,name:o,type:"checkbox",hidden:!0,value:l,onChange:a,disabled:c}),e({checked:u,value:i,indeterminated:s,className:n,id:l,disabled:c})]}):S.jsxs("div",{className:Cc("CheckBoxTrigger",n),children:[S.jsx("input",{id:l,name:o,type:"checkbox",value:l,onChange:a,hidden:!0,disabled:c}),S.jsx("div",{className:Cc("CheckBoxIcon",{checked:u,[r||"checked"]:u,indeterminated:s,disabled:c}),style:{"--default-bg-color":c?d[h].disabled.backgroundColor:"transparent","--border-color":c?d[h].disabled.borderColor:d[h].borderColor},children:u?S.jsx(Ke,{className:Cc("CheckBoxRound",{disabled:c}),name:"CheckBoxRound",size:18,color:c?d[h].disabled.backgroundColor:d[h].backgroundColor}):null})]})}},kw={align:"center",direction:"horizontal",isFitted:!1,onChange:()=>{},bg:"transparent",size:"small",tabType:"line",active:"0"},eh=x.createContext(kw),HP=t=>{const e=x.useMemo(()=>({...kw,...t}),[t]);return S.jsx(eh.Provider,{value:e,children:t.children})},VP={Root:"_Root_mlyi8_2",vertical:"_vertical_mlyi8_7",List:"_List_mlyi8_10",small:"_small_mlyi8_14",medium:"_medium_mlyi8_17",large:"_large_mlyi8_20",circle:"_circle_mlyi8_23",square:"_square_mlyi8_28",squareLine:"_squareLine_mlyi8_33",fitted:"_fitted_mlyi8_36",rounded:"_rounded_mlyi8_39",start:"_start_mlyi8_45",center:"_center_mlyi8_48",end:"_end_mlyi8_51",horizontal:"_horizontal_mlyi8_54",line:"_line_mlyi8_63",textLine:"_textLine_mlyi8_63",text:"_text_mlyi8_63",Panel:"_Panel_mlyi8_72",active:"_active_mlyi8_76",Item:"_Item_mlyi8_79",ItemButton:"_ItemButton_mlyi8_160"},Ba=qe.bind(VP),UP={Root:t=>{const{children:e,className:n,direction:r}=t;return S.jsx(HP,{...t,children:S.jsx("div",{className:Ba("Root",r,n),children:e})})},List:t=>{const{className:e}=t,{tabType:n,direction:r,align:s,isFitted:i,size:o}=x.useContext(eh);return S.jsx("div",{className:Ba("List",r,s,n,e,o,{fitted:i}),children:t.children})},Item:t=>{const{className:e,children:n,id:r,index:s,onClick:i,isActive:o}=t,{onChange:a,tabType:l,size:c,active:u,isFitted:d}=x.useContext(eh),h=r??s.toString(),f=u===h;return S.jsx("div",{className:Ba("Item",c,l,e,{active:o??f,fitted:d}),onClick:i??a.bind(null,r??s.toString()),children:S.jsx("button",{className:Ba("ItemButton",l,{active:o??f}),children:n})})},Panel:t=>{const{className:e,children:n,id:r,index:s}=t,{active:i}=x.useContext(eh),o=r??s.toString();return S.jsx("div",{className:Ba("Panel",e,{active:i===o}),children:n})},Panels:t=>{const{className:e,children:n}=t;return S.jsx("div",{className:Ba("Paenls",e),children:n})}},Mw={value:"",searchable:!1,placeholder:"",searchText:"",open:!1,disabled:!1,error:!1,accentType:"in",onChange:()=>{}},th=x.createContext(Mw),qP={DropdownRoot:"_DropdownRoot_7hptt_2",DropdownTrigger:"_DropdownTrigger_7hptt_8",text:"_text_7hptt_21",small:"_small_7hptt_24",medium:"_medium_7hptt_27",large:"_large_7hptt_30",DropdownTriggerText:"_DropdownTriggerText_7hptt_33",LeftIcon:"_LeftIcon_7hptt_36",RightIcon:"_RightIcon_7hptt_42",open:"_open_7hptt_55",DropdownMenu:"_DropdownMenu_7hptt_58",shadow:"_shadow_7hptt_64",line:"_line_7hptt_69",DropdownItem:"_DropdownItem_7hptt_73",selected:"_selected_7hptt_108",disabled:"_disabled_7hptt_111"},WP=()=>{const t={inactive:{backgroundColor:"transparent",color:`var(--textTertiary, ${T.light.textTertiary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`,iconColor:`var(--textTertiary, ${T.light.textTertiary})`},focused:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`,iconColor:`var(--textPrimary, ${T.light.textPrimary})`},selected:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`,iconColor:`var(--textPrimary, ${T.light.textPrimary})`},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`,iconColor:`var(--textTertiary, ${T.light.textTertiary})`},error:{backgroundColor:"transparent",color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`,iconColor:`var(--textTertiary, ${T.light.textTertiary})`}},e={inactive:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textTertiary, ${T.light.textTertiary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent",iconColor:`var(--textTertiary, ${T.light.textTertiary})`},focused:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`,iconColor:`var(--textPrimary, ${T.light.textPrimary})`},selected:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent",iconColor:`var(--textPrimary, ${T.light.textPrimary})`},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent",iconColor:`var(--textTertiary, ${T.light.textTertiary})`},error:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:"transparent",iconColor:`var(--textTertiary, ${T.light.textTertiary})`}},n={inactive:{backgroundColor:"transparent",color:`var(--textTertiary, ${T.light.textTertiary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent",iconColor:`var(--textTertiary, ${T.light.textTertiary})`},focused:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent",iconColor:`var(--textPrimary, ${T.light.textPrimary})`},selected:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent",iconColor:`var(--textPrimary, ${T.light.textPrimary})`},disabled:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent",iconColor:`var(--textTertiary, ${T.light.textTertiary})`},error:{backgroundColor:"transparent",color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:"transparent",iconColor:`var(--textTertiary, ${T.light.textTertiary})`}};return{outlined:t,contained:e,text:n}};var Ow=function(e){return e.reduce(function(n,r){var s=r[0],i=r[1];return n[s]=i,n},{})},$w=typeof window<"u"&&window.document&&window.document.createElement?Po.useLayoutEffect:Po.useEffect,er="top",Rr="bottom",Ir="right",tr="left",Ug="auto",Sc=[er,Rr,Ir,tr],ja="start",Ec="end",GP="clippingParents",Pw="viewport",Ac="popper",YP="reference",Dw=Sc.reduce(function(t,e){return t.concat([e+"-"+ja,e+"-"+Ec])},[]),Rw=[].concat(Sc,[Ug]).reduce(function(t,e){return t.concat([e,e+"-"+ja,e+"-"+Ec])},[]),KP="beforeRead",ZP="read",XP="afterRead",QP="beforeMain",JP="main",eD="afterMain",tD="beforeWrite",nD="write",rD="afterWrite",sD=[KP,ZP,XP,QP,JP,eD,tD,nD,rD];function Os(t){return t?(t.nodeName||"").toLowerCase():null}function br(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ro(t){var e=br(t).Element;return t instanceof e||t instanceof Element}function Nr(t){var e=br(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function qg(t){if(typeof ShadowRoot>"u")return!1;var e=br(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function iD(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},s=e.attributes[n]||{},i=e.elements[n];!Nr(i)||!Os(i)||(Object.assign(i.style,r),Object.keys(s).forEach(function(o){var a=s[o];a===!1?i.removeAttribute(o):i.setAttribute(o,a===!0?"":a)}))})}function oD(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var s=e.elements[r],i=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=o.reduce(function(l,c){return l[c]="",l},{});!Nr(s)||!Os(s)||(Object.assign(s.style,a),Object.keys(i).forEach(function(l){s.removeAttribute(l)}))})}}const aD={name:"applyStyles",enabled:!0,phase:"write",fn:iD,effect:oD,requires:["computeStyles"]};function $s(t){return t.split("-")[0]}var Io=Math.max,nh=Math.min,Fa=Math.round;function Wg(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Iw(){return!/^((?!chrome|android).)*safari/i.test(Wg())}function za(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),s=1,i=1;e&&Nr(t)&&(s=t.offsetWidth>0&&Fa(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Fa(r.height)/t.offsetHeight||1);var o=Ro(t)?br(t):window,a=o.visualViewport,l=!Iw()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/s,u=(r.top+(l&&a?a.offsetTop:0))/i,d=r.width/s,h=r.height/i;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function Gg(t){var e=za(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function Nw(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&qg(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ri(t){return br(t).getComputedStyle(t)}function lD(t){return["table","td","th"].indexOf(Os(t))>=0}function Ii(t){return((Ro(t)?t.ownerDocument:t.document)||window.document).documentElement}function rh(t){return Os(t)==="html"?t:t.assignedSlot||t.parentNode||(qg(t)?t.host:null)||Ii(t)}function Lw(t){return!Nr(t)||ri(t).position==="fixed"?null:t.offsetParent}function cD(t){var e=/firefox/i.test(Wg()),n=/Trident/i.test(Wg());if(n&&Nr(t)){var r=ri(t);if(r.position==="fixed")return null}var s=rh(t);for(qg(s)&&(s=s.host);Nr(s)&&["html","body"].indexOf(Os(s))<0;){var i=ri(s);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return s;s=s.parentNode}return null}function Tc(t){for(var e=br(t),n=Lw(t);n&&lD(n)&&ri(n).position==="static";)n=Lw(n);return n&&(Os(n)==="html"||Os(n)==="body"&&ri(n).position==="static")?e:n||cD(t)||e}function Yg(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function kc(t,e,n){return Io(t,nh(e,n))}function uD(t,e,n){var r=kc(t,e,n);return r>n?n:r}function Bw(){return{top:0,right:0,bottom:0,left:0}}function jw(t){return Object.assign({},Bw(),t)}function Fw(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var dD=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,jw(typeof e!="number"?e:Fw(e,Sc))};function hD(t){var e,n=t.state,r=t.name,s=t.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,a=$s(n.placement),l=Yg(a),c=[tr,Ir].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!o)){var d=dD(s.padding,n),h=Gg(i),f=l==="y"?er:tr,p=l==="y"?Rr:Ir,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],g=o[l]-n.rects.reference[l],y=Tc(i),v=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,b=m/2-g/2,C=d[f],_=v-h[u]-d[p],k=v/2-h[u]/2+b,E=kc(C,k,_),A=l;n.modifiersData[r]=(e={},e[A]=E,e.centerOffset=E-k,e)}}function fD(t){var e=t.state,n=t.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||Nw(e.elements.popper,s)&&(e.elements.arrow=s))}const pD={name:"arrow",enabled:!0,phase:"main",fn:hD,effect:fD,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ha(t){return t.split("-")[1]}var gD={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mD(t,e){var n=t.x,r=t.y,s=e.devicePixelRatio||1;return{x:Fa(n*s)/s||0,y:Fa(r*s)/s||0}}function zw(t){var e,n=t.popper,r=t.popperRect,s=t.placement,i=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=o.x,f=h===void 0?0:h,p=o.y,m=p===void 0?0:p,g=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var y=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),b=tr,C=er,_=window;if(c){var k=Tc(n),E="clientHeight",A="clientWidth";if(k===br(n)&&(k=Ii(n),ri(k).position!=="static"&&a==="absolute"&&(E="scrollHeight",A="scrollWidth")),k=k,s===er||(s===tr||s===Ir)&&i===Ec){C=Rr;var $=d&&k===_&&_.visualViewport?_.visualViewport.height:k[E];m-=$-r.height,m*=l?1:-1}if(s===tr||(s===er||s===Rr)&&i===Ec){b=Ir;var P=d&&k===_&&_.visualViewport?_.visualViewport.width:k[A];f-=P-r.width,f*=l?1:-1}}var O=Object.assign({position:a},c&&gD),R=u===!0?mD({x:f,y:m},br(n)):{x:f,y:m};if(f=R.x,m=R.y,l){var H;return Object.assign({},O,(H={},H[C]=v?"0":"",H[b]=y?"0":"",H.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",H))}return Object.assign({},O,(e={},e[C]=v?m+"px":"",e[b]=y?f+"px":"",e.transform="",e))}function yD(t){var e=t.state,n=t.options,r=n.gpuAcceleration,s=r===void 0?!0:r,i=n.adaptive,o=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:$s(e.placement),variation:Ha(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,zw(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,zw(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const bD={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yD,data:{}};var sh={passive:!0};function vD(t){var e=t.state,n=t.instance,r=t.options,s=r.scroll,i=s===void 0?!0:s,o=r.resize,a=o===void 0?!0:o,l=br(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,sh)}),a&&l.addEventListener("resize",n.update,sh),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,sh)}),a&&l.removeEventListener("resize",n.update,sh)}}const xD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vD,data:{}};var wD={left:"right",right:"left",bottom:"top",top:"bottom"};function ih(t){return t.replace(/left|right|bottom|top/g,function(e){return wD[e]})}var _D={start:"end",end:"start"};function Hw(t){return t.replace(/start|end/g,function(e){return _D[e]})}function Kg(t){var e=br(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Zg(t){return za(Ii(t)).left+Kg(t).scrollLeft}function CD(t,e){var n=br(t),r=Ii(t),s=n.visualViewport,i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;var c=Iw();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a+Zg(t),y:l}}function SD(t){var e,n=Ii(t),r=Kg(t),s=(e=t.ownerDocument)==null?void 0:e.body,i=Io(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Io(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-r.scrollLeft+Zg(t),l=-r.scrollTop;return ri(s||n).direction==="rtl"&&(a+=Io(n.clientWidth,s?s.clientWidth:0)-i),{width:i,height:o,x:a,y:l}}function Xg(t){var e=ri(t),n=e.overflow,r=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function Vw(t){return["html","body","#document"].indexOf(Os(t))>=0?t.ownerDocument.body:Nr(t)&&Xg(t)?t:Vw(rh(t))}function Mc(t,e){var n;e===void 0&&(e=[]);var r=Vw(t),s=r===((n=t.ownerDocument)==null?void 0:n.body),i=br(r),o=s?[i].concat(i.visualViewport||[],Xg(r)?r:[]):r,a=e.concat(o);return s?a:a.concat(Mc(rh(o)))}function Qg(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ED(t,e){var n=za(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Uw(t,e,n){return e===Pw?Qg(CD(t,n)):Ro(e)?ED(e,n):Qg(SD(Ii(t)))}function AD(t){var e=Mc(rh(t)),n=["absolute","fixed"].indexOf(ri(t).position)>=0,r=n&&Nr(t)?Tc(t):t;return Ro(r)?e.filter(function(s){return Ro(s)&&Nw(s,r)&&Os(s)!=="body"}):[]}function TD(t,e,n,r){var s=e==="clippingParents"?AD(t):[].concat(e),i=[].concat(s,[n]),o=i[0],a=i.reduce(function(l,c){var u=Uw(t,c,r);return l.top=Io(u.top,l.top),l.right=nh(u.right,l.right),l.bottom=nh(u.bottom,l.bottom),l.left=Io(u.left,l.left),l},Uw(t,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function qw(t){var e=t.reference,n=t.element,r=t.placement,s=r?$s(r):null,i=r?Ha(r):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case er:l={x:o,y:e.y-n.height};break;case Rr:l={x:o,y:e.y+e.height};break;case Ir:l={x:e.x+e.width,y:a};break;case tr:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?Yg(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case ja:l[c]=l[c]-(e[u]/2-n[u]/2);break;case Ec:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Oc(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=r===void 0?t.placement:r,i=n.strategy,o=i===void 0?t.strategy:i,a=n.boundary,l=a===void 0?GP:a,c=n.rootBoundary,u=c===void 0?Pw:c,d=n.elementContext,h=d===void 0?Ac:d,f=n.altBoundary,p=f===void 0?!1:f,m=n.padding,g=m===void 0?0:m,y=jw(typeof g!="number"?g:Fw(g,Sc)),v=h===Ac?YP:Ac,b=t.rects.popper,C=t.elements[p?v:h],_=TD(Ro(C)?C:C.contextElement||Ii(t.elements.popper),l,u,o),k=za(t.elements.reference),E=qw({reference:k,element:b,strategy:"absolute",placement:s}),A=Qg(Object.assign({},b,E)),$=h===Ac?A:k,P={top:_.top-$.top+y.top,bottom:$.bottom-_.bottom+y.bottom,left:_.left-$.left+y.left,right:$.right-_.right+y.right},O=t.modifiersData.offset;if(h===Ac&&O){var R=O[s];Object.keys(P).forEach(function(H){var z=[Ir,Rr].indexOf(H)>=0?1:-1,j=[er,Rr].indexOf(H)>=0?"y":"x";P[H]+=R[j]*z})}return P}function kD(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=n.boundary,i=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Rw:l,u=Ha(r),d=u?a?Dw:Dw.filter(function(p){return Ha(p)===u}):Sc,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=Oc(t,{placement:m,boundary:s,rootBoundary:i,padding:o})[$s(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function MD(t){if($s(t)===Ug)return[];var e=ih(t);return[Hw(t),e,Hw(e)]}function OD(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,g=e.options.placement,y=$s(g),v=y===g,b=l||(v||!p?[ih(g)]:MD(g)),C=[g].concat(b).reduce(function(oe,te){return oe.concat($s(te)===Ug?kD(e,{placement:te,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):te)},[]),_=e.rects.reference,k=e.rects.popper,E=new Map,A=!0,$=C[0],P=0;P<C.length;P++){var O=C[P],R=$s(O),H=Ha(O)===ja,z=[er,Rr].indexOf(R)>=0,j=z?"width":"height",F=Oc(e,{placement:O,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),V=z?H?Ir:tr:H?Rr:er;_[j]>k[j]&&(V=ih(V));var q=ih(V),Q=[];if(i&&Q.push(F[R]<=0),a&&Q.push(F[V]<=0,F[q]<=0),Q.every(function(oe){return oe})){$=O,A=!1;break}E.set(O,Q)}if(A)for(var B=p?3:1,W=function(te){var ue=C.find(function(Ce){var be=E.get(Ce);if(be)return be.slice(0,te).every(function(Te){return Te})});if(ue)return $=ue,"break"},se=B;se>0;se--){var ne=W(se);if(ne==="break")break}e.placement!==$&&(e.modifiersData[r]._skip=!0,e.placement=$,e.reset=!0)}}const $D={name:"flip",enabled:!0,phase:"main",fn:OD,requiresIfExists:["offset"],data:{_skip:!1}};function Ww(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Gw(t){return[er,Ir,Rr,tr].some(function(e){return t[e]>=0})}function PD(t){var e=t.state,n=t.name,r=e.rects.reference,s=e.rects.popper,i=e.modifiersData.preventOverflow,o=Oc(e,{elementContext:"reference"}),a=Oc(e,{altBoundary:!0}),l=Ww(o,r),c=Ww(a,s,i),u=Gw(l),d=Gw(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const DD={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:PD};function RD(t,e,n){var r=$s(t),s=[tr,er].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=i[0],a=i[1];return o=o||0,a=(a||0)*s,[tr,Ir].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function ID(t){var e=t.state,n=t.options,r=t.name,s=n.offset,i=s===void 0?[0,0]:s,o=Rw.reduce(function(u,d){return u[d]=RD(d,e.rects,i),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const ND={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ID};function LD(t){var e=t.state,n=t.name;e.modifiersData[n]=qw({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const BD={name:"popperOffsets",enabled:!0,phase:"read",fn:LD,data:{}};function jD(t){return t==="x"?"y":"x"}function FD(t){var e=t.state,n=t.options,r=t.name,s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,g=Oc(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=$s(e.placement),v=Ha(e.placement),b=!v,C=Yg(y),_=jD(C),k=e.modifiersData.popperOffsets,E=e.rects.reference,A=e.rects.popper,$=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,P=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(k){if(i){var H,z=C==="y"?er:tr,j=C==="y"?Rr:Ir,F=C==="y"?"height":"width",V=k[C],q=V+g[z],Q=V-g[j],B=f?-A[F]/2:0,W=v===ja?E[F]:A[F],se=v===ja?-A[F]:-E[F],ne=e.elements.arrow,oe=f&&ne?Gg(ne):{width:0,height:0},te=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Bw(),ue=te[z],Ce=te[j],be=kc(0,E[F],oe[F]),Te=b?E[F]/2-B-be-ue-P.mainAxis:W-be-ue-P.mainAxis,de=b?-E[F]/2+B+be+Ce+P.mainAxis:se+be+Ce+P.mainAxis,Le=e.elements.arrow&&Tc(e.elements.arrow),Z=Le?C==="y"?Le.clientTop||0:Le.clientLeft||0:0,Be=(H=O==null?void 0:O[C])!=null?H:0,ot=V+Te-Be-Z,Et=V+de-Be,tn=kc(f?nh(q,ot):q,V,f?Io(Q,Et):Q);k[C]=tn,R[C]=tn-V}if(a){var Qn,As=C==="x"?er:tr,ts=C==="x"?Rr:Ir,gt=k[_],N=_==="y"?"height":"width",he=gt+g[As],me=gt-g[ts],Oe=[er,tr].indexOf(y)!==-1,at=(Qn=O==null?void 0:O[_])!=null?Qn:0,Ze=Oe?he:gt-E[N]-A[N]-at+P.altAxis,Ee=Oe?gt+E[N]+A[N]-at-P.altAxis:me,mt=f&&Oe?uD(Ze,gt,Ee):kc(f?Ze:he,gt,f?Ee:me);k[_]=mt,R[_]=mt-gt}e.modifiersData[r]=R}}const zD={name:"preventOverflow",enabled:!0,phase:"main",fn:FD,requiresIfExists:["offset"]};function HD(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function VD(t){return t===br(t)||!Nr(t)?Kg(t):HD(t)}function UD(t){var e=t.getBoundingClientRect(),n=Fa(e.width)/t.offsetWidth||1,r=Fa(e.height)/t.offsetHeight||1;return n!==1||r!==1}function qD(t,e,n){n===void 0&&(n=!1);var r=Nr(e),s=Nr(e)&&UD(e),i=Ii(e),o=za(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Os(e)!=="body"||Xg(i))&&(a=VD(e)),Nr(e)?(l=za(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=Zg(i))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function WD(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function s(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||s(i)}),r}function GD(t){var e=WD(t);return sD.reduce(function(n,r){return n.concat(e.filter(function(s){return s.phase===r}))},[])}function YD(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function KD(t){var e=t.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Yw={placement:"bottom",modifiers:[],strategy:"absolute"};function Kw(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function ZD(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,s=e.defaultOptions,i=s===void 0?Yw:s;return function(a,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yw,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,f={state:u,setOptions:function(y){var v=typeof y=="function"?y(u.options):y;m(),u.options=Object.assign({},i,u.options,v),u.scrollParents={reference:Ro(a)?Mc(a):a.contextElement?Mc(a.contextElement):[],popper:Mc(l)};var b=GD(KD([].concat(r,u.options.modifiers)));return u.orderedModifiers=b.filter(function(C){return C.enabled}),p(),f.update()},forceUpdate:function(){if(!h){var y=u.elements,v=y.reference,b=y.popper;if(Kw(v,b)){u.rects={reference:qD(v,Tc(b),u.options.strategy==="fixed"),popper:Gg(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(P){return u.modifiersData[P.name]=Object.assign({},P.data)});for(var C=0;C<u.orderedModifiers.length;C++){if(u.reset===!0){u.reset=!1,C=-1;continue}var _=u.orderedModifiers[C],k=_.fn,E=_.options,A=E===void 0?{}:E,$=_.name;typeof k=="function"&&(u=k({state:u,options:A,name:$,instance:f})||u)}}}},update:YD(function(){return new Promise(function(g){f.forceUpdate(),g(u)})}),destroy:function(){m(),h=!0}};if(!Kw(a,l))return f;f.setOptions(c).then(function(g){!h&&c.onFirstUpdate&&c.onFirstUpdate(g)});function p(){u.orderedModifiers.forEach(function(g){var y=g.name,v=g.options,b=v===void 0?{}:v,C=g.effect;if(typeof C=="function"){var _=C({state:u,name:y,instance:f,options:b}),k=function(){};d.push(_||k)}})}function m(){d.forEach(function(g){return g()}),d=[]}return f}}var XD=[xD,BD,bD,aD,ND,$D,zD,pD,DD],QD=ZD({defaultModifiers:XD}),JD=typeof Element<"u",eR=typeof Map=="function",tR=typeof Set=="function",nR=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function oh(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,s;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!oh(t[r],e[r]))return!1;return!0}var i;if(eR&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;for(i=t.entries();!(r=i.next()).done;)if(!oh(r.value[1],e.get(r.value[0])))return!1;return!0}if(tR&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(nR&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof e.valueOf=="function")return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof e.toString=="function")return t.toString()===e.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;if(JD&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&t.$$typeof)&&!oh(t[s[r]],e[s[r]]))return!1;return!0}return t!==t&&e!==e}var rR=function(e,n){try{return oh(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const sR=ss(rR);var iR=[],Zw=function(e,n,r){r===void 0&&(r={});var s=Po.useRef(null),i={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||iR},o=Po.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=o[0],l=o[1],c=Po.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(f){var p=f.state,m=Object.keys(p.elements);X$.flushSync(function(){l({styles:Ow(m.map(function(g){return[g,p.styles[g]||{}]})),attributes:Ow(m.map(function(g){return[g,p.attributes[g]]}))})})},requires:["computeStyles"]}},[]),u=Po.useMemo(function(){var h={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[c,{name:"applyStyles",enabled:!1}])};return sR(s.current,h)?s.current||h:(s.current=h,h)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,c]),d=Po.useRef();return $w(function(){d.current&&d.current.setOptions(u)},[u]),$w(function(){if(!(e==null||n==null)){var h=r.createPopper||QD,f=h(e,n,u);return d.current=f,function(){f.destroy(),d.current=null}}},[e,n,r.createPopper]),{state:d.current?d.current.state:null,styles:a.styles,attributes:a.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}};const No=qe.bind(qP),oR={Trigger:t=>{var k;const{as:e,className:n,variant:r="outlined",size:s="medium",leftIcon:i={name:"SwapVert",size:20},rightIcon:o={name:"ExpandMore",size:20}}=t,{value:a,placeholder:l,open:c,options:u,id:d,disabled:h,error:f,accentType:p,handleTriggerClick:m}=x.use(th),g=WP(),y=Array.isArray(a)?a.length===0:!a,v=x.useMemo(()=>h?"disabled":f?"error":c?"focused":y?"inactive":"selected",[h,f,c,y]),b=x.useMemo(()=>{const E={"--background-color":g[r][v].backgroundColor,"--color":g[r][v].color,"--border-color":g[r][v].borderColor},A=()=>{y?E["--color"]=g[r].inactive.color:E["--color"]=g[r].selected.color,c&&(E["--color"]=g[r].focused.color),h&&(E["--color"]=g[r].disabled.color)},$=()=>{y||(E["--border-color"]=g[r].selected.borderColor),c&&(E["--border-color"]=g[r].focused.borderColor),h&&(E["--border-color"]=g[r].disabled.borderColor)};if(v==="error")switch(p){case"in":E["--color"]=g[r].error.color,$();break;case"out":E["--border-color"]=g[r].error.color,A();break;case"all":E["--color"]=g[r].error.color,E["--border-color"]=g[r].error.color;break}return E},[g,r,v,c,y,h,p]),C=x.useCallback(E=>{const A=E==="left"?i:o,$={"--icon-color":(A==null?void 0:A.color)??g[r][v].iconColor,...A==null?void 0:A.style};return y||($["--icon-color"]=(A==null?void 0:A.color)??g[r].selected.iconColor),c&&($["--icon-color"]=(A==null?void 0:A.color)??g[r].focused.iconColor),h&&($["--icon-color"]=(A==null?void 0:A.color)??g[r].disabled.iconColor),$},[g,r,v,c,y,h,i,o]),_=Array.isArray(a)?u?u.filter(E=>a.includes(E.value)).map(E=>E.label).join(", "):a.join(", "):u?((k=u.find(E=>E.value===a))==null?void 0:k.label)??"":a;return e?e({isEmpty:y,placeholder:l,selectedValue:_,open:c,options:u,variant:r,size:s,colorStyle:b,iconColorStyle:C,handleTriggerClick:m}):S.jsxs("div",{className:No("DropdownTrigger",n,r,s),onClick:m,"data-name":"trigger",id:d,style:b,children:[i&&S.jsx(Ke,{...i,className:No("LeftIcon",i.className),style:C("left")}),S.jsx("span",{className:No("DropdownTriggerText"),children:y?l:_}),o&&S.jsx(Ke,{...o,className:No("RightIcon",o.className,{open:c}),style:C("right")})]})},Menu:t=>{const{className:e,children:n,variant:r="shadow",size:s="medium",boundaryPadding:i=8}=t,{open:o,id:a,referenceState:l,popperState:c,handleTriggerClick:u}=x.use(th),[d]=l??[],[h,f]=c??[],{styles:p,attributes:m}=Zw(d,h,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"preventOverflow",options:{padding:i}}]});return x.useEffect(()=>{const g=y=>{var C;const v=y.target,b=h;if(v instanceof Element&&b&&!b.contains(v)){if(((C=v.closest("[data-name='trigger']"))==null?void 0:C.id)===a)return;u==null||u()}};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[u,h,a]),o?S.jsx("ul",{...m.popper,ref:f,className:No("DropdownMenu",r,e),style:p.popper,children:typeof n=="function"?n({open:o,id:a,variant:r,size:s,handleTriggerClick:u}):x.Children.map(n,g=>x.isValidElement(g)?x.cloneElement(g,{...g.props instanceof Object?{...g.props,variant:r,size:s}:{}}):g)}):null},Item:t=>{const{children:e,className:n,value:r,label:s,variant:i="shadow",size:o="medium"}=t,a=x.use(th),{onChange:l}=a,c=Array.isArray(a.value),u=x.useCallback(()=>{var p;const f=Array.isArray(a.value)?a.value.includes(r)?a.value.filter(m=>m!==r):[...a.value,r]:r;l(f),c||(p=a.handleTriggerClick)==null||p.call(a)},[a,c,l,r]),d=Array.isArray(a.value)?a.value.includes(r):a.value===r,h=Array.isArray(a.value)?!1:a.value===r;return S.jsx("li",{className:No("DropdownItem",i,o,n,{selected:d,disabled:h}),onClick:u,children:e??s})},Root:t=>{const{children:e,className:n}=t,r=x.useId(),[s,i]=x.useState(!1),o=x.useState(null),[,a]=o,l=x.useState(null),c=x.useCallback(()=>{t.disabled||i(d=>!d)},[t.disabled]),u=x.useMemo(()=>({...Mw,...t,id:r,open:s,referenceState:o,popperState:l,handleTriggerClick:c}),[s,t,o,l,r,c]);return S.jsx(th,{value:u,children:S.jsx("div",{ref:a,className:No("DropdownRoot",n),children:e})})}},aR={otp:[],handleChange:()=>{},handleKeyDown:()=>{}},Xw=x.createContext(aR),lR=t=>{const{length:e,onChange:n,children:r,value:s}=t,i=e-((s==null?void 0:s.length)||0),[o,a]=x.useState(((s==null?void 0:s.split(""))||[]).concat(Array(i>0?i:0).fill(""))),l=x.useRef([]),c=(h,f)=>{const p=[...o];p[h]=f,a(p),n(p.join(""))},u=(h,f)=>{f.key==="Backspace"&&(o[h]===""?h>0&&(l.current[h-1].focus(),c(h-1,"")):c(h,""))},d=(h,f)=>{const p=f.target.value;if(/^\d$/.test(p))c(h,p),h<e-1&&l.current[h+1].focus();else{const m=p.split(o[h]).filter(g=>!!g)[0]||o[h];f.target.value=m,c(h,m),h<e-1&&l.current[h+1].focus()}};return S.jsx(Xw.Provider,{value:{otp:o,inputRefs:l,handleChange:d,handleKeyDown:u},children:r})},cR={OTPInputWrapper:"_OTPInputWrapper_1qkr8_1",OTPInputList:"_OTPInputList_1qkr8_18"},Qw=qe.bind(cR),Jw=({index:t=0,className:e})=>{const{otp:n,inputRefs:r,handleChange:s,handleKeyDown:i}=x.useContext(Xw);return S.jsx("div",{className:Qw("OTPInputWrapper",e),children:S.jsx("input",{ref:o=>{o&&(r!=null&&r.current)&&(r.current[t]=o)},type:"number",inputMode:"numeric",min:0,max:9,step:1,value:n[t],onKeyDown:o=>i(t,o),onChange:o=>s(t,o)})})},uR={Root:t=>{const{length:e,onChange:n,input:r=Jw,value:s,className:i}=t;return S.jsx(lR,{length:e,onChange:n,value:s,children:S.jsx("div",{className:Qw("OTPInputList",i),children:Array.from({length:e},(o,a)=>x.cloneElement(r,{index:a,key:a}))})})},Input:Jw},dR={SwitchWrapper:"_SwitchWrapper_g4jye_1",small:"_small_g4jye_11",medium:"_medium_g4jye_15",SwitchInput:"_SwitchInput_g4jye_19",SwitchBullet:"_SwitchBullet_g4jye_22",SwitchLabel:"_SwitchLabel_g4jye_35",checked:"_checked_g4jye_41",SwitchRoot:"_SwitchRoot_g4jye_47"},e_={value:!1,onChange:()=>{},name:"",disabled:!1,readOnly:!1,size:"small"},Jg=x.createContext(e_),hR=({children:t,...e})=>S.jsx(Jg.Provider,{value:{...e_,...e},children:t}),t_=()=>{const t={backgroundColor:T.primary.pMain,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent",hover:{backgroundColor:T.primary.pDark,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabled, ${T.light.actionDisabled})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}},e={backgroundColor:`var(--textTertiary, ${T.light.textTertiary})`,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent",hover:{backgroundColor:`var(--textSecondary, ${T.light.textSecondary})`,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabled, ${T.light.actionDisabled})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}};return{selected:t,unselected:e}},$c=qe.bind(dR),fR={Root:t=>{const{name:e,value:n,className:r,size:s="small"}=t,i=o=>{var a;if(t.disabled)return!1;(a=t.onChange)==null||a.call(t,o.target.checked),o.stopPropagation()};return S.jsx(hR,{...t,onChange:i,value:n,children:S.jsx("label",{htmlFor:e,className:$c("SwitchRoot",s,r),children:t.children})})},Label:t=>{const{className:e,checkedColor:n,children:r}=t,{value:s,disabled:i}=x.useContext(Jg),o=t_(),a=x.useMemo(()=>s?"selected":"unselected",[s]);return S.jsx("span",{className:$c("SwitchLabel",e,{checked:s}),style:{"--color":n??i?o[a].disabled.color:o[a].color},children:r})},Trigger:t=>{const{as:e,className:n,wrapperClassName:r,bulletClassName:s}=t,{value:i,onChange:o,name:a,size:l,disabled:c}=x.useContext(Jg),u=t_(),d=x.useMemo(()=>i?"selected":"unselected",[i]);return e?S.jsxs(x.Fragment,{children:[S.jsx("input",{name:a,type:"checkbox",checked:i,hidden:!0,value:i?"on":"off",id:a,onChange:o}),e({checked:i,value:i,className:n,id:a})]}):S.jsxs("div",{className:$c("SwitchWrapper",l,r,{checked:!!i}),style:{"--background-color":c?u[d].disabled.backgroundColor:u[d].backgroundColor},children:[S.jsx("input",{type:"checkbox",className:$c("SwitchInput"),checked:i,name:a,value:i?"on":"off",id:a,onChange:o}),S.jsx("div",{className:$c("SwitchBullet",s,{checked:!!i}),style:{backgroundColor:i?"#fff":void 0}})]})}},pR={RadioRoot:"_RadioRoot_lgu2k_2",RadioTrigger:"_RadioTrigger_lgu2k_8",RadioIcon:"_RadioIcon_lgu2k_8",checked:"_checked_lgu2k_21",RadioInner:"_RadioInner_lgu2k_25",disabled:"_disabled_lgu2k_32",readOnly:"_readOnly_lgu2k_32",RadioLabel:"_RadioLabel_lgu2k_35"},n_={value:"",checked:!1,onChange:()=>{},name:"",disabled:!1,readOnly:!1,id:""},ah=x.createContext(n_),r_=()=>{const t={backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:T.primary.pMain,hover:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:T.primary.pDark},disabled:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`}},e={backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:`var(--textTertiary, ${T.light.textTertiary})`,hover:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:`var(--textSecondary, ${T.light.textSecondary})`},disabled:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`}};return{selected:t,unselected:e}},Pc=qe.bind(pR),gR={Root:t=>{const{id:e,value:n,className:r}=t,s=x.useCallback(a=>{var l;if(t.disabled||t.readOnly)return!1;(l=t.onChange)==null||l.call(t,a.target.id)},[t]),i=e===n,o=x.useMemo(()=>({...n_,...t,id:e??"",checked:i,onChange:s}),[t,e,i,s]);return S.jsx(ah,{value:o,children:S.jsx("label",{htmlFor:e,className:Pc("RadioRoot",r),children:t.children})})},Trigger:t=>{const{as:e,className:n,checkedClassName:r}=t,{value:s,checked:i,name:o,id:a,disabled:l,readOnly:c,onChange:u}=x.useContext(ah),d=r_(),h=x.useMemo(()=>i?"selected":"unselected",[i]);return e?S.jsxs(x.Fragment,{children:[S.jsx("input",{id:a,name:o,type:"radio",checked:i,hidden:!0,value:s,onChange:u}),e({checked:i,value:s,className:n,id:a})]}):S.jsxs("div",{className:Pc("RadioTrigger",n),children:[S.jsx("input",{id:a,name:o,type:"radio",checked:i,hidden:!0,onChange:u,value:s}),S.jsx("div",{className:Pc("RadioIcon",{[r||"checked"]:i,disabled:l,readOnly:c}),style:{"--border-color":l?d[h].disabled.borderColor:d[h].borderColor,"--background-color":l?d[h].disabled.backgroundColor:d[h].backgroundColor,"--hover-border-color":d[h].hover.borderColor},children:i&&S.jsx("div",{className:Pc("RadioInner")})})]})},Label:t=>{const{className:e,checkedColor:n,children:r}=t,{checked:s,disabled:i,readOnly:o}=x.useContext(ah),a=r_(),l=x.useMemo(()=>s?"selected":"unselected",[s]);return S.jsx("span",{className:Pc("RadioLabel",e,{checked:s,disabled:i,readOnly:o}),style:{"--color":n??i?a[l].disabled.color:a[l].color,"--hover-color":a[l].hover.color},children:r})},HelperText:t=>{const{status:e}=x.useContext(ah);return S.jsx(La,{...t,status:e})}},s_={value:"",onChange:()=>{},placeholder:"",size:"medium",variant:"outlined",disabled:!1,readOnly:!1,type:"text",name:"",required:!1,focused:!1,onFocus:()=>{},onBlur:()=>{},focusedColor:"var(--Simentic-Outline, #636567)",accentType:"in"},Dc=x.createContext(s_),mR=t=>{const[e,n]=x.useState(!1),r=x.useRef(null),s=x.useMemo(()=>({...s_,...t,focused:e,_inputRef:r,onFocus:i=>{var o;n(!0),(o=t.onFocus)==null||o.call(null,i)},onBlur:i=>{var o;n(!1),(o=t.onBlur)==null||o.call(null,i)}}),[e,t]);return S.jsx(Dc,{value:s,children:t.children})},yR={TextInputRoot:"_TextInputRoot_1oi1h_2",row:"_row_1oi1h_2",TextInputLabel:"_TextInputLabel_1oi1h_8",large:"_large_1oi1h_14",small:"_small_1oi1h_14",error:"_error_1oi1h_27",success:"_success_1oi1h_30",warning:"_warning_1oi1h_33",TextInputErase:"_TextInputErase_1oi1h_36",TextInputComponentWrapper:"_TextInputComponentWrapper_1oi1h_46",TextInputComponentInput:"_TextInputComponentInput_1oi1h_63",contained:"_contained_1oi1h_84",out:"_out_1oi1h_88",all:"_all_1oi1h_88",in:"_in_1oi1h_94",focused:"_focused_1oi1h_103",disabled:"_disabled_1oi1h_106",outlined:"_outlined_1oi1h_106"},bR=()=>{const t={inactive:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},focused:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`},readOnly:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},error:{backgroundColor:"transparent",color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`}},e={inactive:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent"},focused:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`},readOnly:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"},error:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:"transparent"}};return{outlined:t,contained:e}},Rc=qe.bind(yR),vR={Root:t=>{const{name:e,className:n,children:r,direction:s="column",...i}=t;return S.jsx(mR,{...i,direction:s,children:S.jsx("label",{htmlFor:e,className:Rc("TextInputRoot",n,s),children:r})})},Label:t=>{const{className:e,children:n,focusedColor:r}=t,{focused:s,status:i,size:o,direction:a,flexBasis:l}=x.useContext(Dc);return S.jsx("span",{className:Rc("TextInputLabel",e,i,o,a,{focused:s}),style:{color:s?r:void 0,...l?{"--basis":l}:{}},children:n})},HelperText:t=>{const{status:e}=x.useContext(Dc);return S.jsx(La,{...t,status:e})},Input:t=>{const{children:e,wrapperClassName:n,placeholderColor:r,containedBackgroundColor:s,disabledColor:i,leftIcon:o,rightIcon:a,...l}=t,{readOnly:c,disabled:u,variant:d="outlined",focused:h=!1,size:f,name:p,onFocus:m,onBlur:g,status:y,placeholder:v,focusedColor:b,_inputRef:C,onChange:_,type:k,value:E="",accentType:A}=x.useContext(Dc),[$,P]=x.useState(E),R=bR()[d],H=!(t.readOnly??c)&&!(t.disabled??u)&&(h||$.length>0)&&y!=="error";x.useEffect(()=>{P(E)},[E]);const z=x.useCallback(j=>{var F;P(j.target.value),(F=t.onChange)==null||F.call(t,j),_==null||_(j.target.value)},[_,t]);return S.jsxs("div",{className:Rc("TextInputComponentWrapper",d,f,y,A,n,{focused:H,disabled:t.disabled??u,readOnly:t.readOnly??c}),style:{"--background-color":u?s??R.disabled.backgroundColor:R.inactive.backgroundColor,"--border-color":H?t.focusedColor??b??R.focused.borderColor:y==="error"?R.error.borderColor:R.inactive.borderColor},children:[o,S.jsx("input",{...l,type:t.type??k,disabled:t.disabled??u,readOnly:t.readOnly??c,className:Rc("TextInputComponentInput",l.className,y),name:t.name??p,id:t.id??t.name??p,onFocus:!(t.readOnly??c)&&!(t.disabled??u)?t.onFocus??m:void 0,onBlur:t.onFocus??g,onChange:z,value:$,ref:C,style:{"--placeholder-color":r??R.inactive.placeholder,"--color":u?i??R.disabled.color:R.inactive.color,"--error-color":R.error.color},placeholder:t.placeholder??v}),a,e]})},Erase:t=>{const{children:e,className:n,color:r}=t,{onChange:s,_inputRef:i}=x.useContext(Dc),o=()=>{i!=null&&i.current&&(console.log(i.current),i.current.value=""),s==null||s("")};return S.jsx("button",{onClick:o,className:Rc("TextInputErase",n),children:e??S.jsx(Ke,{name:"CancleFilled",size:20,color:r??"#919EAB"})})}},xR={TextAreaTextCount:"_TextAreaTextCount_5lrng_2",TextAreaLabel:"_TextAreaLabel_5lrng_12",error:"_error_5lrng_18",success:"_success_5lrng_21",warning:"_warning_5lrng_24",TextAreaComponentWrapper:"_TextAreaComponentWrapper_5lrng_27",TextAreaInput:"_TextAreaInput_5lrng_46",out:"_out_5lrng_54",all:"_all_5lrng_54",contained:"_contained_5lrng_60",in:"_in_5lrng_70",focused:"_focused_5lrng_76",disabled:"_disabled_5lrng_79",outlined:"_outlined_5lrng_79",TextAreaClone:"_TextAreaClone_5lrng_91"},i_={value:"",onChange:()=>{},placeholder:"",rows:3,disabled:!1,variant:"outlined",readOnly:!1,name:"",focused:!1,onFocus:()=>{},onBlur:()=>{},maxLength:void 0,focusedColor:"var(--Simentic-Outline, #636567)",accentType:"in"},Va=x.createContext(i_),wR=({children:t,...e})=>{const[n,r]=x.useState(!1),s=x.useRef(null);return S.jsx(Va,{value:{...i_,...e,_inputRef:s,focused:n,onFocus:i=>{var o;r(!0),(o=e.onFocus)==null||o.call(null,i)},onBlur:i=>{var o;r(!1),(o=e.onBlur)==null||o.call(null,i)}},children:t})},_R=()=>{const t={inactive:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},focused:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`},readOnly:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},error:{backgroundColor:"transparent",color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`}},e={inactive:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent"},focused:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`},readOnly:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"},error:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:"transparent"}};return{outlined:t,contained:e}},Lo=qe.bind(xR),CR={Root:t=>{const{name:e,className:n}=t;return S.jsx(wR,{...t,children:S.jsx("label",{htmlFor:e,className:Lo("TextAreaRoot",n),children:t.children})})},Label:t=>{const{className:e,children:n,focusedColor:r}=t,{focused:s,status:i}=x.useContext(Va);return S.jsx("span",{className:Lo("TextAreaLabel",e,i,{focused:s}),style:{color:s?r:void 0},children:n})},HelperText:t=>{const{status:e}=x.useContext(Va);return S.jsx(La,{...t,status:e})},Erase:t=>{const{children:e,className:n}=t,{onChange:r,_inputRef:s}=x.useContext(Va),i=()=>{s!=null&&s.current&&(s.current.value=""),r==null||r({target:{value:""}})};return S.jsx("button",{onClick:i,className:Lo("TextAreaErase",n),children:e??S.jsx(Ke,{name:"CancleFilled",size:16})})},Input:t=>{const{children:e,wrapperClassName:n,placeholderColor:r,containedBackgroundColor:s,disabledColor:i,...o}=t,a=x.useRef(null),{readOnly:l,disabled:c,variant:u,focused:d,name:h,onFocus:f,onBlur:p,status:m,placeholder:g,focusedColor:y,_inputRef:v,value:b,onChange:C,rows:_,maxRows:k,accentType:E}=x.useContext(Va),$=_R()[u],P=!(t.readOnly??l)&&!(t.disabled??c)&&(d||b.length>0)&&m!=="error";return x.useEffect(()=>{const O=v==null?void 0:v.current,R=a.current,H=()=>{if(!O||!R)return;const z=O.value;R.value=z,O.rows=Math.min(Math.max(Math.ceil(R.scrollHeight/R.clientHeight),_),t.maxRows??k??_)};return O&&O.addEventListener("input",H),()=>{O&&O.removeEventListener("input",H)}},[v,k,t.maxRows,_]),S.jsxs("div",{className:Lo("TextAreaComponentWrapper",u,m,E,n,{focused:P,disabled:t.disabled??c,readOnly:t.readOnly??l}),style:{"--background-color":c?s??$.disabled.backgroundColor:$.inactive.backgroundColor,"--border-color":P?t.focusedColor??y??$.focused.borderColor:m==="error"?$.error.borderColor:$.inactive.borderColor},children:[S.jsx("textarea",{className:Lo("TextAreaClone"),rows:1,ref:a,readOnly:!0}),S.jsx("textarea",{...o,className:Lo("TextAreaInput"),rows:t.rows??_,disabled:t.disabled??c,readOnly:t.readOnly??l,name:h,id:t.id??t.name??h,onFocus:t.onFocus??f,onBlur:t.onBlur??p,value:b,onChange:t.onChange??C,ref:v,placeholder:t.placeholder??g,style:{"--placeholder-color":r??$.inactive.placeholder,"--focused-color":y??$.focused.borderColor,"--disabled-color":i??$.disabled.color,"--error-color":$.error.color}}),e]})},TextCount:t=>{const{className:e}=t,{value:n,maxLength:r}=x.useContext(Va);return S.jsxs("span",{className:Lo("TextAreaTextCount",e),children:[n.length,"/",r]})}},SR={LazyImage:"_LazyImage_b5s08_1"};function ER(t,e={threshold:0}){const n=x.useRef(null),[r,s]=x.useState([]);return x.useEffect(()=>{const i=t.current;if(i)return n.current=new IntersectionObserver(s,e),Array.isArray(i)?i.forEach(o=>{var a;return o&&((a=n.current)==null?void 0:a.observe(o))}):n.current.observe(i),()=>{var o;(o=n.current)==null||o.disconnect()}},[t,e]),{entries:r,observerRef:n}}const e0=qe.bind(SR),o_={threshold:0},AR=typeof HTMLImageElement<"u"&&"loading"in HTMLImageElement.prototype?({src:t,rootElemRef:e,width:n,height:r,ratio:s,...i})=>{const o=x.useRef(null),[a,l]=x.useState(!1);o_.root=(e==null?void 0:e.current)??null;const{entries:c,observerRef:u}=ER(o,o_),d=()=>{l(!0)};x.useEffect(()=>{var p,m;((p=c[0])==null?void 0:p.isIntersecting)&&(o.current.setAttribute("src",t),(m=u.current)==null||m.disconnect())},[t,c,u]);const h=(()=>{switch(s){case"1:1":return 1;case"4:3":return 4/3;case"16:9":return 16/9;case"3:4":return 3/4;case"9:16":return 9/16}})();if(!n&&!r)throw new Error("width or height is required");return S.jsx("img",{ref:o,className:e0({LazyImage:!a}),width:n??r*h,height:r??n/h,onLoad:d,style:{objectFit:"cover"},alt:"",...i})}:({rootElemRef:t,...e})=>{const n=x.useRef(null);return x.useEffect(()=>{const r=()=>{var s;(s=n.current)==null||s.classList.remove(e0("LazyImage"))};n.current&&n.current.addEventListener("load",r,{once:!0})},[]),S.jsx("img",{ref:n,...e,className:e0("LazyImage"),loading:"lazy"})},TR={CaledarRoot:"_CaledarRoot_186l0_3",CalendarHeaderDate:"_CalendarHeaderDate_186l0_9",CalendarDayTextList:"_CalendarDayTextList_186l0_15",CalednarDayTextColumn:"_CalednarDayTextColumn_186l0_22",sunday:"_sunday_186l0_33",saturday:"_saturday_186l0_36",CalendarBody:"_CalendarBody_186l0_39",CalendarBodyColumn:"_CalendarBodyColumn_186l0_43",selected:"_selected_186l0_52",between:"_between_186l0_55",start:"_start_186l0_58",end:"_end_186l0_67",both:"_both_186l0_76",today:"_today_186l0_79",CalendarBodyColumnText:"_CalendarBodyColumnText_186l0_92"};var a_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(an,function(){var n=1e3,r=6e4,s=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var j=["th","st","nd","rd"],F=z%100;return"["+z+(j[(F-20)%10]||j[F]||j[0])+"]"}},b=function(z,j,F){var V=String(z);return!V||V.length>=j?z:""+Array(j+1-V.length).join(F)+z},C={s:b,z:function(z){var j=-z.utcOffset(),F=Math.abs(j),V=Math.floor(F/60),q=F%60;return(j<=0?"+":"-")+b(V,2,"0")+":"+b(q,2,"0")},m:function z(j,F){if(j.date()<F.date())return-z(F,j);var V=12*(F.year()-j.year())+(F.month()-j.month()),q=j.clone().add(V,d),Q=F-q<0,B=j.clone().add(V+(Q?-1:1),d);return+(-(V+(F-q)/(Q?q-B:B-q))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:d,y:f,w:u,d:c,D:p,h:l,m:a,s:o,ms:i,Q:h}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},_="en",k={};k[_]=v;var E="$isDayjsObject",A=function(z){return z instanceof R||!(!z||!z[E])},$=function z(j,F,V){var q;if(!j)return _;if(typeof j=="string"){var Q=j.toLowerCase();k[Q]&&(q=Q),F&&(k[Q]=F,q=Q);var B=j.split("-");if(!q&&B.length>1)return z(B[0])}else{var W=j.name;k[W]=j,q=W}return!V&&q&&(_=q),q||!V&&_},P=function(z,j){if(A(z))return z.clone();var F=typeof j=="object"?j:{};return F.date=z,F.args=arguments,new R(F)},O=C;O.l=$,O.i=A,O.w=function(z,j){return P(z,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var R=function(){function z(F){this.$L=$(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[E]=!0}var j=z.prototype;return j.parse=function(F){this.$d=function(V){var q=V.date,Q=V.utc;if(q===null)return new Date(NaN);if(O.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var B=q.match(g);if(B){var W=B[2]-1||0,se=(B[7]||"0").substring(0,3);return Q?new Date(Date.UTC(B[1],W,B[3]||1,B[4]||0,B[5]||0,B[6]||0,se)):new Date(B[1],W,B[3]||1,B[4]||0,B[5]||0,B[6]||0,se)}}return new Date(q)}(F),this.init()},j.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},j.$utils=function(){return O},j.isValid=function(){return this.$d.toString()!==m},j.isSame=function(F,V){var q=P(F);return this.startOf(V)<=q&&q<=this.endOf(V)},j.isAfter=function(F,V){return P(F)<this.startOf(V)},j.isBefore=function(F,V){return this.endOf(V)<P(F)},j.$g=function(F,V,q){return O.u(F)?this[V]:this.set(q,F)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(F,V){var q=this,Q=!!O.u(V)||V,B=O.p(F),W=function(Te,de){var Le=O.w(q.$u?Date.UTC(q.$y,de,Te):new Date(q.$y,de,Te),q);return Q?Le:Le.endOf(c)},se=function(Te,de){return O.w(q.toDate()[Te].apply(q.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(de)),q)},ne=this.$W,oe=this.$M,te=this.$D,ue="set"+(this.$u?"UTC":"");switch(B){case f:return Q?W(1,0):W(31,11);case d:return Q?W(1,oe):W(0,oe+1);case u:var Ce=this.$locale().weekStart||0,be=(ne<Ce?ne+7:ne)-Ce;return W(Q?te-be:te+(6-be),oe);case c:case p:return se(ue+"Hours",0);case l:return se(ue+"Minutes",1);case a:return se(ue+"Seconds",2);case o:return se(ue+"Milliseconds",3);default:return this.clone()}},j.endOf=function(F){return this.startOf(F,!1)},j.$set=function(F,V){var q,Q=O.p(F),B="set"+(this.$u?"UTC":""),W=(q={},q[c]=B+"Date",q[p]=B+"Date",q[d]=B+"Month",q[f]=B+"FullYear",q[l]=B+"Hours",q[a]=B+"Minutes",q[o]=B+"Seconds",q[i]=B+"Milliseconds",q)[Q],se=Q===c?this.$D+(V-this.$W):V;if(Q===d||Q===f){var ne=this.clone().set(p,1);ne.$d[W](se),ne.init(),this.$d=ne.set(p,Math.min(this.$D,ne.daysInMonth())).$d}else W&&this.$d[W](se);return this.init(),this},j.set=function(F,V){return this.clone().$set(F,V)},j.get=function(F){return this[O.p(F)]()},j.add=function(F,V){var q,Q=this;F=Number(F);var B=O.p(V),W=function(oe){var te=P(Q);return O.w(te.date(te.date()+Math.round(oe*F)),Q)};if(B===d)return this.set(d,this.$M+F);if(B===f)return this.set(f,this.$y+F);if(B===c)return W(1);if(B===u)return W(7);var se=(q={},q[a]=r,q[l]=s,q[o]=n,q)[B]||1,ne=this.$d.getTime()+F*se;return O.w(ne,this)},j.subtract=function(F,V){return this.add(-1*F,V)},j.format=function(F){var V=this,q=this.$locale();if(!this.isValid())return q.invalidDate||m;var Q=F||"YYYY-MM-DDTHH:mm:ssZ",B=O.z(this),W=this.$H,se=this.$m,ne=this.$M,oe=q.weekdays,te=q.months,ue=q.meridiem,Ce=function(de,Le,Z,Be){return de&&(de[Le]||de(V,Q))||Z[Le].slice(0,Be)},be=function(de){return O.s(W%12||12,de,"0")},Te=ue||function(de,Le,Z){var Be=de<12?"AM":"PM";return Z?Be.toLowerCase():Be};return Q.replace(y,function(de,Le){return Le||function(Z){switch(Z){case"YY":return String(V.$y).slice(-2);case"YYYY":return O.s(V.$y,4,"0");case"M":return ne+1;case"MM":return O.s(ne+1,2,"0");case"MMM":return Ce(q.monthsShort,ne,te,3);case"MMMM":return Ce(te,ne);case"D":return V.$D;case"DD":return O.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return Ce(q.weekdaysMin,V.$W,oe,2);case"ddd":return Ce(q.weekdaysShort,V.$W,oe,3);case"dddd":return oe[V.$W];case"H":return String(W);case"HH":return O.s(W,2,"0");case"h":return be(1);case"hh":return be(2);case"a":return Te(W,se,!0);case"A":return Te(W,se,!1);case"m":return String(se);case"mm":return O.s(se,2,"0");case"s":return String(V.$s);case"ss":return O.s(V.$s,2,"0");case"SSS":return O.s(V.$ms,3,"0");case"Z":return B}return null}(de)||B.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(F,V,q){var Q,B=this,W=O.p(V),se=P(F),ne=(se.utcOffset()-this.utcOffset())*r,oe=this-se,te=function(){return O.m(B,se)};switch(W){case f:Q=te()/12;break;case d:Q=te();break;case h:Q=te()/3;break;case u:Q=(oe-ne)/6048e5;break;case c:Q=(oe-ne)/864e5;break;case l:Q=oe/s;break;case a:Q=oe/r;break;case o:Q=oe/n;break;default:Q=oe}return q?Q:O.a(Q)},j.daysInMonth=function(){return this.endOf(d).$D},j.$locale=function(){return k[this.$L]},j.locale=function(F,V){if(!F)return this.$L;var q=this.clone(),Q=$(F,V,!0);return Q&&(q.$L=Q),q},j.clone=function(){return O.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},z}(),H=R.prototype;return P.prototype=H,[["$ms",i],["$s",o],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(z){H[z[1]]=function(j){return this.$g(j,z[0],z[1])}}),P.extend=function(z,j){return z.$i||(z(j,R,P),z.$i=!0),P},P.locale=$,P.isDayjs=A,P.unix=function(z){return P(1e3*z)},P.en=k[_],P.Ls=k,P.p={},P})})(a_);var l_=a_.exports;const ce=ss(l_);var c_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(an,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(s,i,o){var a,l=function(h,f,p){p===void 0&&(p={});var m=new Date(h),g=function(y,v){v===void 0&&(v={});var b=v.timeZoneName||"short",C=y+"|"+b,_=r[C];return _||(_=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:b}),r[C]=_),_}(f,p);return g.formatToParts(m)},c=function(h,f){for(var p=l(h,f),m=[],g=0;g<p.length;g+=1){var y=p[g],v=y.type,b=y.value,C=n[v];C>=0&&(m[C]=parseInt(b,10))}var _=m[3],k=_===24?0:_,E=m[0]+"-"+m[1]+"-"+m[2]+" "+k+":"+m[4]+":"+m[5]+":000",A=+h;return(o.utc(E).valueOf()-(A-=A%1e3))/6e4},u=i.prototype;u.tz=function(h,f){h===void 0&&(h=a);var p,m=this.utcOffset(),g=this.toDate(),y=g.toLocaleString("en-US",{timeZone:h}),v=Math.round((g-new Date(y))/1e3/60),b=15*-Math.round(g.getTimezoneOffset()/15)-v;if(!Number(b))p=this.utcOffset(0,f);else if(p=o(y,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(b,!0),f){var C=p.utcOffset();p=p.add(m-C,"minute")}return p.$x.$timezone=h,p},u.offsetName=function(h){var f=this.$x.$timezone||o.tz.guess(),p=l(this.valueOf(),f,{timeZoneName:h}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var d=u.startOf;u.startOf=function(h,f){if(!this.$x||!this.$x.$timezone)return d.call(this,h,f);var p=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(p,h,f).tz(this.$x.$timezone,!0)},o.tz=function(h,f,p){var m=p&&f,g=p||f||a,y=c(+o(),g);if(typeof h!="string")return o(h).tz(g);var v=function(k,E,A){var $=k-60*E*1e3,P=c($,A);if(E===P)return[$,E];var O=c($-=60*(P-E)*1e3,A);return P===O?[$,P]:[k-60*Math.min(P,O)*1e3,Math.max(P,O)]}(o.utc(h,m).valueOf(),y,g),b=v[0],C=v[1],_=o(b).utcOffset(C);return _.$x.$timezone=g,_},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(h){a=h}}})})(c_);var kR=c_.exports;const u_=ss(kR);var d_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(an,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,o,a){var l=o.prototype;a.utc=function(m){var g={date:m,utc:!0,args:arguments};return new o(g)},l.utc=function(m){var g=a(this.toDate(),{locale:this.$L,utc:!0});return m?g.add(this.utcOffset(),n):g},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var u=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var d=l.utcOffset;l.utcOffset=function(m,g){var y=this.$utils().u;if(y(m))return this.$u?0:y(this.$offset)?d.call(this):this.$offset;if(typeof m=="string"&&(m=function(_){_===void 0&&(_="");var k=_.match(r);if(!k)return null;var E=(""+k[0]).match(s)||["-",0,0],A=E[0],$=60*+E[1]+ +E[2];return $===0?0:A==="+"?$:-$}(m),m===null))return this;var v=Math.abs(m)<=16?60*m:m,b=this;if(g)return b.$offset=v,b.$u=m===0,b;if(m!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(v+C,n)).$offset=v,b.$x.$localOffset=C}else b=this.utc();return b};var h=l.format;l.format=function(m){var g=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,g)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var f=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var p=l.diff;l.diff=function(m,g,y){if(m&&this.$u===m.$u)return p.call(this,m,g,y);var v=this.local(),b=a(m).local();return p.call(v,b,g,y)}}})})(d_);var MR=d_.exports;const h_=ss(MR);ce.extend(h_),ce.extend(u_);const OR={addMonth:()=>{},addWeek:()=>{},subtractMonth:()=>{},subtractWeek:()=>{},isWeekDay:!0,isWeekend:!0,isMondayStart:!1,calendarType:"month",lang:"ko",excludeDates:[]},Ni=x.createContext(OR),$R=t=>{const{children:e}=t,[n,r]=x.useState(ce(t.currentDate).toString()),[s,i]=x.useState(ce(t.currentDate).set("date",1).toString()),[o,a]=x.useState(ce(t.currentDate).startOf("week").toString()),l=(c=1,u)=>{const d=ce(n).add(c,u).format("YYYY-MM-DD");r(d),a(ce(d).startOf("week").format("YYYY-MM-DD")),i(ce(d).set("date",1).format("YYYY-MM-DD"))};return x.useEffect(()=>{t.currentDate&&(r(ce(t.currentDate).toString()),i(ce(t.currentDate).set("date",1).format("YYYY-MM-DD")),a(ce(t.currentDate).startOf("week").format("YYYY-MM-DD")))},[t.currentDate]),S.jsx(Ni.Provider,{value:{...t,currentDate:n,currentMonthFirst:s,currentWeekFirst:o,addWeek:(c=1)=>l.call(null,c,"week"),addMonth:(c=1)=>l.call(null,c,"month"),subtractWeek:(c=1)=>l.call(null,c*-1,"week"),subtractMonth:(c=1)=>l.call(null,c*-1,"month"),isWeekend:t.isWeekend??!0,isWeekDay:t.isWeekDay??!0,isMondayStart:t.isMondayStart??!1,calendarType:t.calendarType??"month",handleDatePress:t.handleDatePress,selectedDate:t.selectedDate,excludeDates:t.excludeDates},children:e})},PR=new Map([["ko",["일","월","화","수","목","금","토"]],["en",["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]],["ja",["日","月","火","水","木","金","土"]],["zh",["日","一","二","三","四","五","六"]],["vi",["CN","T2","T3","T4","T5","T6","T7"]],["fr",["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]],["de",["So","Mo","Di","Mi","Do","Fr","Sa"]],["es",["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]],["it",["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]],["ru",["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]]]),DR=({columns:t,start:e,end:n,isMondayStart:r=!1,isWeekDay:s=!0,isWeekend:i=!0})=>{const o=[...t];let a=e.day();r&&(a=a===0?6:a-1);const l=a;if(l>0){const d=ce(e).subtract(1,"day");for(let h=0;h<l;h++){const f=ce(d).subtract(h,"day"),p=f.day();(s&&p>=1&&p<=5||i&&(p===0||p===6))&&o.unshift(f)}}let c=n.day();r&&(c=c===0?6:c-1);const u=6-c;if(u>0)for(let d=1;d<=u;d++){const h=ce(n).add(d,"day"),f=h.day();(s&&f>=1&&f<=5||i&&(f===0||f===6))&&o.push(h)}return o},RR=({date:t,isWeekDay:e=!0,isWeekend:n=!0,isMondayStart:r=!1})=>{const s=ce(t).startOf("month"),i=ce(t).endOf("month"),o=ce(i).get("date"),a=[];for(let c=0;c<o;c++){const u=ce(s).add(c,"day"),d=u.day();e&&d>=1&&d<=5&&a.push(u),n&&(d===0||d===6)&&a.push(u)}return DR({columns:a,start:s,end:i,isMondayStart:r,isWeekDay:e,isWeekend:n})},IR=({date:t,isWeekDay:e=!0,isWeekend:n=!0,isMondayStart:r=!1})=>{const s=ce(t).startOf("week").add(r?1:0,"day"),i=[],o=[ce(s).add(6,"day"),ce(s).add(0,"day")],a=new Array(5).fill(0).map((l,c)=>ce(s).add(c+1,"day"));return e&&!n?a:n&&!e?o:(r?i.push(...a,...o):i.push(o[1],...a,o[0]),i)},f_=(t,e="ko")=>{var n;return(n=PR.get(e))==null?void 0:n[t]},si=qe.bind(TR),NR=t=>{const{as:e,className:n,isFill:r,columnClassName:s,columnAs:i}=t,{handleDatePress:o,excludeDates:a,minDate:l,maxDate:c}=x.useContext(Ni),{currentWeekFirst:u,currentMonthFirst:d,calendarType:h,isWeekend:f,isWeekDay:p,isMondayStart:m,selectedDate:g}=x.useContext(Ni),y=x.useMemo(()=>Array.isArray(g)?{start:g[0]||"",end:g[1]||""}:{start:g||"",end:""},[g]),v=IR({date:u??"",isWeekDay:p,isWeekend:f,isMondayStart:m}),b=RR({date:d??"",isWeekDay:p,isWeekend:f,isMondayStart:m}),C=h==="month"?b:v,_=f&&p?7:f?2:5,k=$=>!!(a!=null&&a.includes($)||l&&ce($).isBefore(l,"day")||c&&ce($).isAfter(c,"day")),E=$=>{if(Array.isArray(g))if(y.start&&!y.end){const P=ce(y.start).isBefore($);o==null||o([P?y.start:$,P?$:y.end]);return}else{o==null||o([$,""]);return}else o==null||o($)},A=()=>C.map($=>{const P=ce(y.start).isSame($,"D"),O=ce(y.end).isSame($,"D");if(i){const R={date:$.format("YYYY-MM-DD"),visible:r?!0:$.isSame(d,"month"),className:s,selected:P||O,onClick:o,disabled:k($.format("YYYY-MM-DD")),between:!!y.start&&!!y.end&&ce(y.start).isBefore($)&&ce(y.end).isAfter($),both:P&&O,start:!!y.start&&!!y.end&&P,end:!!y.start&&!!y.end&&O,columns:C};return x.createElement(i,{key:$.toString(),...R})}return S.jsx("button",{className:si("CalendarBodyColumn",s,{today:$.isSame(ce(),"day"),between:y.start&&y.end&&ce(y.start).isBefore($)&&ce(y.end).isAfter($),both:P&&O,start:y.start&&y.end&&P,end:y.start&&y.end&&O}),disabled:k($.format("YYYY-MM-DD")),style:{visibility:r||$.isSame(d,"month")?"visible":"hidden"},onClick:E==null?void 0:E.bind(null,$.format("YYYY-MM-DD")),children:S.jsx("span",{className:si("CalendarBodyColumnText",{selected:P||O}),children:$.format($.isSame(d,"month")?"D":"M.D")})},$.toString())});return e?e({columns:C,className:n,columnRender:A}):S.jsx("div",{className:si("CalendarBody",n),style:{gridTemplateColumns:`repeat(${_}, 1fr)`,gridTemplateRows:`repeat(${Math.ceil(C.length/_)}, 1fr)`},children:A()})},LR=t=>{const{as:e,className:n,disabled:r,moveValue:s}=t,{calendarType:i,addMonth:o,addWeek:a,maxDate:l,currentMonthFirst:c}=x.useContext(Ni),u=x.useCallback(()=>{i==="month"?o(s):a(s)},[o,a,i,s]),d=r||(l?!!ce(c).isSame(l,"month"):!1);return S.jsx("button",{className:si("CalendarDirectionButton","next",n),onClick:u,disabled:d,children:e?e({disabled:d}):S.jsx(Ke,{name:"GoNext",size:24,color:d?"rgba(0, 0, 0, 0.2)":void 0})})},BR=t=>{const{as:e,className:n,disabled:r,moveValue:s}=t,{calendarType:i,subtractWeek:o,subtractMonth:a,minDate:l,currentMonthFirst:c}=x.useContext(Ni),u=x.useCallback(()=>{i==="month"?a(s):o(s)},[i,a,s,o]),d=r||(l?ce(c).isSame(l,"month"):!1);return S.jsx("button",{className:si("CalendarDirectionButton","prev",n),onClick:u,disabled:d,children:e?e({disabled:d}):S.jsx(Ke,{name:"GoBefore",size:24,color:d?"rgba(0, 0, 0, 0.2)":void 0})})},jR=t=>{const{as:e,column:n=S.jsx(FR,{}),className:r}=t,{isWeekDay:s,isWeekend:i,isMondayStart:o,lang:a}=x.useContext(Ni),l=x.useMemo(()=>{const c=[];if(!s&&!i)return[];const u=s?new Array(5).fill(0).map((h,f)=>f+1):[],d=i?new Array(2).fill(0).map((h,f)=>(f+6)%7):[];return!s&&i?d:(o?c.push(...u,...d):c.push(d[1],...u,d[0]),c.filter(h=>h!==void 0))},[o,s,i]);return e?e({columns:l.map(c=>f_(c,a))}):S.jsx("div",{className:si("CalendarDayTextList",r),style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map(c=>x.cloneElement(n,{key:c,children:f_(c,a),day:c}))})},FR=t=>{const{children:e,day:n,className:r}=t;return S.jsx("p",{className:si("CalednarDayTextColumn",r,{saturday:n===6,sunday:n===0}),children:e})},zR={Root:t=>{const{children:e,className:n,...r}=t;return S.jsx($R,{...r,children:S.jsx("div",{className:si("CaledarRoot",n),children:e})})},HeaderDate:t=>{const{className:e,format:n="YYYY-MM"}=t,{currentDate:r}=x.useContext(Ni);return S.jsx("p",{className:si("CalendarHeaderDate",e),children:ce(r).format(n)})},DayTextList:jR,Prev:BR,Next:LR,Body:NR};/*!
38
+ * @kurkle/color v0.3.4
39
+ * https://github.com/kurkle/color#readme
40
+ * (c) 2024 Jukka Kurkela
41
+ * Released under the MIT License
42
+ */function Ic(t){return t+.5|0}const Li=(t,e,n)=>Math.max(Math.min(t,n),e);function Nc(t){return Li(Ic(t*2.55),0,255)}function Bi(t){return Li(Ic(t*255),0,255)}function ii(t){return Li(Ic(t/2.55)/100,0,1)}function p_(t){return Li(Ic(t*100),0,100)}const Lr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},t0=[..."0123456789ABCDEF"],HR=t=>t0[t&15],VR=t=>t0[(t&240)>>4]+t0[t&15],lh=t=>(t&240)>>4===(t&15),UR=t=>lh(t.r)&&lh(t.g)&&lh(t.b)&&lh(t.a);function qR(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Lr[t[1]]*17,g:255&Lr[t[2]]*17,b:255&Lr[t[3]]*17,a:e===5?Lr[t[4]]*17:255}:(e===7||e===9)&&(n={r:Lr[t[1]]<<4|Lr[t[2]],g:Lr[t[3]]<<4|Lr[t[4]],b:Lr[t[5]]<<4|Lr[t[6]],a:e===9?Lr[t[7]]<<4|Lr[t[8]]:255})),n}const WR=(t,e)=>t<255?e(t):"";function GR(t){var e=UR(t)?HR:VR;return t?"#"+e(t.r)+e(t.g)+e(t.b)+WR(t.a,e):void 0}const YR=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function g_(t,e,n){const r=e*Math.min(n,1-n),s=(i,o=(i+t/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function KR(t,e,n){const r=(s,i=(s+t/60)%6)=>n-n*e*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function ZR(t,e,n){const r=g_(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)r[s]*=1-e-n,r[s]+=e;return r}function XR(t,e,n,r,s){return t===s?(e-n)/r+(e<n?6:0):e===s?(n-t)/r+2:(t-e)/r+4}function n0(t){const n=t.r/255,r=t.g/255,s=t.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),a=(i+o)/2;let l,c,u;return i!==o&&(u=i-o,c=a>.5?u/(2-i-o):u/(i+o),l=XR(n,r,s,u,i),l=l*60+.5),[l|0,c||0,a]}function r0(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Bi)}function s0(t,e,n){return r0(g_,t,e,n)}function QR(t,e,n){return r0(ZR,t,e,n)}function JR(t,e,n){return r0(KR,t,e,n)}function m_(t){return(t%360+360)%360}function eI(t){const e=YR.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?Nc(+e[5]):Bi(+e[5]));const s=m_(+e[2]),i=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?r=QR(s,i,o):e[1]==="hsv"?r=JR(s,i,o):r=s0(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function tI(t,e){var n=n0(t);n[0]=m_(n[0]+e),n=s0(n),t.r=n[0],t.g=n[1],t.b=n[2]}function nI(t){if(!t)return;const e=n0(t),n=e[0],r=p_(e[1]),s=p_(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${s}%, ${ii(t.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const y_={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},b_={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function rI(){const t={},e=Object.keys(b_),n=Object.keys(y_);let r,s,i,o,a;for(r=0;r<e.length;r++){for(o=a=e[r],s=0;s<n.length;s++)i=n[s],a=a.replace(i,y_[i]);i=parseInt(b_[o],16),t[a]=[i>>16&255,i>>8&255,i&255]}return t}let ch;function sI(t){ch||(ch=rI(),ch.transparent=[0,0,0,0]);const e=ch[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const iI=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function oI(t){const e=iI.exec(t);let n=255,r,s,i;if(e){if(e[7]!==r){const o=+e[7];n=e[8]?Nc(o):Li(o*255,0,255)}return r=+e[1],s=+e[3],i=+e[5],r=255&(e[2]?Nc(r):Li(r,0,255)),s=255&(e[4]?Nc(s):Li(s,0,255)),i=255&(e[6]?Nc(i):Li(i,0,255)),{r,g:s,b:i,a:n}}}function aI(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ii(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const i0=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Ua=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function lI(t,e,n){const r=Ua(ii(t.r)),s=Ua(ii(t.g)),i=Ua(ii(t.b));return{r:Bi(i0(r+n*(Ua(ii(e.r))-r))),g:Bi(i0(s+n*(Ua(ii(e.g))-s))),b:Bi(i0(i+n*(Ua(ii(e.b))-i))),a:t.a+n*(e.a-t.a)}}function uh(t,e,n){if(t){let r=n0(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=s0(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function v_(t,e){return t&&Object.assign(e||{},t)}function x_(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Bi(t[3]))):(e=v_(t,{r:0,g:0,b:0,a:1}),e.a=Bi(e.a)),e}function cI(t){return t.charAt(0)==="r"?oI(t):eI(t)}let w_=class aw{constructor(e){if(e instanceof aw)return e;const n=typeof e;let r;n==="object"?r=x_(e):n==="string"&&(r=qR(e)||sI(e)||cI(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=v_(this._rgb);return e&&(e.a=ii(e.a)),e}set rgb(e){this._rgb=x_(e)}rgbString(){return this._valid?aI(this._rgb):void 0}hexString(){return this._valid?GR(this._rgb):void 0}hslString(){return this._valid?nI(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,s=e.rgb;let i;const o=n===i?.5:n,a=2*o-1,l=r.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-c,r.r=255&c*r.r+i*s.r+.5,r.g=255&c*r.g+i*s.g+.5,r.b=255&c*r.b+i*s.b+.5,r.a=o*r.a+(1-o)*s.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=lI(this._rgb,e._rgb,n)),this}clone(){return new aw(this.rgb)}alpha(e){return this._rgb.a=Bi(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Ic(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return uh(this._rgb,2,e),this}darken(e){return uh(this._rgb,2,-e),this}saturate(e){return uh(this._rgb,1,e),this}desaturate(e){return uh(this._rgb,1,-e),this}rotate(e){return tI(this._rgb,e),this}};/*!
43
+ * Chart.js v4.4.7
44
+ * https://www.chartjs.org
45
+ * (c) 2024 Chart.js Contributors
46
+ * Released under the MIT License
47
+ */function oi(){}const uI=(()=>{let t=0;return()=>t++})();function Ge(t){return t==null}function bt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ze(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function cn(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ps(t,e){return cn(t)?t:e}function De(t,e){return typeof t>"u"?e:t}const dI=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,__=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function rt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Je(t,e,n,r){let s,i,o;if(bt(t))for(i=t.length,s=0;s<i;s++)e.call(n,t[s],s);else if(ze(t))for(o=Object.keys(t),i=o.length,s=0;s<i;s++)e.call(n,t[o[s]],o[s])}function dh(t,e){let n,r,s,i;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(s=t[n],i=e[n],s.datasetIndex!==i.datasetIndex||s.index!==i.index)return!1;return!0}function hh(t){if(bt(t))return t.map(hh);if(ze(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let s=0;for(;s<r;++s)e[n[s]]=hh(t[n[s]]);return e}return t}function C_(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function hI(t,e,n,r){if(!C_(t))return;const s=e[t],i=n[t];ze(s)&&ze(i)?Br(s,i,r):e[t]=hh(i)}function Br(t,e,n){const r=bt(e)?e:[e],s=r.length;if(!ze(t))return t;n=n||{};const i=n.merger||hI;let o;for(let a=0;a<s;++a){if(o=r[a],!ze(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)i(l[c],t,o,n)}return t}function Lc(t,e){return Br(t,e,{merger:fI})}function fI(t,e,n){if(!C_(t))return;const r=e[t],s=n[t];ze(r)&&ze(s)?Lc(r,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=hh(s))}const S_={"":t=>t,x:t=>t.x,y:t=>t.y};function pI(t){const e=t.split("."),n=[];let r="";for(const s of e)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function gI(t){const e=pI(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function ji(t,e){return(S_[e]||(S_[e]=gI(e)))(t)}function o0(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Bc=t=>typeof t<"u",Fi=t=>typeof t=="function",E_=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function mI(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const vt=Math.PI,xt=2*vt,yI=xt+vt,fh=Number.POSITIVE_INFINITY,bI=vt/180,Nt=vt/2,Bo=vt/4,A_=vt*2/3,a0=Math.log10,Ds=Math.sign;function jc(t,e,n){return Math.abs(t-e)<n}function T_(t){const e=Math.round(t);t=jc(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(a0(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function vI(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((s,i)=>s-i).pop(),e}function qa(t){return!isNaN(parseFloat(t))&&isFinite(t)}function xI(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function wI(t,e,n){let r,s,i;for(r=0,s=t.length;r<s;r++)i=t[r][n],isNaN(i)||(e.min=Math.min(e.min,i),e.max=Math.max(e.max,i))}function is(t){return t*(vt/180)}function l0(t){return t*(180/vt)}function k_(t){if(!cn(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function M_(t,e){const n=e.x-t.x,r=e.y-t.y,s=Math.sqrt(n*n+r*r);let i=Math.atan2(r,n);return i<-.5*vt&&(i+=xt),{angle:i,distance:s}}function c0(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function _I(t,e){return(t-e+yI)%xt-vt}function vr(t){return(t%xt+xt)%xt}function Fc(t,e,n,r){const s=vr(t),i=vr(e),o=vr(n),a=vr(i-s),l=vr(o-s),c=vr(s-i),u=vr(s-o);return s===i||s===o||r&&i===o||a>l&&c<u}function Sn(t,e,n){return Math.max(e,Math.min(n,t))}function CI(t){return Sn(t,-32768,32767)}function ai(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function u0(t,e,n){n=n||(o=>t[o]<e);let r=t.length-1,s=0,i;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const jo=(t,e,n,r)=>u0(t,n,r?s=>{const i=t[s][e];return i<n||i===n&&t[s+1][e]===n}:s=>t[s][e]<n),SI=(t,e,n)=>u0(t,n,r=>t[r][e]>=n);function EI(t,e,n){let r=0,s=t.length;for(;r<s&&t[r]<e;)r++;for(;s>r&&t[s-1]>n;)s--;return r>0||s<t.length?t.slice(r,s):t}const O_=["push","pop","shift","splice","unshift"];function AI(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),O_.forEach(n=>{const r="_onData"+o0(n),s=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...i){const o=s.apply(this,i);return t._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...i)}),o}})})}function $_(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(e);s!==-1&&r.splice(s,1),!(r.length>0)&&(O_.forEach(i=>{delete t[i]}),delete t._chartjs)}function P_(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const D_=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function R_(t,e){let n=[],r=!1;return function(...s){n=s,r||(r=!0,D_.call(window,()=>{r=!1,t.apply(e,n)}))}}function TI(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const d0=t=>t==="start"?"left":t==="end"?"right":"center",En=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,kI=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function I_(t,e,n){const r=e.length;let s=0,i=r;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:u,minDefined:d,maxDefined:h}=o.getUserBounds();d&&(s=Sn(Math.min(jo(a,l,c).lo,n?r:jo(e,l,o.getPixelForValue(c)).lo),0,r-1)),h?i=Sn(Math.max(jo(a,o.axis,u,!0).hi+1,n?0:jo(e,l,o.getPixelForValue(u),!0).hi+1),s,r)-s:i=r-s}return{start:s,count:i}}function N_(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=s,!0;const i=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,s),i}const ph=t=>t===0||t===1,L_=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*xt/n)),B_=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*xt/n)+1,zc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Nt)+1,easeOutSine:t=>Math.sin(t*Nt),easeInOutSine:t=>-.5*(Math.cos(vt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ph(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ph(t)?t:L_(t,.075,.3),easeOutElastic:t=>ph(t)?t:B_(t,.075,.3),easeInOutElastic(t){return ph(t)?t:t<.5?.5*L_(t*2,.1125,.45):.5+.5*B_(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-zc.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?zc.easeInBounce(t*2)*.5:zc.easeOutBounce(t*2-1)*.5+.5};function h0(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function j_(t){return h0(t)?t:new w_(t)}function f0(t){return h0(t)?t:new w_(t).saturate(.5).darken(.1).hexString()}const MI=["x","y","borderWidth","radius","tension"],OI=["color","borderColor","backgroundColor"];function $I(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:OI},numbers:{type:"number",properties:MI}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function PI(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const F_=new Map;function DI(t,e){e=e||{};const n=t+JSON.stringify(e);let r=F_.get(n);return r||(r=new Intl.NumberFormat(t,e),F_.set(n,r)),r}function gh(t,e,n){return DI(e,n).format(t)}const z_={values(t){return bt(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let s,i=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),i=RI(t,n)}const o=a0(Math.abs(i)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),gh(t,r,l)},logarithmic(t,e,n){if(t===0)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(a0(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?z_.numeric.call(this,t,e,n):""}};function RI(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var p0={formatters:z_};function II(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:p0.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Fo=Object.create(null),g0=Object.create(null);function Hc(t,e){if(!e)return t;const n=e.split(".");for(let r=0,s=n.length;r<s;++r){const i=n[r];t=t[i]||(t[i]=Object.create(null))}return t}function m0(t,e,n){return typeof e=="string"?Br(Hc(t,e),n):Br(Hc(t,""),e)}class NI{constructor(e,n){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=r=>r.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=(r,s)=>f0(s.backgroundColor),this.hoverBorderColor=(r,s)=>f0(s.borderColor),this.hoverColor=(r,s)=>f0(s.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(e),this.apply(n)}set(e,n){return m0(this,e,n)}get(e){return Hc(this,e)}describe(e,n){return m0(g0,e,n)}override(e,n){return m0(Fo,e,n)}route(e,n,r,s){const i=Hc(this,e),o=Hc(this,r),a="_"+n;Object.defineProperties(i,{[a]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[s];return ze(l)?Object.assign({},c,l):De(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var kt=new NI({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[$I,PI,II]);function LI(t){return!t||Ge(t.size)||Ge(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function mh(t,e,n,r,s){let i=e[s];return i||(i=e[s]=t.measureText(s).width,n.push(s)),i>r&&(r=i),r}function BI(t,e,n,r){r=r||{};let s=r.data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(s=r.data={},i=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,c,u,d,h;for(l=0;l<a;l++)if(d=n[l],d!=null&&!bt(d))o=mh(t,s,i,o,d);else if(bt(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!bt(h)&&(o=mh(t,s,i,o,h));t.restore();const f=i.length/2;if(f>n.length){for(l=0;l<f;l++)delete s[i[l]];i.splice(0,f)}return o}function zo(t,e,n){const r=t.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((e-s)*r)/r+s}function H_(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function y0(t,e,n,r){V_(t,e,n,r,null)}function V_(t,e,n,r,s){let i,o,a,l,c,u,d,h;const f=e.pointStyle,p=e.rotation,m=e.radius;let g=(p||0)*bI;if(f&&typeof f=="object"&&(i=f.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(g),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),f){default:s?t.ellipse(n,r,s/2,m,0,0,xt):t.arc(n,r,m,0,xt),t.closePath();break;case"triangle":u=s?s/2:m,t.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=A_,t.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=A_,t.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),t.closePath();break;case"rectRounded":c=m*.516,l=m-c,o=Math.cos(g+Bo)*l,d=Math.cos(g+Bo)*(s?s/2-c:l),a=Math.sin(g+Bo)*l,h=Math.sin(g+Bo)*(s?s/2-c:l),t.arc(n-d,r-a,c,g-vt,g-Nt),t.arc(n+h,r-o,c,g-Nt,g),t.arc(n+d,r+a,c,g,g+Nt),t.arc(n-h,r+o,c,g+Nt,g+vt),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,u=s?s/2:l,t.rect(n-u,r-l,2*u,2*l);break}g+=Bo;case"rectRot":d=Math.cos(g)*(s?s/2:m),o=Math.cos(g)*m,a=Math.sin(g)*m,h=Math.sin(g)*(s?s/2:m),t.moveTo(n-d,r-a),t.lineTo(n+h,r-o),t.lineTo(n+d,r+a),t.lineTo(n-h,r+o),t.closePath();break;case"crossRot":g+=Bo;case"cross":d=Math.cos(g)*(s?s/2:m),o=Math.cos(g)*m,a=Math.sin(g)*m,h=Math.sin(g)*(s?s/2:m),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"star":d=Math.cos(g)*(s?s/2:m),o=Math.cos(g)*m,a=Math.sin(g)*m,h=Math.sin(g)*(s?s/2:m),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o),g+=Bo,d=Math.cos(g)*(s?s/2:m),o=Math.cos(g)*m,a=Math.sin(g)*m,h=Math.sin(g)*(s?s/2:m),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"line":o=s?s/2:Math.cos(g)*m,a=Math.sin(g)*m,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(g)*(s?s/2:m),r+Math.sin(g)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function li(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function yh(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function bh(t){t.restore()}function jI(t,e,n,r,s){if(!e)return t.lineTo(n.x,n.y);if(s==="middle"){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else s==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function FI(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function zI(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Ge(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function HI(t,e,n,r,s){if(s.strikethrough||s.underline){const i=t.measureText(r),o=e-i.actualBoundingBoxLeft,a=e+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,c=n+i.actualBoundingBoxDescent,u=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,u),t.lineTo(a,u),t.stroke()}}function VI(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Ho(t,e,n,r,s,i={}){const o=bt(e)?e:[e],a=i.strokeWidth>0&&i.strokeColor!=="";let l,c;for(t.save(),t.font=s.string,zI(t,i),l=0;l<o.length;++l)c=o[l],i.backdrop&&VI(t,i.backdrop),a&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),Ge(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(c,n,r,i.maxWidth)),t.fillText(c,n,r,i.maxWidth),HI(t,n,r,c,i),r+=Number(s.lineHeight);t.restore()}function Vc(t,e){const{x:n,y:r,w:s,h:i,radius:o}=e;t.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*vt,vt,!0),t.lineTo(n,r+i-o.bottomLeft),t.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,vt,Nt,!0),t.lineTo(n+s-o.bottomRight,r+i),t.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Nt,0,!0),t.lineTo(n+s,r+o.topRight),t.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-Nt,!0),t.lineTo(n+o.topLeft,r)}const UI=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,qI=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function WI(t,e){const n=(""+t).match(UI);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const GI=t=>+t||0;function b0(t,e){const n={},r=ze(e),s=r?Object.keys(e):e,i=ze(t)?r?o=>De(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of s)n[o]=GI(i(o));return n}function U_(t){return b0(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Vo(t){return b0(t,["topLeft","topRight","bottomLeft","bottomRight"])}function yn(t){const e=U_(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ut(t,e){t=t||{},e=e||kt.font;let n=De(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=De(t.style,e.style);r&&!(""+r).match(qI)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:De(t.family,e.family),lineHeight:WI(De(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:De(t.weight,e.weight),string:""};return s.string=LI(s),s}function At(t,e,n,r){let s,i,o;for(s=0,i=t.length;s<i;++s)if(o=t[s],o!==void 0&&(e!==void 0&&typeof o=="function"&&(o=o(e)),n!==void 0&&bt(o)&&(o=o[n%o.length]),o!==void 0))return o}function YI(t,e,n){const{min:r,max:s}=t,i=__(e,(s-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(i)),max:o(s,i)}}function zi(t,e){return Object.assign(Object.create(t),e)}function v0(t,e=[""],n,r,s=()=>t[0]){const i=n||t;typeof r>"u"&&(r=K_("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>v0([a,...t],e,i,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return W_(a,l,()=>nN(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Z_(a).includes(l)},ownKeys(a){return Z_(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Wa(t,e,n,r){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:q_(t,r),setContext:i=>Wa(t,i,n,r),override:i=>Wa(t.override(i),e,n,r)};return new Proxy(s,{deleteProperty(i,o){return delete i[o],delete t[o],!0},get(i,o,a){return W_(i,o,()=>ZI(i,o,a))},getOwnPropertyDescriptor(i,o){return i._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(i,o,a){return t[o]=a,delete i[o],!0}})}function q_(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:r,isScriptable:Fi(n)?n:()=>n,isIndexable:Fi(r)?r:()=>r}}const KI=(t,e)=>t?t+o0(e):e,x0=(t,e)=>ze(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function W_(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const r=n();return t[e]=r,r}function ZI(t,e,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=t;let a=r[e];return Fi(a)&&o.isScriptable(e)&&(a=XI(e,a,t,n)),bt(a)&&a.length&&(a=QI(e,a,t,o.isIndexable)),x0(e,a)&&(a=Wa(a,s,i&&i[e],o)),a}function XI(t,e,n,r){const{_proxy:s,_context:i,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(i,o||r);return a.delete(t),x0(t,l)&&(l=w0(s._scopes,s,t,l)),l}function QI(t,e,n,r){const{_proxy:s,_context:i,_subProxy:o,_descriptors:a}=n;if(typeof i.index<"u"&&r(t))return e[i.index%e.length];if(ze(e[0])){const l=e,c=s._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=w0(c,s,t,u);e.push(Wa(d,i,o&&o[t],a))}}return e}function G_(t,e,n){return Fi(t)?t(e,n):t}const JI=(t,e)=>t===!0?e:typeof t=="string"?ji(e,t):void 0;function eN(t,e,n,r,s){for(const i of e){const o=JI(n,i);if(o){t.add(o);const a=G_(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function w0(t,e,n,r){const s=e._rootScopes,i=G_(e._fallback,n,r),o=[...t,...s],a=new Set;a.add(r);let l=Y_(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=Y_(a,o,i,l,r),l===null)?!1:v0(Array.from(a),[""],s,i,()=>tN(e,n,r))}function Y_(t,e,n,r,s){for(;n;)n=eN(t,e,n,r,s);return n}function tN(t,e,n){const r=t._getTarget();e in r||(r[e]={});const s=r[e];return bt(s)&&ze(n)?n:s||{}}function nN(t,e,n,r){let s;for(const i of e)if(s=K_(KI(i,t),n),typeof s<"u")return x0(t,s)?w0(n,r,t,s):s}function K_(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function Z_(t){let e=t._keys;return e||(e=t._keys=rN(t._scopes)),e}function rN(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(s=>!s.startsWith("_")))e.add(r);return Array.from(e)}function X_(t,e,n,r){const{iScale:s}=t,{key:i="r"}=this._parsing,o=new Array(r);let a,l,c,u;for(a=0,l=r;a<l;++a)c=a+n,u=e[c],o[a]={r:s.parse(ji(u,i),c)};return o}const sN=Number.EPSILON||1e-14,Ga=(t,e)=>e<t.length&&!t[e].skip&&t[e],Q_=t=>t==="x"?"y":"x";function iN(t,e,n,r){const s=t.skip?e:t,i=e,o=n.skip?e:n,a=c0(i,s),l=c0(o,i);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,h=r*u;return{previous:{x:i.x-d*(o.x-s.x),y:i.y-d*(o.y-s.y)},next:{x:i.x+h*(o.x-s.x),y:i.y+h*(o.y-s.y)}}}function oN(t,e,n){const r=t.length;let s,i,o,a,l,c=Ga(t,0);for(let u=0;u<r-1;++u)if(l=c,c=Ga(t,u+1),!(!l||!c)){if(jc(e[u],0,sN)){n[u]=n[u+1]=0;continue}s=n[u]/e[u],i=n[u+1]/e[u],a=Math.pow(s,2)+Math.pow(i,2),!(a<=9)&&(o=3/Math.sqrt(a),n[u]=s*o*e[u],n[u+1]=i*o*e[u])}}function aN(t,e,n="x"){const r=Q_(n),s=t.length;let i,o,a,l=Ga(t,0);for(let c=0;c<s;++c){if(o=a,a=l,l=Ga(t,c+1),!a)continue;const u=a[n],d=a[r];o&&(i=(u-o[n])/3,a[`cp1${n}`]=u-i,a[`cp1${r}`]=d-i*e[c]),l&&(i=(l[n]-u)/3,a[`cp2${n}`]=u+i,a[`cp2${r}`]=d+i*e[c])}}function lN(t,e="x"){const n=Q_(e),r=t.length,s=Array(r).fill(0),i=Array(r);let o,a,l,c=Ga(t,0);for(o=0;o<r;++o)if(a=l,l=c,c=Ga(t,o+1),!!l){if(c){const u=c[e]-l[e];s[o]=u!==0?(c[n]-l[n])/u:0}i[o]=a?c?Ds(s[o-1])!==Ds(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}oN(t,s,i),aN(t,i,e)}function vh(t,e,n){return Math.max(Math.min(t,n),e)}function cN(t,e){let n,r,s,i,o,a=li(t[0],e);for(n=0,r=t.length;n<r;++n)o=i,i=a,a=n<r-1&&li(t[n+1],e),i&&(s=t[n],o&&(s.cp1x=vh(s.cp1x,e.left,e.right),s.cp1y=vh(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=vh(s.cp2x,e.left,e.right),s.cp2y=vh(s.cp2y,e.top,e.bottom)))}function uN(t,e,n,r,s){let i,o,a,l;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")lN(t,s);else{let c=r?t[t.length-1]:t[0];for(i=0,o=t.length;i<o;++i)a=t[i],l=iN(c,a,t[Math.min(i+1,o-(r?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}e.capBezierPoints&&cN(t,n)}function _0(){return typeof window<"u"&&typeof document<"u"}function C0(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function xh(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const wh=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function dN(t,e){return wh(t).getPropertyValue(e)}const hN=["top","right","bottom","left"];function Uo(t,e,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=hN[s];r[i]=parseFloat(t[e+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const fN=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function pN(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:s,offsetY:i}=r;let o=!1,a,l;if(fN(s,i,t.target))a=s,l=i;else{const c=e.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function qo(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,s=wh(n),i=s.boxSizing==="border-box",o=Uo(s,"padding"),a=Uo(s,"border","width"),{x:l,y:c,box:u}=pN(t,n),d=o.left+(u&&a.left),h=o.top+(u&&a.top);let{width:f,height:p}=e;return i&&(f-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/f*n.width/r),y:Math.round((c-h)/p*n.height/r)}}function gN(t,e,n){let r,s;if(e===void 0||n===void 0){const i=t&&C0(t);if(!i)e=t.clientWidth,n=t.clientHeight;else{const o=i.getBoundingClientRect(),a=wh(i),l=Uo(a,"border","width"),c=Uo(a,"padding");e=o.width-c.width-l.width,n=o.height-c.height-l.height,r=xh(a.maxWidth,i,"clientWidth"),s=xh(a.maxHeight,i,"clientHeight")}}return{width:e,height:n,maxWidth:r||fh,maxHeight:s||fh}}const _h=t=>Math.round(t*10)/10;function mN(t,e,n,r){const s=wh(t),i=Uo(s,"margin"),o=xh(s.maxWidth,t,"clientWidth")||fh,a=xh(s.maxHeight,t,"clientHeight")||fh,l=gN(t,e,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const h=Uo(s,"border","width"),f=Uo(s,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-i.width),u=Math.max(0,r?c/r:u-i.height),c=_h(Math.min(c,o,l.maxWidth)),u=_h(Math.min(u,a,l.maxHeight)),c&&!u&&(u=_h(c/2)),(e!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=_h(Math.floor(u*r))),{width:c,height:u}}function J_(t,e,n){const r=e||1,s=Math.floor(t.height*r),i=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||o.height!==s||o.width!==i?(t.currentDevicePixelRatio=r,o.height=s,o.width=i,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const yN=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};_0()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function e3(t,e){const n=dN(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Wo(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function bN(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function vN(t,e,n,r){const s={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},o=Wo(t,s,n),a=Wo(s,i,n),l=Wo(i,e,n),c=Wo(o,a,n),u=Wo(a,l,n);return Wo(c,u,n)}const xN=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},wN=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Ya(t,e,n){return t?xN(e,n):wN()}function t3(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function n3(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function r3(t){return t==="angle"?{between:Fc,compare:_I,normalize:vr}:{between:ai,compare:(e,n)=>e-n,normalize:e=>e}}function s3({start:t,end:e,count:n,loop:r,style:s}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:s}}function _N(t,e,n){const{property:r,start:s,end:i}=n,{between:o,normalize:a}=r3(r),l=e.length;let{start:c,end:u,loop:d}=t,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&o(a(e[c%l][r]),s,i);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:t.style}}function i3(t,e,n){if(!n)return[t];const{property:r,start:s,end:i}=n,o=e.length,{compare:a,between:l,normalize:c}=r3(r),{start:u,end:d,loop:h,style:f}=_N(t,e,n),p=[];let m=!1,g=null,y,v,b;const C=()=>l(s,b,y)&&a(s,b)!==0,_=()=>a(i,y)===0||l(i,b,y),k=()=>m||C(),E=()=>!m||_();for(let A=u,$=u;A<=d;++A)v=e[A%o],!v.skip&&(y=c(v[r]),y!==b&&(m=l(y,s,i),g===null&&k()&&(g=a(y,s)===0?A:$),g!==null&&E()&&(p.push(s3({start:g,end:A,loop:h,count:o,style:f})),g=null),$=A,b=y));return g!==null&&p.push(s3({start:g,end:d,loop:h,count:o,style:f})),p}function o3(t,e){const n=[],r=t.segments;for(let s=0;s<r.length;s++){const i=i3(r[s],t.points,e);i.length&&n.push(...i)}return n}function CN(t,e,n,r){let s=0,i=e-1;if(n&&!r)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,n&&(i+=s);i>s&&t[i%e].skip;)i--;return i%=e,{start:s,end:i}}function SN(t,e,n,r){const s=t.length,i=[];let o=e,a=t[e],l;for(l=e+1;l<=n;++l){const c=t[l%s];c.skip||c.stop?a.skip||(r=!1,i.push({start:e%s,end:(l-1)%s,loop:r}),e=o=c.stop?l:null):(o=l,a.skip&&(e=l)),a=c}return o!==null&&i.push({start:e%s,end:o%s,loop:r}),i}function EN(t,e){const n=t.points,r=t.options.spanGaps,s=n.length;if(!s)return[];const i=!!t._loop,{start:o,end:a}=CN(n,s,i,r);if(r===!0)return a3(t,[{start:o,end:a,loop:i}],n,e);const l=a<o?a+s:a,c=!!t._fullLoop&&o===0&&a===s-1;return a3(t,SN(n,o,l,c),n,e)}function a3(t,e,n,r){return!r||!r.setContext||!n?e:AN(t,e,n,r)}function AN(t,e,n,r){const s=t._chart.getContext(),i=l3(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=n.length,c=[];let u=i,d=e[0].start,h=d;function f(p,m,g,y){const v=a?-1:1;if(p!==m){for(p+=l;n[p%l].skip;)p-=v;for(;n[m%l].skip;)m+=v;p%l!==m%l&&(c.push({start:p%l,end:m%l,loop:g,style:y}),u=y,d=m%l)}}for(const p of e){d=a?d:p.start;let m=n[d%l],g;for(h=d+1;h<=p.end;h++){const y=n[h%l];g=l3(r.setContext(zi(s,{type:"segment",p0:m,p1:y,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),TN(g,u)&&f(d,h-1,p.loop,u),m=y,u=g}d<h-1&&f(d,h-1,p.loop,u)}return c}function l3(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function TN(t,e){if(!e)return!1;const n=[],r=function(s,i){return h0(i)?(n.includes(i)||n.push(i),n.indexOf(i)):i};return JSON.stringify(t,r)!==JSON.stringify(e,r)}/*!
48
+ * Chart.js v4.4.7
49
+ * https://www.chartjs.org
50
+ * (c) 2024 Chart.js Contributors
51
+ * Released under the MIT License
52
+ */class kN{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,s){const i=n.listeners[s],o=n.duration;i.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=D_.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const i=r.items;let o=i.length-1,a=!1,l;for(;o>=0;--o)l=i[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(i[o]=i[i.length-1],i.pop());a&&(s.draw(),this._notify(s,r,e,"progress")),i.length||(r.running=!1,this._notify(s,r,e,"complete"),r.initial=!1),n+=i.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var ci=new kN;const c3="transparent",MN={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=j_(t||c3),s=r.valid&&j_(e||c3);return s&&s.valid?s.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class ON{constructor(e,n,r,s){const i=n[r];s=At([e.to,s,i,e.from]);const o=At([e.from,i,s]);this._active=!0,this._fn=e.fn||MN[e.type||typeof o],this._easing=zc[e.easing]||zc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],i=r-this._start,o=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=At([e.to,n,s,e.from]),this._from=At([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,s=this._prop,i=this._from,o=this._loop,a=this._to;let l;if(this._active=i!==a&&(o||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=i;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(i,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class u3{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!ze(e))return;const n=Object.keys(kt.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const i=e[s];if(!ze(i))return;const o={};for(const a of n)o[a]=i[a];(bt(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(e,n){const r=n.options,s=PN(e,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&$N(e.options.$animations,r).then(()=>{e.options=r},()=>{}),i}_createAnimations(e,n){const r=this._properties,s=[],i=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,n));continue}const u=n[c];let d=i[c];const h=r.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){e[c]=u;continue}i[c]=d=new ON(h,e,c,u),s.push(d)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return ci.add(this._chart,r),!0}}function $N(t,e){const n=[],r=Object.keys(e);for(let s=0;s<r.length;s++){const i=t[r[s]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function PN(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function d3(t,e){const n=t&&t.options||{},r=n.reverse,s=n.min===void 0?e:0,i=n.max===void 0?e:0;return{start:r?i:s,end:r?s:i}}function DN(t,e,n){if(n===!1)return!1;const r=d3(t,n),s=d3(e,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function RN(t){let e,n,r,s;return ze(t)?(e=t.top,n=t.right,r=t.bottom,s=t.left):e=n=r=s=t,{top:e,right:n,bottom:r,left:s,disabled:t===!1}}function h3(t,e){const n=[],r=t._getSortedDatasetMetas(e);let s,i;for(s=0,i=r.length;s<i;++s)n.push(r[s].index);return n}function f3(t,e,n,r={}){const s=t.keys,i=r.mode==="single";let o,a,l,c;if(e===null)return;let u=!1;for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===n){if(u=!0,r.all)continue;break}c=t.values[l],cn(c)&&(i||e===0||Ds(e)===Ds(c))&&(e+=c)}return!u&&!r.all?0:e}function IN(t,e){const{iScale:n,vScale:r}=e,s=n.axis==="x"?"x":"y",i=r.axis==="x"?"x":"y",o=Object.keys(t),a=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[s]:u,[i]:t[u]};return a}function S0(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function NN(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function LN(t){const{min:e,max:n,minDefined:r,maxDefined:s}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function BN(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function p3(t,e,n,r){for(const s of e.getMatchingVisibleMetas(r).reverse()){const i=t[s.index];if(n&&i>0||!n&&i<0)return s.index}return null}function g3(t,e){const{chart:n,_cachedMeta:r}=t,s=n._stacks||(n._stacks={}),{iScale:i,vScale:o,index:a}=r,l=i.axis,c=o.axis,u=NN(i,o,r),d=e.length;let h;for(let f=0;f<d;++f){const p=e[f],{[l]:m,[c]:g}=p,y=p._stacks||(p._stacks={});h=y[c]=BN(s,u,m),h[a]=g,h._top=p3(h,o,!0,r.type),h._bottom=p3(h,o,!1,r.type);const v=h._visualValues||(h._visualValues={});v[a]=g}}function E0(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function jN(t,e){return zi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function FN(t,e,n){return zi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Uc(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const s of e){const i=s._stacks;if(!i||i[r]===void 0||i[r][n]===void 0)return;delete i[r][n],i[r]._visualValues!==void 0&&i[r]._visualValues[n]!==void 0&&delete i[r]._visualValues[n]}}}const A0=t=>t==="reset"||t==="none",m3=(t,e)=>e?t:Object.assign({},t),zN=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:h3(n,!0),values:null};class os{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=S0(e.vScale,e),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(e){this.index!==e&&Uc(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,h,f,p)=>d==="x"?h:d==="r"?p:f,i=n.xAxisID=De(r.xAxisID,E0(e,"x")),o=n.yAxisID=De(r.yAxisID,E0(e,"y")),a=n.rAxisID=De(r.rAxisID,E0(e,"r")),l=n.indexAxis,c=n.iAxisID=s(l,i,o,a),u=n.vAxisID=s(l,o,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&$_(this._data,this),e._stacked&&Uc(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(ze(n)){const s=this._cachedMeta;this._data=IN(n,s)}else if(r!==n){if(r){$_(r,this);const s=this._cachedMeta;Uc(s),s._parsed=[]}n&&Object.isExtensible(n)&&AI(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const i=n._stacked;n._stacked=S0(n.vScale,n),n.stack!==r.stack&&(s=!0,Uc(n),n.stack=r.stack),this._resyncElements(e),(s||i!==n._stacked)&&(g3(this,n._parsed),n._stacked=S0(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:s}=this,{iScale:i,_stacked:o}=r,a=i.axis;let l=e===0&&n===s.length?!0:r._sorted,c=e>0&&r._parsed[e-1],u,d,h;if(this._parsing===!1)r._parsed=s,r._sorted=!0,h=s;else{bt(s[e])?h=this.parseArrayData(r,s,e,n):ze(s[e])?h=this.parseObjectData(r,s,e,n):h=this.parsePrimitiveData(r,s,e,n);const f=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+e]=d=h[u],l&&(f()&&(l=!1),c=d);r._sorted=l}o&&g3(this,h)}parsePrimitiveData(e,n,r,s){const{iScale:i,vScale:o}=e,a=i.axis,l=o.axis,c=i.getLabels(),u=i===o,d=new Array(s);let h,f,p;for(h=0,f=s;h<f;++h)p=h+r,d[h]={[a]:u||i.parse(c[p],p),[l]:o.parse(n[p],p)};return d}parseArrayData(e,n,r,s){const{xScale:i,yScale:o}=e,a=new Array(s);let l,c,u,d;for(l=0,c=s;l<c;++l)u=l+r,d=n[u],a[l]={x:i.parse(d[0],u),y:o.parse(d[1],u)};return a}parseObjectData(e,n,r,s){const{xScale:i,yScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let u,d,h,f;for(u=0,d=s;u<d;++u)h=u+r,f=n[h],c[u]={x:i.parse(ji(f,a),h),y:o.parse(ji(f,l),h)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const s=this.chart,i=this._cachedMeta,o=n[e.axis],a={keys:h3(s,!0),values:n._stacks[e.axis]._visualValues};return f3(a,o,i.index,{mode:r})}updateRangeFromParsed(e,n,r,s){const i=r[n.axis];let o=i===null?NaN:i;const a=s&&r._stacks[n.axis];s&&a&&(s.values=a,o=f3(s,i,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const r=this._cachedMeta,s=r._parsed,i=r._sorted&&e===r.iScale,o=s.length,a=this._getOtherScale(e),l=zN(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=LN(a);let h,f;function p(){f=s[h];const m=f[a.axis];return!cn(f[e.axis])||u>m||d<m}for(h=0;h<o&&!(!p()&&(this.updateRangeFromParsed(c,e,f,l),i));++h);if(i){for(h=o-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(c,e,f,l);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let s,i,o;for(s=0,i=n.length;s<i;++s)o=n[s][e.axis],cn(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,s=n.vScale,i=this.getParsed(e);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=RN(De(this.options.clip,DN(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,s=r.data||[],i=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(e,i,a,l),u=a;u<a+l;++u){const d=s[u];d.hidden||(d.active&&c?o.push(d):d.draw(e,i))}for(u=0;u<o.length;++u)o[u].draw(e,i)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const s=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];i=o.$context||(o.$context=FN(this.getContext(),e,o)),i.parsed=this.getParsed(e),i.raw=s.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=jN(this.chart.getContext(),this.index)),i.dataset=s,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=r,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const s=n==="active",i=this._cachedDataOpts,o=e+"-"+n,a=i[o],l=this.enableOptionSharing&&Bc(r);if(a)return m3(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),d=s?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(kt.elements[e]),p=()=>this.getContext(r,s,n),m=c.resolveNamedOptions(h,f,p,d);return m.$shared&&(m.$shared=l,i[o]=Object.freeze(m3(m,l))),m}_resolveAnimations(e,n,r){const s=this.chart,i=this._cachedDataOpts,o=`animation-${n}`,a=i[o];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(e,r,n))}const c=new u3(s,l&&l.animations);return l&&l._cacheable&&(i[o]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||A0(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),s=this._sharedOptions,i=this.getSharedOptions(r),o=this.includeOptions(n,i)||i!==s;return this.updateSharedOptions(i,n,r),{sharedOptions:i,includeOptions:o}}updateElement(e,n,r,s){A0(s)?Object.assign(e,r):this._resolveAnimations(n,s).update(e,r)}updateSharedOptions(e,n,r){e&&!A0(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,s){e.active=s;const i=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(e,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=r.length,i=n.length,o=Math.min(i,s);o&&this.parse(0,o),i>s?this._insertElements(s,i-s,e):i<s&&this._removeElements(i,s-i)}_insertElements(e,n,r=!0){const s=this._cachedMeta,i=s.data,o=e+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(i),a=e;a<o;++a)i[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(e,n),r&&this.updateElements(i,e,n,"reset")}updateElements(e,n,r,s){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const s=r._parsed.splice(e,n);r._stacked&&Uc(r,s)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,s]=e;this[n](r,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}U(os,"defaults",{}),U(os,"datasetElementType",null),U(os,"dataElementType",null);function HN(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let s=0,i=n.length;s<i;s++)r=r.concat(n[s].controller.getAllParsedValues(t));t._cache.$bar=P_(r.sort((s,i)=>s-i))}return t._cache.$bar}function VN(t){const e=t.iScale,n=HN(e,t.type);let r=e._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(Bc(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,i=n.length;s<i;++s)o=e.getPixelForValue(n[s]),l();for(a=void 0,s=0,i=e.ticks.length;s<i;++s)o=e.getPixelForTick(s),l();return r}function UN(t,e,n,r){const s=n.barThickness;let i,o;return Ge(s)?(i=e.min*n.categoryPercentage,o=n.barPercentage):(i=s*r,o=1),{chunk:i/r,ratio:o,start:e.pixels[t]-i/2}}function qN(t,e,n,r){const s=e.pixels,i=s[t];let o=t>0?s[t-1]:null,a=t<s.length-1?s[t+1]:null;const l=n.categoryPercentage;o===null&&(o=i-(a===null?e.end-e.start:a-i)),a===null&&(a=i+i-o);const c=i-(i-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:c}}function WN(t,e,n,r){const s=n.parse(t[0],r),i=n.parse(t[1],r),o=Math.min(s,i),a=Math.max(s,i);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:i,min:o,max:a}}function y3(t,e,n,r){return bt(t)?WN(t,e,n,r):e[n.axis]=n.parse(t,r),e}function b3(t,e,n,r){const s=t.iScale,i=t.vScale,o=s.getLabels(),a=s===i,l=[];let c,u,d,h;for(c=n,u=n+r;c<u;++c)h=e[c],d={},d[s.axis]=a||s.parse(o[c],c),l.push(y3(h,d,i,c));return l}function T0(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function GN(t,e,n){return t!==0?Ds(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function YN(t){let e,n,r,s,i;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(s="end",i="start"):(s="start",i="end"),{start:n,end:r,reverse:e,top:s,bottom:i}}function KN(t,e,n,r){let s=e.borderSkipped;const i={};if(!s){t.borderSkipped=i;return}if(s===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:c,bottom:u}=YN(t);s==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?s=c:(n._bottom||0)===r?s=u:(i[v3(u,o,a,l)]=!0,s=c)),i[v3(s,o,a,l)]=!0,t.borderSkipped=i}function v3(t,e,n,r){return r?(t=ZN(t,e,n),t=x3(t,n,e)):t=x3(t,e,n),t}function ZN(t,e,n){return t===e?n:t===n?e:t}function x3(t,e,n){return t==="start"?e:t==="end"?n:t}function XN(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Hi extends os{parsePrimitiveData(e,n,r,s){return b3(e,n,r,s)}parseArrayData(e,n,r,s){return b3(e,n,r,s)}parseObjectData(e,n,r,s){const{iScale:i,vScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=i.axis==="x"?a:l,u=o.axis==="x"?a:l,d=[];let h,f,p,m;for(h=r,f=r+s;h<f;++h)m=n[h],p={},p[i.axis]=i.parse(ji(m,c),h),d.push(y3(ji(m,u),p,o,h));return d}updateRangeFromParsed(e,n,r,s){super.updateRangeFromParsed(e,n,r,s);const i=r._custom;i&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:r,vScale:s}=n,i=this.getParsed(e),o=i._custom,a=T0(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,r,s){const i=s==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,s);for(let f=n;f<n+r;f++){const p=this.getParsed(f),m=i||Ge(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),g=this._calculateBarIndexPixels(f,u),y=(p._stacks||{})[a.axis],v={horizontal:c,base:m.base,enableBorderRadius:!y||T0(p._custom)||o===y._top||o===y._bottom,x:c?m.head:g.center,y:c?g.center:m.head,height:c?g.size:Math.abs(m.size),width:c?Math.abs(m.size):g.size};h&&(v.options=d||this.resolveDataElementOptions(f,e[f].active?"active":s));const b=v.options||e[f].options;KN(v,b,y,o),XN(v,b,u.ratio),this.updateElement(e[f],f,v,s)}}_getStacks(e,n){const{iScale:r}=this._cachedMeta,s=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),i=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],c=u=>{const d=u._parsed.find(f=>f[r.axis]===l),h=d&&d[u.vScale.axis];if(Ge(h)||isNaN(h))return!0};for(const u of s)if(!(n!==void 0&&c(u))&&((i===!1||o.indexOf(u.stack)===-1||i===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){const s=this._getStacks(e,r),i=n!==void 0?s.indexOf(n):-1;return i===-1?s.length-1:i}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,s=[];let i,o;for(i=0,o=n.data.length;i<o;++i)s.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));const a=e.barThickness;return{min:a||VN(n),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:r,index:s},options:{base:i,minBarLength:o}}=this,a=i||0,l=this.getParsed(e),c=l._custom,u=T0(c);let d=l[n.axis],h=0,f=r?this.applyStack(n,l,r):d,p,m;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&Ds(d)!==Ds(c.barEnd)&&(h=0),h+=d);const g=!Ge(i)&&!u?i:h;let y=n.getPixelForValue(g);if(this.chart.getDataVisibility(e)?p=n.getPixelForValue(h+f):p=y,m=p-y,Math.abs(m)<o){m=GN(m,n,a)*o,d===a&&(y-=m/2);const v=n.getPixelForDecimal(0),b=n.getPixelForDecimal(1),C=Math.min(v,b),_=Math.max(v,b);y=Math.max(Math.min(y,_),C),p=y+m,r&&!u&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(p)-n.getValueForPixel(y))}if(y===n.getPixelForValue(a)){const v=Ds(m)*n.getLineWidthForValue(a)/2;y+=v,m-=v}return{size:m,base:y,head:p,center:p+m/2}}_calculateBarIndexPixels(e,n){const r=n.scale,s=this.options,i=s.skipNull,o=De(s.maxBarThickness,1/0);let a,l;if(n.grouped){const c=i?this._getStackCount(e):n.stackCount,u=s.barThickness==="flex"?qN(e,n,s,c):UN(e,n,s,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(o,u.chunk*u.ratio)}else a=r.getPixelForValue(this.getParsed(e)[r.axis],e),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,r=e.data,s=r.length;let i=0;for(;i<s;++i)this.getParsed(i)[n.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}}U(Hi,"id","bar"),U(Hi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),U(Hi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class qc extends os{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,r,s){const i=super.parsePrimitiveData(e,n,r,s);for(let o=0;o<i.length;o++)i[o]._custom=this.resolveDataElementOptions(o+r).radius;return i}parseArrayData(e,n,r,s){const i=super.parseArrayData(e,n,r,s);for(let o=0;o<i.length;o++){const a=n[r+o];i[o]._custom=De(a[2],this.resolveDataElementOptions(o+r).radius)}return i}parseObjectData(e,n,r,s){const i=super.parseObjectData(e,n,r,s);for(let o=0;o<i.length;o++){const a=n[r+o];i[o]._custom=De(a&&a.r&&+a.r,this.resolveDataElementOptions(o+r).radius)}return i}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let r=e.length-1;r>=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:i}=n,o=this.getParsed(e),a=s.getLabelForValue(o.x),l=i.getLabelForValue(o.y),c=o._custom;return{label:r[e]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,r,s){const i=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=o.axis,d=a.axis;for(let h=n;h<n+r;h++){const f=e[h],p=!i&&this.getParsed(h),m={},g=m[u]=i?o.getPixelForDecimal(.5):o.getPixelForValue(p[u]),y=m[d]=i?a.getBasePixel():a.getPixelForValue(p[d]);m.skip=isNaN(g)||isNaN(y),c&&(m.options=l||this.resolveDataElementOptions(h,f.active?"active":s),i&&(m.options.radius=0)),this.updateElement(f,h,m,s)}}resolveDataElementOptions(e,n){const r=this.getParsed(e);let s=super.resolveDataElementOptions(e,n);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const i=s.radius;return n!=="active"&&(s.radius=0),s.radius+=De(r&&r._custom,i),s}}U(qc,"id","bubble"),U(qc,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),U(qc,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function QN(t,e,n){let r=1,s=1,i=0,o=0;if(e<xt){const a=t,l=a+e,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),h=Math.sin(l),f=(b,C,_)=>Fc(b,a,l,!0)?1:Math.max(C,C*n,_,_*n),p=(b,C,_)=>Fc(b,a,l,!0)?-1:Math.min(C,C*n,_,_*n),m=f(0,c,d),g=f(Nt,u,h),y=p(vt,c,d),v=p(vt+Nt,u,h);r=(m-y)/2,s=(g-v)/2,i=-(m+y)/2,o=-(g+v)/2}return{ratioX:r,ratioY:s,offsetX:i,offsetY:o}}class Go extends os{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=r;else{let i=l=>+r[l];if(ze(r[e])){const{key:l="value"}=this._parsing;i=c=>+ji(r[c],l)}let o,a;for(o=e,a=e+n;o<a;++o)s._parsed[o]=i(o)}}_getRotation(){return is(this.options.rotation-90)}_getCircumference(){return is(this.options.circumference)}_getRotationExtents(){let e=xt,n=-xt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const s=this.chart.getDatasetMeta(r).controller,i=s._getRotation(),o=s._getCircumference();e=Math.min(e,i),n=Math.max(n,i+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:r}=n,s=this._cachedMeta,i=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(dI(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:p,offsetY:m}=QN(d,u,l),g=(r.width-o)/h,y=(r.height-o)/f,v=Math.max(Math.min(g,y)/2,0),b=__(this.options.radius,v),C=Math.max(b*l,0),_=(b-C)/this._getVisibleDatasetWeightTotal();this.offsetX=p*b,this.offsetY=m*b,s.total=this.calculateTotal(),this.outerRadius=b-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(i,0,i.length,e)}_circumference(e,n){const r=this.options,s=this._cachedMeta,i=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*i/xt)}updateElements(e,n,r,s){const i=s==="reset",o=this.chart,a=o.chartArea,c=o.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,h=i&&c.animateScale,f=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:m,includeOptions:g}=this._getSharedOptions(n,s);let y=this._getRotation(),v;for(v=0;v<n;++v)y+=this._circumference(v,i);for(v=n;v<n+r;++v){const b=this._circumference(v,i),C=e[v],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+b,circumference:b,outerRadius:p,innerRadius:f};g&&(_.options=m||this.resolveDataElementOptions(v,C.active?"active":s)),y+=b,this.updateElement(C,v,_,s)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let r=0,s;for(s=0;s<n.length;s++){const i=e._parsed[s];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(r+=Math.abs(i))}return r}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?xt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,s=r.data.labels||[],i=gh(n._parsed[e],r.options.locale);return{label:s[e]||"",value:i}}getMaxBorderWidth(e){let n=0;const r=this.chart;let s,i,o,a,l;if(!e){for(s=0,i=r.data.datasets.length;s<i;++s)if(r.isDatasetVisible(s)){o=r.getDatasetMeta(s),e=o.data,a=o.controller;break}}if(!e)return 0;for(s=0,i=e.length;s<i;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,s=e.length;r<s;++r){const i=this.resolveDataElementOptions(r);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(De(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}U(Go,"id","doughnut"),U(Go,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),U(Go,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),U(Go,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=e.legend.options;return n.labels.map((i,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Wc extends os{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:s=[],_dataset:i}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=I_(n,s,o);this._drawStart=a,this._drawCount=l,N_(n)&&(a=0,l=s.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!i._decimated,r.points=s;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},e),this.updateElements(s,a,l,e)}updateElements(e,n,r,s){const i=s==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,s),h=o.axis,f=a.axis,{spanGaps:p,segment:m}=this.options,g=qa(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||i||s==="none",v=n+r,b=e.length;let C=n>0&&this.getParsed(n-1);for(let _=0;_<b;++_){const k=e[_],E=y?k:{};if(_<n||_>=v){E.skip=!0;continue}const A=this.getParsed(_),$=Ge(A[f]),P=E[h]=o.getPixelForValue(A[h],_),O=E[f]=i||$?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,A,l):A[f],_);E.skip=isNaN(P)||isNaN(O)||$,E.stop=_>0&&Math.abs(A[h]-C[h])>g,m&&(E.parsed=A,E.raw=c.data[_]),d&&(E.options=u||this.resolveDataElementOptions(_,k.active?"active":s)),y||this.updateElement(k,_,E,s),C=A}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return r;const i=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(r,i,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}U(Wc,"id","line"),U(Wc,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),U(Wc,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Gc extends os{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,s=r.data.labels||[],i=gh(n._parsed[e].r,r.options.locale);return{label:s[e]||"",value:i}}parseObjectData(e,n,r,s){return X_.bind(this)(e,n,r,s)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,s)=>{const i=this.getParsed(s).r;!isNaN(i)&&this.chart.getDataVisibility(s)&&(i<n.min&&(n.min=i),i>n.max&&(n.max=i))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,r=e.options,s=Math.min(n.right-n.left,n.bottom-n.top),i=Math.max(s/2,0),o=Math.max(r.cutoutPercentage?i/100*r.cutoutPercentage:1,0),a=(i-o)/e.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,r,s){const i=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*vt;let f=h,p;const m=360/this.countVisibleElements();for(p=0;p<n;++p)f+=this._computeAngle(p,s,m);for(p=n;p<n+r;p++){const g=e[p];let y=f,v=f+this._computeAngle(p,s,m),b=o.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=v,i&&(l.animateScale&&(b=0),l.animateRotate&&(y=v=h));const C={x:u,y:d,innerRadius:0,outerRadius:b,startAngle:y,endAngle:v,options:this.resolveDataElementOptions(p,g.active?"active":s)};this.updateElement(g,p,C,s)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((r,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?is(this.resolveDataElementOptions(e,n).angle||r):0}}U(Gc,"id","polarArea"),U(Gc,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),U(Gc,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=e.legend.options;return n.labels.map((i,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Ch extends Go{}U(Ch,"id","pie"),U(Ch,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Yc extends os{getLabelAndValue(e){const n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,s){return X_.bind(this)(e,n,r,s)}update(e){const n=this._cachedMeta,r=n.dataset,s=n.data||[],i=n.iScale.getLabels();if(r.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:i.length===s.length,options:o};this.updateElement(r,void 0,a,e)}this.updateElements(s,0,s.length,e)}updateElements(e,n,r,s){const i=this._cachedMeta.rScale,o=s==="reset";for(let a=n;a<n+r;a++){const l=e[a],c=this.resolveDataElementOptions(a,l.active?"active":s),u=i.getPointPositionForValue(a,this.getParsed(a).r),d=o?i.xCenter:u.x,h=o?i.yCenter:u.y,f={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:c};this.updateElement(l,a,f,s)}}}U(Yc,"id","radar"),U(Yc,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),U(Yc,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Kc extends os{getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:i}=n,o=this.getParsed(e),a=s.getLabelForValue(o.x),l=i.getLabelForValue(o.y);return{label:r[e]||"",value:"("+a+", "+l+")"}}update(e){const n=this._cachedMeta,{data:r=[]}=n,s=this.chart._animationsDisabled;let{start:i,count:o}=I_(n,r,s);if(this._drawStart=i,this._drawCount=o,N_(n)&&(i=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=r;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,i,o,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,r,s){const i=s==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,s),d=this.getSharedOptions(u),h=this.includeOptions(s,d),f=o.axis,p=a.axis,{spanGaps:m,segment:g}=this.options,y=qa(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||i||s==="none";let b=n>0&&this.getParsed(n-1);for(let C=n;C<n+r;++C){const _=e[C],k=this.getParsed(C),E=v?_:{},A=Ge(k[p]),$=E[f]=o.getPixelForValue(k[f],C),P=E[p]=i||A?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[p],C);E.skip=isNaN($)||isNaN(P)||A,E.stop=C>0&&Math.abs(k[f]-b[f])>y,g&&(E.parsed=k,E.raw=c.data[C]),h&&(E.options=d||this.resolveDataElementOptions(C,_.active?"active":s)),v||this.updateElement(_,C,E,s),b=k}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=e.dataset,s=r.options&&r.options.borderWidth||0;if(!n.length)return s;const i=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,i,o)/2}}U(Kc,"id","scatter"),U(Kc,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),U(Kc,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function Yo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class k0{constructor(e){U(this,"options");this.options=e||{}}static override(e){Object.assign(k0.prototype,e)}init(){}formats(){return Yo()}parse(){return Yo()}format(){return Yo()}add(){return Yo()}diff(){return Yo()}startOf(){return Yo()}endOf(){return Yo()}}var JN={_date:k0};function eL(t,e,n,r){const{controller:s,data:i,_sorted:o}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&o&&i.length){const l=a._reversePixels?SI:jo;if(r){if(s._sharedOptions){const c=i[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(i,e,n-u),h=l(i,e,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(i,e,n)}return{lo:0,hi:i.length-1}}function Zc(t,e,n,r,s){const i=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=i.length;a<l;++a){const{index:c,data:u}=i[a],{lo:d,hi:h}=eL(i[a],e,o,s);for(let f=d;f<=h;++f){const p=u[f];p.skip||r(p,c,f)}}}function tL(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,s){const i=e?Math.abs(r.x-s.x):0,o=n?Math.abs(r.y-s.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function M0(t,e,n,r,s){const i=[];return!s&&!t.isPointInArea(e)||Zc(t,n,e,function(a,l,c){!s&&!li(a,t.chartArea,0)||a.inRange(e.x,e.y,r)&&i.push({element:a,datasetIndex:l,index:c})},!0),i}function nL(t,e,n,r){let s=[];function i(o,a,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],r),{angle:d}=M_(o,{x:e.x,y:e.y});Fc(d,c,u)&&s.push({element:o,datasetIndex:a,index:l})}return Zc(t,n,e,i),s}function rL(t,e,n,r,s,i){let o=[];const a=tL(n);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(e.x,e.y,s);if(r&&!f)return;const p=u.getCenterPoint(s);if(!(!!i||t.isPointInArea(p))&&!f)return;const g=a(e,p);g<l?(o=[{element:u,datasetIndex:d,index:h}],l=g):g===l&&o.push({element:u,datasetIndex:d,index:h})}return Zc(t,n,e,c),o}function O0(t,e,n,r,s,i){return!i&&!t.isPointInArea(e)?[]:n==="r"&&!r?nL(t,e,n,s):rL(t,e,n,r,s,i)}function w3(t,e,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Zc(t,n,e,(l,c,u)=>{l[o]&&l[o](e[n],s)&&(i.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,s))}),r&&!a?[]:i}var sL={evaluateInteractionItems:Zc,modes:{index(t,e,n,r){const s=qo(e,t),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?M0(t,s,i,r,o):O0(t,s,i,!1,r,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(t,e,n,r){const s=qo(e,t),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?M0(t,s,i,r,o):O0(t,s,i,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(t,e,n,r){const s=qo(e,t),i=n.axis||"xy",o=n.includeInvisible||!1;return M0(t,s,i,r,o)},nearest(t,e,n,r){const s=qo(e,t),i=n.axis||"xy",o=n.includeInvisible||!1;return O0(t,s,i,n.intersect,r,o)},x(t,e,n,r){const s=qo(e,t);return w3(t,s,"x",n.intersect,r)},y(t,e,n,r){const s=qo(e,t);return w3(t,s,"y",n.intersect,r)}}};const _3=["left","top","right","bottom"];function Xc(t,e){return t.filter(n=>n.pos===e)}function C3(t,e){return t.filter(n=>_3.indexOf(n.pos)===-1&&n.box.axis===e)}function Qc(t,e){return t.sort((n,r)=>{const s=e?r:n,i=e?n:r;return s.weight===i.weight?s.index-i.index:s.weight-i.weight})}function iL(t){const e=[];let n,r,s,i,o,a;for(n=0,r=(t||[]).length;n<r;++n)s=t[n],{position:i,options:{stack:o,stackWeight:a=1}}=s,e.push({index:n,box:s,pos:i,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&i+o,stackWeight:a});return e}function oL(t){const e={};for(const n of t){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!_3.includes(s))continue;const o=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return e}function aL(t,e){const n=oL(t),{vBoxMaxWidth:r,hBoxMaxHeight:s}=e;let i,o,a;for(i=0,o=t.length;i<o;++i){a=t[i];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&e.availableWidth,a.height=s):(a.width=r,a.height=u?u*s:l&&e.availableHeight)}return n}function lL(t){const e=iL(t),n=Qc(e.filter(c=>c.box.fullSize),!0),r=Qc(Xc(e,"left"),!0),s=Qc(Xc(e,"right")),i=Qc(Xc(e,"top"),!0),o=Qc(Xc(e,"bottom")),a=C3(e,"x"),l=C3(e,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:Xc(e,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function S3(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function E3(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function cL(t,e,n,r){const{pos:s,box:i}=n,o=t.maxPadding;if(!ze(s)){n.size&&(t[s]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?i.height:i.width),n.size=d.size/d.count,t[s]+=n.size}i.getPadding&&E3(o,i.getPadding());const a=Math.max(0,e.outerWidth-S3(o,t,"left","right")),l=Math.max(0,e.outerHeight-S3(o,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function uL(t){const e=t.maxPadding;function n(r){const s=Math.max(e[r]-t[r],0);return t[r]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function dL(t,e){const n=e.maxPadding;function r(s){const i={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{i[o]=Math.max(e[o],n[o])}),i}return r(t?["left","right"]:["top","bottom"])}function Jc(t,e,n,r){const s=[];let i,o,a,l,c,u;for(i=0,o=t.length,c=0;i<o;++i){a=t[i],l=a.box,l.update(a.width||e.w,a.height||e.h,dL(a.horizontal,e));const{same:d,other:h}=cL(e,n,a,r);c|=d&&s.length,u=u||h,l.fullSize||s.push(a)}return c&&Jc(s,e,n,r)||u}function Sh(t,e,n,r,s){t.top=n,t.left=e,t.right=e+r,t.bottom=n+s,t.width=r,t.height=s}function A3(t,e,n,r){const s=n.padding;let{x:i,y:o}=e;for(const a of t){const l=a.box,c=r[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=e.w*u,h=c.size||l.height;Bc(c.start)&&(o=c.start),l.fullSize?Sh(l,s.left,o,n.outerWidth-s.right-s.left,h):Sh(l,e.left+c.placed,o,d,h),c.start=o,c.placed+=d,o=l.bottom}else{const d=e.h*u,h=c.size||l.width;Bc(c.start)&&(i=c.start),l.fullSize?Sh(l,i,s.top,h,n.outerHeight-s.bottom-s.top):Sh(l,i,e.top+c.placed,h,d),c.start=i,c.placed+=d,i=l.right}}e.x=i,e.y=o}var jr={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const s=yn(t.options.layout.padding),i=Math.max(e-s.width,0),o=Math.max(n-s.height,0),a=lL(t.boxes),l=a.vertical,c=a.horizontal;Je(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,g)=>g.box.options&&g.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:i,availableHeight:o,vBoxMaxWidth:i/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},s);E3(h,yn(r));const f=Object.assign({maxPadding:h,w:i,h:o,x:s.left,y:s.top},s),p=aL(l.concat(c),d);Jc(a.fullSize,f,d,p),Jc(l,f,d,p),Jc(c,f,d,p)&&Jc(l,f,d,p),uL(f),A3(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,A3(a.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Je(a.chartArea,m=>{const g=m.box;Object.assign(g,t.chartArea),g.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class T3{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,s){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,s?Math.floor(n/s):r)}}isAttached(e){return!0}updateConfig(e){}}class hL extends T3{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Eh="$chartjs",fL={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},k3=t=>t===null||t==="";function pL(t,e){const n=t.style,r=t.getAttribute("height"),s=t.getAttribute("width");if(t[Eh]={initial:{height:r,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",k3(s)){const i=e3(t,"width");i!==void 0&&(t.width=i)}if(k3(r))if(t.style.height==="")t.height=t.width/(e||2);else{const i=e3(t,"height");i!==void 0&&(t.height=i)}return t}const M3=yN?{passive:!0}:!1;function gL(t,e,n){t&&t.addEventListener(e,n,M3)}function mL(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,M3)}function yL(t,e){const n=fL[t.type]||t.type,{x:r,y:s}=qo(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:s!==void 0?s:null}}function Ah(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function bL(t,e,n){const r=t.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Ah(a.addedNodes,r),o=o&&!Ah(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function vL(t,e,n){const r=t.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Ah(a.removedNodes,r),o=o&&!Ah(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const eu=new Map;let O3=0;function $3(){const t=window.devicePixelRatio;t!==O3&&(O3=t,eu.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function xL(t,e){eu.size||window.addEventListener("resize",$3),eu.set(t,e)}function wL(t){eu.delete(t),eu.size||window.removeEventListener("resize",$3)}function _L(t,e,n){const r=t.canvas,s=r&&C0(r);if(!s)return;const i=R_((a,l)=>{const c=s.clientWidth;n(a,l),c<s.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||i(c,u)});return o.observe(s),xL(t,i),o}function $0(t,e,n){n&&n.disconnect(),e==="resize"&&wL(t)}function CL(t,e,n){const r=t.canvas,s=R_(i=>{t.ctx!==null&&n(yL(i,t))},t);return gL(r,e,s),s}class SL extends T3{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(pL(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[Eh])return!1;const r=n[Eh].initial;["height","width"].forEach(i=>{const o=r[i];Ge(o)?n.removeAttribute(i):n.setAttribute(i,o)});const s=r.style||{};return Object.keys(s).forEach(i=>{n.style[i]=s[i]}),n.width=n.width,delete n[Eh],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),o={attach:bL,detach:vL,resize:_L}[n]||CL;s[n]=o(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),s=r[n];if(!s)return;({attach:$0,detach:$0,resize:$0}[n]||mL)(e,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,s){return mN(e,n,r,s)}isAttached(e){const n=e&&C0(e);return!!(n&&n.isConnected)}}function EL(t){return!_0()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?hL:SL}let ui=(Cg=class{constructor(){U(this,"x");U(this,"y");U(this,"active",!1);U(this,"options");U(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return qa(this.x)&&qa(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const s={};return e.forEach(i=>{s[i]=r[i]&&r[i].active()?r[i]._to:this[i]}),s}},U(Cg,"defaults",{}),U(Cg,"defaultRoutes"),Cg);function AL(t,e){const n=t.options.ticks,r=TL(t),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?ML(e):[],o=i.length,a=i[0],l=i[o-1],c=[];if(o>s)return OL(e,c,i,o/s),c;const u=kL(i,e,s);if(o>0){let d,h;const f=o>1?Math.round((l-a)/(o-1)):null;for(Th(e,c,u,Ge(f)?0:a-f,a),d=0,h=o-1;d<h;d++)Th(e,c,u,i[d],i[d+1]);return Th(e,c,u,l,Ge(f)?e.length:l+f),c}return Th(e,c,u),c}function TL(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(r,s))}function kL(t,e,n){const r=$L(t),s=e.length/n;if(!r)return Math.max(s,1);const i=vI(r);for(let o=0,a=i.length-1;o<a;o++){const l=i[o];if(l>s)return l}return Math.max(s,1)}function ML(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function OL(t,e,n,r){let s=0,i=n[0],o;for(r=Math.ceil(r),o=0;o<t.length;o++)o===i&&(e.push(t[o]),s++,i=n[s*r])}function Th(t,e,n,r,s){const i=De(r,0),o=Math.min(De(s,t.length),t.length);let a=0,l,c,u;for(n=Math.ceil(n),s&&(l=s-r,n=l/Math.floor(l/n)),u=i;u<0;)a++,u=Math.round(i+a*n);for(c=Math.max(i,0);c<o;c++)c===u&&(e.push(t[c]),a++,u=Math.round(i+a*n))}function $L(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const PL=t=>t==="left"?"right":t==="right"?"left":t,P3=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,D3=(t,e)=>Math.min(e||t,t);function R3(t,e){const n=[],r=t.length/e,s=t.length;let i=0;for(;i<s;i+=r)n.push(t[Math.floor(i)]);return n}function DL(t,e,n){const r=t.ticks.length,s=Math.min(e,r-1),i=t._startPixel,o=t._endPixel,a=1e-6;let l=t.getPixelForTick(s),c;if(!(n&&(r===1?c=Math.max(l-i,o-l):e===0?c=(t.getPixelForTick(1)-l)/2:c=(l-t.getPixelForTick(s-1))/2,l+=s<e?c:-c,l<i-a||l>o+a)))return l}function RL(t,e){Je(t,n=>{const r=n.gc,s=r.length/2;let i;if(s>e){for(i=0;i<s;++i)delete n.data[r[i]];r.splice(0,s)}})}function tu(t){return t.drawTicks?t.tickLength:0}function I3(t,e){if(!t.display)return 0;const n=Ut(t.font,e),r=yn(t.padding);return(bt(t.text)?t.text.length:1)*n.lineHeight+r.height}function IL(t,e){return zi(t,{scale:e,type:"scale"})}function NL(t,e,n){return zi(t,{tick:n,index:e,type:"tick"})}function LL(t,e,n){let r=d0(t);return(n&&e!=="right"||!n&&e==="right")&&(r=PL(r)),r}function BL(t,e,n,r){const{top:s,left:i,bottom:o,right:a,chart:l}=t,{chartArea:c,scales:u}=l;let d=0,h,f,p;const m=o-s,g=a-i;if(t.isHorizontal()){if(f=En(r,i,a),ze(n)){const y=Object.keys(n)[0],v=n[y];p=u[y].getPixelForValue(v)+m-e}else n==="center"?p=(c.bottom+c.top)/2+m-e:p=P3(t,n,e);h=a-i}else{if(ze(n)){const y=Object.keys(n)[0],v=n[y];f=u[y].getPixelForValue(v)-g+e}else n==="center"?f=(c.left+c.right)/2-g+e:f=P3(t,n,e);p=En(r,o,s),d=n==="left"?-Nt:Nt}return{titleX:f,titleY:p,maxWidth:h,rotation:d}}class Ka extends ui{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:s}=this;return e=Ps(e,Number.POSITIVE_INFINITY),n=Ps(n,Number.NEGATIVE_INFINITY),r=Ps(r,Number.POSITIVE_INFINITY),s=Ps(s,Number.NEGATIVE_INFINITY),{min:Ps(e,r),max:Ps(n,s),minDefined:cn(e),maxDefined:cn(n)}}getMinMax(e){let{min:n,max:r,minDefined:s,maxDefined:i}=this.getUserBounds(),o;if(s&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,e),s||(n=Math.min(n,o.min)),i||(r=Math.max(r,o.max));return n=i&&n>r?r:n,r=s&&n>r?n:r,{min:Ps(n,Ps(r,n)),max:Ps(r,Ps(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){rt(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:s,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=YI(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?R3(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=AL(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){rt(this.options.afterUpdate,[this])}beforeSetDimensions(){rt(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(){rt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),rt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){rt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,s,i;for(r=0,s=e.length;r<s;r++)i=e[r],i.label=rt(n.callback,[i.value,r,e],this)}afterTickToLabelConversion(){rt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){rt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=D3(this.ticks.length,e.ticks.maxTicksLimit),s=n.minRotation||0,i=n.maxRotation;let o=s,a,l,c;if(!this._isVisible()||!n.display||s>=i||r<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Sn(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/r:f/(r-1),d+6>a&&(a=f/(r-(e.offset?.5:1)),l=this.maxHeight-tu(e.grid)-n.padding-I3(e.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=l0(Math.min(Math.asin(Sn((u.highest.height+6)/a,-1,1)),Math.asin(Sn(l/c,-1,1))-Math.asin(Sn(h/c,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){rt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){rt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:s,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=I3(s,n.options.font);if(a?(e.width=this.maxWidth,e.height=tu(i)+l):(e.height=this.maxHeight,e.width=tu(i)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=r.padding*2,p=is(this.labelRotation),m=Math.cos(p),g=Math.sin(p);if(a){const y=r.mirror?0:g*d.width+m*h.height;e.height=Math.min(this.maxHeight,e.height+y+f)}else{const y=r.mirror?0:m*d.width+g*h.height;e.width=Math.min(this.maxWidth,e.width+y+f)}this._calculatePadding(c,u,g,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,s){const{ticks:{align:i,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=s*e.width,f=r*n.height):(h=r*e.height,f=s*n.width):i==="start"?f=n.width:i==="end"?h=e.width:i!=="inner"&&(h=e.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=e.height/2;i==="start"?(u=0,d=e.height):i==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_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(){rt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)Ge(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=R3(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:s,_longestTextCache:i}=this,o=[],a=[],l=Math.floor(n/D3(n,r));let c=0,u=0,d,h,f,p,m,g,y,v,b,C,_;for(d=0;d<n;d+=l){if(p=e[d].label,m=this._resolveTickFontOptions(d),s.font=g=m.string,y=i[g]=i[g]||{data:{},gc:[]},v=m.lineHeight,b=C=0,!Ge(p)&&!bt(p))b=mh(s,y.data,y.gc,b,p),C=v;else if(bt(p))for(h=0,f=p.length;h<f;++h)_=p[h],!Ge(_)&&!bt(_)&&(b=mh(s,y.data,y.gc,b,_),C+=v);o.push(b),a.push(C),c=Math.max(b,c),u=Math.max(C,u)}RL(i,n);const k=o.indexOf(c),E=a.indexOf(u),A=$=>({width:o[$]||0,height:a[$]||0});return{first:A(0),last:A(n-1),widest:A(k),highest:A(E),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return CI(this._alignToPixels?zo(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=NL(this.getContext(),e,r))}return this.$context||(this.$context=IL(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=is(this.labelRotation),r=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),i=this._getLabelSizes(),o=e.autoSkipPadding||0,a=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return this.isHorizontal()?l*r>a*s?a/r:l/s:l*s<a*r?l/r:a/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,s=this.options,{grid:i,position:o,border:a}=s,l=i.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=tu(i),f=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,y=function(F){return zo(r,F,m)};let v,b,C,_,k,E,A,$,P,O,R,H;if(o==="top")v=y(this.bottom),E=this.bottom-h,$=v-g,O=y(e.top)+g,H=e.bottom;else if(o==="bottom")v=y(this.top),O=e.top,H=y(e.bottom)-g,E=v+g,$=this.top+h;else if(o==="left")v=y(this.right),k=this.right-h,A=v-g,P=y(e.left)+g,R=e.right;else if(o==="right")v=y(this.left),P=e.left,R=y(e.right)-g,k=v+g,A=this.left+h;else if(n==="x"){if(o==="center")v=y((e.top+e.bottom)/2+.5);else if(ze(o)){const F=Object.keys(o)[0],V=o[F];v=y(this.chart.scales[F].getPixelForValue(V))}O=e.top,H=e.bottom,E=v+g,$=E+h}else if(n==="y"){if(o==="center")v=y((e.left+e.right)/2);else if(ze(o)){const F=Object.keys(o)[0],V=o[F];v=y(this.chart.scales[F].getPixelForValue(V))}k=v-g,A=k-h,P=e.left,R=e.right}const z=De(s.ticks.maxTicksLimit,d),j=Math.max(1,Math.ceil(d/z));for(b=0;b<d;b+=j){const F=this.getContext(b),V=i.setContext(F),q=a.setContext(F),Q=V.lineWidth,B=V.color,W=q.dash||[],se=q.dashOffset,ne=V.tickWidth,oe=V.tickColor,te=V.tickBorderDash||[],ue=V.tickBorderDashOffset;C=DL(this,b,l),C!==void 0&&(_=zo(r,C,Q),c?k=A=P=R=_:E=$=O=H=_,f.push({tx1:k,ty1:E,tx2:A,ty2:$,x1:P,y1:O,x2:R,y2:H,width:Q,color:B,borderDash:W,borderDashOffset:se,tickWidth:ne,tickColor:oe,tickBorderDash:te,tickBorderDashOffset:ue}))}return this._ticksLength=d,this._borderValue=v,f}_computeLabelItems(e){const n=this.axis,r=this.options,{position:s,ticks:i}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=i,h=tu(r.grid),f=h+u,p=d?-u:f,m=-is(this.labelRotation),g=[];let y,v,b,C,_,k,E,A,$,P,O,R,H="middle";if(s==="top")k=this.bottom-p,E=this._getXAxisLabelAlignment();else if(s==="bottom")k=this.top+p,E=this._getXAxisLabelAlignment();else if(s==="left"){const j=this._getYAxisLabelAlignment(h);E=j.textAlign,_=j.x}else if(s==="right"){const j=this._getYAxisLabelAlignment(h);E=j.textAlign,_=j.x}else if(n==="x"){if(s==="center")k=(e.top+e.bottom)/2+f;else if(ze(s)){const j=Object.keys(s)[0],F=s[j];k=this.chart.scales[j].getPixelForValue(F)+f}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")_=(e.left+e.right)/2-f;else if(ze(s)){const j=Object.keys(s)[0],F=s[j];_=this.chart.scales[j].getPixelForValue(F)}E=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?H="top":l==="end"&&(H="bottom"));const z=this._getLabelSizes();for(y=0,v=a.length;y<v;++y){b=a[y],C=b.label;const j=i.setContext(this.getContext(y));A=this.getPixelForTick(y)+i.labelOffset,$=this._resolveTickFontOptions(y),P=$.lineHeight,O=bt(C)?C.length:1;const F=O/2,V=j.color,q=j.textStrokeColor,Q=j.textStrokeWidth;let B=E;o?(_=A,E==="inner"&&(y===v-1?B=this.options.reverse?"left":"right":y===0?B=this.options.reverse?"right":"left":B="center"),s==="top"?c==="near"||m!==0?R=-O*P+P/2:c==="center"?R=-z.highest.height/2-F*P+P:R=-z.highest.height+P/2:c==="near"||m!==0?R=P/2:c==="center"?R=z.highest.height/2-F*P:R=z.highest.height-O*P,d&&(R*=-1),m!==0&&!j.showLabelBackdrop&&(_+=P/2*Math.sin(m))):(k=A,R=(1-O)*P/2);let W;if(j.showLabelBackdrop){const se=yn(j.backdropPadding),ne=z.heights[y],oe=z.widths[y];let te=R-se.top,ue=0-se.left;switch(H){case"middle":te-=ne/2;break;case"bottom":te-=ne;break}switch(E){case"center":ue-=oe/2;break;case"right":ue-=oe;break;case"inner":y===v-1?ue-=oe:y>0&&(ue-=oe/2);break}W={left:ue,top:te,width:oe+se.width,height:ne+se.height,color:j.backdropColor}}g.push({label:C,font:$,textOffset:R,options:{rotation:m,color:V,strokeColor:q,strokeWidth:Q,textAlign:B,textBaseline:H,translation:[_,k],backdrop:W}})}return g}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-is(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:s,padding:i}}=this.options,o=this._getLabelSizes(),a=e+i,l=o.widest.width;let c,u;return n==="left"?s?(u=this.right+i,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+i,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:s,width:i,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,s,i,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(i=>i.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,o;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(i=0,o=s.length;i<o;++i){const l=s[i];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({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:e,ctx:n,options:{border:r,grid:s}}=this,i=r.setContext(this.getContext()),o=r.display?i.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,h;this.isHorizontal()?(c=zo(e,this.left,o)-o/2,u=zo(e,this.right,a)+a/2,d=h=l):(d=zo(e,this.top,o)-o/2,h=zo(e,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,s=this._computeLabelArea();s&&yh(r,s);const i=this.getLabelItems(e);for(const o of i){const a=o.options,l=o.font,c=o.label,u=o.textOffset;Ho(r,c,0,u,l,a)}s&&bh(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=Ut(r.font),o=yn(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||ze(n)?(l+=o.bottom,bt(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=BL(this,l,n,a);Ho(e,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:h,textAlign:LL(a,n,s),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=De(e.grid&&e.grid.z,-1),s=De(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ka.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",s=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];a[r]===this.id&&(!e||a.type===e)&&s.push(a)}return s}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Ut(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class kh{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;zL(n)&&(r=this.register(n));const s=this.items,i=e.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in s||(s[i]=e,jL(e,o,r),this.override&&kt.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,s=this.scope;r in n&&delete n[r],s&&r in kt[s]&&(delete kt[s][r],this.override&&delete Fo[r])}}function jL(t,e,n){const r=Br(Object.create(null),[n?kt.get(n):{},kt.get(e),t.defaults]);kt.set(e,r),t.defaultRoutes&&FL(e,t.defaultRoutes),t.descriptors&&kt.describe(e,t.descriptors)}function FL(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),s=r.pop(),i=[t].concat(r).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");kt.route(i,s,l,a)})}function zL(t){return"id"in t&&"defaults"in t}let HL=class{constructor(){this.controllers=new kh(os,"datasets",!0),this.elements=new kh(ui,"elements"),this.plugins=new kh(Object,"plugins"),this.scales=new kh(Ka,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(s=>{const i=r||this._getRegistryForType(s);r||i.isForType(s)||i===this.plugins&&s.id?this._exec(e,i,s):Je(s,o=>{const a=r||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,r){const s=o0(e);rt(r["before"+s],[],r),n[e](r),rt(r["after"+s],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const s=n.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return s}};var Vn=new HL;class VL{constructor(){this._init=[]}notify(e,n,r,s){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(i,e,n,r);return n==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,r,s){s=s||{};for(const i of e){const o=i.plugin,a=o[r],l=[n,s,i.options];if(rt(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){Ge(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,s=De(r.options&&r.options.plugins,{}),i=UL(r);return s===!1&&!n?[]:WL(e,i,s,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,s=(i,o)=>i.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,r),e,"stop"),this._notify(s(r,n),e,"start")}}function UL(t){const e={},n=[],r=Object.keys(Vn.plugins.items);for(let i=0;i<r.length;i++)n.push(Vn.getPlugin(r[i]));const s=t.plugins||[];for(let i=0;i<s.length;i++){const o=s[i];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function qL(t,e){return!e&&t===!1?null:t===!0?{}:t}function WL(t,{plugins:e,localIds:n},r,s){const i=[],o=t.getContext();for(const a of e){const l=a.id,c=qL(r[l],s);c!==null&&i.push({plugin:a,options:GL(t.config,{plugin:a,local:n[l]},c,o)})}return i}function GL(t,{plugin:e,local:n},r,s){const i=t.pluginScopeKeys(e),o=t.getOptionScopes(r,i);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function P0(t,e){const n=kt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function YL(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function KL(t,e){return t===e?"_index_":"_value_"}function N3(t){if(t==="x"||t==="y"||t==="r")return t}function ZL(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function D0(t,...e){if(N3(t))return t;for(const n of e){const r=n.axis||ZL(n.position)||t.length>1&&N3(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function L3(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function XL(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return L3(t,"x",n[0])||L3(t,"y",n[0])}return{}}function QL(t,e){const n=Fo[t.type]||{scales:{}},r=e.scales||{},s=P0(t.type,e),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!ze(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=D0(o,a,XL(o,t),kt.scales[a.type]),c=KL(l,s),u=n.scales||{};i[o]=Lc(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||P0(a,e),u=(Fo[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=YL(d,l),f=o[h+"AxisID"]||h;i[f]=i[f]||Object.create(null),Lc(i[f],[{axis:h},r[f],u[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];Lc(a,[kt.scales[a.type],kt.scale])}),i}function B3(t){const e=t.options||(t.options={});e.plugins=De(e.plugins,{}),e.scales=QL(t,e)}function j3(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function JL(t){return t=t||{},t.data=j3(t.data),B3(t),t}const F3=new Map,z3=new Set;function Mh(t,e){let n=F3.get(t);return n||(n=e(),F3.set(t,n),z3.add(n)),n}const nu=(t,e,n)=>{const r=ji(e,n);r!==void 0&&t.add(r)};class eB{constructor(e){this._config=JL(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=j3(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),B3(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Mh(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Mh(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Mh(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Mh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let s=r.get(e);return(!s||n)&&(s=new Map,r.set(e,s)),s}getOptionScopes(e,n,r){const{options:s,type:i}=this,o=this._cachedScopes(e,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{e&&(l.add(e),u.forEach(d=>nu(l,e,d))),u.forEach(d=>nu(l,s,d)),u.forEach(d=>nu(l,Fo[i]||{},d)),u.forEach(d=>nu(l,kt,d)),u.forEach(d=>nu(l,g0,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),z3.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Fo[n]||{},kt.datasets[n]||{},{type:n},kt,g0]}resolveNamedOptions(e,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=H3(this._resolverCache,e,s);let l=o;if(nB(o,n)){i.$shared=!1,r=Fi(r)?r():r;const c=this.createResolver(e,r,a);l=Wa(o,r,c)}for(const c of n)i[c]=l[c];return i}createResolver(e,n,r=[""],s){const{resolver:i}=H3(this._resolverCache,e,r);return ze(n)?Wa(i,n,void 0,s):i}}function H3(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const s=n.join();let i=r.get(s);return i||(i={resolver:v0(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const tB=t=>ze(t)&&Object.getOwnPropertyNames(t).some(e=>Fi(t[e]));function nB(t,e){const{isScriptable:n,isIndexable:r}=q_(t);for(const s of e){const i=n(s),o=r(s),a=(o||i)&&t[s];if(i&&(Fi(a)||tB(a))||o&&bt(a))return!0}return!1}var rB="4.4.7";const sB=["top","bottom","left","right","chartArea"];function V3(t,e){return t==="top"||t==="bottom"||sB.indexOf(t)===-1&&e==="x"}function U3(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function q3(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),rt(n&&n.onComplete,[t],e)}function iB(t){const e=t.chart,n=e.options.animation;rt(n&&n.onProgress,[t],e)}function W3(t){return _0()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Oh={},G3=t=>{const e=W3(t);return Object.values(Oh).filter(n=>n.canvas===e).pop()};function oB(t,e,n){const r=Object.keys(t);for(const s of r){const i=+s;if(i>=e){const o=t[s];delete t[s],(n>0||i>e)&&(t[i+n]=o)}}}function aB(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function $h(t,e,n){return t.options.clip?t[n]:e[n]}function lB(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:$h(n,e,"left"),right:$h(n,e,"right"),top:$h(r,e,"top"),bottom:$h(r,e,"bottom")}:e}let Ko=(To=class{static register(...e){Vn.add(...e),Y3()}static unregister(...e){Vn.remove(...e),Y3()}constructor(e,n){const r=this.config=new eB(n),s=W3(e),i=G3(s);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||EL(s)),this.platform.updateConfig(r);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=uI(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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 VL,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=TI(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Oh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ci.listen(this,"complete",q3),ci.listen(this,"progress",iB),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:s,_aspectRatio:i}=this;return Ge(e)?n&&i?i:s?r/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Vn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():J_(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return H_(this.canvas,this.ctx),this}stop(){return ci.stop(this),this}resize(e,n){ci.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,s=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,n,i),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,J_(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),rt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Je(n,(r,s)=>{r.id=s})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,s=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let i=[];n&&(i=i.concat(Object.keys(n).map(o=>{const a=n[o],l=D0(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Je(i,o=>{const a=o.options,l=a.id,c=D0(l,a),u=De(a.type,o.dtype);(a.position===void 0||V3(a.position,c)!==V3(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const h=Vn.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,e)}),Je(s,(o,a)=>{o||delete r[a]}),Je(r,o=>{jr.configure(this,o,o.options),jr.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((s,i)=>s.index-i.index),r>n){for(let s=n;s<r;++s)this._destroyDatasetMeta(s);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(U3("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,s)=>{n.filter(i=>i===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r<s;r++){const i=n[r];let o=this.getDatasetMeta(r);const a=i.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=i.indexAxis||P0(a,this.options),o.order=i.order||0,o.index=r,o.label=""+i.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Vn.getController(a),{datasetElementType:c,dataElementType:u}=kt.datasets[a];Object.assign(l,{dataElementType:Vn.getElement(u),datasetElementType:c&&Vn.getElement(c)}),o.controller=new l(this,r),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Je(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!s&&i.indexOf(d)===-1;d.buildOrUpdateElements(h),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),s||Je(i,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(U3("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Je(this.scales,e=>{jr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!E_(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:i}of n){const o=r==="_removeElements"?-i:i;oB(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=i=>new Set(e.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),s=r(0);for(let i=1;i<n;i++)if(!E_(s,r(i)))return;return Array.from(s).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;jr.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Je(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,i)=>{s._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Fi(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),s={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(r.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ci.has(this)?this.attached&&!ci.running(this)&&ci.start(this):(this.draw(),q3({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let s,i;for(s=0,i=n.length;s<i;++s){const o=n[s];(!e||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r=e._clip,s=!r.disabled,i=lB(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&yh(n,{left:r.left===!1?0:i.left-r.left,right:r.right===!1?this.width:i.right+r.right,top:r.top===!1?0:i.top-r.top,bottom:r.bottom===!1?this.height:i.bottom+r.bottom}),e.controller.draw(),s&&bh(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return li(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,s){const i=sL.modes[n];return typeof i=="function"?i(this,e,r,s):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let s=r.filter(i=>i&&i._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=zi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const s=r?"show":"hide",i=this.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,s);Bc(n)?(i.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),o.update(i,{visible:r}),this.update(a=>a.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),ci.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),H_(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Oh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(i,o)=>{n.addEventListener(this,i,o),e[i]=o},s=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};Je(this.options.events,i=>r(i,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),e[l]=c},s=(l,c)=>{e[l]&&(n.removeEventListener(this,l,c),delete e[l])},i=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),r("resize",i),r("detach",o)};o=()=>{this.attached=!1,s("resize",i),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Je(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Je(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const s=r?"set":"remove";let i,o,a,l;for(n==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){o=e[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:i,index:o})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[o],index:o}});!dh(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const s=this.options.hover,i=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=i(n,e),a=r?e:i(e,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;const i=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(i||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:s=[],options:i}=this,o=n,a=this._getActiveElements(e,s,r,o),l=mI(e),c=aB(e,this._lastEvent,r,l);r&&(this._lastEvent=null,rt(i.onHover,[e,a,this],this),l&&rt(i.onClick,[e,a,this],this));const u=!dh(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(e,n,r,s){if(e.type==="mouseout")return[];if(!r)return n;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,s)}},U(To,"defaults",kt),U(To,"instances",Oh),U(To,"overrides",Fo),U(To,"registry",Vn),U(To,"version",rB),U(To,"getChart",G3),To);function Y3(){return Je(Ko.instances,t=>t._plugins.invalidate())}function cB(t,e,n){const{startAngle:r,pixelMargin:s,x:i,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(i,o,a,r-c,n+c),l>s?(c=s/l,t.arc(i,o,l,n+c,r-c,!0)):t.arc(i,o,s,n+Nt,r-Nt),t.closePath(),t.clip()}function uB(t){return b0(t,["outerStart","outerEnd","innerStart","innerEnd"])}function dB(t,e,n,r){const s=uB(t.options.borderRadius),i=(n-e)/2,o=Math.min(i,r*e/2),a=l=>{const c=(n-Math.min(i,l))*r/2;return Sn(l,0,Math.min(i,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Sn(s.innerStart,0,o),innerEnd:Sn(s.innerEnd,0,o)}}function Za(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function Ph(t,e,n,r,s,i){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+r+n-c,0),h=u>0?u+r+n+c:0;let f=0;const p=s-l;if(r){const j=u>0?u-r:0,F=d>0?d-r:0,V=(j+F)/2,q=V!==0?p*V/(V+r):p;f=(p-q)/2}const m=Math.max(.001,p*d-n/vt)/d,g=(p-m)/2,y=l+g+f,v=s-g-f,{outerStart:b,outerEnd:C,innerStart:_,innerEnd:k}=dB(e,h,d,v-y),E=d-b,A=d-C,$=y+b/E,P=v-C/A,O=h+_,R=h+k,H=y+_/O,z=v-k/R;if(t.beginPath(),i){const j=($+P)/2;if(t.arc(o,a,d,$,j),t.arc(o,a,d,j,P),C>0){const Q=Za(A,P,o,a);t.arc(Q.x,Q.y,C,P,v+Nt)}const F=Za(R,v,o,a);if(t.lineTo(F.x,F.y),k>0){const Q=Za(R,z,o,a);t.arc(Q.x,Q.y,k,v+Nt,z+Math.PI)}const V=(v-k/h+(y+_/h))/2;if(t.arc(o,a,h,v-k/h,V,!0),t.arc(o,a,h,V,y+_/h,!0),_>0){const Q=Za(O,H,o,a);t.arc(Q.x,Q.y,_,H+Math.PI,y-Nt)}const q=Za(E,y,o,a);if(t.lineTo(q.x,q.y),b>0){const Q=Za(E,$,o,a);t.arc(Q.x,Q.y,b,y-Nt,$)}}else{t.moveTo(o,a);const j=Math.cos($)*d+o,F=Math.sin($)*d+a;t.lineTo(j,F);const V=Math.cos(P)*d+o,q=Math.sin(P)*d+a;t.lineTo(V,q)}t.closePath()}function hB(t,e,n,r,s){const{fullCircles:i,startAngle:o,circumference:a}=e;let l=e.endAngle;if(i){Ph(t,e,n,r,l,s);for(let c=0;c<i;++c)t.fill();isNaN(a)||(l=o+(a%xt||xt))}return Ph(t,e,n,r,l,s),t.fill(),l}function fB(t,e,n,r,s){const{fullCircles:i,startAngle:o,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;t.setLineDash(d||[]),t.lineDashOffset=h,f?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let p=e.endAngle;if(i){Ph(t,e,n,r,p,s);for(let m=0;m<i;++m)t.stroke();isNaN(a)||(p=o+(a%xt||xt))}f&&cB(t,e,p),i||(Ph(t,e,n,r,p,s),t.stroke())}class Xa extends ui{constructor(n){super();U(this,"circumference");U(this,"endAngle");U(this,"fullCircles");U(this,"innerRadius");U(this,"outerRadius");U(this,"pixelMargin");U(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,s){const i=this.getProps(["x","y"],s),{angle:o,distance:a}=M_(i,{x:n,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,p=De(h,c-l),m=Fc(o,l,c)&&l!==c,g=p>=xt||m,y=ai(a,u+f,d+f);return g&&y}getCenterPoint(n){const{x:r,y:s,startAngle:i,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(i+o)/2,h=(a+l+u+c)/2;return{x:r+Math.cos(d)*h,y:s+Math.sin(d)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:s}=this,i=(r.offset||0)/4,o=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=s>xt?Math.floor(s/xt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*i,Math.sin(l)*i);const c=1-Math.sin(Math.min(vt,s||0)),u=i*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,hB(n,this,u,o,a),fB(n,this,u,o,a),n.restore()}}U(Xa,"id","arc"),U(Xa,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),U(Xa,"defaultRoutes",{backgroundColor:"backgroundColor"}),U(Xa,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function K3(t,e,n=e){t.lineCap=De(n.borderCapStyle,e.borderCapStyle),t.setLineDash(De(n.borderDash,e.borderDash)),t.lineDashOffset=De(n.borderDashOffset,e.borderDashOffset),t.lineJoin=De(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=De(n.borderWidth,e.borderWidth),t.strokeStyle=De(n.borderColor,e.borderColor)}function pB(t,e,n){t.lineTo(n.x,n.y)}function gB(t){return t.stepped?jI:t.tension||t.cubicInterpolationMode==="monotone"?FI:pB}function Z3(t,e,n={}){const r=t.length,{start:s=0,end:i=r-1}=n,{start:o,end:a}=e,l=Math.max(s,o),c=Math.min(i,a),u=s<o&&i<o||s>a&&i>a;return{count:r,start:l,loop:e.loop,ilen:c<l&&!u?r+c-l:c-l}}function mB(t,e,n,r){const{points:s,options:i}=e,{count:o,start:a,loop:l,ilen:c}=Z3(s,n,r),u=gB(i);let{move:d=!0,reverse:h}=r||{},f,p,m;for(f=0;f<=c;++f)p=s[(a+(h?c-f:f))%o],!p.skip&&(d?(t.moveTo(p.x,p.y),d=!1):u(t,m,p,h,i.stepped),m=p);return l&&(p=s[(a+(h?c:0))%o],u(t,m,p,h,i.stepped)),!!l}function yB(t,e,n,r){const s=e.points,{count:i,start:o,ilen:a}=Z3(s,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,h,f,p,m,g,y;const v=C=>(o+(c?a-C:C))%i,b=()=>{m!==g&&(t.lineTo(u,g),t.lineTo(u,m),t.lineTo(u,y))};for(l&&(f=s[v(0)],t.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[v(h)],f.skip)continue;const C=f.x,_=f.y,k=C|0;k===p?(_<m?m=_:_>g&&(g=_),u=(d*u+C)/++d):(b(),t.lineTo(C,_),p=k,d=0,m=g=_),y=_}b()}function R0(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?yB:mB}function bB(t){return t.stepped?bN:t.tension||t.cubicInterpolationMode==="monotone"?vN:Wo}function vB(t,e,n,r){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,r)&&s.closePath()),K3(t,e.options),t.stroke(s)}function xB(t,e,n,r){const{segments:s,options:i}=e,o=R0(e);for(const a of s)K3(t,i,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const wB=typeof Path2D=="function";function _B(t,e,n,r){wB&&!e.options.segment?vB(t,e,n,r):xB(t,e,n,r)}class Vi extends ui{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const s=r.spanGaps?this._loop:this._fullLoop;uN(this._points,r,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=EN(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,s=e[n],i=this.points,o=o3(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=bB(r);let c,u;for(c=0,u=o.length;c<u;++c){const{start:d,end:h}=o[c],f=i[d],p=i[h];if(f===p){a.push(f);continue}const m=Math.abs((s-f[n])/(p[n]-f[n])),g=l(f,p,m,r.stepped);g[n]=e[n],a.push(g)}return a.length===1?a[0]:a}pathSegment(e,n,r){return R0(this)(e,this,n,r)}path(e,n,r){const s=this.segments,i=R0(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of s)o&=i(e,this,a,{start:n,end:n+r-1});return!!o}draw(e,n,r,s){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),_B(e,this,r,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}U(Vi,"id","line"),U(Vi,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),U(Vi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),U(Vi,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function X3(t,e,n,r){const s=t.options,{[n]:i}=t.getProps([n],r);return Math.abs(e-i)<s.radius+s.hitRadius}class ru extends ui{constructor(n){super();U(this,"parsed");U(this,"skip");U(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,s){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],s);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(n,r){return X3(this,n,"x",r)}inYRange(n,r){return X3(this,n,"y",r)}getCenterPoint(n){const{x:r,y:s}=this.getProps(["x","y"],n);return{x:r,y:s}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const s=r&&n.borderWidth||0;return(r+s)*2}draw(n,r){const s=this.options;this.skip||s.radius<.1||!li(this,r,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,y0(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}U(ru,"id","point"),U(ru,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),U(ru,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Q3(t,e){const{x:n,y:r,base:s,width:i,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,c,u,d;return t.horizontal?(d=o/2,a=Math.min(n,s),l=Math.max(n,s),c=r-d,u=r+d):(d=i/2,a=n-d,l=n+d,c=Math.min(r,s),u=Math.max(r,s)),{left:a,top:c,right:l,bottom:u}}function Ui(t,e,n,r){return t?0:Sn(e,n,r)}function CB(t,e,n){const r=t.options.borderWidth,s=t.borderSkipped,i=U_(r);return{t:Ui(s.top,i.top,0,n),r:Ui(s.right,i.right,0,e),b:Ui(s.bottom,i.bottom,0,n),l:Ui(s.left,i.left,0,e)}}function SB(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,i=Vo(s),o=Math.min(e,n),a=t.borderSkipped,l=r||ze(s);return{topLeft:Ui(!l||a.top||a.left,i.topLeft,0,o),topRight:Ui(!l||a.top||a.right,i.topRight,0,o),bottomLeft:Ui(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:Ui(!l||a.bottom||a.right,i.bottomRight,0,o)}}function EB(t){const e=Q3(t),n=e.right-e.left,r=e.bottom-e.top,s=CB(t,n/2,r/2),i=SB(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:i},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,i.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(s.b,s.r))}}}}function I0(t,e,n,r){const s=e===null,i=n===null,a=t&&!(s&&i)&&Q3(t,r);return a&&(s||ai(e,a.left,a.right))&&(i||ai(n,a.top,a.bottom))}function AB(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function TB(t,e){t.rect(e.x,e.y,e.w,e.h)}function N0(t,e,n={}){const r=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,i=(t.x+t.w!==n.x+n.w?e:0)-r,o=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+r,y:t.y+s,w:t.w+i,h:t.h+o,radius:t.radius}}class qi extends ui{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:r,backgroundColor:s}}=this,{inner:i,outer:o}=EB(this),a=AB(o.radius)?Vc:TB;e.save(),(o.w!==i.w||o.h!==i.h)&&(e.beginPath(),a(e,N0(o,n,i)),e.clip(),a(e,N0(i,-n,o)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),a(e,N0(i,n)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,n,r){return I0(this,e,n,r)}inXRange(e,n){return I0(this,e,null,n)}inYRange(e,n){return I0(this,null,e,n)}getCenterPoint(e){const{x:n,y:r,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(n+s)/2:n,y:i?r:(r+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}U(qi,"id","bar"),U(qi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),U(qi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function kB(t,e,n){const r=t.segments,s=t.points,i=e.points,o=[];for(const a of r){let{start:l,end:c}=a;c=B0(l,c,s);const u=L0(n,s[l],s[c],a.loop);if(!e.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=o3(e,u);for(const h of d){const f=L0(n,i[h.start],i[h.end],h.loop),p=i3(a,s,f);for(const m of p)o.push({source:m,target:h,start:{[n]:J3(u,f,"start",Math.max)},end:{[n]:J3(u,f,"end",Math.min)}})}}return o}function L0(t,e,n,r){if(r)return;let s=e[t],i=n[t];return t==="angle"&&(s=vr(s),i=vr(i)),{property:t,start:s,end:i}}function MB(t,e){const{x:n=null,y:r=null}=t||{},s=e.points,i=[];return e.segments.forEach(({start:o,end:a})=>{a=B0(o,a,s);const l=s[o],c=s[a];r!==null?(i.push({x:l.x,y:r}),i.push({x:c.x,y:r})):n!==null&&(i.push({x:n,y:l.y}),i.push({x:n,y:c.y}))}),i}function B0(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function J3(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function e5(t,e){let n=[],r=!1;return bt(t)?(r=!0,n=t):n=MB(t,e),n.length?new Vi({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function t5(t){return t&&t.fill!==!1}function OB(t,e,n){let s=t[e].fill;const i=[e];let o;if(!n)return s;for(;s!==!1&&i.indexOf(s)===-1;){if(!cn(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;i.push(s),s=o.fill}return!1}function $B(t,e,n){const r=IB(t);if(ze(r))return isNaN(r.value)?!1:r;let s=parseFloat(r);return cn(s)&&Math.floor(s)===s?PB(r[0],e,s,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function PB(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function DB(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:ze(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function RB(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:ze(t)?r=t.value:r=e.getBaseValue(),r}function IB(t){const e=t.options,n=e.fill;let r=De(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function NB(t){const{scale:e,index:n,line:r}=t,s=[],i=r.segments,o=r.points,a=LB(e,n);a.push(e5({x:null,y:e.bottom},r));for(let l=0;l<i.length;l++){const c=i[l];for(let u=c.start;u<=c.end;u++)BB(s,o[u],a)}return new Vi({points:s,options:{}})}function LB(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let s=0;s<r.length;s++){const i=r[s];if(i.index===e)break;i.hidden||n.unshift(i.dataset)}return n}function BB(t,e,n){const r=[];for(let s=0;s<n.length;s++){const i=n[s],{first:o,last:a,point:l}=jB(i,e,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(t.push(l),!a)break}}t.push(...r)}function jB(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const s=r[n],i=t.segments,o=t.points;let a=!1,l=!1;for(let c=0;c<i.length;c++){const u=i[c],d=o[u.start][n],h=o[u.end][n];if(ai(s,d,h)){a=s===d,l=s===h;break}}return{first:a,last:l,point:r}}class n5{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:s,y:i,radius:o}=this;return n=n||{start:0,end:xt},e.arc(s,i,o,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:s}=this,i=e.angle;return{x:n+Math.cos(i)*s,y:r+Math.sin(i)*s,angle:i}}}function FB(t){const{chart:e,fill:n,line:r}=t;if(cn(n))return zB(e,n);if(n==="stack")return NB(t);if(n==="shape")return!0;const s=HB(t);return s instanceof n5?s:e5(s,r)}function zB(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function HB(t){return(t.scale||{}).getPointPositionForValue?UB(t):VB(t)}function VB(t){const{scale:e={},fill:n}=t,r=DB(n,e);if(cn(r)){const s=e.isHorizontal();return{x:s?r:null,y:s?null:r}}return null}function UB(t){const{scale:e,fill:n}=t,r=e.options,s=e.getLabels().length,i=r.reverse?e.max:e.min,o=RB(n,e,i),a=[];if(r.grid.circular){const l=e.getPointPositionForValue(0,i);return new n5({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(let l=0;l<s;++l)a.push(e.getPointPositionForValue(l,o));return a}function j0(t,e,n){const r=FB(e),{line:s,scale:i,axis:o}=e,a=s.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};r&&s.points.length&&(yh(t,n),qB(t,{line:s,target:r,above:u,below:d,area:n,scale:i,axis:o}),bh(t))}function qB(t,e){const{line:n,target:r,above:s,below:i,area:o,scale:a}=e,l=n._loop?"angle":e.axis;t.save(),l==="x"&&i!==s&&(r5(t,r,o.top),s5(t,{line:n,target:r,color:s,scale:a,property:l}),t.restore(),t.save(),r5(t,r,o.bottom)),s5(t,{line:n,target:r,color:i,scale:a,property:l}),t.restore()}function r5(t,e,n){const{segments:r,points:s}=e;let i=!0,o=!1;t.beginPath();for(const a of r){const{start:l,end:c}=a,u=s[l],d=s[B0(l,c,s)];i?(t.moveTo(u.x,u.y),i=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(d.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function s5(t,e){const{line:n,target:r,property:s,color:i,scale:o}=e,a=kB(n,r,s);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:h=i}={}}=l,f=r!==!0;t.save(),t.fillStyle=h,WB(t,o,f&&L0(s,u,d)),t.beginPath();const p=!!n.pathSegment(t,l);let m;if(f){p?t.closePath():i5(t,r,d,s);const g=!!r.pathSegment(t,c,{move:p,reverse:!0});m=p&&g,m||i5(t,r,u,s)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function WB(t,e,n){const{top:r,bottom:s}=e.chart.chartArea,{property:i,start:o,end:a}=n||{};i==="x"&&(t.beginPath(),t.rect(o,r,a-o,s-r),t.clip())}function i5(t,e,n,r){const s=e.interpolate(n,r);s&&t.lineTo(s.x,s.y)}var GB={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,s=[];let i,o,a,l;for(o=0;o<r;++o)i=t.getDatasetMeta(o),a=i.dataset,l=null,a&&a.options&&a instanceof Vi&&(l={visible:t.isDatasetVisible(o),index:o,fill:$B(a,o,r),chart:t,axis:i.controller.options.indexAxis,scale:i.vScale,line:a}),i.$filler=l,s.push(l);for(o=0;o<r;++o)l=s[o],!(!l||l.fill===!1)&&(l.fill=OB(s,o,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",s=t.getSortedVisibleDatasetMetas(),i=t.chartArea;for(let o=s.length-1;o>=0;--o){const a=s[o].$filler;a&&(a.line.updateControlPoints(i,a.axis),r&&a.fill&&j0(t.ctx,a,i))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let s=r.length-1;s>=0;--s){const i=r[s].$filler;t5(i)&&j0(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!t5(r)||n.drawTime!=="beforeDatasetDraw"||j0(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const o5=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},YB=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class a5 extends ui{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=rt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,s)=>e.sort(r,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,s=Ut(r.font),i=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=o5(r,i);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,i,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,s){const{ctx:i,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=e;i.textAlign="left",i.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((p,m)=>{const g=r+n/2+i.measureText(p.text).width;(m===0||c[c.length-1]+g+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,f+=u,h++),l[m]={left:0,top:f,row:h,width:g,height:s},c[c.length-1]+=g+a}),d}_fitCols(e,n,r,s){const{ctx:i,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-e;let d=a,h=0,f=0,p=0,m=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:v,itemHeight:b}=KB(r,n,i,g,s);y>0&&f+b+2*a>u&&(d+=h+a,c.push({width:h,height:f}),p+=h+a,m++,h=f=0),l[y]={left:p,top:f,col:m,width:v,height:b},h=Math.max(h,v),f+=b+a}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:s},rtl:i}}=this,o=Ya(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=En(r,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=En(r,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+e+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=En(r,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=En(r,this.top+e+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;yh(e,this),this._draw(),bh(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=e,a=kt.color,l=Ya(e.rtl,this.left,this.width),c=Ut(o.font),{padding:u}=o,d=c.size,h=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:g}=o5(o,d),y=function(k,E,A){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const $=De(A.lineWidth,1);if(s.fillStyle=De(A.fillStyle,a),s.lineCap=De(A.lineCap,"butt"),s.lineDashOffset=De(A.lineDashOffset,0),s.lineJoin=De(A.lineJoin,"miter"),s.lineWidth=$,s.strokeStyle=De(A.strokeStyle,a),s.setLineDash(De(A.lineDash,[])),o.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:$},O=l.xPlus(k,p/2),R=E+h;V_(s,P,O,R,o.pointStyleWidth&&p)}else{const P=E+Math.max((d-m)/2,0),O=l.leftForLtr(k,p),R=Vo(A.borderRadius);s.beginPath(),Object.values(R).some(H=>H!==0)?Vc(s,{x:O,y:P,w:p,h:m,radius:R}):s.rect(O,P,p,m),s.fill(),$!==0&&s.stroke()}s.restore()},v=function(k,E,A){Ho(s,A.text,k,E+g/2,c,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},b=this.isHorizontal(),C=this._computeTitleHeight();b?f={x:En(i,this.left+u,this.right-r[0]),y:this.top+u+C,line:0}:f={x:this.left+u,y:En(i,this.top+C+u,this.bottom-n[0].height),line:0},t3(this.ctx,e.textDirection);const _=g+u;this.legendItems.forEach((k,E)=>{s.strokeStyle=k.fontColor,s.fillStyle=k.fontColor;const A=s.measureText(k.text).width,$=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),P=p+h+A;let O=f.x,R=f.y;l.setWidth(this.width),b?E>0&&O+P+u>this.right&&(R=f.y+=_,f.line++,O=f.x=En(i,this.left+u,this.right-r[f.line])):E>0&&R+_>this.bottom&&(O=f.x=O+n[f.line].width+u,f.line++,R=f.y=En(i,this.top+C+u,this.bottom-n[f.line].height));const H=l.x(O);if(y(H,R,k),O=kI($,O+p+h,b?O+P:this.right,e.rtl),v(l.x(O),R,k),b)f.x+=P+u;else if(typeof k.text!="string"){const z=c.lineHeight;f.y+=l5(k,z)+u}else f.y+=_}),n3(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=Ut(n.font),s=yn(n.padding);if(!n.display)return;const i=Ya(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,c=s.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=En(e.align,d,this.right-h);else{const p=this.columnSizes.reduce((m,g)=>Math.max(m,g.height),0);u=c+En(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const f=En(a,d,d+h);o.textAlign=i.textAlign(d0(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Ho(o,n.text,f,u,r)}_computeTitleHeight(){const e=this.options.title,n=Ut(e.font),r=yn(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,s,i;if(ai(e,this.left,this.right)&&ai(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],ai(e,s.left,s.left+s.width)&&ai(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!QB(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,i=YB(s,r);s&&!i&&rt(n.onLeave,[e,s,this],this),this._hoveredItem=r,r&&!i&&rt(n.onHover,[e,r,this],this)}else r&&rt(n.onClick,[e,r,this],this)}}function KB(t,e,n,r,s){const i=ZB(r,t,e,n),o=XB(s,r,e.lineHeight);return{itemWidth:i,itemHeight:o}}function ZB(t,e,n,r){let s=t.text;return s&&typeof s!="string"&&(s=s.reduce((i,o)=>i.length>o.length?i:o)),e+n.size/2+r.measureText(s).width}function XB(t,e,n){let r=t;return typeof e.text!="string"&&(r=l5(e,n)),r}function l5(t,e){const n=t.text?t.text.length:0;return e*n}function QB(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var JB={id:"legend",_element:a5,start(t,e,n){const r=t.legend=new a5({ctx:t.ctx,options:n,chart:t});jr.configure(t,r,n),jr.addBox(t,r)},stop(t){jr.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;jr.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,s=n.chart;s.isDatasetVisible(r)?(s.hide(r),e.hidden=!0):(s.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:s,color:i,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=yn(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};let c5=class extends ui{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const s=bt(r.text)?r.text.length:1;this._padding=yn(r.padding);const i=s*Ut(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:s,right:i,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=En(a,r,i),d=n+e,c=i-r):(o.position==="left"?(u=r+e,d=En(a,s,n),l=vt*-.5):(u=i-e,d=En(a,n,s),l=vt*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=Ut(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(i);Ho(e,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:d0(n.align),textBaseline:"middle",translation:[o,a]})}};function ej(t,e){const n=new c5({ctx:t.ctx,options:e,chart:t});jr.configure(t,n,e),jr.addBox(t,n),t.titleBlock=n}var tj={id:"title",_element:c5,start(t,e,n){ej(t,n)},stop(t){const e=t.titleBlock;jr.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;jr.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const su={average(t){if(!t.length)return!1;let e,n,r=new Set,s=0,i=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),s+=l.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:s/i}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,s=Number.POSITIVE_INFINITY,i,o,a;for(i=0,o=t.length;i<o;++i){const l=t[i].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=c0(e,c);u<s&&(s=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Rs(t,e){return e&&(bt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function di(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
53
+ `)>-1?t.split(`
54
+ `):t}function nj(t,e){const{element:n,datasetIndex:r,index:s}=e,i=t.getDatasetMeta(r).controller,{label:o,value:a}=i.getLabelAndValue(s);return{chart:t,label:o,parsed:i.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:a,dataset:i.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function u5(t,e){const n=t.chart.ctx,{body:r,footer:s,title:i}=t,{boxWidth:o,boxHeight:a}=e,l=Ut(e.bodyFont),c=Ut(e.titleFont),u=Ut(e.footerFont),d=i.length,h=s.length,f=r.length,p=yn(e.padding);let m=p.height,g=0,y=r.reduce((C,_)=>C+_.before.length+_.lines.length+_.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*C+(y-f)*l.lineHeight+(y-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let v=0;const b=function(C){g=Math.max(g,n.measureText(C).width+v)};return n.save(),n.font=c.string,Je(t.title,b),n.font=l.string,Je(t.beforeBody.concat(t.afterBody),b),v=e.displayColors?o+2+e.boxPadding:0,Je(r,C=>{Je(C.before,b),Je(C.lines,b),Je(C.after,b)}),v=0,n.font=u.string,Je(t.footer,b),n.restore(),g+=p.width,{width:g,height:m}}function rj(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function sj(t,e,n,r){const{x:s,width:i}=r,o=n.caretSize+n.caretPadding;if(t==="left"&&s+i+o>e.width||t==="right"&&s-i-o<0)return!0}function ij(t,e,n,r){const{x:s,width:i}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=i/2?c="left":s>=o-i/2&&(c="right"),sj(c,t,e,n)&&(c="center"),c}function d5(t,e,n){const r=n.yAlign||e.yAlign||rj(t,n);return{xAlign:n.xAlign||e.xAlign||ij(t,e,n,r),yAlign:r}}function oj(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function aj(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function h5(t,e,n,r){const{caretSize:s,caretPadding:i,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=s+i,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=Vo(o);let p=oj(e,a);const m=aj(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,h)+s:a==="right"&&(p+=Math.max(d,f)+s),{x:Sn(p,0,r.width-e.width),y:Sn(m,0,r.height-e.height)}}function Dh(t,e,n){const r=yn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function f5(t){return Rs([],di(t))}function lj(t,e,n){return zi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function p5(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const g5={beforeTitle:oi,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:oi,beforeBody:oi,beforeLabel:oi,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Ge(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:oi,afterBody:oi,beforeFooter:oi,footer:oi,afterFooter:oi};function nr(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?g5[e].call(n,r):s}let m5=(kx=class extends ui{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,i=new u3(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=lj(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=nr(r,"beforeTitle",this,e),i=nr(r,"title",this,e),o=nr(r,"afterTitle",this,e);let a=[];return a=Rs(a,di(s)),a=Rs(a,di(i)),a=Rs(a,di(o)),a}getBeforeBody(e,n){return f5(nr(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,s=[];return Je(e,i=>{const o={before:[],lines:[],after:[]},a=p5(r,i);Rs(o.before,di(nr(a,"beforeLabel",this,i))),Rs(o.lines,nr(a,"label",this,i)),Rs(o.after,di(nr(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(e,n){return f5(nr(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,s=nr(r,"beforeFooter",this,e),i=nr(r,"footer",this,e),o=nr(r,"afterFooter",this,e);let a=[];return a=Rs(a,di(s)),a=Rs(a,di(i)),a=Rs(a,di(o)),a}_createItems(e){const n=this._active,r=this.chart.data,s=[],i=[],o=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(nj(this.chart,n[l]));return e.filter&&(a=a.filter((u,d,h)=>e.filter(u,d,h,r))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,r))),Je(a,u=>{const d=p5(e.callbacks,u);s.push(nr(d,"labelColor",this,u)),i.push(nr(d,"labelPointStyle",this,u)),o.push(nr(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const r=this.options.setContext(this.getContext()),s=this._active;let i,o=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const a=su[r.position].call(this,s,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=u5(this,r),c=Object.assign({},a,l),u=d5(this.chart,r,c),d=h5(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,i={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,s){const i=this.getCaretPosition(e,r,s);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,r){const{xAlign:s,yAlign:i}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Vo(a),{x:h,y:f}=e,{width:p,height:m}=n;let g,y,v,b,C,_;return i==="center"?(C=f+m/2,s==="left"?(g=h,y=g-o,b=C+o,_=C-o):(g=h+p,y=g+o,b=C-o,_=C+o),v=g):(s==="left"?y=h+Math.max(l,u)+o:s==="right"?y=h+p-Math.max(c,d)-o:y=this.caretX,i==="top"?(b=f,C=b-o,g=y-o,v=y+o):(b=f+m,C=b+o,g=y+o,v=y-o),_=b),{x1:g,x2:y,x3:v,y1:b,y2:C,y3:_}}drawTitle(e,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const c=Ya(r.rtl,this.x,this.width);for(e.x=Dh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=Ut(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<i;++l)n.fillText(s[l],c.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+a,l+1===i&&(e.y+=r.titleMarginBottom-a)}}_drawColorBox(e,n,r,s,i){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=i,u=Ut(i.bodyFont),d=Dh(this,"left",i),h=s.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+f;if(i.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},g=s.leftForLtr(h,c)+c/2,y=p+l/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,y0(e,m,g,y),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,y0(e,m,g,y)}else{e.lineWidth=ze(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const m=s.leftForLtr(h,c),g=s.leftForLtr(s.xPlus(h,1),c-2),y=Vo(o.borderRadius);Object.values(y).some(v=>v!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,Vc(e,{x:m,y:p,w:c,h:l,radius:y}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Vc(e,{x:g,y:p+1,w:c-2,h:l-2,radius:y}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(m,p,c,l),e.strokeRect(m,p,c,l),e.fillStyle=o.backgroundColor,e.fillRect(g,p+1,c-2,l-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:s}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Ut(r.bodyFont);let h=d.lineHeight,f=0;const p=Ya(r.rtl,this.x,this.width),m=function(A){n.fillText(A,p.x(e.x+f),e.y+h/2),e.y+=h+i},g=p.textAlign(o);let y,v,b,C,_,k,E;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Dh(this,g,r),n.fillStyle=r.bodyColor,Je(this.beforeBody,m),f=a&&g!=="right"?o==="center"?c/2+u:c+2+u:0,C=0,k=s.length;C<k;++C){for(y=s[C],v=this.labelTextColors[C],n.fillStyle=v,Je(y.before,m),b=y.lines,a&&b.length&&(this._drawColorBox(n,e,C,p,r),h=Math.max(d.lineHeight,l)),_=0,E=b.length;_<E;++_)m(b[_]),h=d.lineHeight;Je(y.after,m)}f=0,h=d.lineHeight,Je(this.afterBody,m),e.y-=i}drawFooter(e,n,r){const s=this.footer,i=s.length;let o,a;if(i){const l=Ya(r.rtl,this.x,this.width);for(e.x=Dh(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=Ut(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<i;++a)n.fillText(s[a],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+r.footerSpacing}}drawBackground(e,n,r,s){const{xAlign:i,yAlign:o}=this,{x:a,y:l}=e,{width:c,height:u}=r,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:p}=Vo(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(e,n,r,s),n.lineTo(a+c-h,l),n.quadraticCurveTo(a+c,l,a+c,l+h),o==="center"&&i==="right"&&this.drawCaret(e,n,r,s),n.lineTo(a+c,l+u-p),n.quadraticCurveTo(a+c,l+u,a+c-p,l+u),o==="bottom"&&this.drawCaret(e,n,r,s),n.lineTo(a+f,l+u),n.quadraticCurveTo(a,l+u,a,l+u-f),o==="center"&&i==="left"&&this.drawCaret(e,n,r,s),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,s=r&&r.x,i=r&&r.y;if(s||i){const o=su[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=u5(this,e),l=Object.assign({},o,this._size),c=d5(n,e,l),u=h5(e,l,c,n);(s._to!==u.x||i._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=yn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=r,this.drawBackground(i,e,s,n),t3(e,n.textDirection),i.y+=o.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),n3(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,s=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),i=!dh(r,s),o=this._positionChanged(s,n);(i||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,i=this._active||[],o=this._getActiveElements(e,i,n,r),a=this._positionChanged(o,e),l=n||!dh(o,i)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,r,s){const i=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,i.mode,i,r);return i.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:r,caretY:s,options:i}=this,o=su[i.position].call(this,e,n);return o!==!1&&(r!==o.x||s!==o.y)}},U(kx,"positioners",su),kx);var cj={id:"tooltip",_element:m5,positioners:su,afterInit(t,e,n){n&&(t.tooltip=new m5({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:g5},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const uj=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function dj(t,e,n,r){const s=t.indexOf(e);if(s===-1)return uj(t,e,n,r);const i=t.lastIndexOf(e);return s!==i?n:s}const hj=(t,e)=>t===null?null:Sn(Math.round(t),0,e);function y5(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Rh extends Ka{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:i}of n)r[s]===i&&r.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Ge(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:dj(r,e,De(n,e),this._addedLabels),hj(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,s=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=e;o<=n;o++)s.push({value:o});return s}getLabelForValue(e){return y5.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}U(Rh,"id","category"),U(Rh,"defaults",{ticks:{callback:y5}});function fj(t,e){const n=[],{bounds:s,step:i,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=t,f=i||1,p=u-1,{min:m,max:g}=e,y=!Ge(o),v=!Ge(a),b=!Ge(c),C=(g-m)/(d+1);let _=T_((g-m)/p/f)*f,k,E,A,$;if(_<1e-14&&!y&&!v)return[{value:m},{value:g}];$=Math.ceil(g/_)-Math.floor(m/_),$>p&&(_=T_($*_/p/f)*f),Ge(l)||(k=Math.pow(10,l),_=Math.ceil(_*k)/k),s==="ticks"?(E=Math.floor(m/_)*_,A=Math.ceil(g/_)*_):(E=m,A=g),y&&v&&i&&xI((a-o)/i,_/1e3)?($=Math.round(Math.min((a-o)/_,u)),_=(a-o)/$,E=o,A=a):b?(E=y?o:E,A=v?a:A,$=c-1,_=(A-E)/$):($=(A-E)/_,jc($,Math.round($),_/1e3)?$=Math.round($):$=Math.ceil($));const P=Math.max(k_(_),k_(E));k=Math.pow(10,Ge(l)?P:l),E=Math.round(E*k)/k,A=Math.round(A*k)/k;let O=0;for(y&&(h&&E!==o?(n.push({value:o}),E<o&&O++,jc(Math.round((E+O*_)*k)/k,o,b5(o,C,t))&&O++):E<o&&O++);O<$;++O){const R=Math.round((E+O*_)*k)/k;if(v&&R>a)break;n.push({value:R})}return v&&h&&A!==a?n.length&&jc(n[n.length-1].value,a,b5(a,C,t))?n[n.length-1].value=a:n.push({value:a}):(!v||A===a)&&n.push({value:A}),n}function b5(t,e,{horizontal:n,minRotation:r}){const s=is(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/i,o)}class F0 extends Ka{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Ge(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:s,max:i}=this;const o=l=>s=n?s:l,a=l=>i=r?i:l;if(e){const l=Ds(s),c=Ds(i);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===i){let l=i===0?1:Math.abs(i*.05);a(i+l),e||o(s-l)}this.min=s,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,o=fj(s,i);return e.bounds==="ticks"&&wI(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const s=(r-n)/Math.max(e.length-1,1)/2;n-=s,r+=s}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return gh(e,this.chart.options.locale,this.options.ticks.format)}}class Ih extends F0{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=cn(e)?e:0,this.max=cn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=is(this.options.ticks.minRotation),s=(e?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}U(Ih,"id","linear"),U(Ih,"defaults",{ticks:{callback:p0.formatters.numeric}});function z0(t){const e=t.ticks;if(e.display&&t.display){const n=yn(e.backdropPadding);return De(e.font&&e.font.size,kt.font.size)+n.height}return 0}function pj(t,e,n){return n=bt(n)?n:[n],{w:BI(t,e.string,n),h:n.length*e.lineHeight}}function v5(t,e,n,r,s){return t===r||t===s?{start:e-n/2,end:e+n/2}:t<r||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function gj(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],s=[],i=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?vt/i:0;for(let l=0;l<i;l++){const c=o.setContext(t.getPointLabelContext(l));s[l]=c.padding;const u=t.getPointPosition(l,t.drawingArea+s[l],a),d=Ut(c.font),h=pj(t.ctx,d,t._pointLabels[l]);r[l]=h;const f=vr(t.getIndexAngle(l)+a),p=Math.round(l0(f)),m=v5(p,u.x,h.w,0,180),g=v5(p,u.y,h.h,90,270);mj(n,e,f,m,g)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=vj(t,r,s)}function mj(t,e,n,r,s){const i=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<e.l?(a=(e.l-r.start)/i,t.l=Math.min(t.l,e.l-a)):r.end>e.r&&(a=(r.end-e.r)/i,t.r=Math.max(t.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/o,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function yj(t,e,n){const r=t.drawingArea,{extra:s,additionalAngle:i,padding:o,size:a}=n,l=t.getPointPosition(e,r+s+o,i),c=Math.round(l0(vr(l.angle+Nt))),u=_j(l.y,a.h,c),d=xj(c),h=wj(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function bj(t,e){if(!e)return!0;const{left:n,top:r,right:s,bottom:i}=t;return!(li({x:n,y:r},e)||li({x:n,y:i},e)||li({x:s,y:r},e)||li({x:s,y:i},e))}function vj(t,e,n){const r=[],s=t._pointLabels.length,i=t.options,{centerPointLabels:o,display:a}=i.pointLabels,l={extra:z0(i)/2,additionalAngle:o?vt/s:0};let c;for(let u=0;u<s;u++){l.padding=n[u],l.size=e[u];const d=yj(t,u,l);r.push(d),a==="auto"&&(d.visible=bj(d,c),d.visible&&(c=d))}return r}function xj(t){return t===0||t===180?"center":t<180?"left":"right"}function wj(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function _j(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Cj(t,e,n){const{left:r,top:s,right:i,bottom:o}=n,{backdropColor:a}=e;if(!Ge(a)){const l=Vo(e.borderRadius),c=yn(e.backdropPadding);t.fillStyle=a;const u=r-c.left,d=s-c.top,h=i-r+c.width,f=o-s+c.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),Vc(t,{x:u,y:d,w:h,h:f,radius:l}),t.fill()):t.fillRect(u,d,h,f)}}function Sj(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let s=e-1;s>=0;s--){const i=t._pointLabelItems[s];if(!i.visible)continue;const o=r.setContext(t.getPointLabelContext(s));Cj(n,o,i);const a=Ut(o.font),{x:l,y:c,textAlign:u}=i;Ho(n,t._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function x5(t,e,n,r){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,xt);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let o=1;o<r;o++)i=t.getPointPosition(o,e),s.lineTo(i.x,i.y)}}function Ej(t,e,n,r,s){const i=t.ctx,o=e.circular,{color:a,lineWidth:l}=e;!o&&!r||!a||!l||n<0||(i.save(),i.strokeStyle=a,i.lineWidth=l,i.setLineDash(s.dash||[]),i.lineDashOffset=s.dashOffset,i.beginPath(),x5(t,n,o,r),i.closePath(),i.stroke(),i.restore())}function Aj(t,e,n){return zi(t,{label:n,index:e,type:"pointLabel"})}class iu extends F0{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=yn(z0(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=cn(e)&&!isNaN(e)?e:0,this.max=cn(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/z0(this.options))}generateTickLabels(e){F0.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{const s=rt(this.options.pointLabels.callback,[n,r],this);return s||s===0?s:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?gj(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,s))}getIndexAngle(e){const n=xt/(this._pointLabels.length||1),r=this.options.startAngle||0;return vr(e*n+is(r))}getDistanceFromCenterForValue(e){if(Ge(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Ge(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const r=n[e];return Aj(this.getContext(),e,r)}}getPointPosition(e,n,r=0){const s=this.getIndexAngle(e)-Nt+r;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:r,right:s,bottom:i}=this._pointLabelItems[e];return{left:n,top:r,right:s,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const r=this.ctx;r.save(),r.beginPath(),x5(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:r,grid:s,border:i}=n,o=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&Sj(this,o),s.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=s.setContext(h),p=i.setContext(h);Ej(this,f,l,o,p)}}),r.display){for(e.save(),a=o-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(e.lineWidth=h,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const s=this.getIndexAngle(0);let i,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=Ut(c.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,o=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=yn(c.backdropPadding);e.fillRect(-o/2-d.left,-i-u.size/2-d.top,o+d.width,u.size+d.height)}Ho(e,a.label,0,-i,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}U(iu,"id","radialLinear"),U(iu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:p0.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),U(iu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),U(iu,"descriptors",{angleLines:{_fallback:"grid"}});const Nh={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}},rr=Object.keys(Nh);function w5(t,e){return t-e}function _5(t,e){if(Ge(e))return null;const n=t._adapter,{parser:r,round:s,isoWeekday:i}=t._parseOpts;let o=e;return typeof r=="function"&&(o=r(o)),cn(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(qa(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function C5(t,e,n,r){const s=rr.length;for(let i=rr.indexOf(t);i<s-1;++i){const o=Nh[rr[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(a*o.size))<=r)return rr[i]}return rr[s-1]}function Tj(t,e,n,r,s){for(let i=rr.length-1;i>=rr.indexOf(n);i--){const o=rr[i];if(Nh[o].common&&t._adapter.diff(s,r,o)>=e-1)return o}return rr[n?rr.indexOf(n):0]}function kj(t){for(let e=rr.indexOf(t)+1,n=rr.length;e<n;++e)if(Nh[rr[e]].common)return rr[e]}function S5(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:s}=u0(n,e),i=n[r]>=e?n[r]:n[s];t[i]=!0}}function Mj(t,e,n,r){const s=t._adapter,i=+s.startOf(e[0].value,r),o=e[e.length-1].value;let a,l;for(a=i;a<=o;a=+s.add(a,1,r))l=n[a],l>=0&&(e[l].major=!0);return e}function E5(t,e,n){const r=[],s={},i=e.length;let o,a;for(o=0;o<i;++o)a=e[o],s[a]=o,r.push({value:a,major:!1});return i===0||!n?r:Mj(t,r,s,n)}class Lh extends Ka{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),s=this._adapter=new JN._date(e.adapters.date);s.init(n),Lc(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:_5(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:s,max:i,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(i=Math.max(i,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=cn(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=cn(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const i=this.min,o=this.max,a=EI(s,i,o);return this._unit=n.unit||(r.autoSkip?C5(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Tj(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:kj(this._unit),this.initOffsets(s),e.reverse&&a.reverse(),E5(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,s,i;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?r=i:r=(i-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Sn(n,0,o),r=Sn(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,s=this.options,i=s.time,o=i.unit||C5(i.minUnit,n,r,this._getLabelCapacity(n)),a=De(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,c=qa(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":o),e.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<r;h=+e.add(h,a,o),f++)S5(u,h,p);return(h===r||s.bounds==="ticks"||f===1)&&S5(u,h,p),Object.keys(u).sort(w5).map(m=>+m)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,i=this._unit,o=n||s[i];return this._adapter.format(e,o)}_tickFormatFunction(e,n,r,s){const i=this.options,o=i.ticks.callback;if(o)return rt(o,[e,n,r],this);const a=i.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=r[n],f=c&&d&&h&&h.major;return this._adapter.format(e,s||(f?d:u))}generateTickLabels(e){let n,r,s;for(n=0,r=e.length;n<r;++n)s=e[n],s.label=this._tickFormatFunction(s.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,s=is(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:r*i+a*o,h:r*o+a*i}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,s=r[n.unit]||r.millisecond,i=this._tickFormatFunction(e,0,E5(this,[e],this._majorUnit),s),o=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n<r;++n)e=e.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const s=this.getLabels();for(n=0,r=s.length;n<r;++n)e.push(_5(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return P_(e.sort(w5))}}U(Lh,"id","time"),U(Lh,"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 Bh(t,e,n){let r=0,s=t.length-1,i,o,a,l;n?(e>=t[r].pos&&e<=t[s].pos&&({lo:r,hi:s}=jo(t,"pos",e)),{pos:i,time:a}=t[r],{pos:o,time:l}=t[s]):(e>=t[r].time&&e<=t[s].time&&({lo:r,hi:s}=jo(t,"time",e)),{time:i,pos:a}=t[r],{time:o,pos:l}=t[s]);const c=o-i;return c?a+(l-a)*(e-i)/c:a}class A5 extends Lh{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Bh(n,this.min),this._tableRange=Bh(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,s=[],i=[];let o,a,l,c,u;for(o=0,a=e.length;o<a;++o)c=e[o],c>=n&&c<=r&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=s.length;o<a;++o)u=s[o+1],l=s[o-1],c=s[o],Math.round((u+l)/2)!==c&&i.push({time:c,pos:o/(a-1)});return i}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((s,i)=>s-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Bh(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return Bh(this._table,r*this._tableRange+this._minPos,!0)}}U(A5,"id","timeseries"),U(A5,"defaults",Lh.defaults);/*!
55
+ * chartjs-plugin-datalabels v2.2.0
56
+ * https://chartjs-plugin-datalabels.netlify.app
57
+ * (c) 2017-2022 chartjs-plugin-datalabels contributors
58
+ * Released under the MIT license
59
+ */var T5=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),ou={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(`
60
+ `)):Array.isArray(n)?t.push.apply(t,n):Ge(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var r=[].concat(e),s=r.length,i=t.font,o=0,a;for(t.font=n.string,a=0;a<s;++a)o=Math.max(t.measureText(r[a]).width,o);return t.font=i,{height:s*n.lineHeight,width:o}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n=t.slice(),r=[],s,i,o,a;for(s=0,o=e.length;s<o;++s)a=e[s],i=n.indexOf(a),i===-1?r.push([a,1]):n.splice(i,1);for(s=0,o=n.length;s<o;++s)r.push([n[s],-1]);return r},rasterize:function(t){return Math.round(t*T5)/T5}};function H0(t,e){var n=e.x,r=e.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var s=t.x-n,i=t.y-r,o=Math.sqrt(s*s+i*i);return{x:o?s/o:0,y:o?i/o:-1}}function Oj(t,e,n,r,s){switch(s){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:s*=Math.PI/180,n=Math.cos(s),r=Math.sin(s);break}return{x:t,y:e,vx:n,vy:r}}var $j=0,k5=1,M5=2,O5=4,$5=8;function jh(t,e,n){var r=$j;return t<n.left?r|=k5:t>n.right&&(r|=M5),e<n.top?r|=$5:e>n.bottom&&(r|=O5),r}function Pj(t,e){for(var n=t.x0,r=t.y0,s=t.x1,i=t.y1,o=jh(n,r,e),a=jh(s,i,e),l,c,u;!(!(o|a)||o&a);)l=o||a,l&$5?(c=n+(s-n)*(e.top-r)/(i-r),u=e.top):l&O5?(c=n+(s-n)*(e.bottom-r)/(i-r),u=e.bottom):l&M5?(u=r+(i-r)*(e.right-n)/(s-n),c=e.right):l&k5&&(u=r+(i-r)*(e.left-n)/(s-n),c=e.left),l===o?(n=c,r=u,o=jh(n,r,e)):(s=c,i=u,a=jh(s,i,e));return{x0:n,x1:s,y0:r,y1:i}}function Fh(t,e){var n=e.anchor,r=t,s,i;return e.clamp&&(r=Pj(r,e.area)),n==="start"?(s=r.x0,i=r.y0):n==="end"?(s=r.x1,i=r.y1):(s=(r.x0+r.x1)/2,i=(r.y0+r.y1)/2),Oj(s,i,t.vx,t.vy,e.align)}var zh={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,r=Math.cos(n),s=Math.sin(n),i=t.innerRadius,o=t.outerRadius;return Fh({x0:t.x+r*i,y0:t.y+s*i,x1:t.x+r*o,y1:t.y+s*o,vx:r,vy:s},e)},point:function(t,e){var n=H0(t,e.origin),r=n.x*t.options.radius,s=n.y*t.options.radius;return Fh({x0:t.x-r,y0:t.y-s,x1:t.x+r,y1:t.y+s,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=H0(t,e.origin),r=t.x,s=t.y,i=0,o=0;return t.horizontal?(r=Math.min(t.x,t.base),i=Math.abs(t.base-t.x)):(s=Math.min(t.y,t.base),o=Math.abs(t.base-t.y)),Fh({x0:r,y0:s+o,x1:r+i,y1:s,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=H0(t,e.origin);return Fh({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},hi=ou.rasterize;function Dj(t){var e=t.borderWidth||0,n=t.padding,r=t.size.height,s=t.size.width,i=-s/2,o=-r/2;return{frame:{x:i-n.left-e,y:o-n.top-e,w:s+n.width+e*2,h:r+n.height+e*2},text:{x:i,y:o,w:s,h:r}}}function Rj(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return t.horizontal?{x:r,y:null}:{x:null,y:r}}function Ij(t){return t instanceof Xa?zh.arc:t instanceof ru?zh.point:t instanceof qi?zh.bar:zh.fallback}function Nj(t,e,n,r,s,i){var o=Math.PI/2;if(i){var a=Math.min(i,s/2,r/2),l=e+a,c=n+a,u=e+r-a,d=n+s-a;t.moveTo(e,c),l<u&&c<d?(t.arc(l,c,a,-Math.PI,-o),t.arc(u,c,a,-o,0),t.arc(u,d,a,0,o),t.arc(l,d,a,o,Math.PI)):l<u?(t.moveTo(l,n),t.arc(u,c,a,-o,o),t.arc(l,c,a,o,Math.PI+o)):c<d?(t.arc(l,c,a,-Math.PI,0),t.arc(l,d,a,0,Math.PI)):t.arc(l,c,a,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,r,s)}function Lj(t,e,n){var r=n.backgroundColor,s=n.borderColor,i=n.borderWidth;!r&&(!s||!i)||(t.beginPath(),Nj(t,hi(e.x)+i/2,hi(e.y)+i/2,hi(e.w)-i,hi(e.h)-i,n.borderRadius),t.closePath(),r&&(t.fillStyle=r,t.fill()),s&&i&&(t.strokeStyle=s,t.lineWidth=i,t.lineJoin="miter",t.stroke()))}function Bj(t,e,n){var r=n.lineHeight,s=t.w,i=t.x,o=t.y+r/2;return e==="center"?i+=s/2:(e==="end"||e==="right")&&(i+=s),{h:r,w:s,x:i,y:o}}function jj(t,e,n){var r=t.shadowBlur,s=n.stroked,i=hi(n.x),o=hi(n.y),a=hi(n.w);s&&t.strokeText(e,i,o,a),n.filled&&(r&&s&&(t.shadowBlur=0),t.fillText(e,i,o,a),r&&s&&(t.shadowBlur=r))}function Fj(t,e,n,r){var s=r.textAlign,i=r.color,o=!!i,a=r.font,l=e.length,c=r.textStrokeColor,u=r.textStrokeWidth,d=c&&u,h;if(!(!l||!o&&!d))for(n=Bj(n,s,a),t.font=a.string,t.textAlign=s,t.textBaseline="middle",t.shadowBlur=r.textShadowBlur,t.shadowColor=r.textShadowColor,o&&(t.fillStyle=i),d&&(t.lineJoin="round",t.lineWidth=u,t.strokeStyle=c),h=0,l=e.length;h<l;++h)jj(t,e[h],{stroked:d,filled:o,w:n.w,x:n.x,y:n.y+n.h*h})}var P5=function(t,e,n,r){var s=this;s._config=t,s._index=r,s._model=null,s._rects=null,s._ctx=e,s._el=n};Br(P5.prototype,{_modelize:function(t,e,n,r){var s=this,i=s._index,o=Ut(At([n.font,{}],r,i)),a=At([n.color,kt.color],r,i);return{align:At([n.align,"center"],r,i),anchor:At([n.anchor,"center"],r,i),area:r.chart.chartArea,backgroundColor:At([n.backgroundColor,null],r,i),borderColor:At([n.borderColor,null],r,i),borderRadius:At([n.borderRadius,0],r,i),borderWidth:At([n.borderWidth,0],r,i),clamp:At([n.clamp,!1],r,i),clip:At([n.clip,!1],r,i),color:a,display:t,font:o,lines:e,offset:At([n.offset,4],r,i),opacity:At([n.opacity,1],r,i),origin:Rj(s._el,r),padding:yn(At([n.padding,4],r,i)),positioner:Ij(s._el),rotation:At([n.rotation,0],r,i)*(Math.PI/180),size:ou.textSize(s._ctx,e,o),textAlign:At([n.textAlign,"start"],r,i),textShadowBlur:At([n.textShadowBlur,0],r,i),textShadowColor:At([n.textShadowColor,a],r,i),textStrokeColor:At([n.textStrokeColor,a],r,i),textStrokeWidth:At([n.textStrokeWidth,0],r,i)}},update:function(t){var e=this,n=null,r=null,s=e._index,i=e._config,o,a,l,c=At([i.display,!0],t,s);c&&(o=t.dataset.data[s],a=De(rt(i.formatter,[o,t]),o),l=Ge(a)?[]:ou.toTextLines(a),l.length&&(n=e._modelize(c,l,i,t),r=Dj(n))),e._model=n,e._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n=this,r=t.ctx,s=n._model,i=n._rects,o;this.visible()&&(r.save(),s.clip&&(o=s.area,r.beginPath(),r.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),r.clip()),r.globalAlpha=ou.bound(0,s.opacity,1),r.translate(hi(e.x),hi(e.y)),r.rotate(s.rotation),Lj(r,i.frame,s),Fj(r,s.lines,i.text,s),r.restore())}});var zj=Number.MIN_SAFE_INTEGER||-9007199254740991,Hj=Number.MAX_SAFE_INTEGER||9007199254740991;function au(t,e,n){var r=Math.cos(n),s=Math.sin(n),i=e.x,o=e.y;return{x:i+r*(t.x-i)-s*(t.y-o),y:o+s*(t.x-i)+r*(t.y-o)}}function D5(t,e){var n=Hj,r=zj,s=e.origin,i,o,a,l,c;for(i=0;i<t.length;++i)o=t[i],a=o.x-s.x,l=o.y-s.y,c=e.vx*a+e.vy*l,n=Math.min(n,c),r=Math.max(r,c);return{min:n,max:r}}function Hh(t,e){var n=e.x-t.x,r=e.y-t.y,s=Math.sqrt(n*n+r*r);return{vx:(e.x-t.x)/s,vy:(e.y-t.y)/s,origin:t,ln:s}}var R5=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Br(R5.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,n=1,r=e._rect;return t=au(t,e.center(),-e._rotation),!(t.x<r.x-n||t.y<r.y-n||t.x>r.x+r.w+n*2||t.y>r.y+r.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),r=[Hh(e[0],e[1]),Hh(e[0],e[3])],s,i,o;for(this._rotation!==t._rotation&&r.push(Hh(n[0],n[1]),Hh(n[0],n[3])),s=0;s<r.length;++s)if(i=D5(e,r[s]),o=D5(n,r[s]),i.max<o.min||o.max<i.min)return!1;return!0},_points:function(){var t=this,e=t._rect,n=t._rotation,r=t.center();return[au({x:e.x,y:e.y},r,n),au({x:e.x+e.w,y:e.y},r,n),au({x:e.x+e.w,y:e.y+e.h},r,n),au({x:e.x,y:e.y+e.h},r,n)]}});function I5(t,e,n){var r=e.positioner(t,e),s=r.vx,i=r.vy;if(!s&&!i)return{x:r.x,y:r.y};var o=n.w,a=n.h,l=e.rotation,c=Math.abs(o/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),u=Math.abs(o/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),d=1/Math.max(Math.abs(s),Math.abs(i));return c*=s*d,u*=i*d,c+=e.offset*s,u+=e.offset*i,{x:r.x+c,y:r.y+u}}function Vj(t,e){var n,r,s,i;for(n=t.length-1;n>=0;--n)for(s=t[n].$layout,r=n-1;r>=0&&s._visible;--r)i=t[r].$layout,i._visible&&s._box.intersects(i._box)&&e(s,i);return t}function Uj(t){var e,n,r,s,i,o,a;for(e=0,n=t.length;e<n;++e)r=t[e],s=r.$layout,s._visible&&(a=new Proxy(r._el,{get:(l,c)=>l.getProps([c],!0)[c]}),i=r.geometry(),o=I5(a,r.model(),i),s._box.update(o,i,r.rotation()));return Vj(t,function(l,c){var u=l._hidable,d=c._hidable;u&&d||d?c._visible=!1:u&&(l._visible=!1)})}var lu={prepare:function(t){var e=[],n,r,s,i,o;for(n=0,s=t.length;n<s;++n)for(r=0,i=t[n].length;r<i;++r)o=t[n][r],e.push(o),o.$layout={_box:new R5,_hidable:!1,_visible:!0,_set:n,_idx:o._index};return e.sort(function(a,l){var c=a.$layout,u=l.$layout;return c._idx===u._idx?u._set-c._set:u._idx-c._idx}),this.update(e),e},update:function(t){var e=!1,n,r,s,i,o;for(n=0,r=t.length;n<r;++n)s=t[n],i=s.model(),o=s.$layout,o._hidable=i&&i.display==="auto",o._visible=s.visible(),e|=o._hidable;e&&Uj(t)},lookup:function(t,e){var n,r;for(n=t.length-1;n>=0;--n)if(r=t[n].$layout,r&&r._visible&&r._box.contains(e))return t[n];return null},draw:function(t,e){var n,r,s,i,o,a;for(n=0,r=e.length;n<r;++n)s=e[n],i=s.$layout,i._visible&&(o=s.geometry(),a=I5(s._el,s.model(),o),i._box.update(a,o,s.rotation()),s.draw(t,a))}},qj=function(t){if(Ge(t))return null;var e=t,n,r,s;if(ze(t))if(!Ge(t.label))e=t.label;else if(!Ge(t.r))e=t.r;else for(e="",n=Object.keys(t),s=0,r=n.length;s<r;++s)e+=(s!==0?", ":"")+n[s]+": "+t[n[s]];return""+e},Wj={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:qj,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},sr="$datalabels",N5="$default";function Gj(t,e){var n=t.datalabels,r={},s=[],i,o;return n===!1?null:(n===!0&&(n={}),e=Br({},[e,n]),i=e.labels||{},o=Object.keys(i),delete e.labels,o.length?o.forEach(function(a){i[a]&&s.push(Br({},[e,i[a],{_key:a}]))}):s.push(e),r=s.reduce(function(a,l){return Je(l.listeners||{},function(c,u){a[u]=a[u]||{},a[u][l._key||N5]=c}),delete l.listeners,a},{}),{labels:s,listeners:r})}function V0(t,e,n,r){if(e){var s=n.$context,i=n.$groups,o;e[i._set]&&(o=e[i._set][i._key],o&&rt(o,[s,r])===!0&&(t[sr]._dirty=!0,n.update(s)))}}function Yj(t,e,n,r,s){var i,o;!n&&!r||(n?r?n!==r&&(o=i=!0):o=!0:i=!0,o&&V0(t,e.leave,n,s),i&&V0(t,e.enter,r,s))}function Kj(t,e){var n=t[sr],r=n._listeners,s,i;if(!(!r.enter&&!r.leave)){if(e.type==="mousemove")i=lu.lookup(n._labels,e);else if(e.type!=="mouseout")return;s=n._hovered,n._hovered=i,Yj(t,r,s,i,e)}}function Zj(t,e){var n=t[sr],r=n._listeners.click,s=r&&lu.lookup(n._labels,e);s&&V0(t,r,s,e)}var L5={id:"datalabels",defaults:Wj,beforeInit:function(t){t[sr]={_actives:[]}},beforeUpdate:function(t){var e=t[sr];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var r=e.index,s=t[sr],i=s._datasets[r]=[],o=t.isDatasetVisible(r),a=t.data.datasets[r],l=Gj(a,n),c=e.meta.data||[],u=t.ctx,d,h,f,p,m,g,y,v;for(u.save(),d=0,f=c.length;d<f;++d)if(y=c[d],y[sr]=[],o&&y&&t.getDataVisibility(d)&&!y.skip)for(h=0,p=l.labels.length;h<p;++h)m=l.labels[h],g=m._key,v=new P5(m,u,y,d),v.$groups={_set:r,_key:g||N5},v.$context={active:!1,chart:t,dataIndex:d,dataset:a,datasetIndex:r},v.update(v.$context),y[sr].push(v),i.push(v);u.restore(),Br(s._listeners,l.listeners,{merger:function(b,C,_){C[b]=C[b]||{},C[b][e.index]=_[b],s._listened=!0}})},afterUpdate:function(t){t[sr]._labels=lu.prepare(t[sr]._datasets)},afterDatasetsDraw:function(t){lu.draw(t,t[sr]._labels)},beforeEvent:function(t,e){if(t[sr]._listened){var n=e.event;switch(n.type){case"mousemove":case"mouseout":Kj(t,n);break;case"click":Zj(t,n);break}}},afterEvent:function(t){var e=t[sr],n=e._actives,r=e._actives=t.getActiveElements(),s=ou.arrayDiff(n,r),i,o,a,l,c,u,d;for(i=0,o=s.length;i<o;++i)if(c=s[i],c[1])for(d=c[0].element[sr]||[],a=0,l=d.length;a<l;++a)u=d[a],u.$context.active=c[1]===1,u.update(u.$context);(e._dirty||s.length)&&(lu.update(e._labels),t.render()),delete e._dirty}};const{min:Xj,max:Qj}=Math,Zo=(t,e=0,n=1)=>Xj(Qj(e,t),n),U0=t=>{t._clipped=!1,t._unclipped=t.slice(0);for(let e=0;e<=3;e++)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]=Zo(t[e],0,255)):e===3&&(t[e]=Zo(t[e],0,1));return t},B5={};for(let t of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])B5[`[object ${t}]`]=t.toLowerCase();function Fe(t){return B5[Object.prototype.toString.call(t)]||"object"}const Ne=(t,e=null)=>t.length>=3?Array.prototype.slice.call(t):Fe(t[0])=="object"&&e?e.split("").filter(n=>t[0][n]!==void 0).map(n=>t[0][n]):t[0].slice(0),Qa=t=>{if(t.length<2)return null;const e=t.length-1;return Fe(t[e])=="string"?t[e].toLowerCase():null},{PI:Vh,min:j5,max:F5}=Math,Fr=t=>Math.round(t*100)/100,q0=t=>Math.round(t*100)/100,fi=Vh*2,W0=Vh/3,Jj=Vh/180,eF=180/Vh;function z5(t){return[...t.slice(0,3).reverse(),...t.slice(3)]}const Re={format:{},autodetect:[]};class ie{constructor(...e){const n=this;if(Fe(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Qa(e),s=!1;if(!r){s=!0,Re.sorted||(Re.autodetect=Re.autodetect.sort((i,o)=>o.p-i.p),Re.sorted=!0);for(let i of Re.autodetect)if(r=i.test(...e),r)break}if(Re.format[r]){const i=Re.format[r].apply(null,s?e:e.slice(0,-1));n._rgb=U0(i)}else throw new Error("unknown format: "+e);n._rgb.length===3&&n._rgb.push(1)}toString(){return Fe(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const tF="3.1.2",He=(...t)=>new ie(...t);He.version=tF;const Ja={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},nF=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rF=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,H5=t=>{if(t.match(nF)){(t.length===4||t.length===7)&&(t=t.substr(1)),t.length===3&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const e=parseInt(t,16),n=e>>16,r=e>>8&255,s=e&255;return[n,r,s,1]}if(t.match(rF)){(t.length===5||t.length===9)&&(t=t.substr(1)),t.length===4&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const e=parseInt(t,16),n=e>>24&255,r=e>>16&255,s=e>>8&255,i=Math.round((e&255)/255*100)/100;return[n,r,s,i]}throw new Error(`unknown hex color: ${t}`)},{round:Uh}=Math,V5=(...t)=>{let[e,n,r,s]=Ne(t,"rgba"),i=Qa(t)||"auto";s===void 0&&(s=1),i==="auto"&&(i=s<1?"rgba":"rgb"),e=Uh(e),n=Uh(n),r=Uh(r);let a="000000"+(e<<16|n<<8|r).toString(16);a=a.substr(a.length-6);let l="0"+Uh(s*255).toString(16);switch(l=l.substr(l.length-2),i.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};ie.prototype.name=function(){const t=V5(this._rgb,"rgb");for(let e of Object.keys(Ja))if(Ja[e]===t)return e.toLowerCase();return t},Re.format.named=t=>{if(t=t.toLowerCase(),Ja[t])return H5(Ja[t]);throw new Error("unknown color name: "+t)},Re.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&Fe(t)==="string"&&Ja[t.toLowerCase()])return"named"}}),ie.prototype.alpha=function(t,e=!1){return t!==void 0&&Fe(t)==="number"?e?(this._rgb[3]=t,this):new ie([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},ie.prototype.clipped=function(){return this._rgb._clipped||!1};const Is={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},sF=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function pi(t){const e=sF.get(String(t).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+t);Is.labWhitePoint=t,Is.Xn=e[0],Is.Zn=e[1]}function cu(){return Is.labWhitePoint}const G0=(...t)=>{t=Ne(t,"lab");const[e,n,r]=t,[s,i,o]=iF(e,n,r),[a,l,c]=U5(s,i,o);return[a,l,c,t.length>3?t[3]:1]},iF=(t,e,n)=>{const{kE:r,kK:s,kKE:i,Xn:o,Yn:a,Zn:l}=Is,c=(t+16)/116,u=.002*e+c,d=c-.005*n,h=u*u*u,f=d*d*d,p=h>r?h:(116*u-16)/s,m=t>i?Math.pow((t+16)/116,3):t/s,g=f>r?f:(116*d-16)/s,y=p*o,v=m*a,b=g*l;return[y,v,b]},Y0=t=>{const e=Math.sign(t);return t=Math.abs(t),(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*e},U5=(t,e,n)=>{const{MtxAdaptMa:r,MtxAdaptMaI:s,MtxXYZ2RGB:i,RefWhiteRGB:o,Xn:a,Yn:l,Zn:c}=Is,u=a*r.m00+l*r.m10+c*r.m20,d=a*r.m01+l*r.m11+c*r.m21,h=a*r.m02+l*r.m12+c*r.m22,f=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,p=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,m=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(t*r.m00+e*r.m10+n*r.m20)*(f/u),y=(t*r.m01+e*r.m11+n*r.m21)*(p/d),v=(t*r.m02+e*r.m12+n*r.m22)*(m/h),b=g*s.m00+y*s.m10+v*s.m20,C=g*s.m01+y*s.m11+v*s.m21,_=g*s.m02+y*s.m12+v*s.m22,k=Y0(b*i.m00+C*i.m10+_*i.m20),E=Y0(b*i.m01+C*i.m11+_*i.m21),A=Y0(b*i.m02+C*i.m12+_*i.m22);return[k*255,E*255,A*255]},K0=(...t)=>{const[e,n,r,...s]=Ne(t,"rgb"),[i,o,a]=q5(e,n,r),[l,c,u]=oF(i,o,a);return[l,c,u,...s.length>0&&s[0]<1?[s[0]]:[]]};function oF(t,e,n){const{Xn:r,Yn:s,Zn:i,kE:o,kK:a}=Is,l=t/r,c=e/s,u=n/i,d=l>o?Math.pow(l,1/3):(a*l+16)/116,h=c>o?Math.pow(c,1/3):(a*c+16)/116,f=u>o?Math.pow(u,1/3):(a*u+16)/116;return[116*h-16,500*(d-h),200*(h-f)]}function Z0(t){const e=Math.sign(t);return t=Math.abs(t),(t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4))*e}const q5=(t,e,n)=>{t=Z0(t/255),e=Z0(e/255),n=Z0(n/255);const{MtxRGB2XYZ:r,MtxAdaptMa:s,MtxAdaptMaI:i,Xn:o,Yn:a,Zn:l,As:c,Bs:u,Cs:d}=Is;let h=t*r.m00+e*r.m10+n*r.m20,f=t*r.m01+e*r.m11+n*r.m21,p=t*r.m02+e*r.m12+n*r.m22;const m=o*s.m00+a*s.m10+l*s.m20,g=o*s.m01+a*s.m11+l*s.m21,y=o*s.m02+a*s.m12+l*s.m22;let v=h*s.m00+f*s.m10+p*s.m20,b=h*s.m01+f*s.m11+p*s.m21,C=h*s.m02+f*s.m12+p*s.m22;return v*=m/c,b*=g/u,C*=y/d,h=v*i.m00+b*i.m10+C*i.m20,f=v*i.m01+b*i.m11+C*i.m21,p=v*i.m02+b*i.m12+C*i.m22,[h,f,p]};ie.prototype.lab=function(){return K0(this._rgb)},Object.assign(He,{lab:(...t)=>new ie(...t,"lab"),getLabWhitePoint:cu,setLabWhitePoint:pi}),Re.format.lab=G0,Re.autodetect.push({p:2,test:(...t)=>{if(t=Ne(t,"lab"),Fe(t)==="array"&&t.length===3)return"lab"}}),ie.prototype.darken=function(t=1){const e=this,n=e.lab();return n[0]-=Is.Kn*t,new ie(n,"lab").alpha(e.alpha(),!0)},ie.prototype.brighten=function(t=1){return this.darken(-t)},ie.prototype.darker=ie.prototype.darken,ie.prototype.brighter=ie.prototype.brighten,ie.prototype.get=function(t){const[e,n]=t.split("."),r=this[e]();if(n){const s=e.indexOf(n)-(e.substr(0,2)==="ok"?2:0);if(s>-1)return r[s];throw new Error(`unknown channel ${n} in mode ${e}`)}else return r};const{pow:aF}=Math,lF=1e-7,cF=20;ie.prototype.luminance=function(t,e="rgb"){if(t!==void 0&&Fe(t)==="number"){if(t===0)return new ie([0,0,0,this._rgb[3]],"rgb");if(t===1)return new ie([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=cF;const s=(o,a)=>{const l=o.interpolate(a,.5,e),c=l.luminance();return Math.abs(t-c)<lF||!r--?l:c>t?s(o,l):s(l,a)},i=(n>t?s(new ie([0,0,0]),this):s(this,new ie([255,255,255]))).rgb();return new ie([...i,this._rgb[3]])}return uF(...this._rgb.slice(0,3))};const uF=(t,e,n)=>(t=X0(t),e=X0(e),n=X0(n),.2126*t+.7152*e+.0722*n),X0=t=>(t/=255,t<=.03928?t/12.92:aF((t+.055)/1.055,2.4)),An={},el=(t,e,n=.5,...r)=>{let s=r[0]||"lrgb";if(!An[s]&&!r.length&&(s=Object.keys(An)[0]),!An[s])throw new Error(`interpolation mode ${s} is not defined`);return Fe(t)!=="object"&&(t=new ie(t)),Fe(e)!=="object"&&(e=new ie(e)),An[s](t,e,n).alpha(t.alpha()+n*(e.alpha()-t.alpha()))};ie.prototype.mix=ie.prototype.interpolate=function(t,e=.5,...n){return el(this,t,e,...n)},ie.prototype.premultiply=function(t=!1){const e=this._rgb,n=e[3];return t?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new ie([e[0]*n,e[1]*n,e[2]*n,n],"rgb")};const{sin:dF,cos:hF}=Math,W5=(...t)=>{let[e,n,r]=Ne(t,"lch");return isNaN(r)&&(r=0),r=r*Jj,[e,hF(r)*n,dF(r)*n]},Q0=(...t)=>{t=Ne(t,"lch");const[e,n,r]=t,[s,i,o]=W5(e,n,r),[a,l,c]=G0(s,i,o);return[a,l,c,t.length>3?t[3]:1]},fF=(...t)=>{const e=z5(Ne(t,"hcl"));return Q0(...e)},{sqrt:pF,atan2:gF,round:mF}=Math,G5=(...t)=>{const[e,n,r]=Ne(t,"lab"),s=pF(n*n+r*r);let i=(gF(r,n)*eF+360)%360;return mF(s*1e4)===0&&(i=Number.NaN),[e,s,i]},J0=(...t)=>{const[e,n,r,...s]=Ne(t,"rgb"),[i,o,a]=K0(e,n,r),[l,c,u]=G5(i,o,a);return[l,c,u,...s.length>0&&s[0]<1?[s[0]]:[]]};ie.prototype.lch=function(){return J0(this._rgb)},ie.prototype.hcl=function(){return z5(J0(this._rgb))},Object.assign(He,{lch:(...t)=>new ie(...t,"lch"),hcl:(...t)=>new ie(...t,"hcl")}),Re.format.lch=Q0,Re.format.hcl=fF,["lch","hcl"].forEach(t=>Re.autodetect.push({p:2,test:(...e)=>{if(e=Ne(e,t),Fe(e)==="array"&&e.length===3)return t}})),ie.prototype.saturate=function(t=1){const e=this,n=e.lch();return n[1]+=Is.Kn*t,n[1]<0&&(n[1]=0),new ie(n,"lch").alpha(e.alpha(),!0)},ie.prototype.desaturate=function(t=1){return this.saturate(-t)},ie.prototype.set=function(t,e,n=!1){const[r,s]=t.split("."),i=this[r]();if(s){const o=r.indexOf(s)-(r.substr(0,2)==="ok"?2:0);if(o>-1){if(Fe(e)=="string")switch(e.charAt(0)){case"+":i[o]+=+e;break;case"-":i[o]+=+e;break;case"*":i[o]*=+e.substr(1);break;case"/":i[o]/=+e.substr(1);break;default:i[o]=+e}else if(Fe(e)==="number")i[o]=e;else throw new Error("unsupported value for Color.set");const a=new ie(i,r);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${s} in mode ${r}`)}else return i},ie.prototype.tint=function(t=.5,...e){return el(this,"white",t,...e)},ie.prototype.shade=function(t=.5,...e){return el(this,"black",t,...e)};const yF=(t,e,n)=>{const r=t._rgb,s=e._rgb;return new ie(r[0]+n*(s[0]-r[0]),r[1]+n*(s[1]-r[1]),r[2]+n*(s[2]-r[2]),"rgb")};An.rgb=yF;const{sqrt:em,pow:tl}=Math,bF=(t,e,n)=>{const[r,s,i]=t._rgb,[o,a,l]=e._rgb;return new ie(em(tl(r,2)*(1-n)+tl(o,2)*n),em(tl(s,2)*(1-n)+tl(a,2)*n),em(tl(i,2)*(1-n)+tl(l,2)*n),"rgb")};An.lrgb=bF;const vF=(t,e,n)=>{const r=t.lab(),s=e.lab();return new ie(r[0]+n*(s[0]-r[0]),r[1]+n*(s[1]-r[1]),r[2]+n*(s[2]-r[2]),"lab")};An.lab=vF;const nl=(t,e,n,r)=>{let s,i;r==="hsl"?(s=t.hsl(),i=e.hsl()):r==="hsv"?(s=t.hsv(),i=e.hsv()):r==="hcg"?(s=t.hcg(),i=e.hcg()):r==="hsi"?(s=t.hsi(),i=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",s=t.hcl(),i=e.hcl()):r==="oklch"&&(s=t.oklch().reverse(),i=e.oklch().reverse());let o,a,l,c,u,d;(r.substr(0,1)==="h"||r==="oklch")&&([o,l,u]=s,[a,c,d]=i);let h,f,p,m;return!isNaN(o)&&!isNaN(a)?(a>o&&a-o>180?m=a-(o+360):a<o&&o-a>180?m=a+360-o:m=a-o,f=o+n*m):isNaN(o)?isNaN(a)?f=Number.NaN:(f=a,(u==1||u==0)&&r!="hsv"&&(h=c)):(f=o,(d==1||d==0)&&r!="hsv"&&(h=l)),h===void 0&&(h=l+n*(c-l)),p=u+n*(d-u),r==="oklch"?new ie([p,h,f],r):new ie([f,h,p],r)},Y5=(t,e,n)=>nl(t,e,n,"lch");An.lch=Y5,An.hcl=Y5;const xF=t=>{if(Fe(t)=="number"&&t>=0&&t<=16777215){const e=t>>16,n=t>>8&255,r=t&255;return[e,n,r,1]}throw new Error("unknown num color: "+t)},wF=(...t)=>{const[e,n,r]=Ne(t,"rgb");return(e<<16)+(n<<8)+r};ie.prototype.num=function(){return wF(this._rgb)},Object.assign(He,{num:(...t)=>new ie(...t,"num")}),Re.format.num=xF,Re.autodetect.push({p:5,test:(...t)=>{if(t.length===1&&Fe(t[0])==="number"&&t[0]>=0&&t[0]<=16777215)return"num"}});const _F=(t,e,n)=>{const r=t.num(),s=e.num();return new ie(r+n*(s-r),"num")};An.num=_F;const{floor:CF}=Math,SF=(...t)=>{t=Ne(t,"hcg");let[e,n,r]=t,s,i,o;r=r*255;const a=n*255;if(n===0)s=i=o=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const l=CF(e),c=e-l,u=r*(1-n),d=u+a*(1-c),h=u+a*c,f=u+a;switch(l){case 0:[s,i,o]=[f,h,u];break;case 1:[s,i,o]=[d,f,u];break;case 2:[s,i,o]=[u,f,h];break;case 3:[s,i,o]=[u,d,f];break;case 4:[s,i,o]=[h,u,f];break;case 5:[s,i,o]=[f,u,d];break}}return[s,i,o,t.length>3?t[3]:1]},EF=(...t)=>{const[e,n,r]=Ne(t,"rgb"),s=j5(e,n,r),i=F5(e,n,r),o=i-s,a=o*100/255,l=s/(255-o)*100;let c;return o===0?c=Number.NaN:(e===i&&(c=(n-r)/o),n===i&&(c=2+(r-e)/o),r===i&&(c=4+(e-n)/o),c*=60,c<0&&(c+=360)),[c,a,l]};ie.prototype.hcg=function(){return EF(this._rgb)};const AF=(...t)=>new ie(...t,"hcg");He.hcg=AF,Re.format.hcg=SF,Re.autodetect.push({p:1,test:(...t)=>{if(t=Ne(t,"hcg"),Fe(t)==="array"&&t.length===3)return"hcg"}});const TF=(t,e,n)=>nl(t,e,n,"hcg");An.hcg=TF;const{cos:rl}=Math,kF=(...t)=>{t=Ne(t,"hsi");let[e,n,r]=t,s,i,o;return isNaN(e)&&(e=0),isNaN(n)&&(n=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(o=(1-n)/3,s=(1+n*rl(fi*e)/rl(W0-fi*e))/3,i=1-(o+s)):e<2/3?(e-=1/3,s=(1-n)/3,i=(1+n*rl(fi*e)/rl(W0-fi*e))/3,o=1-(s+i)):(e-=2/3,i=(1-n)/3,o=(1+n*rl(fi*e)/rl(W0-fi*e))/3,s=1-(i+o)),s=Zo(r*s*3),i=Zo(r*i*3),o=Zo(r*o*3),[s*255,i*255,o*255,t.length>3?t[3]:1]},{min:MF,sqrt:OF,acos:$F}=Math,PF=(...t)=>{let[e,n,r]=Ne(t,"rgb");e/=255,n/=255,r/=255;let s;const i=MF(e,n,r),o=(e+n+r)/3,a=o>0?1-i/o:0;return a===0?s=NaN:(s=(e-n+(e-r))/2,s/=OF((e-n)*(e-n)+(e-r)*(n-r)),s=$F(s),r>n&&(s=fi-s),s/=fi),[s*360,a,o]};ie.prototype.hsi=function(){return PF(this._rgb)};const DF=(...t)=>new ie(...t,"hsi");He.hsi=DF,Re.format.hsi=kF,Re.autodetect.push({p:2,test:(...t)=>{if(t=Ne(t,"hsi"),Fe(t)==="array"&&t.length===3)return"hsi"}});const RF=(t,e,n)=>nl(t,e,n,"hsi");An.hsi=RF;const tm=(...t)=>{t=Ne(t,"hsl");const[e,n,r]=t;let s,i,o;if(n===0)s=i=o=r*255;else{const a=[0,0,0],l=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,u=2*r-c,d=e/360;a[0]=d+1/3,a[1]=d,a[2]=d-1/3;for(let h=0;h<3;h++)a[h]<0&&(a[h]+=1),a[h]>1&&(a[h]-=1),6*a[h]<1?l[h]=u+(c-u)*6*a[h]:2*a[h]<1?l[h]=c:3*a[h]<2?l[h]=u+(c-u)*(2/3-a[h])*6:l[h]=u;[s,i,o]=[l[0]*255,l[1]*255,l[2]*255]}return t.length>3?[s,i,o,t[3]]:[s,i,o,1]},K5=(...t)=>{t=Ne(t,"rgba");let[e,n,r]=t;e/=255,n/=255,r/=255;const s=j5(e,n,r),i=F5(e,n,r),o=(i+s)/2;let a,l;return i===s?(a=0,l=Number.NaN):a=o<.5?(i-s)/(i+s):(i-s)/(2-i-s),e==i?l=(n-r)/(i-s):n==i?l=2+(r-e)/(i-s):r==i&&(l=4+(e-n)/(i-s)),l*=60,l<0&&(l+=360),t.length>3&&t[3]!==void 0?[l,a,o,t[3]]:[l,a,o]};ie.prototype.hsl=function(){return K5(this._rgb)};const IF=(...t)=>new ie(...t,"hsl");He.hsl=IF,Re.format.hsl=tm,Re.autodetect.push({p:2,test:(...t)=>{if(t=Ne(t,"hsl"),Fe(t)==="array"&&t.length===3)return"hsl"}});const NF=(t,e,n)=>nl(t,e,n,"hsl");An.hsl=NF;const{floor:LF}=Math,BF=(...t)=>{t=Ne(t,"hsv");let[e,n,r]=t,s,i,o;if(r*=255,n===0)s=i=o=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const a=LF(e),l=e-a,c=r*(1-n),u=r*(1-n*l),d=r*(1-n*(1-l));switch(a){case 0:[s,i,o]=[r,d,c];break;case 1:[s,i,o]=[u,r,c];break;case 2:[s,i,o]=[c,r,d];break;case 3:[s,i,o]=[c,u,r];break;case 4:[s,i,o]=[d,c,r];break;case 5:[s,i,o]=[r,c,u];break}}return[s,i,o,t.length>3?t[3]:1]},{min:jF,max:FF}=Math,zF=(...t)=>{t=Ne(t,"rgb");let[e,n,r]=t;const s=jF(e,n,r),i=FF(e,n,r),o=i-s;let a,l,c;return c=i/255,i===0?(a=Number.NaN,l=0):(l=o/i,e===i&&(a=(n-r)/o),n===i&&(a=2+(r-e)/o),r===i&&(a=4+(e-n)/o),a*=60,a<0&&(a+=360)),[a,l,c]};ie.prototype.hsv=function(){return zF(this._rgb)};const HF=(...t)=>new ie(...t,"hsv");He.hsv=HF,Re.format.hsv=BF,Re.autodetect.push({p:2,test:(...t)=>{if(t=Ne(t,"hsv"),Fe(t)==="array"&&t.length===3)return"hsv"}});const VF=(t,e,n)=>nl(t,e,n,"hsv");An.hsv=VF;function qh(t,e){let n=t.length;Array.isArray(t[0])||(t=[t]),Array.isArray(e[0])||(e=e.map(o=>[o]));let r=e[0].length,s=e[0].map((o,a)=>e.map(l=>l[a])),i=t.map(o=>s.map(a=>Array.isArray(o)?o.reduce((l,c,u)=>l+c*(a[u]||0),0):a.reduce((l,c)=>l+c*o,0)));return n===1&&(i=i[0]),r===1?i.map(o=>o[0]):i}const nm=(...t)=>{t=Ne(t,"lab");const[e,n,r,...s]=t,[i,o,a]=UF([e,n,r]),[l,c,u]=U5(i,o,a);return[l,c,u,...s.length>0&&s[0]<1?[s[0]]:[]]};function UF(t){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=qh(n,t);return qh(e,r.map(s=>s**3))}const rm=(...t)=>{const[e,n,r,...s]=Ne(t,"rgb"),i=q5(e,n,r);return[...qF(i),...s.length>0&&s[0]<1?[s[0]]:[]]};function qF(t){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=qh(e,t);return qh(n,r.map(s=>Math.cbrt(s)))}ie.prototype.oklab=function(){return rm(this._rgb)},Object.assign(He,{oklab:(...t)=>new ie(...t,"oklab")}),Re.format.oklab=nm,Re.autodetect.push({p:2,test:(...t)=>{if(t=Ne(t,"oklab"),Fe(t)==="array"&&t.length===3)return"oklab"}});const WF=(t,e,n)=>{const r=t.oklab(),s=e.oklab();return new ie(r[0]+n*(s[0]-r[0]),r[1]+n*(s[1]-r[1]),r[2]+n*(s[2]-r[2]),"oklab")};An.oklab=WF;const GF=(t,e,n)=>nl(t,e,n,"oklch");An.oklch=GF;const{pow:sm,sqrt:im,PI:om,cos:Z5,sin:X5,atan2:YF}=Math,KF=(t,e="lrgb",n=null)=>{const r=t.length;n||(n=Array.from(new Array(r)).map(()=>1));const s=r/n.reduce(function(d,h){return d+h});if(n.forEach((d,h)=>{n[h]*=s}),t=t.map(d=>new ie(d)),e==="lrgb")return ZF(t,n);const i=t.shift(),o=i.get(e),a=[];let l=0,c=0;for(let d=0;d<o.length;d++)if(o[d]=(o[d]||0)*n[0],a.push(isNaN(o[d])?0:n[0]),e.charAt(d)==="h"&&!isNaN(o[d])){const h=o[d]/180*om;l+=Z5(h)*n[0],c+=X5(h)*n[0]}let u=i.alpha()*n[0];t.forEach((d,h)=>{const f=d.get(e);u+=d.alpha()*n[h+1];for(let p=0;p<o.length;p++)if(!isNaN(f[p]))if(a[p]+=n[h+1],e.charAt(p)==="h"){const m=f[p]/180*om;l+=Z5(m)*n[h+1],c+=X5(m)*n[h+1]}else o[p]+=f[p]*n[h+1]});for(let d=0;d<o.length;d++)if(e.charAt(d)==="h"){let h=YF(c/a[d],l/a[d])/om*180;for(;h<0;)h+=360;for(;h>=360;)h-=360;o[d]=h}else o[d]=o[d]/a[d];return u/=r,new ie(o,e).alpha(u>.99999?1:u,!0)},ZF=(t,e)=>{const n=t.length,r=[0,0,0,0];for(let s=0;s<t.length;s++){const i=t[s],o=e[s]/n,a=i._rgb;r[0]+=sm(a[0],2)*o,r[1]+=sm(a[1],2)*o,r[2]+=sm(a[2],2)*o,r[3]+=a[3]*o}return r[0]=im(r[0]),r[1]=im(r[1]),r[2]=im(r[2]),r[3]>.9999999&&(r[3]=1),new ie(U0(r))},{pow:XF}=Math;function Wh(t){let e="rgb",n=He("#ccc"),r=0,s=[0,1],i=[],o=[0,0],a=!1,l=[],c=!1,u=0,d=1,h=!1,f={},p=!0,m=1;const g=function(E){if(E=E||["#fff","#000"],E&&Fe(E)==="string"&&He.brewer&&He.brewer[E.toLowerCase()]&&(E=He.brewer[E.toLowerCase()]),Fe(E)==="array"){E.length===1&&(E=[E[0],E[0]]),E=E.slice(0);for(let A=0;A<E.length;A++)E[A]=He(E[A]);i.length=0;for(let A=0;A<E.length;A++)i.push(A/(E.length-1))}return _(),l=E},y=function(E){if(a!=null){const A=a.length-1;let $=0;for(;$<A&&E>=a[$];)$++;return $-1}return 0};let v=E=>E,b=E=>E;const C=function(E,A){let $,P;if(A==null&&(A=!1),isNaN(E)||E===null)return n;A?P=E:a&&a.length>2?P=y(E)/(a.length-2):d!==u?P=(E-u)/(d-u):P=1,P=b(P),A||(P=v(P)),m!==1&&(P=XF(P,m)),P=o[0]+P*(1-o[0]-o[1]),P=Zo(P,0,1);const O=Math.floor(P*1e4);if(p&&f[O])$=f[O];else{if(Fe(l)==="array")for(let R=0;R<i.length;R++){const H=i[R];if(P<=H){$=l[R];break}if(P>=H&&R===i.length-1){$=l[R];break}if(P>H&&P<i[R+1]){P=(P-H)/(i[R+1]-H),$=He.interpolate(l[R],l[R+1],P,e);break}}else Fe(l)==="function"&&($=l(P));p&&(f[O]=$)}return $};var _=()=>f={};g(t);const k=function(E){const A=He(C(E));return c&&A[c]?A[c]():A};return k.classes=function(E){if(E!=null){if(Fe(E)==="array")a=E,s=[E[0],E[E.length-1]];else{const A=He.analyze(s);E===0?a=[A.min,A.max]:a=He.limits(A,"e",E)}return k}return a},k.domain=function(E){if(!arguments.length)return s;u=E[0],d=E[E.length-1],i=[];const A=l.length;if(E.length===A&&u!==d)for(let $ of Array.from(E))i.push(($-u)/(d-u));else{for(let $=0;$<A;$++)i.push($/(A-1));if(E.length>2){const $=E.map((O,R)=>R/(E.length-1)),P=E.map(O=>(O-u)/(d-u));P.every((O,R)=>$[R]===O)||(b=O=>{if(O<=0||O>=1)return O;let R=0;for(;O>=P[R+1];)R++;const H=(O-P[R])/(P[R+1]-P[R]);return $[R]+H*($[R+1]-$[R])})}}return s=[u,d],k},k.mode=function(E){return arguments.length?(e=E,_(),k):e},k.range=function(E,A){return g(E),k},k.out=function(E){return c=E,k},k.spread=function(E){return arguments.length?(r=E,k):r},k.correctLightness=function(E){return E==null&&(E=!0),h=E,_(),h?v=function(A){const $=C(0,!0).lab()[0],P=C(1,!0).lab()[0],O=$>P;let R=C(A,!0).lab()[0];const H=$+(P-$)*A;let z=R-H,j=0,F=1,V=20;for(;Math.abs(z)>.01&&V-- >0;)(function(){return O&&(z*=-1),z<0?(j=A,A+=(F-A)*.5):(F=A,A+=(j-A)*.5),R=C(A,!0).lab()[0],z=R-H})();return A}:v=A=>A,k},k.padding=function(E){return E!=null?(Fe(E)==="number"&&(E=[E,E]),o=E,k):o},k.colors=function(E,A){arguments.length<2&&(A="hex");let $=[];if(arguments.length===0)$=l.slice(0);else if(E===1)$=[k(.5)];else if(E>1){const P=s[0],O=s[1]-P;$=QF(0,E).map(R=>k(P+R/(E-1)*O))}else{t=[];let P=[];if(a&&a.length>2)for(let O=1,R=a.length,H=1<=R;H?O<R:O>R;H?O++:O--)P.push((a[O-1]+a[O])*.5);else P=s;$=P.map(O=>k(O))}return He[A]&&($=$.map(P=>P[A]())),$},k.cache=function(E){return E!=null?(p=E,k):p},k.gamma=function(E){return E!=null?(m=E,k):m},k.nodata=function(E){return E!=null?(n=He(E),k):n},k}function QF(t,e,n){let r=[],s=t<e,i=e;for(let o=t;s?o<i:o>i;s?o++:o--)r.push(o);return r}const JF=function(t){let e=[1,1];for(let n=1;n<t;n++){let r=[1];for(let s=1;s<=e.length;s++)r[s]=(e[s]||0)+e[s-1];e=r}return e},ez=function(t){let e,n,r,s;if(t=t.map(i=>new ie(i)),t.length===2)[n,r]=t.map(i=>i.lab()),e=function(i){const o=[0,1,2].map(a=>n[a]+i*(r[a]-n[a]));return new ie(o,"lab")};else if(t.length===3)[n,r,s]=t.map(i=>i.lab()),e=function(i){const o=[0,1,2].map(a=>(1-i)*(1-i)*n[a]+2*(1-i)*i*r[a]+i*i*s[a]);return new ie(o,"lab")};else if(t.length===4){let i;[n,r,s,i]=t.map(o=>o.lab()),e=function(o){const a=[0,1,2].map(l=>(1-o)*(1-o)*(1-o)*n[l]+3*(1-o)*(1-o)*o*r[l]+3*(1-o)*o*o*s[l]+o*o*o*i[l]);return new ie(a,"lab")}}else if(t.length>=5){let i,o,a;i=t.map(l=>l.lab()),a=t.length-1,o=JF(a),e=function(l){const c=1-l,u=[0,1,2].map(d=>i.reduce((h,f,p)=>h+o[p]*c**(a-p)*l**p*f[d],0));return new ie(u,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},tz=t=>{const e=ez(t);return e.scale=()=>Wh(e),e},{round:Q5}=Math;ie.prototype.rgb=function(t=!0){return t===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Q5)},ie.prototype.rgba=function(t=!0){return this._rgb.slice(0,4).map((e,n)=>n<3?t===!1?e:Q5(e):e)},Object.assign(He,{rgb:(...t)=>new ie(...t,"rgb")}),Re.format.rgb=(...t)=>{const e=Ne(t,"rgba");return e[3]===void 0&&(e[3]=1),e},Re.autodetect.push({p:3,test:(...t)=>{if(t=Ne(t,"rgba"),Fe(t)==="array"&&(t.length===3||t.length===4&&Fe(t[3])=="number"&&t[3]>=0&&t[3]<=1))return"rgb"}});const as=(t,e,n)=>{if(!as[n])throw new Error("unknown blend mode "+n);return as[n](t,e)},Wi=t=>(e,n)=>{const r=He(n).rgb(),s=He(e).rgb();return He.rgb(t(r,s))},Gi=t=>(e,n)=>{const r=[];return r[0]=t(e[0],n[0]),r[1]=t(e[1],n[1]),r[2]=t(e[2],n[2]),r},nz=t=>t,rz=(t,e)=>t*e/255,sz=(t,e)=>t>e?e:t,iz=(t,e)=>t>e?t:e,oz=(t,e)=>255*(1-(1-t/255)*(1-e/255)),az=(t,e)=>e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255)),lz=(t,e)=>255*(1-(1-e/255)/(t/255)),cz=(t,e)=>t===255?255:(t=255*(e/255)/(1-t/255),t>255?255:t);as.normal=Wi(Gi(nz)),as.multiply=Wi(Gi(rz)),as.screen=Wi(Gi(oz)),as.overlay=Wi(Gi(az)),as.darken=Wi(Gi(sz)),as.lighten=Wi(Gi(iz)),as.dodge=Wi(Gi(cz)),as.burn=Wi(Gi(lz));const{pow:uz,sin:dz,cos:hz}=Math;function fz(t=300,e=-1.5,n=1,r=1,s=[0,1]){let i=0,o;Fe(s)==="array"?o=s[1]-s[0]:(o=0,s=[s,s]);const a=function(l){const c=fi*((t+120)/360+e*l),u=uz(s[0]+o*l,r),h=(i!==0?n[0]+l*i:n)*u*(1-u)/2,f=hz(c),p=dz(c),m=u+h*(-.14861*f+1.78277*p),g=u+h*(-.29227*f-.90649*p),y=u+h*(1.97294*f);return He(U0([m*255,g*255,y*255,1]))};return a.start=function(l){return l==null?t:(t=l,a)},a.rotations=function(l){return l==null?e:(e=l,a)},a.gamma=function(l){return l==null?r:(r=l,a)},a.hue=function(l){return l==null?n:(n=l,Fe(n)==="array"?(i=n[1]-n[0],i===0&&(n=n[1])):i=0,a)},a.lightness=function(l){return l==null?s:(Fe(l)==="array"?(s=l,o=l[1]-l[0]):(s=[l,l],o=0),a)},a.scale=()=>He.scale(a),a.hue(n),a}const pz="0123456789abcdef",{floor:gz,random:mz}=Math,yz=()=>{let t="#";for(let e=0;e<6;e++)t+=pz.charAt(gz(mz()*16));return new ie(t,"hex")},{log:J5,pow:bz,floor:vz,abs:xz}=Math;function eC(t,e=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Fe(t)==="object"&&(t=Object.values(t)),t.forEach(r=>{e&&Fe(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(r,s)=>tC(n,r,s),n}function tC(t,e="equal",n=7){Fe(t)=="array"&&(t=eC(t));const{min:r,max:s}=t,i=t.values.sort((a,l)=>a-l);if(n===1)return[r,s];const o=[];if(e.substr(0,1)==="c"&&(o.push(r),o.push(s)),e.substr(0,1)==="e"){o.push(r);for(let a=1;a<n;a++)o.push(r+a/n*(s-r));o.push(s)}else if(e.substr(0,1)==="l"){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");const a=Math.LOG10E*J5(r),l=Math.LOG10E*J5(s);o.push(r);for(let c=1;c<n;c++)o.push(bz(10,a+c/n*(l-a)));o.push(s)}else if(e.substr(0,1)==="q"){o.push(r);for(let a=1;a<n;a++){const l=(i.length-1)*a/n,c=vz(l);if(c===l)o.push(i[c]);else{const u=l-c;o.push(i[c]*(1-u)+i[c+1]*u)}}o.push(s)}else if(e.substr(0,1)==="k"){let a;const l=i.length,c=new Array(l),u=new Array(n);let d=!0,h=0,f=null;f=[],f.push(r);for(let g=1;g<n;g++)f.push(r+g/n*(s-r));for(f.push(s);d;){for(let y=0;y<n;y++)u[y]=0;for(let y=0;y<l;y++){const v=i[y];let b=Number.MAX_VALUE,C;for(let _=0;_<n;_++){const k=xz(f[_]-v);k<b&&(b=k,C=_),u[C]++,c[y]=C}}const g=new Array(n);for(let y=0;y<n;y++)g[y]=null;for(let y=0;y<l;y++)a=c[y],g[a]===null?g[a]=i[y]:g[a]+=i[y];for(let y=0;y<n;y++)g[y]*=1/u[y];d=!1;for(let y=0;y<n;y++)if(g[y]!==f[y]){d=!0;break}f=g,h++,h>200&&(d=!1)}const p={};for(let g=0;g<n;g++)p[g]=[];for(let g=0;g<l;g++)a=c[g],p[a].push(i[g]);let m=[];for(let g=0;g<n;g++)m.push(p[g][0]),m.push(p[g][p[g].length-1]);m=m.sort((g,y)=>g-y),o.push(m[0]);for(let g=1;g<m.length;g+=2){const y=m[g];!isNaN(y)&&o.indexOf(y)===-1&&o.push(y)}}return o}const wz=(t,e)=>{t=new ie(t),e=new ie(e);const n=t.luminance(),r=e.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)};/**
61
+ * @license
62
+ *
63
+ * The APCA contrast prediction algorithm is based of the formulas published
64
+ * in the APCA-1.0.98G specification by Myndex. The specification is available at:
65
+ * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg
66
+ *
67
+ * Note that the APCA implementation is still beta, so please update to
68
+ * future versions of chroma.js when they become available.
69
+ *
70
+ * You can read more about the APCA Readability Criterion at
71
+ * https://readtech.org/ARC/
72
+ */const nC=.027,_z=5e-4,Cz=.1,rC=1.14,Gh=.022,sC=1.414,Sz=(t,e)=>{t=new ie(t),e=new ie(e),t.alpha()<1&&(t=el(e,t,t.alpha(),"rgb"));const n=iC(...t.rgb()),r=iC(...e.rgb()),s=n>=Gh?n:n+Math.pow(Gh-n,sC),i=r>=Gh?r:r+Math.pow(Gh-r,sC),o=Math.pow(i,.56)-Math.pow(s,.57),a=Math.pow(i,.65)-Math.pow(s,.62),l=Math.abs(i-s)<_z?0:s<i?o*rC:a*rC;return(Math.abs(l)<Cz?0:l>0?l-nC:l+nC)*100};function iC(t,e,n){return .2126729*Math.pow(t/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:gi,pow:qt,min:Ez,max:Az,atan2:oC,abs:aC,cos:Yh,sin:lC,exp:Tz,PI:cC}=Math;function kz(t,e,n=1,r=1,s=1){var i=function(ne){return 360*ne/(2*cC)},o=function(ne){return 2*cC*ne/360};t=new ie(t),e=new ie(e);const[a,l,c]=Array.from(t.lab()),[u,d,h]=Array.from(e.lab()),f=(a+u)/2,p=gi(qt(l,2)+qt(c,2)),m=gi(qt(d,2)+qt(h,2)),g=(p+m)/2,y=.5*(1-gi(qt(g,7)/(qt(g,7)+qt(25,7)))),v=l*(1+y),b=d*(1+y),C=gi(qt(v,2)+qt(c,2)),_=gi(qt(b,2)+qt(h,2)),k=(C+_)/2,E=i(oC(c,v)),A=i(oC(h,b)),$=E>=0?E:E+360,P=A>=0?A:A+360,O=aC($-P)>180?($+P+360)/2:($+P)/2,R=1-.17*Yh(o(O-30))+.24*Yh(o(2*O))+.32*Yh(o(3*O+6))-.2*Yh(o(4*O-63));let H=P-$;H=aC(H)<=180?H:P<=$?H+360:H-360,H=2*gi(C*_)*lC(o(H)/2);const z=u-a,j=_-C,F=1+.015*qt(f-50,2)/gi(20+qt(f-50,2)),V=1+.045*k,q=1+.015*k*R,Q=30*Tz(-qt((O-275)/25,2)),W=-(2*gi(qt(k,7)/(qt(k,7)+qt(25,7))))*lC(2*o(Q)),se=gi(qt(z/(n*F),2)+qt(j/(r*V),2)+qt(H/(s*q),2)+W*(j/(r*V))*(H/(s*q)));return Az(0,Ez(100,se))}function Mz(t,e,n="lab"){t=new ie(t),e=new ie(e);const r=t.get(n),s=e.get(n);let i=0;for(let o in r){const a=(r[o]||0)-(s[o]||0);i+=a*a}return Math.sqrt(i)}const Oz=(...t)=>{try{return new ie(...t),!0}catch{return!1}},$z={cool(){return Wh([He.hsl(180,1,.9),He.hsl(250,.7,.4)])},hot(){return Wh(["#000","#f00","#ff0","#fff"]).mode("rgb")}},am={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},uC=Object.keys(am),dC=new Map(uC.map(t=>[t.toLowerCase(),t])),Pz=typeof Proxy=="function"?new Proxy(am,{get(t,e){const n=e.toLowerCase();if(dC.has(n))return t[dC.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(uC)}}):am,Dz=(...t)=>{t=Ne(t,"cmyk");const[e,n,r,s]=t,i=t.length>4?t[4]:1;return s===1?[0,0,0,i]:[e>=1?0:255*(1-e)*(1-s),n>=1?0:255*(1-n)*(1-s),r>=1?0:255*(1-r)*(1-s),i]},{max:hC}=Math,Rz=(...t)=>{let[e,n,r]=Ne(t,"rgb");e=e/255,n=n/255,r=r/255;const s=1-hC(e,hC(n,r)),i=s<1?1/(1-s):0,o=(1-e-s)*i,a=(1-n-s)*i,l=(1-r-s)*i;return[o,a,l,s]};ie.prototype.cmyk=function(){return Rz(this._rgb)},Object.assign(He,{cmyk:(...t)=>new ie(...t,"cmyk")}),Re.format.cmyk=Dz,Re.autodetect.push({p:2,test:(...t)=>{if(t=Ne(t,"cmyk"),Fe(t)==="array"&&t.length===4)return"cmyk"}});const Iz=(...t)=>{const e=Ne(t,"hsla");let n=Qa(t)||"lsa";return e[0]=Fr(e[0]||0)+"deg",e[1]=Fr(e[1]*100)+"%",e[2]=Fr(e[2]*100)+"%",n==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),n="hsla"):e.length=3,`${n.substr(0,3)}(${e.join(" ")})`},Nz=(...t)=>{const e=Ne(t,"lab");let n=Qa(t)||"lab";return e[0]=Fr(e[0])+"%",e[1]=Fr(e[1]),e[2]=Fr(e[2]),n==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},Lz=(...t)=>{const e=Ne(t,"lch");let n=Qa(t)||"lab";return e[0]=Fr(e[0])+"%",e[1]=Fr(e[1]),e[2]=isNaN(e[2])?"none":Fr(e[2])+"deg",n==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},Bz=(...t)=>{const e=Ne(t,"lab");return e[0]=Fr(e[0]*100)+"%",e[1]=q0(e[1]),e[2]=q0(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},fC=(...t)=>{const[e,n,r,...s]=Ne(t,"rgb"),[i,o,a]=rm(e,n,r),[l,c,u]=G5(i,o,a);return[l,c,u,...s.length>0&&s[0]<1?[s[0]]:[]]},jz=(...t)=>{const e=Ne(t,"lch");return e[0]=Fr(e[0]*100)+"%",e[1]=q0(e[1]),e[2]=isNaN(e[2])?"none":Fr(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:lm}=Math,Fz=(...t)=>{const e=Ne(t,"rgba");let n=Qa(t)||"rgb";if(n.substr(0,3)==="hsl")return Iz(K5(e),n);if(n.substr(0,3)==="lab"){const r=cu();pi("d50");const s=Nz(K0(e),n);return pi(r),s}if(n.substr(0,3)==="lch"){const r=cu();pi("d50");const s=Lz(J0(e),n);return pi(r),s}return n.substr(0,5)==="oklab"?Bz(rm(e)):n.substr(0,5)==="oklch"?jz(fC(e)):(e[0]=lm(e[0]),e[1]=lm(e[1]),e[2]=lm(e[2]),(n==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),n="rgba"),`${n.substr(0,3)}(${e.slice(0,n==="rgb"?3:4).join(" ")})`)},pC=(...t)=>{t=Ne(t,"lch");const[e,n,r,...s]=t,[i,o,a]=W5(e,n,r),[l,c,u]=nm(i,o,a);return[l,c,u,...s.length>0&&s[0]<1?[s[0]]:[]]},mi=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ls=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Kh=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,zr=/\s*/.source,sl=/\s+/.source,cm=/\s*,\s*/.source,Zh=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,il=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,gC=new RegExp("^rgba?\\("+zr+[mi,mi,mi].join(sl)+il+"\\)$"),mC=new RegExp("^rgb\\("+zr+[mi,mi,mi].join(cm)+zr+"\\)$"),yC=new RegExp("^rgba\\("+zr+[mi,mi,mi,ls].join(cm)+zr+"\\)$"),bC=new RegExp("^hsla?\\("+zr+[Zh,Kh,Kh].join(sl)+il+"\\)$"),vC=new RegExp("^hsl?\\("+zr+[Zh,Kh,Kh].join(cm)+zr+"\\)$"),xC=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,wC=new RegExp("^lab\\("+zr+[ls,ls,ls].join(sl)+il+"\\)$"),_C=new RegExp("^lch\\("+zr+[ls,ls,Zh].join(sl)+il+"\\)$"),CC=new RegExp("^oklab\\("+zr+[ls,ls,ls].join(sl)+il+"\\)$"),SC=new RegExp("^oklch\\("+zr+[ls,ls,Zh].join(sl)+il+"\\)$"),{round:EC}=Math,ol=t=>t.map((e,n)=>n<=2?Zo(EC(e),0,255):e),Wt=(t,e=0,n=100,r=!1)=>(typeof t=="string"&&t.endsWith("%")&&(t=parseFloat(t.substring(0,t.length-1))/100,r?t=e+(t+1)*.5*(n-e):t=e+t*(n-e)),+t),Un=(t,e)=>t==="none"?e:t,um=t=>{if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e;if(Re.format.named)try{return Re.format.named(t)}catch{}if((e=t.match(gC))||(e=t.match(mC))){let n=e.slice(1,4);for(let s=0;s<3;s++)n[s]=+Wt(Un(n[s],0),0,255);n=ol(n);const r=e[4]!==void 0?+Wt(e[4],0,1):1;return n[3]=r,n}if(e=t.match(yC)){const n=e.slice(1,5);for(let r=0;r<4;r++)n[r]=+Wt(n[r],0,255);return n}if((e=t.match(bC))||(e=t.match(vC))){const n=e.slice(1,4);n[0]=+Un(n[0].replace("deg",""),0),n[1]=+Wt(Un(n[1],0),0,100)*.01,n[2]=+Wt(Un(n[2],0),0,100)*.01;const r=ol(tm(n)),s=e[4]!==void 0?+Wt(e[4],0,1):1;return r[3]=s,r}if(e=t.match(xC)){const n=e.slice(1,4);n[1]*=.01,n[2]*=.01;const r=tm(n);for(let s=0;s<3;s++)r[s]=EC(r[s]);return r[3]=+e[4],r}if(e=t.match(wC)){const n=e.slice(1,4);n[0]=Wt(Un(n[0],0),0,100),n[1]=Wt(Un(n[1],0),-125,125,!0),n[2]=Wt(Un(n[2],0),-125,125,!0);const r=cu();pi("d50");const s=ol(G0(n));pi(r);const i=e[4]!==void 0?+Wt(e[4],0,1):1;return s[3]=i,s}if(e=t.match(_C)){const n=e.slice(1,4);n[0]=Wt(n[0],0,100),n[1]=Wt(Un(n[1],0),0,150,!1),n[2]=+Un(n[2].replace("deg",""),0);const r=cu();pi("d50");const s=ol(Q0(n));pi(r);const i=e[4]!==void 0?+Wt(e[4],0,1):1;return s[3]=i,s}if(e=t.match(CC)){const n=e.slice(1,4);n[0]=Wt(Un(n[0],0),0,1),n[1]=Wt(Un(n[1],0),-.4,.4,!0),n[2]=Wt(Un(n[2],0),-.4,.4,!0);const r=ol(nm(n)),s=e[4]!==void 0?+Wt(e[4],0,1):1;return r[3]=s,r}if(e=t.match(SC)){const n=e.slice(1,4);n[0]=Wt(Un(n[0],0),0,1),n[1]=Wt(Un(n[1],0),0,.4,!1),n[2]=+Un(n[2].replace("deg",""),0);const r=ol(pC(n)),s=e[4]!==void 0?+Wt(e[4],0,1):1;return r[3]=s,r}};um.test=t=>gC.test(t)||bC.test(t)||wC.test(t)||_C.test(t)||CC.test(t)||SC.test(t)||mC.test(t)||yC.test(t)||vC.test(t)||xC.test(t)||t==="transparent",ie.prototype.css=function(t){return Fz(this._rgb,t)};const zz=(...t)=>new ie(...t,"css");He.css=zz,Re.format.css=um,Re.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&Fe(t)==="string"&&um.test(t))return"css"}}),Re.format.gl=(...t)=>{const e=Ne(t,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const Hz=(...t)=>new ie(...t,"gl");He.gl=Hz,ie.prototype.gl=function(){const t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]},ie.prototype.hex=function(t){return V5(this._rgb,t)};const Vz=(...t)=>new ie(...t,"hex");He.hex=Vz,Re.format.hex=H5,Re.autodetect.push({p:4,test:(t,...e)=>{if(!e.length&&Fe(t)==="string"&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});const{log:Xh}=Math,AC=t=>{const e=t/100;let n,r,s;return e<66?(n=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*Xh(r),s=e<20?0:-254.76935184120902+.8274096064007395*(s=e-10)+115.67994401066147*Xh(s)):(n=351.97690566805693+.114206453784165*(n=e-55)-40.25366309332127*Xh(n),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*Xh(r),s=255),[n,r,s,1]},{round:Uz}=Math,qz=(...t)=>{const e=Ne(t,"rgb"),n=e[0],r=e[2];let s=1e3,i=4e4;const o=.4;let a;for(;i-s>o;){a=(i+s)*.5;const l=AC(a);l[2]/l[0]>=r/n?i=a:s=a}return Uz(a)};ie.prototype.temp=ie.prototype.kelvin=ie.prototype.temperature=function(){return qz(this._rgb)};const dm=(...t)=>new ie(...t,"temp");Object.assign(He,{temp:dm,kelvin:dm,temperature:dm}),Re.format.temp=Re.format.kelvin=Re.format.temperature=AC,ie.prototype.oklch=function(){return fC(this._rgb)},Object.assign(He,{oklch:(...t)=>new ie(...t,"oklch")}),Re.format.oklch=pC,Re.autodetect.push({p:2,test:(...t)=>{if(t=Ne(t,"oklch"),Fe(t)==="array"&&t.length===3)return"oklch"}}),Object.assign(He,{analyze:eC,average:KF,bezier:tz,blend:as,brewer:Pz,Color:ie,colors:Ja,contrast:wz,contrastAPCA:Sz,cubehelix:fz,deltaE:kz,distance:Mz,input:Re,interpolate:el,limits:tC,mix:el,random:yz,scale:Wh,scales:$z,valid:Oz});function TC(t,e,n,r=1e-5){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function hm(t){return{left:t.top,right:t.bottom,top:t.left,bottom:t.right,horizontal:!t.horizontal}}class al extends qi{constructor(){super(...arguments),this.align="center",this.next=void 0,this.previous=void 0}getBounds(e=!1){const{x:n,y:r,base:s,width:i,height:o,horizontal:a}=this.getProps(["x","y","base","width","height","horizontal"],e);if(a){const l=Math.abs(n-s),c=s-(this.align!=="left"?l:0),u=s+(this.align!=="right"?l:0),d=o/2,h=r-d,f=r+d;return{left:c,top:h,right:u,bottom:f,horizontal:a}}else{const l=Math.abs(r-s),c=i/2,u=n-c,d=n+c,h=s-(this.align!=="right"?l:0),f=s+(this.align!=="left"?l:0);return{left:u,top:h,right:d,bottom:f,horizontal:a}}}inRange(e,n,r){const s=this.getBounds(r),i=e==null||TC(e,s.left,s.right),o=n==null||TC(n,s.top,s.bottom);return i&&o}inXRange(e,n){return this.inRange(e,null,n)}inYRange(e,n){return this.inRange(null,e,n)}getCenterPoint(e){const{x:n,y:r,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{center:{x:i?s:n,y:i?r:s},left:{x:i?(s+n)/2:n,y:i?r:(s+r)/2},right:{x:i?s-(n-s)/2:n,y:i?r:s-(r+s)/2}}[this.align]}tooltipPosition(e){return this.getCenterPoint(e)}getRange(e){const{width:n,height:r}=this.getProps(["width","height"]);return e==="x"?n:r}computeWayPoints(e=!1){let n=this.options.shrinkAnchor,r=Math.max(Math.min(this.options.shrinkFraction,1),0);r===0&&(n="none",r=1);let s=this.getBounds(e);const i=s.horizontal;let o=this.next&&(n==="top"||n==="middle")?this.next.getBounds(e):s,a=this.previous&&(n==="bottom"||n==="middle")?this.previous.getBounds(e):s;i||(s=hm(s),o=hm(o),a=hm(a));const l=Math.floor((s.bottom-s.top)*(1-r)),c=Math.floor((s.bottom-s.top-l)/2),u=[],d=[];if(n==="none"||n==="top")u.push([s.left,s.top],[s.right,s.top]);else{let h=1;if(n==="middle"){const f=Math.floor((a.bottom-a.top)*r*.5);h=c/(f+c)}u.push([s.left+(a.left-s.left)*h,s.top],[s.right+(a.right-s.right)*h,s.top])}if(n==="middle"?(u.push([s.right,s.top+c]),u.push([s.right,s.bottom-c]),d.push([s.left,s.top+c]),d.push([s.left,s.bottom-c])):n==="top"&&r<1?(u.push([s.right,s.top+l]),d.push([s.left,s.top+l])):n==="bottom"&&r<1&&(u.push([s.right,s.bottom-l]),d.push([s.left,s.bottom-l])),n==="none"||n==="bottom")u.push([s.right,s.bottom],[s.left,s.bottom]);else{let h=1;if(n==="middle"){const f=Math.floor((o.bottom-o.top)*r*.5);h=c/(f+c)}u.push([s.right+(o.right-s.right)*h,s.bottom],[s.left+(o.left-s.left)*h,s.bottom])}return u.push(...d.reverse()),i?u:u.map(([h,f])=>[f,h])}draw(e){const{options:n}=this;e.save(),e.beginPath();const r=this.computeWayPoints();e.moveTo(r[0][0],r[0][1]);for(const s of r.slice(1))e.lineTo(s[0],s[1]);n.backgroundColor&&(e.fillStyle=n.backgroundColor,e.fill()),n.borderColor&&(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.stroke()),e.restore()}}al.id="trapezoid",al.defaults={...qi.defaults,shrinkAnchor:"top",shrinkFraction:1},al.defaultRoutes=qi.defaultRoutes;function Wz(t,e="#000000",n="#ffffff"){return He(t).luminance()>.5?e:n}function Gz(t,e){return He.scale("Blues")(t/(e-1)).hex()}function Yz(t,e,n,r=[],s=[]){Vn.addControllers(n),Array.isArray(r)?Vn.addElements(...r):Vn.addElements(r),Array.isArray(s)?Vn.addScales(...s):Vn.addScales(s);const i=e;return i.type=t,i}class ll extends Hi{getMinMax(e,n){const{max:r}=super.getMinMax(e,n);return{center:{min:-r,max:r},left:{min:0,max:r},right:{min:-r,max:0}}[this.options.align]}update(e){super.update(e);const r=this._cachedMeta.data||[];for(let s=0;s<r.length;s++)r[s].align=this.options.align,r[s].next=r[s+1],r[s].previous=r[s-1]}}ll.id="funnel",ll.defaults=Br({},[Hi.defaults,{dataElementType:al.id,barPercentage:1,align:"center",categoryPercentage:.98}]),ll.overrides=Br({},[Hi.overrides,{plugins:{legend:{display:!1},colors:{enabled:!1},datalabels:{anchor:"start",textAlign:"center",font:{size:20},color:t=>{const e=t.chart.getDatasetMeta(t.datasetIndex).data[t.dataIndex].options.backgroundColor;return Wz(e,Ko.defaults.color,"#ffffff")},formatter:(t,e)=>{var n,r;return`${(r=(n=e.chart.data.labels)===null||n===void 0?void 0:n[e.dataIndex])!==null&&r!==void 0?r:""}
73
+ ${(t*100).toLocaleString()}%`}}},scales:{_index_:{display:!1,padding:10,grid:{display:!1}},_value_:{display:!1,beginAtZero:!1,grace:0,grid:{display:!1}}},elements:{trapezoid:{backgroundColor(t){const e=t.chart.data.datasets[t.datasetIndex].data.length;return Gz(t.dataIndex,e)}}}}]);class kC extends Ko{constructor(e,n){super(e,Yz("funnel",n,ll,al,[Rh,Ih]))}}kC.id=ll.id;const MC="label";function OC(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Kz(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function $C(t,e){t.labels=e}function PC(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MC;const r=[];t.datasets=e.map(s=>{const i=t.datasets.find(o=>o[n]===s[n]);return!i||!s.data||r.includes(i)?{...s}:(r.push(i),Object.assign(i,s),i)})}function Zz(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:MC;const n={labels:[],datasets:[]};return $C(n,t.labels),PC(n,t.datasets,e),n}function Xz(t,e){const{height:n=150,width:r=300,redraw:s=!1,datasetIdKey:i,type:o,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...h}=t,f=x.useRef(null),p=x.useRef(),m=()=>{f.current&&(p.current=new Ko(f.current,{type:o,data:Zz(a,i),options:l&&{...l},plugins:c}),OC(e,p.current))},g=()=>{OC(e,null),p.current&&(p.current.destroy(),p.current=null)};return x.useEffect(()=>{!s&&p.current&&l&&Kz(p.current,l)},[s,l]),x.useEffect(()=>{!s&&p.current&&$C(p.current.config.data,a.labels)},[s,a.labels]),x.useEffect(()=>{!s&&p.current&&a.datasets&&PC(p.current.config.data,a.datasets,i)},[s,a.datasets]),x.useEffect(()=>{p.current&&(s?(g(),setTimeout(m)):p.current.update(d))},[s,l,a.labels,a.datasets,d]),x.useEffect(()=>{p.current&&(g(),setTimeout(m))},[o]),x.useEffect(()=>(m(),()=>g()),[]),x.createElement("canvas",Object.assign({ref:f,role:"img",height:n,width:r},h),u)}const Qz=x.forwardRef(Xz);function Yi(t,e){return Ko.register(e),x.forwardRef((n,r)=>x.createElement(Qz,Object.assign({},n,{ref:r,type:t})))}const Jz=Yi("line",Wc),eH=Yi("bar",Hi),tH=Yi("radar",Yc),nH=Yi("doughnut",Go),rH=Yi("polarArea",Gc),sH=Yi("bubble",qc),iH=Yi("pie",Ch),oH=Yi("scatter",Kc);Ko.register(Rh,Ih,ru,Wc,qc,Go,Ch,Vi,Hi,Gc,qi,Yc,iu,Kc,tj,cj,GB,JB,Xa,L5,ll,al);const aH={labels:["January","February","March","April","May","June","July"],datasets:[{label:"My First Dataset",data:[65,59,80,81,56,55,40],fill:!1,borderColor:"rgb(75, 192, 192)",tension:.1}]},lH={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top"},title:{display:!0,text:"Chart.js Chart"}}},cH=t=>{const{type:e="line",data:n=aH,options:r=lH,width:s=800,height:i=400}=t,o=x.useRef(null);return x.useEffect(()=>{const a=o.current;if(a&&e==="funnel"){const l=a.getContext("2d");if(!l)return;console.log("type",e),console.log("data",n);const c=Ko.getChart(l),u=async()=>{new kC(l,{data:n,options:r,plugins:[L5]})};c==null||c.destroy(),u()}},[n,r,e]),S.jsxs("div",{style:{position:"relative",height:"40vh",width:"80vw"},children:[e==="line"&&S.jsx(Jz,{data:n,options:r,width:s,height:i}),e==="bar"&&S.jsx(eH,{data:n,options:r}),e==="bubble"&&S.jsx(sH,{data:n,options:r}),e==="doughnut"&&S.jsx(nH,{data:n,options:r}),e==="pie"&&S.jsx(iH,{data:n,options:r}),e==="polarArea"&&S.jsx(rH,{data:n,options:r}),e==="radar"&&S.jsx(tH,{data:n,options:r}),e==="scatter"&&S.jsx(oH,{data:n,options:r}),e==="funnel"&&S.jsx("canvas",{id:"Chart",ref:o,width:s,height:i})]})};function uH(){this.__data__=[],this.size=0}var dH=uH;function hH(t,e){return t===e||t!==t&&e!==e}var DC=hH,fH=DC;function pH(t,e){for(var n=t.length;n--;)if(fH(t[n][0],e))return n;return-1}var Qh=pH,gH=Qh,mH=Array.prototype,yH=mH.splice;function bH(t){var e=this.__data__,n=gH(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():yH.call(e,n,1),--this.size,!0}var vH=bH,xH=Qh;function wH(t){var e=this.__data__,n=xH(e,t);return n<0?void 0:e[n][1]}var _H=wH,CH=Qh;function SH(t){return CH(this.__data__,t)>-1}var EH=SH,AH=Qh;function TH(t,e){var n=this.__data__,r=AH(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var kH=TH,MH=dH,OH=vH,$H=_H,PH=EH,DH=kH;function cl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}cl.prototype.clear=MH,cl.prototype.delete=OH,cl.prototype.get=$H,cl.prototype.has=PH,cl.prototype.set=DH;var Jh=cl,RH=Jh;function IH(){this.__data__=new RH,this.size=0}var NH=IH;function LH(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var BH=LH;function jH(t){return this.__data__.get(t)}var FH=jH;function zH(t){return this.__data__.has(t)}var HH=zH,VH=typeof an=="object"&&an&&an.Object===Object&&an,RC=VH,UH=RC,qH=typeof self=="object"&&self&&self.Object===Object&&self,WH=UH||qH||Function("return this")(),yi=WH,GH=yi,YH=GH.Symbol,fm=YH,IC=fm,NC=Object.prototype,KH=NC.hasOwnProperty,ZH=NC.toString,uu=IC?IC.toStringTag:void 0;function XH(t){var e=KH.call(t,uu),n=t[uu];try{t[uu]=void 0;var r=!0}catch{}var s=ZH.call(t);return r&&(e?t[uu]=n:delete t[uu]),s}var QH=XH,JH=Object.prototype,eV=JH.toString;function tV(t){return eV.call(t)}var nV=tV,LC=fm,rV=QH,sV=nV,iV="[object Null]",oV="[object Undefined]",BC=LC?LC.toStringTag:void 0;function aV(t){return t==null?t===void 0?oV:iV:BC&&BC in Object(t)?rV(t):sV(t)}var ef=aV;function lV(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var jC=lV,cV=ef,uV=jC,dV="[object AsyncFunction]",hV="[object Function]",fV="[object GeneratorFunction]",pV="[object Proxy]";function gV(t){if(!uV(t))return!1;var e=cV(t);return e==hV||e==fV||e==dV||e==pV}var FC=gV,mV=yi,yV=mV["__core-js_shared__"],bV=yV,pm=bV,zC=function(){var t=/[^.]+$/.exec(pm&&pm.keys&&pm.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function vV(t){return!!zC&&zC in t}var xV=vV,wV=Function.prototype,_V=wV.toString;function CV(t){if(t!=null){try{return _V.call(t)}catch{}try{return t+""}catch{}}return""}var HC=CV,SV=FC,EV=xV,AV=jC,TV=HC,kV=/[\\^$.*+?()[\]{}|]/g,MV=/^\[object .+?Constructor\]$/,OV=Function.prototype,$V=Object.prototype,PV=OV.toString,DV=$V.hasOwnProperty,RV=RegExp("^"+PV.call(DV).replace(kV,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function IV(t){if(!AV(t)||EV(t))return!1;var e=SV(t)?RV:MV;return e.test(TV(t))}var NV=IV;function LV(t,e){return t==null?void 0:t[e]}var BV=LV,jV=NV,FV=BV;function zV(t,e){var n=FV(t,e);return jV(n)?n:void 0}var ul=zV,HV=ul,VV=yi,UV=HV(VV,"Map"),gm=UV,qV=ul,WV=qV(Object,"create"),tf=WV,VC=tf;function GV(){this.__data__=VC?VC(null):{},this.size=0}var YV=GV;function KV(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ZV=KV,XV=tf,QV="__lodash_hash_undefined__",JV=Object.prototype,eU=JV.hasOwnProperty;function tU(t){var e=this.__data__;if(XV){var n=e[t];return n===QV?void 0:n}return eU.call(e,t)?e[t]:void 0}var nU=tU,rU=tf,sU=Object.prototype,iU=sU.hasOwnProperty;function oU(t){var e=this.__data__;return rU?e[t]!==void 0:iU.call(e,t)}var aU=oU,lU=tf,cU="__lodash_hash_undefined__";function uU(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=lU&&e===void 0?cU:e,this}var dU=uU,hU=YV,fU=ZV,pU=nU,gU=aU,mU=dU;function dl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dl.prototype.clear=hU,dl.prototype.delete=fU,dl.prototype.get=pU,dl.prototype.has=gU,dl.prototype.set=mU;var yU=dl,UC=yU,bU=Jh,vU=gm;function xU(){this.size=0,this.__data__={hash:new UC,map:new(vU||bU),string:new UC}}var wU=xU;function _U(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var CU=_U,SU=CU;function EU(t,e){var n=t.__data__;return SU(e)?n[typeof e=="string"?"string":"hash"]:n.map}var nf=EU,AU=nf;function TU(t){var e=AU(this,t).delete(t);return this.size-=e?1:0,e}var kU=TU,MU=nf;function OU(t){return MU(this,t).get(t)}var $U=OU,PU=nf;function DU(t){return PU(this,t).has(t)}var RU=DU,IU=nf;function NU(t,e){var n=IU(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var LU=NU,BU=wU,jU=kU,FU=$U,zU=RU,HU=LU;function hl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}hl.prototype.clear=BU,hl.prototype.delete=jU,hl.prototype.get=FU,hl.prototype.has=zU,hl.prototype.set=HU;var qC=hl,VU=Jh,UU=gm,qU=qC,WU=200;function GU(t,e){var n=this.__data__;if(n instanceof VU){var r=n.__data__;if(!UU||r.length<WU-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new qU(r)}return n.set(t,e),this.size=n.size,this}var YU=GU,KU=Jh,ZU=NH,XU=BH,QU=FH,JU=HH,eq=YU;function fl(t){var e=this.__data__=new KU(t);this.size=e.size}fl.prototype.clear=ZU,fl.prototype.delete=XU,fl.prototype.get=QU,fl.prototype.has=JU,fl.prototype.set=eq;var tq=fl,nq="__lodash_hash_undefined__";function rq(t){return this.__data__.set(t,nq),this}var sq=rq;function iq(t){return this.__data__.has(t)}var oq=iq,aq=qC,lq=sq,cq=oq;function rf(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new aq;++e<n;)this.add(t[e])}rf.prototype.add=rf.prototype.push=lq,rf.prototype.has=cq;var uq=rf;function dq(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var hq=dq;function fq(t,e){return t.has(e)}var pq=fq,gq=uq,mq=hq,yq=pq,bq=1,vq=2;function xq(t,e,n,r,s,i){var o=n&bq,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&vq?new gq:void 0;for(i.set(t,e),i.set(e,t);++d<a;){var p=t[d],m=e[d];if(r)var g=o?r(m,p,d,e,t,i):r(p,m,d,t,e,i);if(g!==void 0){if(g)continue;h=!1;break}if(f){if(!mq(e,function(y,v){if(!yq(f,v)&&(p===y||s(p,y,n,r,i)))return f.push(v)})){h=!1;break}}else if(!(p===m||s(p,m,n,r,i))){h=!1;break}}return i.delete(t),i.delete(e),h}var WC=xq,wq=yi,_q=wq.Uint8Array,Cq=_q;function Sq(t){var e=-1,n=Array(t.size);return t.forEach(function(r,s){n[++e]=[s,r]}),n}var Eq=Sq;function Aq(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Tq=Aq,GC=fm,YC=Cq,kq=DC,Mq=WC,Oq=Eq,$q=Tq,Pq=1,Dq=2,Rq="[object Boolean]",Iq="[object Date]",Nq="[object Error]",Lq="[object Map]",Bq="[object Number]",jq="[object RegExp]",Fq="[object Set]",zq="[object String]",Hq="[object Symbol]",Vq="[object ArrayBuffer]",Uq="[object DataView]",KC=GC?GC.prototype:void 0,mm=KC?KC.valueOf:void 0;function qq(t,e,n,r,s,i,o){switch(n){case Uq:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Vq:return!(t.byteLength!=e.byteLength||!i(new YC(t),new YC(e)));case Rq:case Iq:case Bq:return kq(+t,+e);case Nq:return t.name==e.name&&t.message==e.message;case jq:case zq:return t==e+"";case Lq:var a=Oq;case Fq:var l=r&Pq;if(a||(a=$q),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;r|=Dq,o.set(t,e);var u=Mq(a(t),a(e),r,s,i,o);return o.delete(t),u;case Hq:if(mm)return mm.call(t)==mm.call(e)}return!1}var Wq=qq;function Gq(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t}var Yq=Gq,Kq=Array.isArray,ym=Kq,Zq=Yq,Xq=ym;function Qq(t,e,n){var r=e(t);return Xq(t)?r:Zq(r,n(t))}var Jq=Qq;function eW(t,e){for(var n=-1,r=t==null?0:t.length,s=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[s++]=o)}return i}var tW=eW;function nW(){return[]}var rW=nW,sW=tW,iW=rW,oW=Object.prototype,aW=oW.propertyIsEnumerable,ZC=Object.getOwnPropertySymbols,lW=ZC?function(t){return t==null?[]:(t=Object(t),sW(ZC(t),function(e){return aW.call(t,e)}))}:iW,cW=lW;function uW(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var dW=uW;function hW(t){return t!=null&&typeof t=="object"}var sf=hW,fW=ef,pW=sf,gW="[object Arguments]";function mW(t){return pW(t)&&fW(t)==gW}var yW=mW,XC=yW,bW=sf,QC=Object.prototype,vW=QC.hasOwnProperty,xW=QC.propertyIsEnumerable,wW=XC(function(){return arguments}())?XC:function(t){return bW(t)&&vW.call(t,"callee")&&!xW.call(t,"callee")},_W=wW,of={exports:{}};function CW(){return!1}var SW=CW;of.exports,function(t,e){var n=yi,r=SW,s=e&&!e.nodeType&&e,i=s&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===s,a=o?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;t.exports=c}(of,of.exports);var JC=of.exports,EW=9007199254740991,AW=/^(?:0|[1-9]\d*)$/;function TW(t,e){var n=typeof t;return e=e??EW,!!e&&(n=="number"||n!="symbol"&&AW.test(t))&&t>-1&&t%1==0&&t<e}var kW=TW,MW=9007199254740991;function OW(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=MW}var eS=OW,$W=ef,PW=eS,DW=sf,RW="[object Arguments]",IW="[object Array]",NW="[object Boolean]",LW="[object Date]",BW="[object Error]",jW="[object Function]",FW="[object Map]",zW="[object Number]",HW="[object Object]",VW="[object RegExp]",UW="[object Set]",qW="[object String]",WW="[object WeakMap]",GW="[object ArrayBuffer]",YW="[object DataView]",KW="[object Float32Array]",ZW="[object Float64Array]",XW="[object Int8Array]",QW="[object Int16Array]",JW="[object Int32Array]",eG="[object Uint8Array]",tG="[object Uint8ClampedArray]",nG="[object Uint16Array]",rG="[object Uint32Array]",wt={};wt[KW]=wt[ZW]=wt[XW]=wt[QW]=wt[JW]=wt[eG]=wt[tG]=wt[nG]=wt[rG]=!0,wt[RW]=wt[IW]=wt[GW]=wt[NW]=wt[YW]=wt[LW]=wt[BW]=wt[jW]=wt[FW]=wt[zW]=wt[HW]=wt[VW]=wt[UW]=wt[qW]=wt[WW]=!1;function sG(t){return DW(t)&&PW(t.length)&&!!wt[$W(t)]}var iG=sG;function oG(t){return function(e){return t(e)}}var aG=oG,af={exports:{}};af.exports,function(t,e){var n=RC,r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===r,o=i&&n.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a}(af,af.exports);var lG=af.exports,cG=iG,uG=aG,tS=lG,nS=tS&&tS.isTypedArray,dG=nS?uG(nS):cG,rS=dG,hG=dW,fG=_W,pG=ym,gG=JC,mG=kW,yG=rS,bG=Object.prototype,vG=bG.hasOwnProperty;function xG(t,e){var n=pG(t),r=!n&&fG(t),s=!n&&!r&&gG(t),i=!n&&!r&&!s&&yG(t),o=n||r||s||i,a=o?hG(t.length,String):[],l=a.length;for(var c in t)(e||vG.call(t,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||mG(c,l)))&&a.push(c);return a}var wG=xG,_G=Object.prototype;function CG(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||_G;return t===n}var SG=CG;function EG(t,e){return function(n){return t(e(n))}}var AG=EG,TG=AG,kG=TG(Object.keys,Object),MG=kG,OG=SG,$G=MG,PG=Object.prototype,DG=PG.hasOwnProperty;function RG(t){if(!OG(t))return $G(t);var e=[];for(var n in Object(t))DG.call(t,n)&&n!="constructor"&&e.push(n);return e}var IG=RG,NG=FC,LG=eS;function BG(t){return t!=null&&LG(t.length)&&!NG(t)}var jG=BG,FG=wG,zG=IG,HG=jG;function VG(t){return HG(t)?FG(t):zG(t)}var UG=VG,qG=Jq,WG=cW,GG=UG;function YG(t){return qG(t,GG,WG)}var KG=YG,sS=KG,ZG=1,XG=Object.prototype,QG=XG.hasOwnProperty;function JG(t,e,n,r,s,i){var o=n&ZG,a=sS(t),l=a.length,c=sS(e),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:QG.call(e,h)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var m=!0;i.set(t,e),i.set(e,t);for(var g=o;++d<l;){h=a[d];var y=t[h],v=e[h];if(r)var b=o?r(v,y,h,e,t,i):r(y,v,h,t,e,i);if(!(b===void 0?y===v||s(y,v,n,r,i):b)){m=!1;break}g||(g=h=="constructor")}if(m&&!g){var C=t.constructor,_=e.constructor;C!=_&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return i.delete(t),i.delete(e),m}var eY=JG,tY=ul,nY=yi,rY=tY(nY,"DataView"),sY=rY,iY=ul,oY=yi,aY=iY(oY,"Promise"),lY=aY,cY=ul,uY=yi,dY=cY(uY,"Set"),hY=dY,fY=ul,pY=yi,gY=fY(pY,"WeakMap"),mY=gY,bm=sY,vm=gm,xm=lY,wm=hY,_m=mY,iS=ef,pl=HC,oS="[object Map]",yY="[object Object]",aS="[object Promise]",lS="[object Set]",cS="[object WeakMap]",uS="[object DataView]",bY=pl(bm),vY=pl(vm),xY=pl(xm),wY=pl(wm),_Y=pl(_m),Xo=iS;(bm&&Xo(new bm(new ArrayBuffer(1)))!=uS||vm&&Xo(new vm)!=oS||xm&&Xo(xm.resolve())!=aS||wm&&Xo(new wm)!=lS||_m&&Xo(new _m)!=cS)&&(Xo=function(t){var e=iS(t),n=e==yY?t.constructor:void 0,r=n?pl(n):"";if(r)switch(r){case bY:return uS;case vY:return oS;case xY:return aS;case wY:return lS;case _Y:return cS}return e});var CY=Xo,Cm=tq,SY=WC,EY=Wq,AY=eY,dS=CY,hS=ym,fS=JC,TY=rS,kY=1,pS="[object Arguments]",gS="[object Array]",lf="[object Object]",MY=Object.prototype,mS=MY.hasOwnProperty;function OY(t,e,n,r,s,i){var o=hS(t),a=hS(e),l=o?gS:dS(t),c=a?gS:dS(e);l=l==pS?lf:l,c=c==pS?lf:c;var u=l==lf,d=c==lf,h=l==c;if(h&&fS(t)){if(!fS(e))return!1;o=!0,u=!1}if(h&&!u)return i||(i=new Cm),o||TY(t)?SY(t,e,n,r,s,i):EY(t,e,l,n,r,s,i);if(!(n&kY)){var f=u&&mS.call(t,"__wrapped__"),p=d&&mS.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,g=p?e.value():e;return i||(i=new Cm),s(m,g,n,r,i)}}return h?(i||(i=new Cm),AY(t,e,n,r,s,i)):!1}var $Y=OY,PY=$Y,yS=sf;function bS(t,e,n,r,s){return t===e?!0:t==null||e==null||!yS(t)&&!yS(e)?t!==t&&e!==e:PY(t,e,n,r,bS,s)}var DY=bS,RY=DY;function IY(t,e){return RY(t,e)}var NY=IY;const du=ss(NY);var vS=typeof global=="object"&&global&&global.Object===Object&&global,LY=typeof self=="object"&&self&&self.Object===Object&&self,Ns=vS||LY||Function("return this")(),Ki=Ns.Symbol,xS=Object.prototype,BY=xS.hasOwnProperty,jY=xS.toString,hu=Ki?Ki.toStringTag:void 0;function FY(t){var e=BY.call(t,hu),n=t[hu];try{t[hu]=void 0;var r=!0}catch{}var s=jY.call(t);return r&&(e?t[hu]=n:delete t[hu]),s}var zY=Object.prototype,HY=zY.toString;function VY(t){return HY.call(t)}var UY="[object Null]",qY="[object Undefined]",wS=Ki?Ki.toStringTag:void 0;function gl(t){return t==null?t===void 0?qY:UY:wS&&wS in Object(t)?FY(t):VY(t)}function bi(t){return t!=null&&typeof t=="object"}var Qo=Array.isArray;function Zi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function _S(t){return t}var WY="[object AsyncFunction]",GY="[object Function]",YY="[object GeneratorFunction]",KY="[object Proxy]";function Sm(t){if(!Zi(t))return!1;var e=gl(t);return e==GY||e==YY||e==WY||e==KY}var Em=Ns["__core-js_shared__"],CS=function(){var t=/[^.]+$/.exec(Em&&Em.keys&&Em.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ZY(t){return!!CS&&CS in t}var XY=Function.prototype,QY=XY.toString;function Jo(t){if(t!=null){try{return QY.call(t)}catch{}try{return t+""}catch{}}return""}var JY=/[\\^$.*+?()[\]{}|]/g,eK=/^\[object .+?Constructor\]$/,tK=Function.prototype,nK=Object.prototype,rK=tK.toString,sK=nK.hasOwnProperty,iK=RegExp("^"+rK.call(sK).replace(JY,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oK(t){if(!Zi(t)||ZY(t))return!1;var e=Sm(t)?iK:eK;return e.test(Jo(t))}function aK(t,e){return t==null?void 0:t[e]}function ea(t,e){var n=aK(t,e);return oK(n)?n:void 0}var Am=ea(Ns,"WeakMap"),SS=Object.create,lK=function(){function t(){}return function(e){if(!Zi(e))return{};if(SS)return SS(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function cK(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ES(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var uK=800,dK=16,hK=Date.now;function fK(t){var e=0,n=0;return function(){var r=hK(),s=dK-(r-n);if(n=r,s>0){if(++e>=uK)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function pK(t){return function(){return t}}var cf=function(){try{var t=ea(Object,"defineProperty");return t({},"",{}),t}catch{}}(),gK=cf?function(t,e){return cf(t,"toString",{configurable:!0,enumerable:!1,value:pK(e),writable:!0})}:_S,mK=fK(gK);function yK(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var bK=9007199254740991,vK=/^(?:0|[1-9]\d*)$/;function AS(t,e){var n=typeof t;return e=e??bK,!!e&&(n=="number"||n!="symbol"&&vK.test(t))&&t>-1&&t%1==0&&t<e}function Tm(t,e,n){e=="__proto__"&&cf?cf(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function fu(t,e){return t===e||t!==t&&e!==e}var xK=Object.prototype,wK=xK.hasOwnProperty;function TS(t,e,n){var r=t[e];(!(wK.call(t,e)&&fu(r,n))||n===void 0&&!(e in t))&&Tm(t,e,n)}function pu(t,e,n,r){var s=!n;n||(n={});for(var i=-1,o=e.length;++i<o;){var a=e[i],l=void 0;l===void 0&&(l=t[a]),s?Tm(n,a,l):TS(n,a,l)}return n}var kS=Math.max;function _K(t,e,n){return e=kS(e===void 0?t.length-1:e,0),function(){for(var r=arguments,s=-1,i=kS(r.length-e,0),o=Array(i);++s<i;)o[s]=r[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=r[s];return a[e]=n(o),cK(t,this,a)}}function CK(t,e){return mK(_K(t,e,_S),t+"")}var SK=9007199254740991;function MS(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=SK}function uf(t){return t!=null&&MS(t.length)&&!Sm(t)}function EK(t,e,n){if(!Zi(n))return!1;var r=typeof e;return(r=="number"?uf(n)&&AS(e,n.length):r=="string"&&e in n)?fu(n[e],t):!1}function AK(t){return CK(function(e,n){var r=-1,s=n.length,i=s>1?n[s-1]:void 0,o=s>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(s--,i):void 0,o&&EK(n[0],n[1],o)&&(i=s<3?void 0:i,s=1),e=Object(e);++r<s;){var a=n[r];a&&t(e,a,r,i)}return e})}var TK=Object.prototype;function km(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||TK;return t===n}function kK(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var MK="[object Arguments]";function OS(t){return bi(t)&&gl(t)==MK}var $S=Object.prototype,OK=$S.hasOwnProperty,$K=$S.propertyIsEnumerable,Mm=OS(function(){return arguments}())?OS:function(t){return bi(t)&&OK.call(t,"callee")&&!$K.call(t,"callee")};function PK(){return!1}var PS=typeof ye=="object"&&ye&&!ye.nodeType&&ye,DS=PS&&typeof module=="object"&&module&&!module.nodeType&&module,DK=DS&&DS.exports===PS,RS=DK?Ns.Buffer:void 0,RK=RS?RS.isBuffer:void 0,gu=RK||PK,IK="[object Arguments]",NK="[object Array]",LK="[object Boolean]",BK="[object Date]",jK="[object Error]",FK="[object Function]",zK="[object Map]",HK="[object Number]",VK="[object Object]",UK="[object RegExp]",qK="[object Set]",WK="[object String]",GK="[object WeakMap]",YK="[object ArrayBuffer]",KK="[object DataView]",ZK="[object Float32Array]",XK="[object Float64Array]",QK="[object Int8Array]",JK="[object Int16Array]",eZ="[object Int32Array]",tZ="[object Uint8Array]",nZ="[object Uint8ClampedArray]",rZ="[object Uint16Array]",sZ="[object Uint32Array]",_t={};_t[ZK]=_t[XK]=_t[QK]=_t[JK]=_t[eZ]=_t[tZ]=_t[nZ]=_t[rZ]=_t[sZ]=!0,_t[IK]=_t[NK]=_t[YK]=_t[LK]=_t[KK]=_t[BK]=_t[jK]=_t[FK]=_t[zK]=_t[HK]=_t[VK]=_t[UK]=_t[qK]=_t[WK]=_t[GK]=!1;function iZ(t){return bi(t)&&MS(t.length)&&!!_t[gl(t)]}function Om(t){return function(e){return t(e)}}var IS=typeof ye=="object"&&ye&&!ye.nodeType&&ye,mu=IS&&typeof module=="object"&&module&&!module.nodeType&&module,oZ=mu&&mu.exports===IS,$m=oZ&&vS.process,ml=function(){try{var t=mu&&mu.require&&mu.require("util").types;return t||$m&&$m.binding&&$m.binding("util")}catch{}}(),NS=ml&&ml.isTypedArray,Pm=NS?Om(NS):iZ,aZ=Object.prototype,lZ=aZ.hasOwnProperty;function LS(t,e){var n=Qo(t),r=!n&&Mm(t),s=!n&&!r&&gu(t),i=!n&&!r&&!s&&Pm(t),o=n||r||s||i,a=o?kK(t.length,String):[],l=a.length;for(var c in t)(e||lZ.call(t,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||AS(c,l)))&&a.push(c);return a}function BS(t,e){return function(n){return t(e(n))}}var cZ=BS(Object.keys,Object),uZ=Object.prototype,dZ=uZ.hasOwnProperty;function hZ(t){if(!km(t))return cZ(t);var e=[];for(var n in Object(t))dZ.call(t,n)&&n!="constructor"&&e.push(n);return e}function Dm(t){return uf(t)?LS(t):hZ(t)}function fZ(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var pZ=Object.prototype,gZ=pZ.hasOwnProperty;function mZ(t){if(!Zi(t))return fZ(t);var e=km(t),n=[];for(var r in t)r=="constructor"&&(e||!gZ.call(t,r))||n.push(r);return n}function yu(t){return uf(t)?LS(t,!0):mZ(t)}var bu=ea(Object,"create");function yZ(){this.__data__=bu?bu(null):{},this.size=0}function bZ(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var vZ="__lodash_hash_undefined__",xZ=Object.prototype,wZ=xZ.hasOwnProperty;function _Z(t){var e=this.__data__;if(bu){var n=e[t];return n===vZ?void 0:n}return wZ.call(e,t)?e[t]:void 0}var CZ=Object.prototype,SZ=CZ.hasOwnProperty;function EZ(t){var e=this.__data__;return bu?e[t]!==void 0:SZ.call(e,t)}var AZ="__lodash_hash_undefined__";function TZ(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bu&&e===void 0?AZ:e,this}function ta(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ta.prototype.clear=yZ,ta.prototype.delete=bZ,ta.prototype.get=_Z,ta.prototype.has=EZ,ta.prototype.set=TZ;function kZ(){this.__data__=[],this.size=0}function df(t,e){for(var n=t.length;n--;)if(fu(t[n][0],e))return n;return-1}var MZ=Array.prototype,OZ=MZ.splice;function $Z(t){var e=this.__data__,n=df(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():OZ.call(e,n,1),--this.size,!0}function PZ(t){var e=this.__data__,n=df(e,t);return n<0?void 0:e[n][1]}function DZ(t){return df(this.__data__,t)>-1}function RZ(t,e){var n=this.__data__,r=df(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function vi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}vi.prototype.clear=kZ,vi.prototype.delete=$Z,vi.prototype.get=PZ,vi.prototype.has=DZ,vi.prototype.set=RZ;var vu=ea(Ns,"Map");function IZ(){this.size=0,this.__data__={hash:new ta,map:new(vu||vi),string:new ta}}function NZ(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function hf(t,e){var n=t.__data__;return NZ(e)?n[typeof e=="string"?"string":"hash"]:n.map}function LZ(t){var e=hf(this,t).delete(t);return this.size-=e?1:0,e}function BZ(t){return hf(this,t).get(t)}function jZ(t){return hf(this,t).has(t)}function FZ(t,e){var n=hf(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function na(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}na.prototype.clear=IZ,na.prototype.delete=LZ,na.prototype.get=BZ,na.prototype.has=jZ,na.prototype.set=FZ;function jS(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t}var Rm=BS(Object.getPrototypeOf,Object),zZ="[object Object]",HZ=Function.prototype,VZ=Object.prototype,FS=HZ.toString,UZ=VZ.hasOwnProperty,qZ=FS.call(Object);function WZ(t){if(!bi(t)||gl(t)!=zZ)return!1;var e=Rm(t);if(e===null)return!0;var n=UZ.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&FS.call(n)==qZ}function GZ(){this.__data__=new vi,this.size=0}function YZ(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function KZ(t){return this.__data__.get(t)}function ZZ(t){return this.__data__.has(t)}var XZ=200;function QZ(t,e){var n=this.__data__;if(n instanceof vi){var r=n.__data__;if(!vu||r.length<XZ-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new na(r)}return n.set(t,e),this.size=n.size,this}function Ls(t){var e=this.__data__=new vi(t);this.size=e.size}Ls.prototype.clear=GZ,Ls.prototype.delete=YZ,Ls.prototype.get=KZ,Ls.prototype.has=ZZ,Ls.prototype.set=QZ;function JZ(t,e){return t&&pu(e,Dm(e),t)}function eX(t,e){return t&&pu(e,yu(e),t)}var zS=typeof ye=="object"&&ye&&!ye.nodeType&&ye,HS=zS&&typeof module=="object"&&module&&!module.nodeType&&module,tX=HS&&HS.exports===zS,VS=tX?Ns.Buffer:void 0,US=VS?VS.allocUnsafe:void 0;function qS(t,e){if(e)return t.slice();var n=t.length,r=US?US(n):new t.constructor(n);return t.copy(r),r}function nX(t,e){for(var n=-1,r=t==null?0:t.length,s=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[s++]=o)}return i}function WS(){return[]}var rX=Object.prototype,sX=rX.propertyIsEnumerable,GS=Object.getOwnPropertySymbols,Im=GS?function(t){return t==null?[]:(t=Object(t),nX(GS(t),function(e){return sX.call(t,e)}))}:WS;function iX(t,e){return pu(t,Im(t),e)}var oX=Object.getOwnPropertySymbols,YS=oX?function(t){for(var e=[];t;)jS(e,Im(t)),t=Rm(t);return e}:WS;function aX(t,e){return pu(t,YS(t),e)}function KS(t,e,n){var r=e(t);return Qo(t)?r:jS(r,n(t))}function Nm(t){return KS(t,Dm,Im)}function lX(t){return KS(t,yu,YS)}var Lm=ea(Ns,"DataView"),Bm=ea(Ns,"Promise"),jm=ea(Ns,"Set"),ZS="[object Map]",cX="[object Object]",XS="[object Promise]",QS="[object Set]",JS="[object WeakMap]",eE="[object DataView]",uX=Jo(Lm),dX=Jo(vu),hX=Jo(Bm),fX=Jo(jm),pX=Jo(Am),cs=gl;(Lm&&cs(new Lm(new ArrayBuffer(1)))!=eE||vu&&cs(new vu)!=ZS||Bm&&cs(Bm.resolve())!=XS||jm&&cs(new jm)!=QS||Am&&cs(new Am)!=JS)&&(cs=function(t){var e=gl(t),n=e==cX?t.constructor:void 0,r=n?Jo(n):"";if(r)switch(r){case uX:return eE;case dX:return ZS;case hX:return XS;case fX:return QS;case pX:return JS}return e});var gX=Object.prototype,mX=gX.hasOwnProperty;function yX(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&mX.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var ff=Ns.Uint8Array;function Fm(t){var e=new t.constructor(t.byteLength);return new ff(e).set(new ff(t)),e}function bX(t,e){var n=e?Fm(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var vX=/\w*$/;function xX(t){var e=new t.constructor(t.source,vX.exec(t));return e.lastIndex=t.lastIndex,e}var tE=Ki?Ki.prototype:void 0,nE=tE?tE.valueOf:void 0;function wX(t){return nE?Object(nE.call(t)):{}}function rE(t,e){var n=e?Fm(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var _X="[object Boolean]",CX="[object Date]",SX="[object Map]",EX="[object Number]",AX="[object RegExp]",TX="[object Set]",kX="[object String]",MX="[object Symbol]",OX="[object ArrayBuffer]",$X="[object DataView]",PX="[object Float32Array]",DX="[object Float64Array]",RX="[object Int8Array]",IX="[object Int16Array]",NX="[object Int32Array]",LX="[object Uint8Array]",BX="[object Uint8ClampedArray]",jX="[object Uint16Array]",FX="[object Uint32Array]";function zX(t,e,n){var r=t.constructor;switch(e){case OX:return Fm(t);case _X:case CX:return new r(+t);case $X:return bX(t,n);case PX:case DX:case RX:case IX:case NX:case LX:case BX:case jX:case FX:return rE(t,n);case SX:return new r;case EX:case kX:return new r(t);case AX:return xX(t);case TX:return new r;case MX:return wX(t)}}function sE(t){return typeof t.constructor=="function"&&!km(t)?lK(Rm(t)):{}}var HX="[object Map]";function VX(t){return bi(t)&&cs(t)==HX}var iE=ml&&ml.isMap,UX=iE?Om(iE):VX,qX="[object Set]";function WX(t){return bi(t)&&cs(t)==qX}var oE=ml&&ml.isSet,GX=oE?Om(oE):WX,YX=1,KX=2,ZX=4,aE="[object Arguments]",XX="[object Array]",QX="[object Boolean]",JX="[object Date]",eQ="[object Error]",lE="[object Function]",tQ="[object GeneratorFunction]",nQ="[object Map]",rQ="[object Number]",cE="[object Object]",sQ="[object RegExp]",iQ="[object Set]",oQ="[object String]",aQ="[object Symbol]",lQ="[object WeakMap]",cQ="[object ArrayBuffer]",uQ="[object DataView]",dQ="[object Float32Array]",hQ="[object Float64Array]",fQ="[object Int8Array]",pQ="[object Int16Array]",gQ="[object Int32Array]",mQ="[object Uint8Array]",yQ="[object Uint8ClampedArray]",bQ="[object Uint16Array]",vQ="[object Uint32Array]",dt={};dt[aE]=dt[XX]=dt[cQ]=dt[uQ]=dt[QX]=dt[JX]=dt[dQ]=dt[hQ]=dt[fQ]=dt[pQ]=dt[gQ]=dt[nQ]=dt[rQ]=dt[cE]=dt[sQ]=dt[iQ]=dt[oQ]=dt[aQ]=dt[mQ]=dt[yQ]=dt[bQ]=dt[vQ]=!0,dt[eQ]=dt[lE]=dt[lQ]=!1;function pf(t,e,n,r,s,i){var o,a=e&YX,l=e&KX,c=e&ZX;if(o!==void 0)return o;if(!Zi(t))return t;var u=Qo(t);if(u){if(o=yX(t),!a)return ES(t,o)}else{var d=cs(t),h=d==lE||d==tQ;if(gu(t))return qS(t,a);if(d==cE||d==aE||h&&!s){if(o=l||h?{}:sE(t),!a)return l?aX(t,eX(o,t)):iX(t,JZ(o,t))}else{if(!dt[d])return s?t:{};o=zX(t,d,a)}}i||(i=new Ls);var f=i.get(t);if(f)return f;i.set(t,o),GX(t)?t.forEach(function(g){o.add(pf(g,e,n,g,t,i))}):UX(t)&&t.forEach(function(g,y){o.set(y,pf(g,e,n,y,t,i))});var p=c?l?lX:Nm:l?yu:Dm,m=u?void 0:p(t);return yK(m||t,function(g,y){m&&(y=g,g=t[y]),TS(o,y,pf(g,e,n,y,t,i))}),o}var xQ=1,wQ=4;function yl(t){return pf(t,xQ|wQ)}var _Q="__lodash_hash_undefined__";function CQ(t){return this.__data__.set(t,_Q),this}function SQ(t){return this.__data__.has(t)}function gf(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new na;++e<n;)this.add(t[e])}gf.prototype.add=gf.prototype.push=CQ,gf.prototype.has=SQ;function EQ(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function AQ(t,e){return t.has(e)}var TQ=1,kQ=2;function uE(t,e,n,r,s,i){var o=n&TQ,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&kQ?new gf:void 0;for(i.set(t,e),i.set(e,t);++d<a;){var p=t[d],m=e[d];if(r)var g=o?r(m,p,d,e,t,i):r(p,m,d,t,e,i);if(g!==void 0){if(g)continue;h=!1;break}if(f){if(!EQ(e,function(y,v){if(!AQ(f,v)&&(p===y||s(p,y,n,r,i)))return f.push(v)})){h=!1;break}}else if(!(p===m||s(p,m,n,r,i))){h=!1;break}}return i.delete(t),i.delete(e),h}function MQ(t){var e=-1,n=Array(t.size);return t.forEach(function(r,s){n[++e]=[s,r]}),n}function OQ(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var $Q=1,PQ=2,DQ="[object Boolean]",RQ="[object Date]",IQ="[object Error]",NQ="[object Map]",LQ="[object Number]",BQ="[object RegExp]",jQ="[object Set]",FQ="[object String]",zQ="[object Symbol]",HQ="[object ArrayBuffer]",VQ="[object DataView]",dE=Ki?Ki.prototype:void 0,zm=dE?dE.valueOf:void 0;function UQ(t,e,n,r,s,i,o){switch(n){case VQ:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case HQ:return!(t.byteLength!=e.byteLength||!i(new ff(t),new ff(e)));case DQ:case RQ:case LQ:return fu(+t,+e);case IQ:return t.name==e.name&&t.message==e.message;case BQ:case FQ:return t==e+"";case NQ:var a=MQ;case jQ:var l=r&$Q;if(a||(a=OQ),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;r|=PQ,o.set(t,e);var u=uE(a(t),a(e),r,s,i,o);return o.delete(t),u;case zQ:if(zm)return zm.call(t)==zm.call(e)}return!1}var qQ=1,WQ=Object.prototype,GQ=WQ.hasOwnProperty;function YQ(t,e,n,r,s,i){var o=n&qQ,a=Nm(t),l=a.length,c=Nm(e),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:GQ.call(e,h)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var m=!0;i.set(t,e),i.set(e,t);for(var g=o;++d<l;){h=a[d];var y=t[h],v=e[h];if(r)var b=o?r(v,y,h,e,t,i):r(y,v,h,t,e,i);if(!(b===void 0?y===v||s(y,v,n,r,i):b)){m=!1;break}g||(g=h=="constructor")}if(m&&!g){var C=t.constructor,_=e.constructor;C!=_&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return i.delete(t),i.delete(e),m}var KQ=1,hE="[object Arguments]",fE="[object Array]",mf="[object Object]",ZQ=Object.prototype,pE=ZQ.hasOwnProperty;function XQ(t,e,n,r,s,i){var o=Qo(t),a=Qo(e),l=o?fE:cs(t),c=a?fE:cs(e);l=l==hE?mf:l,c=c==hE?mf:c;var u=l==mf,d=c==mf,h=l==c;if(h&&gu(t)){if(!gu(e))return!1;o=!0,u=!1}if(h&&!u)return i||(i=new Ls),o||Pm(t)?uE(t,e,n,r,s,i):UQ(t,e,l,n,r,s,i);if(!(n&KQ)){var f=u&&pE.call(t,"__wrapped__"),p=d&&pE.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,g=p?e.value():e;return i||(i=new Ls),s(m,g,n,r,i)}}return h?(i||(i=new Ls),YQ(t,e,n,r,s,i)):!1}function gE(t,e,n,r,s){return t===e?!0:t==null||e==null||!bi(t)&&!bi(e)?t!==t&&e!==e:XQ(t,e,n,r,gE,s)}function QQ(t){return function(e,n,r){for(var s=-1,i=Object(e),o=r(e),a=o.length;a--;){var l=o[++s];if(n(i[l],l,i)===!1)break}return e}}var JQ=QQ();function Hm(t,e,n){(n!==void 0&&!fu(t[e],n)||n===void 0&&!(e in t))&&Tm(t,e,n)}function eJ(t){return bi(t)&&uf(t)}function Vm(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function tJ(t){return pu(t,yu(t))}function nJ(t,e,n,r,s,i,o){var a=Vm(t,n),l=Vm(e,n),c=o.get(l);if(c){Hm(t,n,c);return}var u=i?i(a,l,n+"",t,e,o):void 0,d=u===void 0;if(d){var h=Qo(l),f=!h&&gu(l),p=!h&&!f&&Pm(l);u=l,h||f||p?Qo(a)?u=a:eJ(a)?u=ES(a):f?(d=!1,u=qS(l,!0)):p?(d=!1,u=rE(l,!0)):u=[]:WZ(l)||Mm(l)?(u=a,Mm(a)?u=tJ(a):(!Zi(a)||Sm(a))&&(u=sE(l))):d=!1}d&&(o.set(l,u),s(u,l,r,i,o),o.delete(l)),Hm(t,n,u)}function mE(t,e,n,r,s){t!==e&&JQ(e,function(i,o){if(s||(s=new Ls),Zi(i))nJ(t,e,o,n,mE,r,s);else{var a=r?r(Vm(t,o),i,o+"",t,e,s):void 0;a===void 0&&(a=i),Hm(t,o,a)}},yu)}function Um(t,e){return gE(t,e)}var Xi=AK(function(t,e,n){mE(t,e,n)}),Se=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(Se||{});class Bs{constructor(e,n,r={}){this.attrName=e,this.keyName=n;const s=Se.TYPE&Se.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Se.LEVEL|s:Se.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(n=>n.name)}add(e,n){return this.canAdd(e,n)?(e.setAttribute(this.keyName,n),!0):!1}canAdd(e,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const n=e.getAttribute(this.keyName);return this.canAdd(e,n)&&n?n:""}}class bl extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const yE=class lw{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,n=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(n){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,n)}return null}create(e,n,r){const s=this.query(n);if(s==null)throw new bl(`Unable to create ${n} blot`);const i=s,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:i.create(r),a=new i(e,o,r);return lw.blots.set(a.domNode,a),a}find(e,n=!1){return lw.find(e,n)}query(e,n=Se.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&Se.LEVEL&Se.BLOCK?r=this.types.block:e&Se.LEVEL&Se.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(r=this.classes[s],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&n&Se.LEVEL&r.scope&&n&Se.TYPE&r.scope?r:null}register(...e){return e.map(n=>{const r="blotName"in n,s="attrName"in n;if(!r&&!s)throw new bl("Invalid definition");if(r&&n.blotName==="abstract")throw new bl("Cannot register abstract class");const i=r?n.blotName:s?n.attrName:void 0;return this.types[i]=n,s?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(o=>o.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(o=>{(this.tags[o]==null||n.className==null)&&(this.tags[o]=n)}))),n})}};yE.blots=new WeakMap;let vl=yE;function bE(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${e}-`)===0)}class rJ extends Bs{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(e,n){return this.canAdd(e,n)?(this.remove(e),e.classList.add(`${this.keyName}-${n}`),!0):!1}remove(e){bE(e,this.keyName).forEach(n=>{e.classList.remove(n)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const n=(bE(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,n)?n:""}}const us=rJ;function qm(t){const e=t.split("-"),n=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+n}class sJ extends Bs{static keys(e){return(e.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(e,n){return this.canAdd(e,n)?(e.style[qm(this.keyName)]=n,!0):!1}remove(e){e.style[qm(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const n=e.style[qm(this.keyName)];return this.canAdd(e,n)?n:""}}const Qi=sJ;class iJ{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,n){n?e.add(this.domNode,n)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=vl.find(this.domNode);if(e==null)return;const n=Bs.keys(this.domNode),r=us.keys(this.domNode),s=Qi.keys(this.domNode);n.concat(r).concat(s).forEach(i=>{const o=e.scroll.query(i,Se.ATTRIBUTE);o instanceof Bs&&(this.attributes[o.attrName]=o)})}copy(e){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);e.format(n,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,n)=>(e[n]=this.attributes[n].value(this.domNode),e),{})}}const yf=iJ,vE=class{constructor(e,n){this.scroll=e,this.domNode=n,vl.blots.set(n,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new bl("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),vl.blots.delete(this.domNode)}deleteAt(e,n){this.isolate(e,n).remove()}formatAt(e,n,r,s){const i=this.isolate(e,n);if(this.scroll.query(r,Se.BLOT)!=null&&s)i.wrap(r,s);else if(this.scroll.query(r,Se.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(r,s)}}insertAt(e,n,r){const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,n){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,n){return e===0?this:this.next}update(e,n){}wrap(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new bl(`Cannot wrap ${e}`);return r.appendChild(this),r}};vE.blotName="abstract";let xE=vE;const wE=class extends xE{static value(e){return!0}index(e,n){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(e,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};wE.scope=Se.INLINE_BLOT;const Tn=wE;class oJ{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const n=e.slice(1);this.append(...n)}}at(e){const n=this.iterator();let r=n();for(;r&&e>0;)e-=1,r=n();return r}contains(e){const n=this.iterator();let r=n();for(;r;){if(r===e)return!0;r=n()}return!1}indexOf(e){const n=this.iterator();let r=n(),s=0;for(;r;){if(r===e)return s;s+=1,r=n()}return-1}insertBefore(e,n){e!=null&&(this.remove(e),e.next=n,n!=null?(e.prev=n.prev,n.prev!=null&&(n.prev.next=e),n.prev=e,n===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let n=0,r=this.head;for(;r!=null;){if(r===e)return n;n+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const n=e;return e!=null&&(e=e.next),n}}find(e,n=!1){const r=this.iterator();let s=r();for(;s;){const i=s.length();if(e<i||n&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=r()}return[null,0]}forEach(e){const n=this.iterator();let r=n();for(;r;)e(r),r=n()}forEachAt(e,n,r){if(n<=0)return;const[s,i]=this.find(e);let o=e-i;const a=this.iterator(s);let l=a();for(;l&&o<e+n;){const c=l.length();e>o?r(l,e-o,Math.min(n,o+c-e)):r(l,0,Math.min(c,e+n-o)),o+=c,l=a()}}map(e){return this.reduce((n,r)=>(n.push(e(r)),n),[])}reduce(e,n){const r=this.iterator();let s=r();for(;s;)n=e(n,s),s=r();return n}}function _E(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const r=e.create(Se.INLINE);return Array.from(t.childNodes).forEach(s=>{r.domNode.appendChild(s)}),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const CE=class $o extends xE{constructor(e,n){super(e,n),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,$o.uiClass&&this.uiNode.classList.add($o.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new oJ,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const n=_E(e,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof bl)return;throw n}})}deleteAt(e,n){if(e===0&&n===this.length())return this.remove();this.children.forEachAt(e,n,(r,s,i)=>{r.deleteAt(s,i)})}descendant(e,n=0){const[r,s]=this.children.find(n);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,s]:r instanceof $o?r.descendant(e,s):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let s=[],i=r;return this.children.forEachAt(n,r,(o,a,l)=>{(e.blotName==null&&e(o)||e.blotName!=null&&o instanceof e)&&s.push(o),o instanceof $o&&(s=s.concat(o.descendants(e,a,i))),i-=l}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(n=>{e||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===Se.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof $o?n.unwrap():n.remove())})}formatAt(e,n,r,s){this.children.forEachAt(e,n,(i,o,a)=>{i.formatAt(o,a,r,s)})}insertAt(e,n,r){const[s,i]=this.children.find(e);if(s)s.insertAt(i,n,r);else{const o=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(o)}}insertBefore(e,n){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,n||null),e.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,n)=>e+n.length(),0)}moveChildren(e,n){this.children.forEach(r=>{e.insertBefore(r,n)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(e,n=!1){const[r,s]=this.children.find(e,n),i=[[this,e]];return r instanceof $o?i.concat(r.path(s,n)):(r!=null&&i.push([r,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return r instanceof $o&&this.moveChildren(r),super.replaceWith(r)}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,o)=>{const a=s.split(i,n);a!=null&&r.appendChild(a)}),r}splitAfter(e){const n=this.clone();for(;e.next!=null;)n.appendChild(e.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,n){const r=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(r.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(i);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),r.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,o)=>i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let o=null;i.nextSibling!=null&&(o=this.scroll.find(i.nextSibling));const a=_E(i,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};CE.uiClass="";const ds=CE;function aJ(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const xl=class vc extends ds{static create(e){return super.create(e)}static formats(e,n){const r=n.query(vc.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new yf(this.domNode)}format(e,n){if(e===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof vc||(r=r.wrap(vc.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,Se.INLINE);if(r==null)return;r instanceof Bs?this.attributes.attribute(r,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,s){this.formats()[r]!=null||this.scroll.query(r,Se.ATTRIBUTE)?this.isolate(e,n).format(r,s):super.formatAt(e,n,r,s)}optimize(e){super.optimize(e);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof vc&&r.prev===this&&aJ(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof vc&&this.attributes.move(r),r}};xl.allowedChildren=[xl,Tn],xl.blotName="inline",xl.scope=Se.INLINE_BLOT,xl.tagName="SPAN";const Wm=xl,wl=class cw extends ds{static create(e){return super.create(e)}static formats(e,n){const r=n.query(cw.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new yf(this.domNode)}format(e,n){const r=this.scroll.query(e,Se.BLOCK);r!=null&&(r instanceof Bs?this.attributes.attribute(r,n):e===this.statics.blotName&&!n?this.replaceWith(cw.blotName):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n))}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,s){this.scroll.query(r,Se.BLOCK)!=null?this.format(r,s):super.formatAt(e,n,r,s)}insertAt(e,n,r){if(r==null||this.scroll.query(n,Se.INLINE)!=null)super.insertAt(e,n,r);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(n,r);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};wl.blotName="block",wl.scope=Se.BLOCK_BLOT,wl.tagName="P",wl.allowedChildren=[Wm,wl,Tn];const xu=wl,Gm=class extends ds{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,n){super.deleteAt(e,n),this.enforceAllowedChildren()}formatAt(e,n,r,s){super.formatAt(e,n,r,s),this.enforceAllowedChildren()}insertAt(e,n,r){super.insertAt(e,n,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Gm.blotName="container",Gm.scope=Se.BLOCK_BLOT;const bf=Gm;class lJ extends Tn{static formats(e,n){}format(e,n){super.formatAt(0,this.length(),e,n)}formatAt(e,n,r,s){e===0&&n===this.length()?this.format(r,s):super.formatAt(e,n,r,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const xr=lJ,cJ={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},uJ=100,_l=class extends ds{constructor(e,n){super(null,n),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,cJ),this.attach()}create(e,n){return this.registry.create(this,e,n)}find(e,n=!1){const r=this.registry.find(e,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,n=Se.ANY){return this.registry.query(e,n)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,n){this.update(),e===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,n)}formatAt(e,n,r,s){this.update(),super.formatAt(e,n,r,s)}insertAt(e,n,r){this.update(),super.insertAt(e,n,r)}optimize(e=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(l,c=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),c&&i(l.parent))},o=l=>{r.has(l.domNode)&&(l instanceof ds&&l.children.forEach(o),r.delete(l.domNode),l.optimize(n))};let a=e;for(let l=0;a.length>0;l+=1){if(l>=uJ)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(i(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const h=this.find(d,!1);i(h,!1),h instanceof ds&&h.children.forEach(f=>{i(f,!1)})})):c.type==="attributes"&&i(u.prev)),i(u))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),s=a.slice();s.length>0;)e.push(s.pop())}}update(e,n={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(s),null):(r.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&r.has(s.domNode)&&s.update(r.get(s.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(e,n)}};_l.blotName="scroll",_l.defaultChild=xu,_l.allowedChildren=[xu,bf],_l.scope=Se.BLOCK_BLOT,_l.tagName="DIV";const Ym=_l,Km=class K$ extends Tn{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,n){super(e,n),this.text=this.statics.value(this.domNode)}deleteAt(e,n){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+n)}index(e,n){return this.domNode===e?n:-1}insertAt(e,n,r){r==null?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,n,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof K$&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,n=!1){return[this.domNode,e]}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,n){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Km.blotName="text",Km.scope=Se.INLINE_BLOT;const vf=Km,dJ=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Bs,AttributorStore:yf,BlockBlot:xu,ClassAttributor:us,ContainerBlot:bf,EmbedBlot:xr,InlineBlot:Wm,LeafBlot:Tn,ParentBlot:ds,Registry:vl,Scope:Se,ScrollBlot:Ym,StyleAttributor:Qi,TextBlot:vf},Symbol.toStringTag,{value:"Module"}));var Zm={exports:{}},wr=-1,qn=1,Qt=0;function wu(t,e,n,r,s){if(t===e)return t?[[Qt,t]]:[];if(n!=null){var i=xJ(t,e,n);if(i)return i}var o=Xm(t,e),a=t.substring(0,o);t=t.substring(o),e=e.substring(o),o=xf(t,e);var l=t.substring(t.length-o);t=t.substring(0,t.length-o),e=e.substring(0,e.length-o);var c=hJ(t,e);return a&&c.unshift([Qt,a]),l&&c.push([Qt,l]),Qm(c,s),r&&gJ(c),c}function hJ(t,e){var n;if(!t)return[[qn,e]];if(!e)return[[wr,t]];var r=t.length>e.length?t:e,s=t.length>e.length?e:t,i=r.indexOf(s);if(i!==-1)return n=[[qn,r.substring(0,i)],[Qt,s],[qn,r.substring(i+s.length)]],t.length>e.length&&(n[0][0]=n[2][0]=wr),n;if(s.length===1)return[[wr,t],[qn,e]];var o=pJ(t,e);if(o){var a=o[0],l=o[1],c=o[2],u=o[3],d=o[4],h=wu(a,c),f=wu(l,u);return h.concat([[Qt,d]],f)}return fJ(t,e)}function fJ(t,e){for(var n=t.length,r=e.length,s=Math.ceil((n+r)/2),i=s,o=2*s,a=new Array(o),l=new Array(o),c=0;c<o;c++)a[c]=-1,l[c]=-1;a[i+1]=0,l[i+1]=0;for(var u=n-r,d=u%2!==0,h=0,f=0,p=0,m=0,g=0;g<s;g++){for(var y=-g+h;y<=g-f;y+=2){var v=i+y,b;y===-g||y!==g&&a[v-1]<a[v+1]?b=a[v+1]:b=a[v-1]+1;for(var C=b-y;b<n&&C<r&&t.charAt(b)===e.charAt(C);)b++,C++;if(a[v]=b,b>n)f+=2;else if(C>r)h+=2;else if(d){var _=i+u-y;if(_>=0&&_<o&&l[_]!==-1){var k=n-l[_];if(b>=k)return SE(t,e,b,C)}}}for(var E=-g+p;E<=g-m;E+=2){var _=i+E,k;E===-g||E!==g&&l[_-1]<l[_+1]?k=l[_+1]:k=l[_-1]+1;for(var A=k-E;k<n&&A<r&&t.charAt(n-k-1)===e.charAt(r-A-1);)k++,A++;if(l[_]=k,k>n)m+=2;else if(A>r)p+=2;else if(!d){var v=i+u-E;if(v>=0&&v<o&&a[v]!==-1){var b=a[v],C=i+b-v;if(k=n-k,b>=k)return SE(t,e,b,C)}}}}return[[wr,t],[qn,e]]}function SE(t,e,n,r){var s=t.substring(0,n),i=e.substring(0,r),o=t.substring(n),a=e.substring(r),l=wu(s,i),c=wu(o,a);return l.concat(c)}function Xm(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),s=r,i=0;n<s;)t.substring(i,s)==e.substring(i,s)?(n=s,i=n):r=s,s=Math.floor((r-n)/2+n);return ME(t.charCodeAt(s-1))&&s--,s}function EE(t,e){var n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var s=Math.min(n,r);if(t==e)return s;for(var i=0,o=1;;){var a=t.substring(s-o),l=e.indexOf(a);if(l==-1)return i;o+=l,(l==0||t.substring(s-o)==e.substring(0,o))&&(i=o,o++)}}function xf(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),s=r,i=0;n<s;)t.substring(t.length-s,t.length-i)==e.substring(e.length-s,e.length-i)?(n=s,i=n):r=s,s=Math.floor((r-n)/2+n);return OE(t.charCodeAt(t.length-s))&&s--,s}function pJ(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;function s(f,p,m){for(var g=f.substring(m,m+Math.floor(f.length/4)),y=-1,v="",b,C,_,k;(y=p.indexOf(g,y+1))!==-1;){var E=Xm(f.substring(m),p.substring(y)),A=xf(f.substring(0,m),p.substring(0,y));v.length<A+E&&(v=p.substring(y-A,y)+p.substring(y,y+E),b=f.substring(0,m-A),C=f.substring(m+E),_=p.substring(0,y-A),k=p.substring(y+E))}return v.length*2>=f.length?[b,C,_,k,v]:null}var i=s(n,r,Math.ceil(n.length/4)),o=s(n,r,Math.ceil(n.length/2)),a;if(!i&&!o)return null;o?i?a=i[4].length>o[4].length?i:o:a=o:a=i;var l,c,u,d;t.length>e.length?(l=a[0],c=a[1],u=a[2],d=a[3]):(u=a[0],d=a[1],l=a[2],c=a[3]);var h=a[4];return[l,c,u,d,h]}function gJ(t){for(var e=!1,n=[],r=0,s=null,i=0,o=0,a=0,l=0,c=0;i<t.length;)t[i][0]==Qt?(n[r++]=i,o=l,a=c,l=0,c=0,s=t[i][1]):(t[i][0]==qn?l+=t[i][1].length:c+=t[i][1].length,s&&s.length<=Math.max(o,a)&&s.length<=Math.max(l,c)&&(t.splice(n[r-1],0,[wr,s]),t[n[r-1]+1][0]=qn,r--,r--,i=r>0?n[r-1]:-1,o=0,a=0,l=0,c=0,s=null,e=!0)),i++;for(e&&Qm(t),bJ(t),i=1;i<t.length;){if(t[i-1][0]==wr&&t[i][0]==qn){var u=t[i-1][1],d=t[i][1],h=EE(u,d),f=EE(d,u);h>=f?(h>=u.length/2||h>=d.length/2)&&(t.splice(i,0,[Qt,d.substring(0,h)]),t[i-1][1]=u.substring(0,u.length-h),t[i+1][1]=d.substring(h),i++):(f>=u.length/2||f>=d.length/2)&&(t.splice(i,0,[Qt,u.substring(0,f)]),t[i-1][0]=qn,t[i-1][1]=d.substring(0,d.length-f),t[i+1][0]=wr,t[i+1][1]=u.substring(f),i++),i++}i++}}var AE=/[^a-zA-Z0-9]/,TE=/\s/,kE=/[\r\n]/,mJ=/\n\r?\n$/,yJ=/^\r?\n\r?\n/;function bJ(t){function e(f,p){if(!f||!p)return 6;var m=f.charAt(f.length-1),g=p.charAt(0),y=m.match(AE),v=g.match(AE),b=y&&m.match(TE),C=v&&g.match(TE),_=b&&m.match(kE),k=C&&g.match(kE),E=_&&f.match(mJ),A=k&&p.match(yJ);return E||A?5:_||k?4:y&&!b&&C?3:b||C?2:y||v?1:0}for(var n=1;n<t.length-1;){if(t[n-1][0]==Qt&&t[n+1][0]==Qt){var r=t[n-1][1],s=t[n][1],i=t[n+1][1],o=xf(r,s);if(o){var a=s.substring(s.length-o);r=r.substring(0,r.length-o),s=a+s.substring(0,s.length-o),i=a+i}for(var l=r,c=s,u=i,d=e(r,s)+e(s,i);s.charAt(0)===i.charAt(0);){r+=s.charAt(0),s=s.substring(1)+i.charAt(0),i=i.substring(1);var h=e(r,s)+e(s,i);h>=d&&(d=h,l=r,c=s,u=i)}t[n-1][1]!=l&&(l?t[n-1][1]=l:(t.splice(n-1,1),n--),t[n][1]=c,u?t[n+1][1]=u:(t.splice(n+1,1),n--))}n++}}function Qm(t,e){t.push([Qt,""]);for(var n=0,r=0,s=0,i="",o="",a;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case qn:s++,o+=t[n][1],n++;break;case wr:r++,i+=t[n][1],n++;break;case Qt:var l=n-s-r-1;if(e){if(l>=0&&PE(t[l][1])){var c=t[l][1].slice(-1);if(t[l][1]=t[l][1].slice(0,-1),i=c+i,o=c+o,!t[l][1]){t.splice(l,1),n--;var u=l-1;t[u]&&t[u][0]===qn&&(s++,o=t[u][1]+o,u--),t[u]&&t[u][0]===wr&&(r++,i=t[u][1]+i,u--),l=u}}if($E(t[n][1])){var c=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),i+=c,o+=c}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(i.length>0||o.length>0){i.length>0&&o.length>0&&(a=Xm(o,i),a!==0&&(l>=0?t[l][1]+=o.substring(0,a):(t.splice(0,0,[Qt,o.substring(0,a)]),n++),o=o.substring(a),i=i.substring(a)),a=xf(o,i),a!==0&&(t[n][1]=o.substring(o.length-a)+t[n][1],o=o.substring(0,o.length-a),i=i.substring(0,i.length-a)));var d=s+r;i.length===0&&o.length===0?(t.splice(n-d,d),n=n-d):i.length===0?(t.splice(n-d,d,[qn,o]),n=n-d+1):o.length===0?(t.splice(n-d,d,[wr,i]),n=n-d+1):(t.splice(n-d,d,[wr,i],[qn,o]),n=n-d+2)}n!==0&&t[n-1][0]===Qt?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,s=0,r=0,i="",o="";break}}t[t.length-1][1]===""&&t.pop();var h=!1;for(n=1;n<t.length-1;)t[n-1][0]===Qt&&t[n+1][0]===Qt&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),h=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),h=!0)),n++;h&&Qm(t,e)}function ME(t){return t>=55296&&t<=56319}function OE(t){return t>=56320&&t<=57343}function $E(t){return OE(t.charCodeAt(0))}function PE(t){return ME(t.charCodeAt(t.length-1))}function vJ(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function Jm(t,e,n,r){return PE(t)||$E(r)?null:vJ([[Qt,t],[wr,e],[qn,n],[Qt,r]])}function xJ(t,e,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,i=t.length,o=e.length;if(r.length===0&&(s===null||s.length===0)){var a=r.index,l=t.slice(0,a),c=t.slice(a),u=s?s.index:null;e:{var d=a+o-i;if(u!==null&&u!==d||d<0||d>o)break e;var h=e.slice(0,d),f=e.slice(d);if(f!==c)break e;var p=Math.min(a,d),m=l.slice(0,p),g=h.slice(0,p);if(m!==g)break e;var y=l.slice(p),v=h.slice(p);return Jm(m,y,v,c)}e:{if(u!==null&&u!==a)break e;var b=a,h=e.slice(0,b),f=e.slice(b);if(h!==l)break e;var C=Math.min(i-b,o-b),_=c.slice(c.length-C),k=f.slice(f.length-C);if(_!==k)break e;var y=c.slice(0,c.length-C),v=f.slice(0,f.length-C);return Jm(l,y,v,_)}}if(r.length>0&&s&&s.length===0)e:{var m=t.slice(0,r.index),_=t.slice(r.index+r.length),p=m.length,C=_.length;if(o<p+C)break e;var g=e.slice(0,p),k=e.slice(o-C);if(m!==g||_!==k)break e;var y=t.slice(p,i-C),v=e.slice(p,o-C);return Jm(m,y,v,_)}return null}function wf(t,e,n,r){return wu(t,e,n,r,!0)}wf.INSERT=qn,wf.DELETE=wr,wf.EQUAL=Qt;var wJ=wf,_f={exports:{}};_f.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",h="[object Map]",f="[object Number]",p="[object Object]",m="[object Promise]",g="[object RegExp]",y="[object Set]",v="[object String]",b="[object Symbol]",C="[object WeakMap]",_="[object ArrayBuffer]",k="[object DataView]",E="[object Float32Array]",A="[object Float64Array]",$="[object Int8Array]",P="[object Int16Array]",O="[object Int32Array]",R="[object Uint8Array]",H="[object Uint8ClampedArray]",z="[object Uint16Array]",j="[object Uint32Array]",F=/[\\^$.*+?()[\]{}|]/g,V=/\w*$/,q=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,B={};B[i]=B[o]=B[_]=B[k]=B[a]=B[l]=B[E]=B[A]=B[$]=B[P]=B[O]=B[h]=B[f]=B[p]=B[g]=B[y]=B[v]=B[b]=B[R]=B[H]=B[z]=B[j]=!0,B[c]=B[u]=B[C]=!1;var W=typeof an=="object"&&an&&an.Object===Object&&an,se=typeof self=="object"&&self&&self.Object===Object&&self,ne=W||se||Function("return this")(),oe=e&&!e.nodeType&&e,te=oe&&!0&&t&&!t.nodeType&&t,ue=te&&te.exports===oe;function Ce(w,M){return w.set(M[0],M[1]),w}function be(w,M){return w.add(M),w}function Te(w,M){for(var I=-1,G=w?w.length:0;++I<G&&M(w[I],I,w)!==!1;);return w}function de(w,M){for(var I=-1,G=M.length,Ie=w.length;++I<G;)w[Ie+I]=M[I];return w}function Le(w,M,I,G){for(var Ie=-1,Ae=w?w.length:0;++Ie<Ae;)I=M(I,w[Ie],Ie,w);return I}function Z(w,M){for(var I=-1,G=Array(w);++I<w;)G[I]=M(I);return G}function Be(w,M){return w==null?void 0:w[M]}function ot(w){var M=!1;if(w!=null&&typeof w.toString!="function")try{M=!!(w+"")}catch{}return M}function Et(w){var M=-1,I=Array(w.size);return w.forEach(function(G,Ie){I[++M]=[Ie,G]}),I}function tn(w,M){return function(I){return w(M(I))}}function Qn(w){var M=-1,I=Array(w.size);return w.forEach(function(G){I[++M]=G}),I}var As=Array.prototype,ts=Function.prototype,gt=Object.prototype,N=ne["__core-js_shared__"],he=function(){var w=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||"");return w?"Symbol(src)_1."+w:""}(),me=ts.toString,Oe=gt.hasOwnProperty,at=gt.toString,Ze=RegExp("^"+me.call(Oe).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=ue?ne.Buffer:void 0,mt=ne.Symbol,gn=ne.Uint8Array,Qe=tn(Object.getPrototypeOf,Object),Ht=Object.create,Mr=gt.propertyIsEnumerable,fr=As.splice,ns=Object.getOwnPropertySymbols,Zt=Ee?Ee.isBuffer:void 0,Oa=tn(Object.keys,Object),ko=Ms(ne,"DataView"),Zs=Ms(ne,"Map"),Or=Ms(ne,"Promise"),Mo=Ms(ne,"Set"),$a=Ms(ne,"WeakMap"),Tt=Ms(Object,"create"),nn=Jn(ko),Vt=Jn(Zs),pr=Jn(Or),mn=Jn(Mo),rn=Jn($a),sn=mt?mt.prototype:void 0,Ts=sn?sn.valueOf:void 0;function ut(w){var M=-1,I=w?w.length:0;for(this.clear();++M<I;){var G=w[M];this.set(G[0],G[1])}}function rs(){this.__data__=Tt?Tt(null):{}}function gr(w){return this.has(w)&&delete this.__data__[w]}function $r(w){var M=this.__data__;if(Tt){var I=M[w];return I===r?void 0:I}return Oe.call(M,w)?M[w]:void 0}function Xs(w){var M=this.__data__;return Tt?M[w]!==void 0:Oe.call(M,w)}function ks(w,M){var I=this.__data__;return I[w]=Tt&&M===void 0?r:M,this}ut.prototype.clear=rs,ut.prototype.delete=gr,ut.prototype.get=$r,ut.prototype.has=Xs,ut.prototype.set=ks;function yt(w){var M=-1,I=w?w.length:0;for(this.clear();++M<I;){var G=w[M];this.set(G[0],G[1])}}function $i(){this.__data__=[]}function Pa(w){var M=this.__data__,I=gc(M,w);if(I<0)return!1;var G=M.length-1;return I==G?M.pop():fr.call(M,I,1),!0}function Mx(w){var M=this.__data__,I=gc(M,w);return I<0?void 0:M[I][1]}function Ox(w){return gc(this.__data__,w)>-1}function $x(w,M){var I=this.__data__,G=gc(I,w);return G<0?I.push([w,M]):I[G][1]=M,this}yt.prototype.clear=$i,yt.prototype.delete=Pa,yt.prototype.get=Mx,yt.prototype.has=Ox,yt.prototype.set=$x;function Fn(w){var M=-1,I=w?w.length:0;for(this.clear();++M<I;){var G=w[M];this.set(G[0],G[1])}}function Px(){this.__data__={hash:new ut,map:new(Zs||yt),string:new ut}}function Dx(w){return Ra(this,w).delete(w)}function Rx(w){return Ra(this,w).get(w)}function Ix(w){return Ra(this,w).has(w)}function Nx(w,M){return Ra(this,w).set(w,M),this}Fn.prototype.clear=Px,Fn.prototype.delete=Dx,Fn.prototype.get=Rx,Fn.prototype.has=Ix,Fn.prototype.set=Nx;function mr(w){this.__data__=new yt(w)}function Lx(){this.__data__=new yt}function Bx(w){return this.__data__.delete(w)}function jx(w){return this.__data__.get(w)}function Fx(w){return this.__data__.has(w)}function zx(w,M){var I=this.__data__;if(I instanceof yt){var G=I.__data__;if(!Zs||G.length<n-1)return G.push([w,M]),this;I=this.__data__=new Fn(G)}return I.set(w,M),this}mr.prototype.clear=Lx,mr.prototype.delete=Bx,mr.prototype.get=jx,mr.prototype.has=Fx,mr.prototype.set=zx;function pc(w,M){var I=Gd(w)||yc(w)?Z(w.length,String):[],G=I.length,Ie=!!G;for(var Ae in w)Oe.call(w,Ae)&&!(Ie&&(Ae=="length"||tw(Ae,G)))&&I.push(Ae);return I}function Ag(w,M,I){var G=w[M];(!(Oe.call(w,M)&&$g(G,I))||I===void 0&&!(M in w))&&(w[M]=I)}function gc(w,M){for(var I=w.length;I--;)if($g(w[I][0],M))return I;return-1}function Qs(w,M){return w&&Wd(M,Kd(M),w)}function Ud(w,M,I,G,Ie,Ae,Xe){var Ye;if(G&&(Ye=Ae?G(w,Ie,Ae,Xe):G(w)),Ye!==void 0)return Ye;if(!ei(w))return w;var Xt=Gd(w);if(Xt){if(Ye=Jx(w),!M)return Zx(w,Ye)}else{var nt=Di(w),zn=nt==u||nt==d;if(Pg(w))return mc(w,M);if(nt==p||nt==i||zn&&!Ae){if(ot(w))return Ae?w:{};if(Ye=Js(zn?{}:w),!M)return Xx(w,Qs(Ye,w))}else{if(!B[nt])return Ae?w:{};Ye=ew(w,nt,Ud,M)}}Xe||(Xe=new mr);var yr=Xe.get(w);if(yr)return yr;if(Xe.set(w,Ye),!Xt)var on=I?Qx(w):Kd(w);return Te(on||w,function(Hn,Cn){on&&(Cn=Hn,Hn=w[Cn]),Ag(Ye,Cn,Ud(Hn,M,I,G,Cn,w,Xe))}),Ye}function Hx(w){return ei(w)?Ht(w):{}}function Vx(w,M,I){var G=M(w);return Gd(w)?G:de(G,I(w))}function Ux(w){return at.call(w)}function qx(w){if(!ei(w)||rw(w))return!1;var M=Yd(w)||ot(w)?Ze:q;return M.test(Jn(w))}function Wx(w){if(!Mg(w))return Oa(w);var M=[];for(var I in Object(w))Oe.call(w,I)&&I!="constructor"&&M.push(I);return M}function mc(w,M){if(M)return w.slice();var I=new w.constructor(w.length);return w.copy(I),I}function qd(w){var M=new w.constructor(w.byteLength);return new gn(M).set(new gn(w)),M}function Da(w,M){var I=M?qd(w.buffer):w.buffer;return new w.constructor(I,w.byteOffset,w.byteLength)}function Tg(w,M,I){var G=M?I(Et(w),!0):Et(w);return Le(G,Ce,new w.constructor)}function kg(w){var M=new w.constructor(w.source,V.exec(w));return M.lastIndex=w.lastIndex,M}function Gx(w,M,I){var G=M?I(Qn(w),!0):Qn(w);return Le(G,be,new w.constructor)}function Yx(w){return Ts?Object(Ts.call(w)):{}}function Kx(w,M){var I=M?qd(w.buffer):w.buffer;return new w.constructor(I,w.byteOffset,w.length)}function Zx(w,M){var I=-1,G=w.length;for(M||(M=Array(G));++I<G;)M[I]=w[I];return M}function Wd(w,M,I,G){I||(I={});for(var Ie=-1,Ae=M.length;++Ie<Ae;){var Xe=M[Ie],Ye=void 0;Ag(I,Xe,Ye===void 0?w[Xe]:Ye)}return I}function Xx(w,M){return Wd(w,Pi(w),M)}function Qx(w){return Vx(w,Kd,Pi)}function Ra(w,M){var I=w.__data__;return nw(M)?I[typeof M=="string"?"string":"hash"]:I.map}function Ms(w,M){var I=Be(w,M);return qx(I)?I:void 0}var Pi=ns?tn(ns,Object):iw,Di=Ux;(ko&&Di(new ko(new ArrayBuffer(1)))!=k||Zs&&Di(new Zs)!=h||Or&&Di(Or.resolve())!=m||Mo&&Di(new Mo)!=y||$a&&Di(new $a)!=C)&&(Di=function(w){var M=at.call(w),I=M==p?w.constructor:void 0,G=I?Jn(I):void 0;if(G)switch(G){case nn:return k;case Vt:return h;case pr:return m;case mn:return y;case rn:return C}return M});function Jx(w){var M=w.length,I=w.constructor(M);return M&&typeof w[0]=="string"&&Oe.call(w,"index")&&(I.index=w.index,I.input=w.input),I}function Js(w){return typeof w.constructor=="function"&&!Mg(w)?Hx(Qe(w)):{}}function ew(w,M,I,G){var Ie=w.constructor;switch(M){case _:return qd(w);case a:case l:return new Ie(+w);case k:return Da(w,G);case E:case A:case $:case P:case O:case R:case H:case z:case j:return Kx(w,G);case h:return Tg(w,G,I);case f:case v:return new Ie(w);case g:return kg(w);case y:return Gx(w,G,I);case b:return Yx(w)}}function tw(w,M){return M=M??s,!!M&&(typeof w=="number"||Q.test(w))&&w>-1&&w%1==0&&w<M}function nw(w){var M=typeof w;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?w!=="__proto__":w===null}function rw(w){return!!he&&he in w}function Mg(w){var M=w&&w.constructor,I=typeof M=="function"&&M.prototype||gt;return w===I}function Jn(w){if(w!=null){try{return me.call(w)}catch{}try{return w+""}catch{}}return""}function Og(w){return Ud(w,!0,!0)}function $g(w,M){return w===M||w!==w&&M!==M}function yc(w){return sw(w)&&Oe.call(w,"callee")&&(!Mr.call(w,"callee")||at.call(w)==i)}var Gd=Array.isArray;function bc(w){return w!=null&&Dg(w.length)&&!Yd(w)}function sw(w){return Rg(w)&&bc(w)}var Pg=Zt||ow;function Yd(w){var M=ei(w)?at.call(w):"";return M==u||M==d}function Dg(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=s}function ei(w){var M=typeof w;return!!w&&(M=="object"||M=="function")}function Rg(w){return!!w&&typeof w=="object"}function Kd(w){return bc(w)?pc(w):Wx(w)}function iw(){return[]}function ow(){return!1}t.exports=Og}(_f,_f.exports);var DE=_f.exports,Cf={exports:{}};Cf.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",s=1,i=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Null]",v="[object Object]",b="[object Promise]",C="[object Proxy]",_="[object RegExp]",k="[object Set]",E="[object String]",A="[object Symbol]",$="[object Undefined]",P="[object WeakMap]",O="[object ArrayBuffer]",R="[object DataView]",H="[object Float32Array]",z="[object Float64Array]",j="[object Int8Array]",F="[object Int16Array]",V="[object Int32Array]",q="[object Uint8Array]",Q="[object Uint8ClampedArray]",B="[object Uint16Array]",W="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,oe=/^(?:0|[1-9]\d*)$/,te={};te[H]=te[z]=te[j]=te[F]=te[V]=te[q]=te[Q]=te[B]=te[W]=!0,te[a]=te[l]=te[O]=te[u]=te[R]=te[d]=te[h]=te[f]=te[m]=te[g]=te[v]=te[_]=te[k]=te[E]=te[P]=!1;var ue=typeof an=="object"&&an&&an.Object===Object&&an,Ce=typeof self=="object"&&self&&self.Object===Object&&self,be=ue||Ce||Function("return this")(),Te=e&&!e.nodeType&&e,de=Te&&!0&&t&&!t.nodeType&&t,Le=de&&de.exports===Te,Z=Le&&ue.process,Be=function(){try{return Z&&Z.binding&&Z.binding("util")}catch{}}(),ot=Be&&Be.isTypedArray;function Et(w,M){for(var I=-1,G=w==null?0:w.length,Ie=0,Ae=[];++I<G;){var Xe=w[I];M(Xe,I,w)&&(Ae[Ie++]=Xe)}return Ae}function tn(w,M){for(var I=-1,G=M.length,Ie=w.length;++I<G;)w[Ie+I]=M[I];return w}function Qn(w,M){for(var I=-1,G=w==null?0:w.length;++I<G;)if(M(w[I],I,w))return!0;return!1}function As(w,M){for(var I=-1,G=Array(w);++I<w;)G[I]=M(I);return G}function ts(w){return function(M){return w(M)}}function gt(w,M){return w.has(M)}function N(w,M){return w==null?void 0:w[M]}function he(w){var M=-1,I=Array(w.size);return w.forEach(function(G,Ie){I[++M]=[Ie,G]}),I}function me(w,M){return function(I){return w(M(I))}}function Oe(w){var M=-1,I=Array(w.size);return w.forEach(function(G){I[++M]=G}),I}var at=Array.prototype,Ze=Function.prototype,Ee=Object.prototype,mt=be["__core-js_shared__"],gn=Ze.toString,Qe=Ee.hasOwnProperty,Ht=function(){var w=/[^.]+$/.exec(mt&&mt.keys&&mt.keys.IE_PROTO||"");return w?"Symbol(src)_1."+w:""}(),Mr=Ee.toString,fr=RegExp("^"+gn.call(Qe).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ns=Le?be.Buffer:void 0,Zt=be.Symbol,Oa=be.Uint8Array,ko=Ee.propertyIsEnumerable,Zs=at.splice,Or=Zt?Zt.toStringTag:void 0,Mo=Object.getOwnPropertySymbols,$a=ns?ns.isBuffer:void 0,Tt=me(Object.keys,Object),nn=Pi(be,"DataView"),Vt=Pi(be,"Map"),pr=Pi(be,"Promise"),mn=Pi(be,"Set"),rn=Pi(be,"WeakMap"),sn=Pi(Object,"create"),Ts=Jn(nn),ut=Jn(Vt),rs=Jn(pr),gr=Jn(mn),$r=Jn(rn),Xs=Zt?Zt.prototype:void 0,ks=Xs?Xs.valueOf:void 0;function yt(w){var M=-1,I=w==null?0:w.length;for(this.clear();++M<I;){var G=w[M];this.set(G[0],G[1])}}function $i(){this.__data__=sn?sn(null):{},this.size=0}function Pa(w){var M=this.has(w)&&delete this.__data__[w];return this.size-=M?1:0,M}function Mx(w){var M=this.__data__;if(sn){var I=M[w];return I===r?void 0:I}return Qe.call(M,w)?M[w]:void 0}function Ox(w){var M=this.__data__;return sn?M[w]!==void 0:Qe.call(M,w)}function $x(w,M){var I=this.__data__;return this.size+=this.has(w)?0:1,I[w]=sn&&M===void 0?r:M,this}yt.prototype.clear=$i,yt.prototype.delete=Pa,yt.prototype.get=Mx,yt.prototype.has=Ox,yt.prototype.set=$x;function Fn(w){var M=-1,I=w==null?0:w.length;for(this.clear();++M<I;){var G=w[M];this.set(G[0],G[1])}}function Px(){this.__data__=[],this.size=0}function Dx(w){var M=this.__data__,I=mc(M,w);if(I<0)return!1;var G=M.length-1;return I==G?M.pop():Zs.call(M,I,1),--this.size,!0}function Rx(w){var M=this.__data__,I=mc(M,w);return I<0?void 0:M[I][1]}function Ix(w){return mc(this.__data__,w)>-1}function Nx(w,M){var I=this.__data__,G=mc(I,w);return G<0?(++this.size,I.push([w,M])):I[G][1]=M,this}Fn.prototype.clear=Px,Fn.prototype.delete=Dx,Fn.prototype.get=Rx,Fn.prototype.has=Ix,Fn.prototype.set=Nx;function mr(w){var M=-1,I=w==null?0:w.length;for(this.clear();++M<I;){var G=w[M];this.set(G[0],G[1])}}function Lx(){this.size=0,this.__data__={hash:new yt,map:new(Vt||Fn),string:new yt}}function Bx(w){var M=Ms(this,w).delete(w);return this.size-=M?1:0,M}function jx(w){return Ms(this,w).get(w)}function Fx(w){return Ms(this,w).has(w)}function zx(w,M){var I=Ms(this,w),G=I.size;return I.set(w,M),this.size+=I.size==G?0:1,this}mr.prototype.clear=Lx,mr.prototype.delete=Bx,mr.prototype.get=jx,mr.prototype.has=Fx,mr.prototype.set=zx;function pc(w){var M=-1,I=w==null?0:w.length;for(this.__data__=new mr;++M<I;)this.add(w[M])}function Ag(w){return this.__data__.set(w,r),this}function gc(w){return this.__data__.has(w)}pc.prototype.add=pc.prototype.push=Ag,pc.prototype.has=gc;function Qs(w){var M=this.__data__=new Fn(w);this.size=M.size}function Ud(){this.__data__=new Fn,this.size=0}function Hx(w){var M=this.__data__,I=M.delete(w);return this.size=M.size,I}function Vx(w){return this.__data__.get(w)}function Ux(w){return this.__data__.has(w)}function qx(w,M){var I=this.__data__;if(I instanceof Fn){var G=I.__data__;if(!Vt||G.length<n-1)return G.push([w,M]),this.size=++I.size,this;I=this.__data__=new mr(G)}return I.set(w,M),this.size=I.size,this}Qs.prototype.clear=Ud,Qs.prototype.delete=Hx,Qs.prototype.get=Vx,Qs.prototype.has=Ux,Qs.prototype.set=qx;function Wx(w,M){var I=yc(w),G=!I&&$g(w),Ie=!I&&!G&&bc(w),Ae=!I&&!G&&!Ie&&Rg(w),Xe=I||G||Ie||Ae,Ye=Xe?As(w.length,String):[],Xt=Ye.length;for(var nt in w)Qe.call(w,nt)&&!(Xe&&(nt=="length"||Ie&&(nt=="offset"||nt=="parent")||Ae&&(nt=="buffer"||nt=="byteLength"||nt=="byteOffset")||ew(nt,Xt)))&&Ye.push(nt);return Ye}function mc(w,M){for(var I=w.length;I--;)if(Og(w[I][0],M))return I;return-1}function qd(w,M,I){var G=M(w);return yc(w)?G:tn(G,I(w))}function Da(w){return w==null?w===void 0?$:y:Or&&Or in Object(w)?Di(w):Mg(w)}function Tg(w){return ei(w)&&Da(w)==a}function kg(w,M,I,G,Ie){return w===M?!0:w==null||M==null||!ei(w)&&!ei(M)?w!==w&&M!==M:Gx(w,M,I,G,kg,Ie)}function Gx(w,M,I,G,Ie,Ae){var Xe=yc(w),Ye=yc(M),Xt=Xe?l:Js(w),nt=Ye?l:Js(M);Xt=Xt==a?v:Xt,nt=nt==a?v:nt;var zn=Xt==v,yr=nt==v,on=Xt==nt;if(on&&bc(w)){if(!bc(M))return!1;Xe=!0,zn=!1}if(on&&!zn)return Ae||(Ae=new Qs),Xe||Rg(w)?Wd(w,M,I,G,Ie,Ae):Xx(w,M,Xt,I,G,Ie,Ae);if(!(I&s)){var Hn=zn&&Qe.call(w,"__wrapped__"),Cn=yr&&Qe.call(M,"__wrapped__");if(Hn||Cn){var Oo=Hn?w.value():w,Ri=Cn?M.value():M;return Ae||(Ae=new Qs),Ie(Oo,Ri,I,G,Ae)}}return on?(Ae||(Ae=new Qs),Qx(w,M,I,G,Ie,Ae)):!1}function Yx(w){if(!Dg(w)||nw(w))return!1;var M=Pg(w)?fr:ne;return M.test(Jn(w))}function Kx(w){return ei(w)&&Yd(w.length)&&!!te[Da(w)]}function Zx(w){if(!rw(w))return Tt(w);var M=[];for(var I in Object(w))Qe.call(w,I)&&I!="constructor"&&M.push(I);return M}function Wd(w,M,I,G,Ie,Ae){var Xe=I&s,Ye=w.length,Xt=M.length;if(Ye!=Xt&&!(Xe&&Xt>Ye))return!1;var nt=Ae.get(w);if(nt&&Ae.get(M))return nt==M;var zn=-1,yr=!0,on=I&i?new pc:void 0;for(Ae.set(w,M),Ae.set(M,w);++zn<Ye;){var Hn=w[zn],Cn=M[zn];if(G)var Oo=Xe?G(Cn,Hn,zn,M,w,Ae):G(Hn,Cn,zn,w,M,Ae);if(Oo!==void 0){if(Oo)continue;yr=!1;break}if(on){if(!Qn(M,function(Ri,Ia){if(!gt(on,Ia)&&(Hn===Ri||Ie(Hn,Ri,I,G,Ae)))return on.push(Ia)})){yr=!1;break}}else if(!(Hn===Cn||Ie(Hn,Cn,I,G,Ae))){yr=!1;break}}return Ae.delete(w),Ae.delete(M),yr}function Xx(w,M,I,G,Ie,Ae,Xe){switch(I){case R:if(w.byteLength!=M.byteLength||w.byteOffset!=M.byteOffset)return!1;w=w.buffer,M=M.buffer;case O:return!(w.byteLength!=M.byteLength||!Ae(new Oa(w),new Oa(M)));case u:case d:case g:return Og(+w,+M);case h:return w.name==M.name&&w.message==M.message;case _:case E:return w==M+"";case m:var Ye=he;case k:var Xt=G&s;if(Ye||(Ye=Oe),w.size!=M.size&&!Xt)return!1;var nt=Xe.get(w);if(nt)return nt==M;G|=i,Xe.set(w,M);var zn=Wd(Ye(w),Ye(M),G,Ie,Ae,Xe);return Xe.delete(w),zn;case A:if(ks)return ks.call(w)==ks.call(M)}return!1}function Qx(w,M,I,G,Ie,Ae){var Xe=I&s,Ye=Ra(w),Xt=Ye.length,nt=Ra(M),zn=nt.length;if(Xt!=zn&&!Xe)return!1;for(var yr=Xt;yr--;){var on=Ye[yr];if(!(Xe?on in M:Qe.call(M,on)))return!1}var Hn=Ae.get(w);if(Hn&&Ae.get(M))return Hn==M;var Cn=!0;Ae.set(w,M),Ae.set(M,w);for(var Oo=Xe;++yr<Xt;){on=Ye[yr];var Ri=w[on],Ia=M[on];if(G)var Y$=Xe?G(Ia,Ri,on,M,w,Ae):G(Ri,Ia,on,w,M,Ae);if(!(Y$===void 0?Ri===Ia||Ie(Ri,Ia,I,G,Ae):Y$)){Cn=!1;break}Oo||(Oo=on=="constructor")}if(Cn&&!Oo){var Ig=w.constructor,Ng=M.constructor;Ig!=Ng&&"constructor"in w&&"constructor"in M&&!(typeof Ig=="function"&&Ig instanceof Ig&&typeof Ng=="function"&&Ng instanceof Ng)&&(Cn=!1)}return Ae.delete(w),Ae.delete(M),Cn}function Ra(w){return qd(w,Kd,Jx)}function Ms(w,M){var I=w.__data__;return tw(M)?I[typeof M=="string"?"string":"hash"]:I.map}function Pi(w,M){var I=N(w,M);return Yx(I)?I:void 0}function Di(w){var M=Qe.call(w,Or),I=w[Or];try{w[Or]=void 0;var G=!0}catch{}var Ie=Mr.call(w);return G&&(M?w[Or]=I:delete w[Or]),Ie}var Jx=Mo?function(w){return w==null?[]:(w=Object(w),Et(Mo(w),function(M){return ko.call(w,M)}))}:iw,Js=Da;(nn&&Js(new nn(new ArrayBuffer(1)))!=R||Vt&&Js(new Vt)!=m||pr&&Js(pr.resolve())!=b||mn&&Js(new mn)!=k||rn&&Js(new rn)!=P)&&(Js=function(w){var M=Da(w),I=M==v?w.constructor:void 0,G=I?Jn(I):"";if(G)switch(G){case Ts:return R;case ut:return m;case rs:return b;case gr:return k;case $r:return P}return M});function ew(w,M){return M=M??o,!!M&&(typeof w=="number"||oe.test(w))&&w>-1&&w%1==0&&w<M}function tw(w){var M=typeof w;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?w!=="__proto__":w===null}function nw(w){return!!Ht&&Ht in w}function rw(w){var M=w&&w.constructor,I=typeof M=="function"&&M.prototype||Ee;return w===I}function Mg(w){return Mr.call(w)}function Jn(w){if(w!=null){try{return gn.call(w)}catch{}try{return w+""}catch{}}return""}function Og(w,M){return w===M||w!==w&&M!==M}var $g=Tg(function(){return arguments}())?Tg:function(w){return ei(w)&&Qe.call(w,"callee")&&!ko.call(w,"callee")},yc=Array.isArray;function Gd(w){return w!=null&&Yd(w.length)&&!Pg(w)}var bc=$a||ow;function sw(w,M){return kg(w,M)}function Pg(w){if(!Dg(w))return!1;var M=Da(w);return M==f||M==p||M==c||M==C}function Yd(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=o}function Dg(w){var M=typeof w;return w!=null&&(M=="object"||M=="function")}function ei(w){return w!=null&&typeof w=="object"}var Rg=ot?ts(ot):Kx;function Kd(w){return Gd(w)?Wx(w):Zx(w)}function iw(){return[]}function ow(){return!1}t.exports=sw}(Cf,Cf.exports);var RE=Cf.exports,e1={};Object.defineProperty(e1,"__esModule",{value:!0});const _J=DE,CJ=RE;var t1;(function(t){function e(i={},o={},a=!1){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let l=_J(o);a||(l=Object.keys(l).reduce((c,u)=>(l[u]!=null&&(c[u]=l[u]),c),{}));for(const c in i)i[c]!==void 0&&o[c]===void 0&&(l[c]=i[c]);return Object.keys(l).length>0?l:void 0}t.compose=e;function n(i={},o={}){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});const a=Object.keys(i).concat(Object.keys(o)).reduce((l,c)=>(CJ(i[c],o[c])||(l[c]=o[c]===void 0?null:o[c]),l),{});return Object.keys(a).length>0?a:void 0}t.diff=n;function r(i={},o={}){i=i||{};const a=Object.keys(o).reduce((l,c)=>(o[c]!==i[c]&&i[c]!==void 0&&(l[c]=o[c]),l),{});return Object.keys(i).reduce((l,c)=>(i[c]!==o[c]&&o[c]===void 0&&(l[c]=null),l),a)}t.invert=r;function s(i,o,a=!1){if(typeof i!="object")return o;if(typeof o!="object")return;if(!a)return o;const l=Object.keys(o).reduce((c,u)=>(i[u]===void 0&&(c[u]=o[u]),c),{});return Object.keys(l).length>0?l:void 0}t.transform=s})(t1||(t1={})),e1.default=t1;var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0});var n1;(function(t){function e(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}t.length=e})(n1||(n1={})),Sf.default=n1;var r1={};Object.defineProperty(r1,"__esModule",{value:!0});const IE=Sf;let SJ=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const n=this.ops[this.index];if(n){const r=this.offset,s=IE.default.length(n);if(e>=s-r?(e=s-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete=="number")return{delete:e};{const i={};return n.attributes&&(i.attributes=n.attributes),typeof n.retain=="number"?i.retain=e:typeof n.retain=="object"&&n.retain!==null?i.retain=n.retain:typeof n.insert=="string"?i.insert=n.insert.substr(r,e):i.insert=n.insert,i}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?IE.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,n=this.index,r=this.next(),s=this.ops.slice(this.index);return this.offset=e,this.index=n,[r].concat(s)}}else return[]}};r1.default=SJ,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=wJ,r=DE,s=RE,i=e1;e.AttributeMap=i.default;const o=Sf;e.Op=o.default;const a=r1;e.OpIterator=a.default;const l="\0",c=(d,h)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const f=Object.keys(d)[0];if(!f||f!==Object.keys(h)[0])throw new Error(`embed types not matched: ${f} != ${Object.keys(h)[0]}`);return[f,d[f],h[f]]};class u{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,f){this.handlers[h]=f}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const f=this.handlers[h];if(!f)throw new Error(`no handlers for embed type "${h}"`);return f}insert(h,f){const p={};return typeof h=="string"&&h.length===0?this:(p.insert=h,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,f){if(typeof h=="number"&&h<=0)return this;const p={retain:h};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p)}push(h){let f=this.ops.length,p=this.ops[f-1];if(h=r(h),typeof p=="object"){if(typeof h.delete=="number"&&typeof p.delete=="number")return this.ops[f-1]={delete:p.delete+h.delete},this;if(typeof p.delete=="number"&&h.insert!=null&&(f-=1,p=this.ops[f-1],typeof p!="object"))return this.ops.unshift(h),this;if(s(h.attributes,p.attributes)){if(typeof h.insert=="string"&&typeof p.insert=="string")return this.ops[f-1]={insert:p.insert+h.insert},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof p.retain=="number")return this.ops[f-1]={retain:p.retain+h.retain},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this}}return f===this.ops.length?this.ops.push(h):this.ops.splice(f,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const f=[],p=[];return this.forEach(m=>{(h(m)?f:p).push(m)}),[f,p]}reduce(h,f){return this.ops.reduce(h,f)}changeLength(){return this.reduce((h,f)=>f.insert?h+o.default.length(f):f.delete?h-f.delete:h,0)}length(){return this.reduce((h,f)=>h+o.default.length(f),0)}slice(h=0,f=1/0){const p=[],m=new a.default(this.ops);let g=0;for(;g<f&&m.hasNext();){let y;g<h?y=m.next(h-g):(y=m.next(f-g),p.push(y)),g+=o.default.length(y)}return new u(p)}compose(h){const f=new a.default(this.ops),p=new a.default(h.ops),m=[],g=p.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){let v=g.retain;for(;f.peekType()==="insert"&&f.peekLength()<=v;)v-=f.peekLength(),m.push(f.next());g.retain-v>0&&p.next(g.retain-v)}const y=new u(m);for(;f.hasNext()||p.hasNext();)if(p.peekType()==="insert")y.push(p.next());else if(f.peekType()==="delete")y.push(f.next());else{const v=Math.min(f.peekLength(),p.peekLength()),b=f.next(v),C=p.next(v);if(C.retain){const _={};if(typeof b.retain=="number")_.retain=typeof C.retain=="number"?v:C.retain;else if(typeof C.retain=="number")b.retain==null?_.insert=b.insert:_.retain=b.retain;else{const E=b.retain==null?"insert":"retain",[A,$,P]=c(b[E],C.retain),O=u.getHandler(A);_[E]={[A]:O.compose($,P,E==="retain")}}const k=i.default.compose(b.attributes,C.attributes,typeof b.retain=="number");if(k&&(_.attributes=k),y.push(_),!p.hasNext()&&s(y.ops[y.ops.length-1],_)){const E=new u(f.rest());return y.concat(E).chop()}}else typeof C.delete=="number"&&(typeof b.retain=="number"||typeof b.retain=="object"&&b.retain!==null)&&y.push(C)}return y.chop()}concat(h){const f=new u(this.ops.slice());return h.ops.length>0&&(f.push(h.ops[0]),f.ops=f.ops.concat(h.ops.slice(1))),f}diff(h,f){if(this.ops===h.ops)return new u;const p=[this,h].map(b=>b.map(C=>{if(C.insert!=null)return typeof C.insert=="string"?C.insert:l;const _=b===h?"on":"with";throw new Error("diff() called "+_+" non-document")}).join("")),m=new u,g=n(p[0],p[1],f,!0),y=new a.default(this.ops),v=new a.default(h.ops);return g.forEach(b=>{let C=b[1].length;for(;C>0;){let _=0;switch(b[0]){case n.INSERT:_=Math.min(v.peekLength(),C),m.push(v.next(_));break;case n.DELETE:_=Math.min(C,y.peekLength()),y.next(_),m.delete(_);break;case n.EQUAL:_=Math.min(y.peekLength(),v.peekLength(),C);const k=y.next(_),E=v.next(_);s(k.insert,E.insert)?m.retain(_,i.default.diff(k.attributes,E.attributes)):m.push(E).delete(_);break}C-=_}}),m.chop()}eachLine(h,f=`
74
+ `){const p=new a.default(this.ops);let m=new u,g=0;for(;p.hasNext();){if(p.peekType()!=="insert")return;const y=p.peek(),v=o.default.length(y)-p.peekLength(),b=typeof y.insert=="string"?y.insert.indexOf(f,v)-v:-1;if(b<0)m.push(p.next());else if(b>0)m.push(p.next(b));else{if(h(m,p.next(1).attributes||{},g)===!1)return;g+=1,m=new u}}m.length()>0&&h(m,{},g)}invert(h){const f=new u;return this.reduce((p,m)=>{if(m.insert)f.delete(o.default.length(m));else{if(typeof m.retain=="number"&&m.attributes==null)return f.retain(m.retain),p+m.retain;if(m.delete||typeof m.retain=="number"){const g=m.delete||m.retain;return h.slice(p,p+g).forEach(v=>{m.delete?f.push(v):m.retain&&m.attributes&&f.retain(o.default.length(v),i.default.invert(m.attributes,v.attributes))}),p+g}else if(typeof m.retain=="object"&&m.retain!==null){const g=h.slice(p,p+1),y=new a.default(g.ops).next(),[v,b,C]=c(m.retain,y.insert),_=u.getHandler(v);return f.retain({[v]:_.invert(b,C)},i.default.invert(m.attributes,y.attributes)),p+1}}return p},0),f.chop()}transform(h,f=!1){if(f=!!f,typeof h=="number")return this.transformPosition(h,f);const p=h,m=new a.default(this.ops),g=new a.default(p.ops),y=new u;for(;m.hasNext()||g.hasNext();)if(m.peekType()==="insert"&&(f||g.peekType()!=="insert"))y.retain(o.default.length(m.next()));else if(g.peekType()==="insert")y.push(g.next());else{const v=Math.min(m.peekLength(),g.peekLength()),b=m.next(v),C=g.next(v);if(b.delete)continue;if(C.delete)y.push(C);else{const _=b.retain,k=C.retain;let E=typeof k=="object"&&k!==null?k:v;if(typeof _=="object"&&_!==null&&typeof k=="object"&&k!==null){const A=Object.keys(_)[0];if(A===Object.keys(k)[0]){const $=u.getHandler(A);$&&(E={[A]:$.transform(_[A],k[A],f)})}}y.retain(E,i.default.transform(b.attributes,C.attributes,f))}}return y.chop()}transformPosition(h,f=!1){f=!!f;const p=new a.default(this.ops);let m=0;for(;p.hasNext()&&m<=h;){const g=p.peekLength(),y=p.peekType();if(p.next(),y==="delete"){h-=Math.min(g,h-m);continue}else y==="insert"&&(m<h||!f)&&(h+=g);m+=g}return h}}u.Op=o.default,u.OpIterator=a.default,u.AttributeMap=i.default,u.handlers={},e.default=u,t.exports=u,t.exports.default=u}(Zm,Zm.exports);var Hr=Zm.exports;const _e=ss(Hr);class hs extends xr{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}hs.blotName="break",hs.tagName="BR";let fs=class extends vf{};const EJ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ef(t){return t.replace(/[&<>"']/g,e=>EJ[e])}const Ks=class Ks extends Wm{static compare(e,n){const r=Ks.order.indexOf(e),s=Ks.order.indexOf(n);return r>=0||s>=0?r-s:e===n?0:e<n?-1:1}formatAt(e,n,r,s){if(Ks.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Se.BLOT)){const i=this.isolate(e,n);s&&i.wrap(r,s)}else super.formatAt(e,n,r,s)}optimize(e){if(super.optimize(e),this.parent instanceof Ks&&Ks.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};U(Ks,"allowedChildren",[Ks,hs,xr,fs]),U(Ks,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let js=Ks;const NE=1;class bn extends xu{constructor(){super(...arguments);U(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=LE(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,s,i){r<=0||(this.scroll.query(s,Se.BLOCK)?n+r===this.length()&&this.format(s,i):super.formatAt(n,Math.min(r,this.length()-n-1),s,i),this.cache={})}insertAt(n,r,s){if(s!=null){super.insertAt(n,r,s),this.cache={};return}if(r.length===0)return;const i=r.split(`
75
+ `),o=i.shift();o.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;i.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),n+o.length)}insertBefore(n,r){const{head:s}=this.children;super.insertBefore(n,r),s instanceof hs&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+NE),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-NE)){const i=this.clone();return n===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}const s=super.split(n,r);return this.cache={},s}}bn.blotName="block",bn.tagName="P",bn.defaultChild=hs,bn.allowedChildren=[hs,js,xr,fs];class Vr extends xr{attach(){super.attach(),this.attributes=new yf(this.domNode)}delta(){return new _e().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,n){const r=this.scroll.query(e,Se.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(e,n,r,s){this.format(r,s)}insertAt(e,n,r){if(r!=null){super.insertAt(e,n,r);return}const s=n.split(`
76
+ `),i=s.pop(),o=s.map(l=>{const c=this.scroll.create(bn.blotName);return c.insertAt(0,l),c}),a=this.split(e);o.forEach(l=>{this.parent.insertBefore(l,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}}Vr.scope=Se.BLOCK_BLOT;function LE(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.descendants(Tn).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),Ur(r,{},e)),new _e).insert(`
77
+ `,Ur(t))}function Ur(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return t==null||("formats"in t&&typeof t.formats=="function"&&(e={...e,...t.formats()},n&&delete e["code-token"]),t.parent==null||t.parent.statics.blotName==="scroll"||t.parent.statics.scope!==t.statics.scope)?e:Ur(t.parent,e,n)}const es=class es extends xr{static value(){}constructor(e,n,r){super(e,n),this.selection=r,this.textNode=document.createTextNode(es.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,n){if(this.savedLength!==0){super.format(e,n);return}let r=this,s=0;for(;r!=null&&r.statics.scope!==Se.BLOCK_BLOT;)s+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=es.CONTENTS.length,r.optimize(),r.formatAt(s,es.CONTENTS.length,e,n),this.savedLength=0)}index(e,n){return e===this.textNode?0:super.index(e,n)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const n=this.prev instanceof fs?this.prev:null,r=n?n.length():0,s=this.next instanceof fs?this.next:null,i=s?s.text:"",{textNode:o}=this,a=o.data.split(es.CONTENTS).join("");o.data=es.CONTENTS;let l;if(n)l=n,(a||s)&&(n.insertAt(n.length(),a+i),s&&s.remove());else if(s)l=s,s.insertAt(0,a);else{const c=document.createTextNode(a);l=this.scroll.create(c),this.parent.insertBefore(l,this)}if(this.remove(),e){const c=(h,f)=>n&&h===n.domNode?f:h===o?r+f-1:s&&h===s.domNode?r+a.length+f:null,u=c(e.start.node,e.start.offset),d=c(e.end.node,e.end.offset);if(u!==null&&d!==null)return{startNode:l.domNode,startOffset:u,endNode:l.domNode,endOffset:d}}return null}update(e,n){if(e.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(n.range=r)}}optimize(e){super.optimize(e);let{parent:n}=this;for(;n;){if(n.domNode.tagName==="A"){this.savedLength=es.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}};U(es,"blotName","cursor"),U(es,"className","ql-cursor"),U(es,"tagName","span"),U(es,"CONTENTS","\uFEFF");let Cl=es;var BE={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function s(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new s(u,d||l,h),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)e.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},a.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,f=d.length,p=new Array(f);h<f;h++)p[h]=d[h].fn;return p},a.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},a.prototype.emit=function(c,u,d,h,f,p){var m=n?n+c:c;if(!this._events[m])return!1;var g=this._events[m],y=arguments.length,v,b;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,d),!0;case 4:return g.fn.call(g.context,u,d,h),!0;case 5:return g.fn.call(g.context,u,d,h,f),!0;case 6:return g.fn.call(g.context,u,d,h,f,p),!0}for(b=1,v=new Array(y-1);b<y;b++)v[b-1]=arguments[b];g.fn.apply(g.context,v)}else{var C=g.length,_;for(b=0;b<C;b++)switch(g[b].once&&this.removeListener(c,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,u);break;case 3:g[b].fn.call(g[b].context,u,d);break;case 4:g[b].fn.call(g[b].context,u,d,h);break;default:if(!v)for(_=1,v=new Array(y-1);_<y;_++)v[_-1]=arguments[_];g[b].fn.apply(g[b].context,v)}}return!0},a.prototype.on=function(c,u,d){return i(this,c,u,d,!1)},a.prototype.once=function(c,u,d){return i(this,c,u,d,!0)},a.prototype.removeListener=function(c,u,d,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===u&&(!h||p.once)&&(!d||p.context===d)&&o(this,f);else{for(var m=0,g=[],y=p.length;m<y;m++)(p[m].fn!==u||h&&!p[m].once||d&&p[m].context!==d)&&g.push(p[m]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(BE);var AJ=BE.exports;const TJ=ss(AJ),s1=new WeakMap,i1=["error","warn","log","info"];let o1="warn";function jE(t){if(o1&&i1.indexOf(t)<=i1.indexOf(o1)){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];console[t](...n)}}function xi(t){return i1.reduce((e,n)=>(e[n]=jE.bind(console,n,t),e),{})}xi.level=t=>{o1=t},jE.level=xi.level;const a1=xi("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(t=>{document.addEventListener(t,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{const i=s1.get(s);i&&i.emitter&&i.emitter.handleDOM(...n)})})});class ve extends TJ{constructor(){super(),this.domListeners={},this.on("error",a1.error)}emit(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return a1.log.call(a1,...n),super.emit(...n)}handleDOM(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];(this.domListeners[e.type]||[]).forEach(i=>{let{node:o,handler:a}=i;(e.target===o||o.contains(e.target))&&a(e,...r)})}listenDOM(e,n,r){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:n,handler:r})}}U(ve,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),U(ve,"sources",{API:"api",SILENT:"silent",USER:"user"});const l1=xi("quill:selection");class ra{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=n}}class kJ{constructor(e,n){this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new ra(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,ve.sources.USER),1)}),this.emitter.on(ve.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(ve.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const o=i.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?ve.sources.SILENT:s)}catch{}})}),this.emitter.on(ve.events.SCROLL_OPTIMIZE,(r,s)=>{if(s.range){const{startNode:i,startOffset:o,endNode:a,endOffset:l}=s.range;this.setNativeRange(i,o,a,l),this.update(ve.sources.SILENT)}}),this.update(ve.sources.SILENT)}handleComposition(){this.emitter.on(ve.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(ve.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(ve.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,n){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(e,Se.BLOCK))){if(r.start.node!==this.cursor.textNode){const s=this.scroll.find(r.start.node,!1);if(s==null)return;if(s instanceof Tn){const i=s.split(r.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(e,n),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();e=Math.min(e,r-1),n=Math.min(e+n,r-1)-e;let s,[i,o]=this.scroll.leaf(e);if(i==null)return null;if(n>0&&o===i.length()){const[u]=this.scroll.leaf(e+1);if(u){const[d]=this.scroll.line(e),[h]=this.scroll.line(e+1);d===h&&(i=u,o=0)}}[s,o]=i.position(o,!0);const a=document.createRange();if(n>0)return a.setStart(s,o),[i,o]=this.scroll.leaf(e+n),i==null?null:([s,o]=i.position(o,!0),a.setEnd(s,o),a.getBoundingClientRect());let l="left",c;if(s instanceof Text){if(!s.data.length)return null;o<s.data.length?(a.setStart(s,o),a.setEnd(s,o+1)):(a.setStart(s,o-1),a.setEnd(s,o),l="right"),c=a.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;c=i.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:c.top+c.height,height:c.height,left:c[l],right:c[l],top:c.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const n=e.getRangeAt(0);if(n==null)return null;const r=this.normalizeNative(n);return l1.info("getNativeRange",r),r}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const n=this.getNativeRange();return n==null?[null,null]:[this.normalizedToRange(n),n]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&c1(this.root,document.activeElement)}normalizedToRange(e){const n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);const r=n.map(o=>{const[a,l]=o,c=this.scroll.find(a,!0),u=c.offset(this.scroll);return l===0?u:c instanceof Tn?u+c.index(a,l):u+c.length()}),s=Math.min(Math.max(...r),this.scroll.length()-1),i=Math.min(s,...r);return new ra(i,s-i)}normalizeNative(e){if(!c1(this.root,e.startContainer)||!e.collapsed&&!c1(this.root,e.endContainer))return null;const n={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[n.start,n.end].forEach(r=>{let{node:s,offset:i}=r;for(;!(s instanceof Text)&&s.childNodes.length>0;)if(s.childNodes.length>i)s=s.childNodes[i],i=0;else if(s.childNodes.length===i)s=s.lastChild,s instanceof Text?i=s.data.length:s.childNodes.length>0?i=s.childNodes.length:i=s.childNodes.length+1;else break;r.node=s,r.offset=i}),n}rangeToNative(e){const n=this.scroll.length(),r=(s,i)=>{s=Math.min(n-1,s);const[o,a]=this.scroll.leaf(s);return o?o.position(a,i):[null,-1]};return[...r(e.index,!1),...r(e.index+e.length,!0)]}setNativeRange(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(l1.info("setNativeRange",e,n,r,s),e!=null&&(this.root.parentNode==null||e.parentNode==null||r.parentNode==null))return;const o=document.getSelection();if(o!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||i||e!==a.startContainer||n!==a.startOffset||r!==a.endContainer||s!==a.endOffset){e instanceof Element&&e.tagName==="BR"&&(n=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),r instanceof Element&&r.tagName==="BR"&&(s=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const l=document.createRange();l.setStart(e,n),l.setEnd(r,s),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve.sources.API;if(typeof n=="string"&&(r=n,n=!1),l1.info("setRange",e),e!=null){const s=this.rangeToNative(e);this.setNativeRange(...s,n)}else this.setNativeRange(null);this.update(r)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ve.sources.USER;const n=this.lastRange,[r,s]=this.getRange();if(this.lastRange=r,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!Um(n,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const i=[ve.events.SELECTION_CHANGE,yl(this.lastRange),yl(n),e];this.emitter.emit(ve.events.EDITOR_CHANGE,...i),e!==ve.sources.SILENT&&this.emitter.emit(...i)}}}function c1(t,e){try{e.parentNode}catch{return!1}return t.contains(e)}const MJ=/^[ -~]*$/;class OJ{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=FE(e),s=new _e;return PJ(r.ops.slice()).reduce((o,a)=>{const l=Hr.Op.length(a);let c=a.attributes||{},u=!1,d=!1;if(a.insert!=null){if(s.retain(l),typeof a.insert=="string"){const p=a.insert;d=!p.endsWith(`
78
+ `)&&(n<=o||!!this.scroll.descendant(Vr,o)[0]),this.scroll.insertAt(o,p);const[m,g]=this.scroll.line(o);let y=Xi({},Ur(m));if(m instanceof bn){const[v]=m.descendant(Tn,g);v&&(y=Xi(y,Ur(v)))}c=Hr.AttributeMap.diff(y,c)||{}}else if(typeof a.insert=="object"){const p=Object.keys(a.insert)[0];if(p==null)return o;const m=this.scroll.query(p,Se.INLINE)!=null;if(m)(n<=o||this.scroll.descendant(Vr,o)[0])&&(d=!0);else if(o>0){const[g,y]=this.scroll.descendant(Tn,o-1);g instanceof fs?g.value()[y]!==`
79
+ `&&(u=!0):g instanceof xr&&g.statics.scope===Se.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(o,p,a.insert[p]),m){const[g]=this.scroll.descendant(Tn,o);if(g){const y=Xi({},Ur(g));c=Hr.AttributeMap.diff(y,c)||{}}}}n+=l}else if(s.push(a),a.retain!==null&&typeof a.retain=="object"){const p=Object.keys(a.retain)[0];if(p==null)return o;this.scroll.updateEmbedAt(o,p,a.retain[p])}Object.keys(c).forEach(p=>{this.scroll.formatAt(o,l,p,c[p])});const h=u?1:0,f=d?1:0;return n+=h+f,s.retain(h),s.delete(f),o+l+h+f},0),s.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+Hr.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(e,n){return this.scroll.deleteAt(e,n),this.update(new _e().retain(e).delete(n))}formatLine(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(i=>{this.scroll.lines(e,Math.max(n,1)).forEach(o=>{o.format(i,r[i])})}),this.scroll.optimize();const s=new _e().retain(e).retain(n,yl(r));return this.update(s)}formatText(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(i=>{this.scroll.formatAt(e,n,i,r[i])});const s=new _e().retain(e).retain(n,yl(r));return this.update(s)}getContents(e,n){return this.delta.slice(e,e+n)}getDelta(){return this.scroll.lines().reduce((e,n)=>e.concat(n.delta()),new _e)}getFormat(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],s=[];n===0?this.scroll.path(e).forEach(a=>{const[l]=a;l instanceof bn?r.push(l):l instanceof Tn&&s.push(l)}):(r=this.scroll.lines(e,n),s=this.scroll.descendants(Tn,e,n));const[i,o]=[r,s].map(a=>{const l=a.shift();if(l==null)return{};let c=Ur(l);for(;Object.keys(c).length>0;){const u=a.shift();if(u==null)return c;c=$J(Ur(u),c)}return c});return{...i,...o}}getHTML(e,n){const[r,s]=this.scroll.line(e);if(r){const i=r.length();return r.length()>=s+n&&!(s===0&&n===i)?_u(r,s,n,!0):_u(this.scroll,e,n,!0)}return""}getText(e,n){return this.getContents(e,n).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(e,n){const r=FE(n),s=new _e().retain(e).concat(r);return this.scroll.insertContents(e,r),this.update(s)}insertEmbed(e,n,r){return this.scroll.insertAt(e,n,r),this.update(new _e().retain(e).insert({[n]:r}))}insertText(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n=n.replace(/\r\n/g,`
80
+ `).replace(/\r/g,`
81
+ `),this.scroll.insertAt(e,n),Object.keys(r).forEach(s=>{this.scroll.formatAt(e,n.length,s,r[s])}),this.update(new _e().retain(e).insert(n,yl(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==bn.blotName)return!1;const n=e;return n.children.length>1?!1:n.children.head instanceof hs}removeFormat(e,n){const r=this.getText(e,n),[s,i]=this.scroll.line(e+n);let o=0,a=new _e;s!=null&&(o=s.length()-i,a=s.delta().slice(i,i+o-1).insert(`
82
+ `));const c=this.getContents(e,n+o).diff(new _e().insert(r).concat(a)),u=new _e().retain(e).concat(c);return this.applyDelta(u)}update(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(n.length===1&&n[0].type==="characterData"&&n[0].target.data.match(MJ)&&this.scroll.find(n[0].target)){const i=this.scroll.find(n[0].target),o=Ur(i),a=i.offset(this.scroll),l=n[0].oldValue.replace(Cl.CONTENTS,""),c=new _e().insert(l),u=new _e().insert(i.value()),d=r&&{oldRange:zE(r.oldRange,-a),newRange:zE(r.newRange,-a)};e=new _e().retain(a).concat(c.diff(u,d)).reduce((f,p)=>p.insert?f.insert(p.insert,o):f.push(p),new _e),this.delta=s.compose(e)}else this.delta=this.getDelta(),(!e||!Um(s.compose(e),this.delta))&&(e=s.diff(this.delta,r));return e}}function Sl(t,e,n){if(t.length===0){const[f]=u1(n.pop());return e<=0?`</li></${f}>`:`</li></${f}>${Sl([],e-1,n)}`}const[{child:r,offset:s,length:i,indent:o,type:a},...l]=t,[c,u]=u1(a);if(o>e)return n.push(a),o===e+1?`<${c}><li${u}>${_u(r,s,i)}${Sl(l,o,n)}`:`<${c}><li>${Sl(t,e+1,n)}`;const d=n[n.length-1];if(o===e&&a===d)return`</li><li${u}>${_u(r,s,i)}${Sl(l,o,n)}`;const[h]=u1(n.pop());return`</li></${h}>${Sl(t,e-1,n)}`}function _u(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in t&&typeof t.html=="function")return t.html(e,n);if(t instanceof fs)return Ef(t.value().slice(e,e+n)).replaceAll(" ","&nbsp;");if(t instanceof ds){if(t.statics.blotName==="list-container"){const c=[];return t.children.forEachAt(e,n,(u,d,h)=>{const f="formats"in u&&typeof u.formats=="function"?u.formats():{};c.push({child:u,offset:d,length:h,indent:f.indent||0,type:f.list})}),Sl(c,-1,[])}const s=[];if(t.children.forEachAt(e,n,(c,u,d)=>{s.push(_u(c,u,d))}),r||t.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:o}=t.domNode,[a,l]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${l}`:`${a}>${s.join("")}<${l}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function $J(t,e){return Object.keys(e).reduce((n,r)=>{if(t[r]==null)return n;const s=e[r];return s===t[r]?n[r]=s:Array.isArray(s)?s.indexOf(t[r])<0?n[r]=s.concat([t[r]]):n[r]=s:n[r]=[s,t[r]],n},{})}function u1(t){const e=t==="ordered"?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function FE(t){return t.reduce((e,n)=>{if(typeof n.insert=="string"){const r=n.insert.replace(/\r\n/g,`
83
+ `).replace(/\r/g,`
84
+ `);return e.insert(r,n.attributes)}return e.push(n)},new _e)}function zE(t,e){let{index:n,length:r}=t;return new ra(n+e,r)}function PJ(t){const e=[];return t.forEach(n=>{typeof n.insert=="string"?n.insert.split(`
85
+ `).forEach((s,i)=>{i&&e.push({insert:`
86
+ `,attributes:n.attributes}),s&&e.push({insert:s,attributes:n.attributes})}):e.push(n)}),e}class ps{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=n}}U(ps,"DEFAULTS",{});const Af="\uFEFF";class d1 extends xr{constructor(e,n){super(e,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Af),this.rightGuard=document.createTextNode(Af),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,n)}restore(e){let n=null,r;const s=e.data.split(Af).join("");if(e===this.leftGuard)if(this.prev instanceof fs){const i=this.prev.length();this.prev.insertAt(i,s),n={startNode:this.prev.domNode,startOffset:i+s.length}}else r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this),n={startNode:r,startOffset:s.length};else e===this.rightGuard&&(this.next instanceof fs?(this.next.insertAt(0,s),n={startNode:this.next.domNode,startOffset:s.length}):(r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this.next),n={startNode:r,startOffset:s.length}));return e.data=Af,n}update(e,n){e.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const s=this.restore(r.target);s&&(n.range=s)}})}}class DJ{constructor(e,n){U(this,"isComposing",!1);this.scroll=e,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const n=e.target instanceof Node?this.scroll.find(e.target,!0):null;n&&!(n instanceof d1)&&(this.emitter.emit(ve.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(ve.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(ve.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(ve.events.COMPOSITION_END,e),this.isComposing=!1}}const Hd=class Hd{constructor(e,n){U(this,"modules",{});this.quill=e,this.options=n}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const n=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new n(this.quill,this.options.modules[e]||{}),this.modules[e]}};U(Hd,"DEFAULTS",{modules:{}}),U(Hd,"themes",{default:Hd});let El=Hd;const RJ=t=>t.parentElement||t.getRootNode().host||null,IJ=t=>{const e=t.getBoundingClientRect(),n="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,r="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*n,bottom:e.top+t.clientHeight*r,left:e.left}},Tf=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},HE=(t,e,n,r,s,i)=>t<n&&e>r?0:t<n?-(n-t+s):e>r?e-t>r-n?t+s-n:e-r+i:0,NJ=(t,e)=>{var i,o,a;const n=t.ownerDocument;let r=e,s=t;for(;s;){const l=s===n.body,c=l?{top:0,right:((i=window.visualViewport)==null?void 0:i.width)??n.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??n.documentElement.clientHeight,left:0}:IJ(s),u=getComputedStyle(s),d=HE(r.left,r.right,c.left,c.right,Tf(u.scrollPaddingLeft),Tf(u.scrollPaddingRight)),h=HE(r.top,r.bottom,c.top,c.bottom,Tf(u.scrollPaddingTop),Tf(u.scrollPaddingBottom));if(d||h)if(l)(a=n.defaultView)==null||a.scrollBy(d,h);else{const{scrollLeft:f,scrollTop:p}=s;h&&(s.scrollTop+=h),d&&(s.scrollLeft+=d);const m=s.scrollLeft-f,g=s.scrollTop-p;r={left:r.left-m,top:r.top-g,right:r.right-m,bottom:r.bottom-g}}s=l||u.position==="fixed"?null:RJ(s)}},LJ=100,BJ=["block","break","cursor","inline","scroll","text"],jJ=(t,e,n)=>{const r=new vl;return BJ.forEach(s=>{const i=e.query(s);i&&r.register(i)}),t.forEach(s=>{let i=e.query(s);i||n.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(r.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>LJ){n.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),r},Al=xi("quill"),kf=new vl;ds.uiClass="ql-ui";const Es=class Es{static debug(e){e===!0&&(e="log"),xi.level(e)}static find(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return s1.get(e)||kf.find(e,n)}static import(e){return this.imports[e]==null&&Al.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],n=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in e?e.attrName:e.blotName;typeof r=="string"?this.register(`formats/${r}`,e,n):Object.keys(e).forEach(s=>{this.register(s,e[s],n)})}else{const e=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!r&&Al.warn(`Overwriting ${e} with`,n),this.imports[e]=n,(e.startsWith("blots/")||e.startsWith("formats/"))&&n&&typeof n!="boolean"&&n.blotName!=="abstract"&&kf.register(n),typeof n.register=="function"&&n.register(kf)}}constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=FJ(e,n),this.container=this.options.container,this.container==null){Al.error("Invalid Quill container",e);return}this.options.debug&&Es.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",s1.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new ve;const s=Ym.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new OJ(this.scroll),this.selection=new kJ(this.scroll,this.emitter),this.composition=new DJ(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(ve.events.EDITOR_CHANGE,o=>{o===ve.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(ve.events.SCROLL_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;gs.call(this,()=>this.editor.update(null,a,u),o)}),this.emitter.on(ve.events.SCROLL_EMBED_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;gs.call(this,()=>{const d=new _e().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(d,[],u)},Es.sources.USER)}),r){const o=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
87
+ `});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const r=e;e=document.createElement("div"),e.classList.add(r)}return this.container.insertBefore(e,n),e}blur(){this.selection.setRange(null)}deleteText(e,n,r){return[e,n,,r]=wi(e,n,r),gs.call(this,()=>this.editor.deleteText(e,n),r,e,-1*n)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const n=e();return this.allowReadOnlyEdits=!1,n}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve.sources.API;return gs.call(this,()=>{const s=this.getSelection(!0);let i=new _e;if(s==null)return i;if(this.scroll.query(e,Se.BLOCK))i=this.editor.formatLine(s.index,s.length,{[e]:n});else{if(s.length===0)return this.selection.format(e,n),i;i=this.editor.formatText(s.index,s.length,{[e]:n})}return this.setSelection(s,ve.sources.SILENT),i},r)}formatLine(e,n,r,s,i){let o;return[e,n,o,i]=wi(e,n,r,s,i),gs.call(this,()=>this.editor.formatLine(e,n,o),i,e,0)}formatText(e,n,r,s,i){let o;return[e,n,o,i]=wi(e,n,r,s,i),gs.call(this,()=>this.editor.formatText(e,n,o),i,e,0)}getBounds(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof e=="number"?r=this.selection.getBounds(e,n):r=this.selection.getBounds(e.index,e.length),!r)return null;const s=this.container.getBoundingClientRect();return{bottom:r.bottom-s.top,height:r.height,left:r.left-s.left,right:r.right-s.left,top:r.top-s.top,width:r.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,n]=wi(e,n),this.editor.getContents(e,n)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,n):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,n)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(n=n??this.getLength()-e),[e,n]=wi(e,n),this.editor.getHTML(e,n)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(n=n??this.getLength()-e),[e,n]=wi(e,n),this.editor.getText(e,n)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Es.sources.API;return gs.call(this,()=>this.editor.insertEmbed(e,n,r),s,e)}insertText(e,n,r,s,i){let o;return[e,,o,i]=wi(e,0,r,s,i),gs.call(this,()=>this.editor.insertText(e,n,o),i,e,n.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,n,r){return[e,n,,r]=wi(e,n,r),gs.call(this,()=>this.editor.removeFormat(e,n),r,e)}scrollRectIntoView(e){NJ(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,n=e&&this.selection.getBounds(e.index,e.length);n&&this.scrollRectIntoView(n)}setContents(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ve.sources.API;return gs.call(this,()=>{e=new _e(e);const r=this.getLength(),s=this.editor.deleteText(0,r),i=this.editor.insertContents(0,e),o=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(o)},n)}setSelection(e,n,r){e==null?this.selection.setRange(null,n||Es.sources.API):([e,n,,r]=wi(e,n,r),this.selection.setRange(new ra(Math.max(0,e),n),r),r!==ve.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ve.sources.API;const r=new _e().insert(e);return this.setContents(r,n)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ve.sources.USER;const n=this.scroll.update(e);return this.selection.update(e),n}updateContents(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ve.sources.API;return gs.call(this,()=>(e=new _e(e),this.editor.applyDelta(e)),n,!0)}};U(Es,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:kf,theme:"default"}),U(Es,"events",ve.events),U(Es,"sources",ve.sources),U(Es,"version","2.0.3"),U(Es,"imports",{delta:_e,parchment:dJ,"core/module":ps,"core/theme":El});let X=Es;function VE(t){return typeof t=="string"?document.querySelector(t):t}function h1(t){return Object.entries(t??{}).reduce((e,n)=>{let[r,s]=n;return{...e,[r]:s===!0?{}:s}},{})}function UE(t){return Object.fromEntries(Object.entries(t).filter(e=>e[1]!==void 0))}function FJ(t,e){const n=VE(t);if(!n)throw new Error("Invalid Quill container");const s=!e.theme||e.theme===X.DEFAULTS.theme?El:X.import(`themes/${e.theme}`);if(!s)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:i,...o}=X.DEFAULTS,{modules:a,...l}=s.DEFAULTS;let c=h1(e.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=Xi({},h1(i),h1(a),c),d={...o,...UE(l),...UE(e)};let h=e.registry;return h?e.formats&&Al.warn('Ignoring "formats" option because "registry" is specified'):h=e.formats?jJ(e.formats,d.registry,Al):d.registry,{...d,registry:h,container:n,theme:s,modules:Object.entries(u).reduce((f,p)=>{let[m,g]=p;if(!g)return f;const y=X.import(`modules/${m}`);return y==null?(Al.error(`Cannot load ${m} module. Are you sure you registered it?`),f):{...f,[m]:Xi({},y.DEFAULTS||{},g)}},{}),bounds:VE(d.bounds)}}function gs(t,e,n,r){if(!this.isEnabled()&&e===ve.sources.USER&&!this.allowReadOnlyEdits)return new _e;let s=n==null?null:this.getSelection();const i=this.editor.delta,o=t();if(s!=null&&(n===!0&&(n=s.index),r==null?s=qE(s,o,e):r!==0&&(s=qE(s,n,r,e)),this.setSelection(s,ve.sources.SILENT)),o.length()>0){const a=[ve.events.TEXT_CHANGE,o,i,e];this.emitter.emit(ve.events.EDITOR_CHANGE,...a),e!==ve.sources.SILENT&&this.emitter.emit(...a)}return o}function wi(t,e,n,r,s){let i={};return typeof t.index=="number"&&typeof t.length=="number"?typeof e!="number"?(s=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):typeof e!="number"&&(s=r,r=n,n=e,e=0),typeof n=="object"?(i=n,s=r):typeof n=="string"&&(r!=null?i[n]=r:s=n),s=s||ve.sources.API,[t,e,i,s]}function qE(t,e,n,r){const s=typeof n=="number"?n:0;if(t==null)return null;let i,o;return e&&typeof e.transformPosition=="function"?[i,o]=[t.index,t.index+t.length].map(a=>e.transformPosition(a,r!==ve.sources.USER)):[i,o]=[t.index,t.index+t.length].map(a=>a<e||a===e&&r===ve.sources.USER?a:s>=0?a+s:Math.max(e,a+s)),new ra(i,o-i)}class sa extends bf{}function WE(t){return t instanceof bn||t instanceof Vr}function GE(t){return typeof t.updateContent=="function"}class Tl extends Ym{constructor(e,n,r){let{emitter:s}=r;super(e,n),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(ve.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(ve.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,n){this.emitter.emit(ve.events.SCROLL_EMBED_UPDATE,e,n)}deleteAt(e,n){const[r,s]=this.line(e),[i]=this.line(e+n);if(super.deleteAt(e,n),i!=null&&r!==i&&s>0){if(r instanceof Vr||i instanceof Vr){this.optimize();return}const o=i.children.head instanceof hs?null:i.children.head;r.moveChildren(i,o),r.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,n,r,s){super.formatAt(e,n,r,s),this.optimize()}insertAt(e,n,r){if(e>=this.length())if(r==null||this.scroll.query(n,Se.BLOCK)==null){const s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s),r==null&&n.endsWith(`
88
+ `)?s.insertAt(0,n.slice(0,-1),r):s.insertAt(0,n,r)}else{const s=this.scroll.create(n,r);this.appendChild(s)}else super.insertAt(e,n,r);this.optimize()}insertBefore(e,n){if(e.statics.scope===Se.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(e),super.insertBefore(r,n)}else super.insertBefore(e,n)}insertContents(e,n){const r=this.deltaToRenderBlocks(n.concat(new _e().insert(`
89
+ `))),s=r.pop();if(s==null)return;this.batchStart();const i=r.shift();if(i){const l=i.type==="block"&&(i.delta.length()===0||!this.descendant(Vr,e)[0]&&e<this.length()),c=i.type==="block"?i.delta:new _e().insert({[i.key]:i.value});f1(this,e,c);const u=i.type==="block"?1:0,d=e+c.length()+u;l&&this.insertAt(d-1,`
90
+ `);const h=Ur(this.line(e)[0]),f=Hr.AttributeMap.diff(h,i.attributes)||{};Object.keys(f).forEach(p=>{this.formatAt(d-1,1,p,f[p])}),e=d}let[o,a]=this.children.find(e);if(r.length&&(o&&(o=o.split(a),a=0),r.forEach(l=>{if(l.type==="block"){const c=this.createBlock(l.attributes,o||void 0);f1(c,0,l.delta)}else{const c=this.create(l.key,l.value);this.insertBefore(c,o||void 0),Object.keys(l.attributes).forEach(u=>{c.format(u,l.attributes[u])})}})),s.type==="block"&&s.delta.length()){const l=o?o.offset(o.scroll)+a:this.length();f1(this,l,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const n=this.path(e).pop();if(!n)return[null,-1];const[r,s]=n;return r instanceof Tn?[r,s]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(WE,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(s,i,o)=>{let a=[],l=o;return s.children.forEachAt(i,o,(c,u,d)=>{WE(c)?a.push(c):c instanceof bf&&(a=a.concat(r(c,u,l))),l-=d}),a};return r(this,e,n)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,n),e.length>0&&this.emitter.emit(ve.events.SCROLL_OPTIMIZE,e,n))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let n=ve.sources.USER;typeof e=="string"&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(r=>{let{target:s}=r;const i=this.find(s,!0);return i&&!GE(i)}),e.length>0&&this.emitter.emit(ve.events.SCROLL_BEFORE_UPDATE,n,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(ve.events.SCROLL_UPDATE,n,e)}updateEmbedAt(e,n,r){const[s]=this.descendant(i=>i instanceof Vr,e);s&&s.statics.blotName===n&&GE(s)&&s.updateContent(r)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const n=[];let r=new _e;return e.forEach(s=>{const i=s==null?void 0:s.insert;if(i)if(typeof i=="string"){const o=i.split(`
91
+ `);o.slice(0,-1).forEach(l=>{r.insert(l,s.attributes),n.push({type:"block",delta:r,attributes:s.attributes??{}}),r=new _e});const a=o[o.length-1];a&&r.insert(a,s.attributes)}else{const o=Object.keys(i)[0];if(!o)return;this.query(o,Se.INLINE)?r.push(s):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new _e,n.push({type:"blockEmbed",key:o,value:i[o],attributes:s.attributes??{}}))}}),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(e,n){let r;const s={};Object.entries(e).forEach(a=>{let[l,c]=a;this.query(l,Se.BLOCK&Se.BLOT)!=null?r=l:s[l]=c});const i=this.create(r||this.statics.defaultChild.blotName,r?e[r]:void 0);this.insertBefore(i,n||void 0);const o=i.length();return Object.entries(s).forEach(a=>{let[l,c]=a;i.formatAt(0,o,l,c)}),i}}U(Tl,"blotName","scroll"),U(Tl,"className","ql-editor"),U(Tl,"tagName","DIV"),U(Tl,"defaultChild",bn),U(Tl,"allowedChildren",[bn,Vr,sa]);function f1(t,e,n){n.reduce((r,s)=>{const i=Hr.Op.length(s);let o=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const a=s.insert;t.insertAt(r,a);const[l]=t.descendant(Tn,r),c=Ur(l);o=Hr.AttributeMap.diff(c,o)||{}}else if(typeof s.insert=="object"){const a=Object.keys(s.insert)[0];if(a==null)return r;if(t.insertAt(r,a,s.insert[a]),t.scroll.query(a,Se.INLINE)!=null){const[c]=t.descendant(Tn,r),u=Ur(c);o=Hr.AttributeMap.diff(u,o)||{}}}}return Object.keys(o).forEach(a=>{t.formatAt(r,i,a,o[a])}),r+i},e)}const p1={scope:Se.BLOCK,whitelist:["right","center","justify"]},zJ=new Bs("align","align",p1),YE=new us("align","ql-align",p1),KE=new Qi("align","text-align",p1);class ZE extends Qi{value(e){let n=super.value(e);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${n.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):n}}const HJ=new us("color","ql-color",{scope:Se.INLINE}),g1=new ZE("color","color",{scope:Se.INLINE}),VJ=new us("background","ql-bg",{scope:Se.INLINE}),m1=new ZE("background","background-color",{scope:Se.INLINE});class ia extends sa{static create(e){const n=super.create(e);return n.setAttribute("spellcheck","false"),n}code(e,n){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
92
+ `).slice(e,e+n)}html(e,n){return`<pre>
93
+ ${Ef(this.code(e,n))}
94
+ </pre>`}}class kn extends bn{static register(){X.register(ia)}}U(kn,"TAB"," ");class y1 extends js{}y1.blotName="code",y1.tagName="CODE",kn.blotName="code-block",kn.className="ql-code-block",kn.tagName="DIV",ia.blotName="code-block-container",ia.className="ql-code-block-container",ia.tagName="DIV",ia.allowedChildren=[kn],kn.allowedChildren=[fs,hs,Cl],kn.requiredContainer=ia;const b1={scope:Se.BLOCK,whitelist:["rtl"]},XE=new Bs("direction","dir",b1),QE=new us("direction","ql-direction",b1),JE=new Qi("direction","direction",b1),e4={scope:Se.INLINE,whitelist:["serif","monospace"]},t4=new us("font","ql-font",e4);class UJ extends Qi{value(e){return super.value(e).replace(/["']/g,"")}}const n4=new UJ("font","font-family",e4),r4=new us("size","ql-size",{scope:Se.INLINE,whitelist:["small","large","huge"]}),s4=new Qi("size","font-size",{scope:Se.INLINE,whitelist:["10px","18px","32px"]}),qJ=xi("quill:keyboard"),WJ=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Mf extends ps{static match(e,n){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!n[r]!==e[r]&&n[r]!==null)?!1:n.key===e.key||n.key===e.which}constructor(e,n){super(e,n),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=YJ(e);if(s==null){qJ.warn("Attempted to add invalid keyboard binding",s);return}typeof n=="function"&&(n={handler:n}),typeof r=="function"&&(r={handler:r}),(Array.isArray(s.key)?s.key:[s.key]).forEach(o=>{const a={...s,key:o,...n,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const s=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(y=>Mf.match(e,y));if(s.length===0)return;const i=X.find(e.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,l]=this.quill.getLine(o.index),[c,u]=this.quill.getLeaf(o.index),[d,h]=o.length===0?[c,u]:this.quill.getLeaf(o.index+o.length),f=c instanceof vf?c.value().slice(0,u):"",p=d instanceof vf?d.value().slice(h):"",m={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:f,suffix:p,event:e};s.some(y=>{if(y.collapsed!=null&&y.collapsed!==m.collapsed||y.empty!=null&&y.empty!==m.empty||y.offset!=null&&y.offset!==m.offset)return!1;if(Array.isArray(y.format)){if(y.format.every(v=>m.format[v]==null))return!1}else if(typeof y.format=="object"&&!Object.keys(y.format).every(v=>y.format[v]===!0?m.format[v]!=null:y.format[v]===!1?m.format[v]==null:Um(y.format[v],m.format[v])))return!1;return y.prefix!=null&&!y.prefix.test(m.prefix)||y.suffix!=null&&!y.suffix.test(m.suffix)?!1:y.handler.call(this,o,m,y)!==!0})&&e.preventDefault()})}handleBackspace(e,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(e.index);let o=new _e().retain(e.index-r).delete(r);if(n.offset===0){const[a]=this.quill.getLine(e.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const c=i.formats(),u=this.quill.getFormat(e.index-1,1);if(s=Hr.AttributeMap.diff(c,u)||{},Object.keys(s).length>0){const d=new _e().retain(e.index+i.length()-2).retain(1,s);o=o.compose(d)}}}this.quill.updateContents(o,X.sources.USER),this.quill.focus()}handleDelete(e,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(e.index>=this.quill.getLength()-r)return;let s={};const[i]=this.quill.getLine(e.index);let o=new _e().retain(e.index).delete(r);if(n.offset>=i.length()-1){const[a]=this.quill.getLine(e.index+1);if(a){const l=i.formats(),c=this.quill.getFormat(e.index,1);s=Hr.AttributeMap.diff(l,c)||{},Object.keys(s).length>0&&(o=o.retain(a.length()-1).retain(1,s))}}this.quill.updateContents(o,X.sources.USER),this.quill.focus()}handleDeleteRange(e){x1({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,n){const r=Object.keys(n.format).reduce((i,o)=>(this.quill.scroll.query(o,Se.BLOCK)&&!Array.isArray(n.format[o])&&(i[o]=n.format[o]),i),{}),s=new _e().retain(e.index).delete(e.length).insert(`
95
+ `,r);this.quill.updateContents(s,X.sources.USER),this.quill.setSelection(e.index+1,X.sources.SILENT),this.quill.focus()}}const GJ={bindings:{bold:v1("bold"),italic:v1("italic"),underline:v1("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",X.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",X.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){e.format.indent!=null?this.quill.format("indent","-1",X.sources.USER):e.format.list!=null&&this.quill.format("list",!1,X.sources.USER)}},"indent code-block":i4(!0),"outdent code-block":i4(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,X.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const n=new _e().retain(t.index).delete(t.length).insert(" ");return this.quill.updateContents(n,X.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,X.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,X.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,e){const n={list:!1};e.format.indent&&(n.indent=!1),this.quill.formatLine(t.index,t.length,n,X.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,n]=this.quill.getLine(t.index),r={...e.formats(),list:"checked"},s=new _e().retain(t.index).insert(`
96
+ `,r).retain(e.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,X.sources.USER),this.quill.setSelection(t.index+1,X.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[n,r]=this.quill.getLine(t.index),s=new _e().retain(t.index).insert(`
97
+ `,e.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(s,X.sources.USER),this.quill.setSelection(t.index+1,X.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(t){const e=this.quill.getModule("table");if(e){const[n,r,s,i]=e.getTable(t),o=KJ(n,r,s,i);if(o==null)return;let a=n.offset();if(o<0){const l=new _e().retain(a).insert(`
98
+ `);this.quill.updateContents(l,X.sources.USER),this.quill.setSelection(t.index+1,t.length,X.sources.SILENT)}else if(o>0){a+=n.length();const l=new _e().retain(a).insert(`
99
+ `);this.quill.updateContents(l,X.sources.USER),this.quill.setSelection(a,X.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:n,line:r}=e,s=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(s-1,X.sources.USER):this.quill.setSelection(s+r.length(),X.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(this.quill.scroll.query("list")==null)return!0;const{length:n}=e.prefix,[r,s]=this.quill.getLine(t.index);if(s>n)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(t.index," ",X.sources.USER),this.quill.history.cutoff();const o=new _e().retain(t.index-s).delete(n+1).retain(r.length()-2-s).retain(1,{list:i});return this.quill.updateContents(o,X.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,X.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,n]=this.quill.getLine(t.index);let r=2,s=e;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,r-=1,r<=0){const i=new _e().retain(t.index+e.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,X.sources.USER),this.quill.setSelection(t.index-1,X.sources.SILENT),!1}return!0}},"embed left":Of("ArrowLeft",!1),"embed left shift":Of("ArrowLeft",!0),"embed right":Of("ArrowRight",!1),"embed right shift":Of("ArrowRight",!0),"table down":o4(!1),"table up":o4(!0)}};Mf.DEFAULTS=GJ;function i4(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,n){let{event:r}=n;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(e.length===0&&!r.shiftKey){this.quill.insertText(e.index,i,X.sources.USER),this.quill.setSelection(e.index+i.length,X.sources.SILENT);return}const o=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:l}=e;o.forEach((c,u)=>{t?(c.insertAt(0,i),u===0?a+=i.length:l+=i.length):c.domNode.textContent.startsWith(i)&&(c.deleteAt(0,i.length),u===0?a-=i.length:l-=i.length)}),this.quill.update(X.sources.USER),this.quill.setSelection(a,l,X.sources.SILENT)}}}function Of(t,e){return{key:t,shiftKey:e,altKey:null,[t==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:s}=r;t==="ArrowRight"&&(s+=r.length+1);const[i]=this.quill.getLeaf(s);return i instanceof xr?(t==="ArrowLeft"?e?this.quill.setSelection(r.index-1,r.length+1,X.sources.USER):this.quill.setSelection(r.index-1,X.sources.USER):e?this.quill.setSelection(r.index,r.length+1,X.sources.USER):this.quill.setSelection(r.index+r.length+1,X.sources.USER),!1):!0}}}function v1(t){return{key:t[0],shortKey:!0,handler(e,n){this.quill.format(t,!n.format[t],X.sources.USER)}}}function o4(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,n){const r=t?"prev":"next",s=n.line,i=s.parent[r];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=s;for(;a.prev!=null;)a=a.prev,o=o.next;const l=o.offset(this.quill.scroll)+Math.min(n.offset,o.length()-1);this.quill.setSelection(l,0,X.sources.USER)}}else{const o=s.table()[r];o!=null&&(t?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,X.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,X.sources.USER))}return!1}}}function YJ(t){if(typeof t=="string"||typeof t=="number")t={key:t};else if(typeof t=="object")t=yl(t);else return null;return t.shortKey&&(t[WJ]=t.shortKey,delete t.shortKey),t}function x1(t){let{quill:e,range:n}=t;const r=e.getLines(n);let s={};if(r.length>1){const i=r[0].formats(),o=r[r.length-1].formats();s=Hr.AttributeMap.diff(o,i)||{}}e.deleteText(n,X.sources.USER),Object.keys(s).length>0&&e.formatLine(n.index,1,s,X.sources.USER),e.setSelection(n.index,X.sources.SILENT)}function KJ(t,e,n,r){return e.prev==null&&e.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const ZJ=/font-weight:\s*normal/,XJ=["P","OL","UL"],a4=t=>t&&XJ.includes(t.tagName),QJ=t=>{Array.from(t.querySelectorAll("br")).filter(e=>a4(e.previousElementSibling)&&a4(e.nextElementSibling)).forEach(e=>{var n;(n=e.parentNode)==null||n.removeChild(e)})},JJ=t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var n;return(n=e.getAttribute("style"))==null?void 0:n.match(ZJ)}).forEach(e=>{var r;const n=t.createDocumentFragment();n.append(...e.childNodes),(r=e.parentNode)==null||r.replaceChild(n,e)})};function eee(t){t.querySelector('[id^="docs-internal-guid-"]')&&(JJ(t),QJ(t))}const tee=/\bmso-list:[^;]*ignore/i,nee=/\bmso-list:[^;]*\bl(\d+)/i,ree=/\bmso-list:[^;]*\blevel(\d+)/i,see=(t,e)=>{const n=t.getAttribute("style"),r=n==null?void 0:n.match(nee);if(!r)return null;const s=Number(r[1]),i=n==null?void 0:n.match(ree),o=i?Number(i[1]):1,a=new RegExp(`@list l${s}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=e.match(a),c=l&&l[1]==="bullet"?"bullet":"ordered";return{id:s,indent:o,type:c,element:t}},iee=t=>{var o,a;const e=Array.from(t.querySelectorAll("[style*=mso-list]")),n=[],r=[];e.forEach(l=>{(l.getAttribute("style")||"").match(tee)?n.push(l):r.push(l)}),n.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)});const s=t.documentElement.innerHTML,i=r.map(l=>see(l,s)).filter(l=>l);for(;i.length;){const l=[];let c=i.shift();for(;c;)l.push(c),c=i.length&&((o=i[0])==null?void 0:o.element)===c.element.nextElementSibling&&i[0].id===c.id?i.shift():null;const u=document.createElement("ul");l.forEach(f=>{const p=document.createElement("li");p.setAttribute("data-list",f.type),f.indent>1&&p.setAttribute("class",`ql-indent-${f.indent-1}`),p.innerHTML=f.element.innerHTML,u.appendChild(p)});const d=(a=l[0])==null?void 0:a.element,{parentNode:h}=d??{};d&&(h==null||h.replaceChild(u,d)),l.slice(1).forEach(f=>{let{element:p}=f;h==null||h.removeChild(p)})}};function oee(t){t.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&iee(t)}const aee=[oee,eee],lee=t=>{t.documentElement&&aee.forEach(e=>{e(t)})},cee=xi("quill:clipboard"),uee=[[Node.TEXT_NODE,_ee],[Node.TEXT_NODE,d4],["br",gee],[Node.ELEMENT_NODE,d4],[Node.ELEMENT_NODE,pee],[Node.ELEMENT_NODE,fee],[Node.ELEMENT_NODE,xee],["li",bee],["ol, ul",vee],["pre",mee],["tr",wee],["b",_1("bold")],["i",_1("italic")],["strike",_1("strike")],["style",yee]],dee=[zJ,XE].reduce((t,e)=>(t[e.keyName]=e,t),{}),l4=[KE,m1,g1,JE,n4,s4].reduce((t,e)=>(t[e.keyName]=e,t),{});class c4 extends ps{constructor(e,n){super(e,n),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],uee.concat(this.options.matchers??[]).forEach(r=>{let[s,i]=r;this.addMatcher(s,i)})}addMatcher(e,n){this.matchers.push([e,n])}convert(e){let{html:n,text:r}=e,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s[kn.blotName])return new _e().insert(r||"",{[kn.blotName]:s[kn.blotName]});if(!n)return new _e().insert(r||"",s);const i=this.convertHTML(n);return Cu(i,`
100
+ `)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new _e().retain(i.length()-1).delete(1)):i}normalizeHTML(e){lee(e)}convertHTML(e){const n=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(n);const r=n.body,s=new WeakMap,[i,o]=this.prepareMatching(r,s);return w1(this.quill.scroll,r,i,o,s)}dangerouslyPasteHTML(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X.sources.API;if(typeof e=="string"){const s=this.convert({html:e,text:""});this.quill.setContents(s,n),this.quill.setSelection(0,X.sources.SILENT)}else{const s=this.convert({html:n,text:""});this.quill.updateContents(new _e().retain(e).concat(s),r),this.quill.setSelection(e+s.length(),X.sources.SILENT)}}onCaptureCopy(e){var o,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:s,text:i}=this.onCopy(r,n);(o=e.clipboardData)==null||o.setData("text/plain",i),(a=e.clipboardData)==null||a.setData("text/html",s),n&&x1({range:r,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(n=>n[0]!=="#").join(`
101
+ `)}onCapturePaste(e){var o,a,l,c,u;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const n=this.quill.getSelection(!0);if(n==null)return;const r=(o=e.clipboardData)==null?void 0:o.getData("text/html");let s=(a=e.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!s){const d=(l=e.clipboardData)==null?void 0:l.getData("text/uri-list");d&&(s=this.normalizeURIList(d))}const i=Array.from(((c=e.clipboardData)==null?void 0:c.files)||[]);if(!r&&i.length>0){this.quill.uploader.upload(n,i);return}if(r&&i.length>0){const d=new DOMParser().parseFromString(r,"text/html");if(d.body.childElementCount===1&&((u=d.body.firstElementChild)==null?void 0:u.tagName)==="IMG"){this.quill.uploader.upload(n,i);return}}this.onPaste(n,{html:r,text:s})}onCopy(e){const n=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:n}}onPaste(e,n){let{text:r,html:s}=n;const i=this.quill.getFormat(e.index),o=this.convert({text:r,html:s},i);cee.log("onPaste",o,{text:r,html:s});const a=new _e().retain(e.index).delete(e.length).concat(o);this.quill.updateContents(a,X.sources.USER),this.quill.setSelection(a.length()-e.length,X.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,n){const r=[],s=[];return this.matchers.forEach(i=>{const[o,a]=i;switch(o){case Node.TEXT_NODE:s.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(e.querySelectorAll(o)).forEach(l=>{if(n.has(l)){const c=n.get(l);c==null||c.push(a)}else n.set(l,[a])});break}}),[r,s]}}U(c4,"DEFAULTS",{matchers:[]});function oa(t,e,n,r){return r.query(e)?t.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[e])return s.push(i);const o=n?{[e]:n}:{};return s.insert(i.insert,{...o,...i.attributes})},new _e):t}function Cu(t,e){let n="";for(let r=t.ops.length-1;r>=0&&n.length<e.length;--r){const s=t.ops[r];if(typeof s.insert!="string")break;n=s.insert+n}return n.slice(-1*e.length)===e}function Ji(t,e){if(!(t instanceof Element))return!1;const n=e.query(t);return n&&n.prototype instanceof xr?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(t.tagName.toLowerCase())}function hee(t,e){return t.previousElementSibling&&t.nextElementSibling&&!Ji(t.previousElementSibling,e)&&!Ji(t.nextElementSibling,e)}const $f=new WeakMap;function u4(t){return t==null?!1:($f.has(t)||(t.tagName==="PRE"?$f.set(t,!0):$f.set(t,u4(t.parentNode))),$f.get(t))}function w1(t,e,n,r,s){return e.nodeType===e.TEXT_NODE?r.reduce((i,o)=>o(e,i,t),new _e):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((i,o)=>{let a=w1(t,o,n,r,s);return o.nodeType===e.ELEMENT_NODE&&(a=n.reduce((l,c)=>c(o,l,t),a),a=(s.get(o)||[]).reduce((l,c)=>c(o,l,t),a)),i.concat(a)},new _e):new _e}function _1(t){return(e,n,r)=>oa(n,t,!0,r)}function fee(t,e,n){const r=Bs.keys(t),s=us.keys(t),i=Qi.keys(t),o={};return r.concat(s).concat(i).forEach(a=>{let l=n.query(a,Se.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(t),o[l.attrName])||(l=dee[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(t)||void 0),l=l4[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=l4[a],o[l.attrName]=l.value(t)||void 0))}),Object.entries(o).reduce((a,l)=>{let[c,u]=l;return oa(a,c,u,n)},e)}function pee(t,e,n){const r=n.query(t);if(r==null)return e;if(r.prototype instanceof xr){const s={},i=r.value(t);if(i!=null)return s[r.blotName]=i,new _e().insert(s,r.formats(t,n))}else if(r.prototype instanceof xu&&!Cu(e,`
102
+ `)&&e.insert(`
103
+ `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return oa(e,r.blotName,r.formats(t,n),n);return e}function gee(t,e){return Cu(e,`
104
+ `)||e.insert(`
105
+ `),e}function mee(t,e,n){const r=n.query("code-block"),s=r&&"formats"in r&&typeof r.formats=="function"?r.formats(t,n):!0;return oa(e,"code-block",s,n)}function yee(){return new _e}function bee(t,e,n){const r=n.query(t);if(r==null||r.blotName!=="list"||!Cu(e,`
106
+ `))return e;let s=-1,i=t.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?e:e.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:s,...a.attributes||{}}):o,new _e)}function vee(t,e,n){const r=t;let s=r.tagName==="OL"?"ordered":"bullet";const i=r.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),oa(e,"list",s,n)}function d4(t,e,n){if(!Cu(e,`
107
+ `)){if(Ji(t,n)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert(`
108
+ `);if(e.length()>0&&t.nextSibling){let r=t.nextSibling;for(;r!=null;){if(Ji(r,n))return e.insert(`
109
+ `);const s=n.query(r);if(s&&s.prototype instanceof Vr)return e.insert(`
110
+ `);r=r.firstChild}}}return e}function xee(t,e,n){var i;const r={},s=t.style||{};return s.fontStyle==="italic"&&(r.italic=!0),s.textDecoration==="underline"&&(r.underline=!0),s.textDecoration==="line-through"&&(r.strike=!0),((i=s.fontWeight)!=null&&i.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce((o,a)=>{let[l,c]=a;return oa(o,l,c,n)},e),parseFloat(s.textIndent||0)>0?new _e().insert(" ").concat(e):e}function wee(t,e,n){var s,i;const r=((s=t.parentElement)==null?void 0:s.tagName)==="TABLE"?t.parentElement:(i=t.parentElement)==null?void 0:i.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(t)+1;return oa(e,"table",a,n)}return e}function _ee(t,e,n){var s;let r=t.data;if(((s=t.parentElement)==null?void 0:s.tagName)==="O:P")return e.insert(r.trim());if(!u4(t)){if(r.trim().length===0&&r.includes(`
111
+ `)&&!hee(t,n))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(t.previousSibling==null&&t.parentElement!=null&&Ji(t.parentElement,n)||t.previousSibling instanceof Element&&Ji(t.previousSibling,n))&&(r=r.replace(/^ /,"")),(t.nextSibling==null&&t.parentElement!=null&&Ji(t.parentElement,n)||t.nextSibling instanceof Element&&Ji(t.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class h4 extends ps{constructor(n,r){super(n,r);U(this,"lastRecorded",0);U(this,"ignoreChange",!1);U(this,"stack",{undo:[],redo:[]});U(this,"currentRange",null);this.quill.on(X.events.EDITOR_CHANGE,(s,i,o,a)=>{s===X.events.SELECTION_CHANGE?i&&a!==X.sources.SILENT&&(this.currentRange=i):s===X.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===X.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=C1(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(n,r){if(this.stack[n].length===0)return;const s=this.stack[n].pop();if(!s)return;const i=this.quill.getContents(),o=s.delta.invert(i);this.stack[r].push({delta:o,range:C1(s.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,X.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(n,r){if(n.ops.length===0)return;this.stack.redo=[];let s=n.invert(r),i=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(s=s.compose(a.delta),i=a.range)}else this.lastRecorded=o;s.length()!==0&&(this.stack.undo.push({delta:s,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(n){f4(this.stack.undo,n),f4(this.stack.redo,n)}undo(){this.change("undo","redo")}restoreSelection(n){if(n.range)this.quill.setSelection(n.range,X.sources.USER);else{const r=See(this.quill.scroll,n.delta);this.quill.setSelection(r,X.sources.USER)}}}U(h4,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function f4(t,e){let n=e;for(let r=t.length-1;r>=0;r-=1){const s=t[r];t[r]={delta:n.transform(s.delta,!0),range:s.range&&C1(s.range,n)},n=s.delta.transform(n),t[r].delta.length()===0&&t.splice(r,1)}}function Cee(t,e){const n=e.ops[e.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
112
+ `):n.attributes!=null?Object.keys(n.attributes).some(r=>t.query(r,Se.BLOCK)!=null):!1}function See(t,e){const n=e.reduce((s,i)=>s+(i.delete||0),0);let r=e.length()-n;return Cee(t,e)&&(r-=1),r}function C1(t,e){if(!t)return t;const n=e.transformPosition(t.index),r=e.transformPosition(t.index+t.length);return{index:n,length:r-n}}class p4 extends ps{constructor(e,n){super(e,n),e.root.addEventListener("drop",r=>{var o;r.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);s=document.createRange(),s.setStart(a.offsetNode,a.offset),s.setEnd(a.offsetNode,a.offset)}const i=s&&e.selection.normalizeNative(s);if(i){const a=e.selection.normalizedToRange(i);(o=r.dataTransfer)!=null&&o.files&&this.upload(a,r.dataTransfer.files)}})}upload(e,n){const r=[];Array.from(n).forEach(s=>{var i;s&&((i=this.options.mimetypes)!=null&&i.includes(s.type))&&r.push(s)}),r.length>0&&this.options.handler.call(this,e,r)}}p4.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;const n=e.map(r=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(r)}));Promise.all(n).then(r=>{const s=r.reduce((i,o)=>i.insert({image:o}),new _e().retain(t.index).delete(t.length));this.quill.updateContents(s,ve.sources.USER),this.quill.setSelection(t.index+r.length,ve.sources.SILENT)})}};const Eee=["insertText","insertReplacementText"];let Aee=class extends ps{constructor(e,n){super(e,n),e.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||e.on(X.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){x1({range:e,quill:this.quill})}replaceText(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(n){const r=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new _e().retain(e.index).insert(n,r),X.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+n.length,0,X.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!Eee.includes(e.inputType))return;const n=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!n||n.collapsed===!0)return;const r=Tee(e);if(r==null)return;const s=this.quill.selection.normalizeNative(n),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,r)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}};function Tee(t){var e;return typeof t.data=="string"?t.data:(e=t.dataTransfer)!=null&&e.types.includes("text/plain")?t.dataTransfer.getData("text/plain"):null}const kee=/Mac/i.test(navigator.platform),Mee=100,Oee=t=>!!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||kee&&t.key==="a"&&t.ctrlKey===!0);class $ee extends ps{constructor(n,r){super(n,r);U(this,"isListening",!1);U(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(n,r){let{line:s,event:i}=r;if(!(s instanceof ds)||!s.uiNode)return!0;const o=getComputedStyle(s.domNode).direction==="rtl";return o&&i.key!=="ArrowRight"||!o&&i.key!=="ArrowLeft"?!0:(this.quill.setSelection(n.index-1,n.length+(i.shiftKey?1:0),X.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",n=>{!n.defaultPrevented&&Oee(n)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+Mee,this.isListening)return;this.isListening=!0;const n=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",n,{once:!0})}handleSelectionChange(){const n=document.getSelection();if(!n)return;const r=n.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const s=this.quill.scroll.find(r.startContainer);if(!(s instanceof ds)||!s.uiNode)return;const i=document.createRange();i.setStartAfter(s.uiNode),i.setEndAfter(s.uiNode),n.removeAllRanges(),n.addRange(i)}}X.register({"blots/block":bn,"blots/block/embed":Vr,"blots/break":hs,"blots/container":sa,"blots/cursor":Cl,"blots/embed":d1,"blots/inline":js,"blots/scroll":Tl,"blots/text":fs,"modules/clipboard":c4,"modules/history":h4,"modules/keyboard":Mf,"modules/uploader":p4,"modules/input":Aee,"modules/uiNode":$ee});class Pee extends us{add(e,n){let r=0;if(n==="+1"||n==="-1"){const s=this.value(e)||0;r=n==="+1"?s+1:s-1}else typeof n=="number"&&(r=n);return r===0?(this.remove(e),!0):super.add(e,r.toString())}canAdd(e,n){return super.canAdd(e,n)||super.canAdd(e,parseInt(n,10))}value(e){return parseInt(super.value(e),10)||void 0}}const Dee=new Pee("indent","ql-indent",{scope:Se.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class S1 extends bn{}U(S1,"blotName","blockquote"),U(S1,"tagName","blockquote");let Ree=(Sg=class extends bn{static formats(e){return this.tagName.indexOf(e.tagName)+1}},U(Sg,"blotName","header"),U(Sg,"tagName",["H1","H2","H3","H4","H5","H6"]),Sg);class Su extends sa{}Su.blotName="list-container",Su.tagName="OL";class Eu extends bn{static create(e){const n=super.create();return n.setAttribute("data-list",e),n}static formats(e){return e.getAttribute("data-list")||void 0}static register(){X.register(Su)}constructor(e,n){super(e,n);const r=n.ownerDocument.createElement("span"),s=i=>{if(!e.isEnabled())return;const o=this.statics.formats(n,e);o==="checked"?(this.format("list","unchecked"),i.preventDefault()):o==="unchecked"&&(this.format("list","checked"),i.preventDefault())};r.addEventListener("mousedown",s),r.addEventListener("touchstart",s),this.attachUI(r)}format(e,n){e===this.statics.blotName&&n?this.domNode.setAttribute("data-list",n):super.format(e,n)}}Eu.blotName="list",Eu.tagName="LI",Su.allowedChildren=[Eu],Eu.requiredContainer=Su;class Au extends js{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}U(Au,"blotName","bold"),U(Au,"tagName",["STRONG","B"]);class E1 extends Au{}U(E1,"blotName","italic"),U(E1,"tagName",["EM","I"]);class eo extends js{static create(e){const n=super.create(e);return n.setAttribute("href",this.sanitize(e)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(e){return e.getAttribute("href")}static sanitize(e){return g4(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,n){e!==this.statics.blotName||!n?super.format(e,n):this.domNode.setAttribute("href",this.constructor.sanitize(n))}}U(eo,"blotName","link"),U(eo,"tagName","A"),U(eo,"SANITIZED_URL","about:blank"),U(eo,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function g4(t,e){const n=document.createElement("a");n.href=t;const r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}class A1 extends js{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}U(A1,"blotName","script"),U(A1,"tagName",["SUB","SUP"]);class T1 extends Au{}U(T1,"blotName","strike"),U(T1,"tagName",["S","STRIKE"]);class k1 extends js{}U(k1,"blotName","underline"),U(k1,"tagName","U");class Pf extends d1{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const n=super.create(e);return typeof e=="string"&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}U(Pf,"blotName","formula"),U(Pf,"className","ql-formula"),U(Pf,"tagName","SPAN");const m4=["alt","height","width"];let Iee=(Eg=class extends xr{static create(e){const n=super.create(e);return typeof e=="string"&&n.setAttribute("src",this.sanitize(e)),n}static formats(e){return m4.reduce((n,r)=>(e.hasAttribute(r)&&(n[r]=e.getAttribute(r)),n),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return g4(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,n){m4.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):super.format(e,n)}},U(Eg,"blotName","image"),U(Eg,"tagName","IMG"),Eg);const y4=["height","width"];class Df extends Vr{static create(e){const n=super.create(e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen","true"),n.setAttribute("src",this.sanitize(e)),n}static formats(e){return y4.reduce((n,r)=>(e.hasAttribute(r)&&(n[r]=e.getAttribute(r)),n),{})}static sanitize(e){return eo.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,n){y4.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):super.format(e,n)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}U(Df,"blotName","video"),U(Df,"className","ql-video"),U(Df,"tagName","IFRAME");const Tu=new us("code-token","hljs",{scope:Se.INLINE});class _i extends js{static formats(e,n){for(;e!=null&&e!==n.domNode;){if(e.classList&&e.classList.contains(kn.className))return super.formats(e,n);e=e.parentNode}}constructor(e,n,r){super(e,n,r),Tu.add(this.domNode,r)}format(e,n){e!==_i.blotName?super.format(e,n):n?Tu.add(this.domNode,n):(Tu.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Tu.value(this.domNode)||this.unwrap()}}_i.blotName="code-token",_i.className="ql-token";class qr extends kn{static create(e){const n=super.create(e);return typeof e=="string"&&n.setAttribute("data-language",e),n}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,n){e===this.statics.blotName&&n?this.domNode.setAttribute("data-language",n):super.format(e,n)}replaceWith(e,n){return this.formatAt(0,this.length(),_i.blotName,!1),super.replaceWith(e,n)}}class ku extends ia{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,n){e===qr.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(e,n)}))}formatAt(e,n,r,s){r===qr.blotName&&(this.forceNext=!0),super.formatAt(e,n,r,s)}highlight(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
113
+ `)}
114
+ `,i=qr.formats(this.children.head.domNode);if(n||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const o=this.children.reduce((l,c)=>l.concat(LE(c,!1)),new _e),a=e(s,i);o.diff(a).reduce((l,c)=>{let{retain:u,attributes:d}=c;return u?(d&&Object.keys(d).forEach(h=>{[qr.blotName,_i.blotName].includes(h)&&this.formatAt(l,u,h,d[h])}),l+u):l},0)}this.cachedText=s,this.forceNext=!1}}html(e,n){const[r]=this.children.find(e);return`<pre data-language="${r?qr.formats(r.domNode):"plain"}">
115
+ ${Ef(this.code(e,n))}
116
+ </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const n=qr.formats(this.children.head.domNode);n!==this.uiNode.value&&(this.uiNode.value=n)}}}ku.allowedChildren=[qr],qr.requiredContainer=ku,qr.allowedChildren=[_i,Cl,fs,hs];const Nee=(t,e,n)=>{if(typeof t.versionString=="string"){const r=t.versionString.split(".")[0];if(parseInt(r,10)>=11)return t.highlight(n,{language:e}).value}return t.highlight(e,n).value};class b4 extends ps{static register(){X.register(_i,!0),X.register(qr,!0),X.register(ku,!0)}constructor(e,n){if(super(e,n),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,s)=>{let{key:i}=s;return r[i]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(X.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof ku))return;const n=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:s,label:i}=r;const o=n.ownerDocument.createElement("option");o.textContent=i,o.setAttribute("value",s),n.appendChild(o)}),n.addEventListener("change",()=>{e.format(qr.blotName,n.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(n),e.children.head&&(n.value=qr.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(X.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(X.sources.USER);const r=this.quill.getSelection();(e==null?this.quill.scroll.descendants(ku):[e]).forEach(i=>{i.highlight(this.highlightBlot,n)}),this.quill.update(X.sources.SILENT),r!=null&&this.quill.setSelection(r,X.sources.SILENT)}highlightBlot(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(n=this.languages[n]?n:"plain",n==="plain")return Ef(e).split(`
117
+ `).reduce((s,i,o)=>(o!==0&&s.insert(`
118
+ `,{[kn.blotName]:n}),s.insert(i)),new _e);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(kn.className),r.innerHTML=Nee(this.options.hljs,n,e),w1(this.quill.scroll,r,[(s,i)=>{const o=Tu.value(s);return o?i.compose(new _e().retain(i.length(),{[_i.blotName]:o})):i}],[(s,i)=>s.data.split(`
119
+ `).reduce((o,a,l)=>(l!==0&&o.insert(`
120
+ `,{[kn.blotName]:n}),o.insert(a)),i)],new WeakMap)}}b4.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Vd=class Vd extends bn{static create(e){const n=super.create();return e?n.setAttribute("data-row",e):n.setAttribute("data-row",M1()),n}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,n){e===Vd.blotName&&n?this.domNode.setAttribute("data-row",n):super.format(e,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};U(Vd,"blotName","table"),U(Vd,"tagName","TD");let ms=Vd;class Ci extends sa{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),n=this.children.tail.formats(),r=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===n.table&&e.table===r.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(n=>{if(n.next==null)return;const r=n.formats(),s=n.next.formats();if(r.table!==s.table){const i=this.splitAfter(n);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}U(Ci,"blotName","table-row"),U(Ci,"tagName","TR");class Fs extends sa{}U(Fs,"blotName","table-body"),U(Fs,"tagName","TBODY");class kl extends sa{balanceCells(){const e=this.descendants(Ci),n=e.reduce((r,s)=>Math.max(s.children.length,r),0);e.forEach(r=>{new Array(n-r.children.length).fill(0).forEach(()=>{let s;r.children.head!=null&&(s=ms.formats(r.children.head.domNode));const i=this.scroll.create(ms.blotName,s);r.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(n=>n.children.at(e))}deleteColumn(e){const[n]=this.descendant(Fs);n==null||n.children.head==null||n.children.forEach(r=>{const s=r.children.at(e);s!=null&&s.remove()})}insertColumn(e){const[n]=this.descendant(Fs);n==null||n.children.head==null||n.children.forEach(r=>{const s=r.children.at(e),i=ms.formats(r.children.head.domNode),o=this.scroll.create(ms.blotName,i);r.insertBefore(o,s)})}insertRow(e){const[n]=this.descendant(Fs);if(n==null||n.children.head==null)return;const r=M1(),s=this.scroll.create(Ci.blotName);n.children.head.children.forEach(()=>{const o=this.scroll.create(ms.blotName,r);s.appendChild(o)});const i=n.children.at(e);n.insertBefore(s,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(n=>n)}}U(kl,"blotName","table-container"),U(kl,"tagName","TABLE"),kl.allowedChildren=[Fs],Fs.requiredContainer=kl,Fs.allowedChildren=[Ci],Ci.requiredContainer=Fs,Ci.allowedChildren=[ms],ms.requiredContainer=Ci;function M1(){return`row-${Math.random().toString(36).slice(2,6)}`}let Lee=class extends ps{static register(){X.register(ms),X.register(Ci),X.register(Fs),X.register(kl)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(kl).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,n]=this.getTable();n!=null&&(e.deleteColumn(n.cellOffset()),this.quill.update(X.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(X.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const n=e.offset();e.remove(),this.quill.update(X.sources.USER),this.quill.setSelection(n,X.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[n,r]=this.quill.getLine(e.index);if(n==null||n.statics.blotName!==ms.blotName)return[null,null,null,-1];const s=n.parent;return[s.parent.parent,s,n,r]}insertColumn(e){const n=this.quill.getSelection();if(!n)return;const[r,s,i]=this.getTable(n);if(i==null)return;const o=i.cellOffset();r.insertColumn(o+e),this.quill.update(X.sources.USER);let a=s.rowOffset();e===0&&(a+=1),this.quill.setSelection(n.index+a,n.length,X.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const n=this.quill.getSelection();if(!n)return;const[r,s,i]=this.getTable(n);if(i==null)return;const o=s.rowOffset();r.insertRow(o+e),this.quill.update(X.sources.USER),e>0?this.quill.setSelection(n,X.sources.SILENT):this.quill.setSelection(n.index+s.children.length,n.length,X.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,n){const r=this.quill.getSelection();if(r==null)return;const s=new Array(e).fill(0).reduce(i=>{const o=new Array(n).fill(`
121
+ `).join("");return i.insert(o,{table:M1()})},new _e().retain(r.index));this.quill.updateContents(s,X.sources.USER),this.quill.setSelection(r.index,X.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(X.events.SCROLL_OPTIMIZE,e=>{e.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(X.events.TEXT_CHANGE,(r,s,i)=>{i===X.sources.USER&&this.balanceTables()}),!0):!1)})}};const v4=xi("quill:toolbar");class O1 extends ps{constructor(e,n){var r,s;if(super(e,n),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),Bee(i,this.options.container),(s=(r=e.container)==null?void 0:r.parentNode)==null||s.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){v4.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(i=>{var a;const o=(a=this.options.handlers)==null?void 0:a[i];o&&this.addHandler(i,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(X.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,n){this.handlers[e]=n}attach(e){let n=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!n)return;if(n=n.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[n]==null&&this.quill.scroll.query(n)==null){v4.warn("ignoring attaching to nonexistent format",n,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[n]!=null)this.handlers[n].call(this,i);else if(this.quill.scroll.query(n).prototype instanceof xr){if(i=prompt(`Enter ${n}`),!i)return;this.quill.updateContents(new _e().retain(o.index).delete(o.length).insert({[n]:i}),X.sources.USER)}else this.quill.format(n,i,X.sources.USER);this.update(o)}),this.controls.push([n,e])}update(e){const n=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[s,i]=r;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(n[s]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(n[s])){let a=n[s];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=n[s],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=n[s]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}O1.DEFAULTS={};function x4(t,e,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${e}: ${n}`)):r.setAttribute("aria-label",e),t.appendChild(r)}function Bee(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(s=>{if(typeof s=="string")x4(r,s);else{const i=Object.keys(s)[0],o=s[i];Array.isArray(o)?jee(r,i,o):x4(r,i,o)}}),t.appendChild(r)})}function jee(t,e,n){const r=document.createElement("select");r.classList.add(`ql-${e}`),n.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),r.appendChild(i)}),t.appendChild(r)}O1.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(t!=null)if(t.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(n=>{this.quill.scroll.query(n,Se.INLINE)!=null&&this.quill.format(n,!1,X.sources.USER)})}else this.quill.removeFormat(t.index,t.length,X.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();t==="rtl"&&e==null?this.quill.format("align","right",X.sources.USER):!t&&e==="right"&&this.quill.format("align",!1,X.sources.USER),this.quill.format("direction",t,X.sources.USER)},indent(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0,10);if(t==="+1"||t==="-1"){let s=t==="+1"?1:-1;n.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,X.sources.USER)}},link(t){t===!0&&(t=prompt("Enter link URL:")),this.quill.format("link",t,X.sources.USER)},list(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e);t==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,X.sources.USER):this.quill.format("list","unchecked",X.sources.USER):this.quill.format("list",t,X.sources.USER)}}};const Fee='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',zee='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Hee='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Vee='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Uee='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',qee='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Wee='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Gee='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',w4='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Mu={align:{"":Fee,center:zee,right:Hee,justify:Vee},background:Uee,blockquote:qee,bold:Wee,clean:Gee,code:w4,"code-block":w4,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},Yee='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let _4=0;function C4(t,e){t.setAttribute(e,`${t.getAttribute(e)!=="true"}`)}class Rf{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),C4(this.label,"aria-expanded"),C4(this.options,"aria-hidden")}buildItem(e){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=e.getAttribute("value");return r&&n.setAttribute("data-value",r),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(n,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),n}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Yee,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${_4}`,_4+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);e.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class S4 extends Rf{constructor(e,n){super(e),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(e){const n=super.buildItem(e);return n.style.backgroundColor=e.getAttribute("value")||"",n}selectItem(e,n){super.selectItem(e,n);const r=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class E4 extends Rf{constructor(e,n){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,n){super.selectItem(e,n);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const Kee=t=>{const{overflowY:e}=getComputedStyle(t,null);return e!=="visible"&&e!=="clip"};class A4{constructor(e,n){this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Kee(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const n=e.left+e.width/2-this.root.offsetWidth/2,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>s.right&&(o=s.right-i.right,this.root.style.left=`${n+o}px`),i.left<s.left&&(o=s.left-i.left,this.root.style.left=`${n+o}px`),i.bottom>s.bottom){const a=i.bottom-i.top,l=e.bottom-e.top+a;this.root.style.top=`${r-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Zee=[!1,"center","right","justify"],Xee=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Qee=[!1,"serif","monospace"],Jee=["1","2","3",!1],ete=["small",!1,"large","huge"];class Ou extends El{constructor(e,n){super(e,n);const r=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const n=super.addModule(e);return e==="toolbar"&&this.extendToolbar(n),n}buildButtons(e,n){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),n[i]!=null))if(i==="direction")r.innerHTML=n[i][""]+n[i].rtl;else if(typeof n[i]=="string")r.innerHTML=n[i];else{const o=r.value||"";o!=null&&n[i][o]&&(r.innerHTML=n[i][o])}})})}buildPickers(e,n){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&$u(s,Zee),typeof n.align=="object"))return new E4(s,n.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&$u(s,Xee,i==="background"?"#ffffff":"#000000"),new S4(s,n[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?$u(s,Qee):s.classList.contains("ql-header")?$u(s,Jee):s.classList.contains("ql-size")&&$u(s,ete)),new Rf(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(ve.events.EDITOR_CHANGE,r)}}Ou.DEFAULTS=Xi({},El.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let t=this.container.querySelector("input.ql-image[type=file]");t==null&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),t.classList.add("ql-image"),t.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,t.files),t.value=""}),this.container.appendChild(t)),t.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class T4 extends A4{constructor(e,n){super(e,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,ve.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,ve.sources.USER)),this.quill.root.scrollTop=n;break}case"video":e=tte(e);case"formula":{if(!e)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,ve.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",ve.sources.USER),this.quill.setSelection(r+2,ve.sources.USER)}break}}this.textbox.value="",this.hide()}}function tte(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:t}function $u(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const s=document.createElement("option");r===n?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),t.appendChild(s)})}const nte=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class k4 extends T4{constructor(e,n){super(e,n),this.quill.on(ve.events.EDITOR_CHANGE,(r,s,i,o)=>{if(r===ve.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&o===ve.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(s.index,s.length);if(a.length===1){const l=this.quill.getBounds(s);l!=null&&this.position(l)}else{const l=a[a.length-1],c=this.quill.getIndex(l),u=Math.min(l.length()-1,s.index+s.length-c),d=this.quill.getBounds(new ra(c,u));d!=null&&this.position(d)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(ve.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const n=this.quill.getBounds(e);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(e){const n=super.position(e),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}U(k4,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class M4 extends Ou{constructor(e,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=nte),super(e,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new k4(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Mu),this.buildPickers(e.container.querySelectorAll("select"),Mu))}}M4.DEFAULTS=Xi({},Ou.DEFAULTS,{modules:{toolbar:{handlers:{link(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1,X.sources.USER)}}}}});const rte=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class O4 extends T4{constructor(){super(...arguments);U(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",n=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),n.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",n=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,ve.sources.USER),delete this.linkRange}n.preventDefault(),this.hide()}),this.quill.on(ve.events.SELECTION_CHANGE,(n,r,s)=>{if(n!=null){if(n.length===0&&s===ve.sources.USER){const[i,o]=this.quill.scroll.descendant(eo,n.index);if(i!=null){this.linkRange=new ra(n.index-o,i.length());const a=eo.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}U(O4,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class $4 extends Ou{constructor(e,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=rte),super(e,n),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Mu),this.buildPickers(e.container.querySelectorAll("select"),Mu),this.tooltip=new O4(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{e.handlers.link.call(e,!r.format.link)}))}}$4.DEFAULTS=Xi({},Ou.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(t){const e=this.quill.getSelection();if(e==null||e.length===0)return;let n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,X.sources.USER)}}}}}),X.register({"attributors/attribute/direction":XE,"attributors/class/align":YE,"attributors/class/background":VJ,"attributors/class/color":HJ,"attributors/class/direction":QE,"attributors/class/font":t4,"attributors/class/size":r4,"attributors/style/align":KE,"attributors/style/background":m1,"attributors/style/color":g1,"attributors/style/direction":JE,"attributors/style/font":n4,"attributors/style/size":s4},!0),X.register({"formats/align":YE,"formats/direction":QE,"formats/indent":Dee,"formats/background":m1,"formats/color":g1,"formats/font":t4,"formats/size":r4,"formats/blockquote":S1,"formats/code-block":kn,"formats/header":Ree,"formats/list":Eu,"formats/bold":Au,"formats/code":y1,"formats/italic":E1,"formats/link":eo,"formats/script":A1,"formats/strike":T1,"formats/underline":k1,"formats/formula":Pf,"formats/image":Iee,"formats/video":Df,"modules/syntax":b4,"modules/table":Lee,"modules/toolbar":O1,"themes/bubble":M4,"themes/snow":$4,"ui/icons":Mu,"ui/picker":Rf,"ui/icon-picker":E4,"ui/color-picker":S4,"ui/tooltip":A4},!0);class If extends x.Component{constructor(e){super(e),this.editingAreaRef=x.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,s,i,o)=>{var a,l;r==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.root.innerHTML,s,o,this.unprivilegedEditor):r==="selection-change"&&((l=this.onEditorChangeSelection)==null||l.call(this,s,o,this.unprivilegedEditor))};const n=this.isControlled()?e.value:e.defaultValue;this.value=n??""}validateProps(e){if(x.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(x.Children.count(e.children)){const n=x.Children.only(e.children);if((n==null?void 0:n.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(e,n){if(this.validateProps(e),!this.editor||this.state.generation!==n.generation)return!0;if("value"in e){const r=this.getEditorContents(),s=e.value??"";this.isEqualValue(s,r)||this.setEditorContents(this.editor,s)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!du(e[r],this.props[r]))}shouldComponentRegenerate(e){return this.dirtyProps.some(n=>!du(e[n],this.props[n]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(e,n){if(this.editor&&this.shouldComponentRegenerate(e)){const r=this.editor.getContents(),s=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:s},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==n.generation){const{delta:r,selection:s}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const i=this.editor;i.setContents(r),P4(()=>this.setEditorSelection(i,s))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){this.editor&&this.unhookEditor(this.editor)}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(e,n){const r=new X(e,n);return n.tabIndex!=null&&this.setEditorTabIndex(r,n.tabIndex),this.hookEditor(r),r}hookEditor(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)}unhookEditor(e){e.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(e){return e&&e.ops}isEqualValue(e,n){return this.isDelta(e)&&this.isDelta(n)?du(e.ops,n.ops):du(e,n)}setEditorContents(e,n){this.value=n;const r=this.getEditorSelection();typeof n=="string"?e.setContents(e.clipboard.convert({html:n})):e.setContents(n),P4(()=>this.setEditorSelection(e,r))}setEditorSelection(e,n){if(this.selection=n,n){const r=e.getLength();n.index=Math.max(0,Math.min(n.index,r-1)),n.length=Math.max(0,Math.min(n.length,r-1-n.index)),e.setSelection(n)}}setEditorTabIndex(e,n){var r;(r=e==null?void 0:e.scroll)!=null&&r.domNode&&(e.scroll.domNode.tabIndex=n)}setEditorReadOnly(e,n){n?e.disable():e.enable()}makeUnprivilegedEditor(e){const n=e;return{getHTML:()=>n.root.innerHTML,getSemanticHTML:n.getSemanticHTML.bind(n),getLength:n.getLength.bind(n),getText:n.getText.bind(n),getContents:n.getContents.bind(n),getSelection:n.getSelection.bind(n),getBounds:n.getBounds.bind(n)}}getEditingArea(){const e=this.editingAreaRef.current;if(!e)throw new Error("Cannot find element for editing area");if(e.nodeType===3)throw new Error("Editing area cannot be a text node");return e}renderEditingArea(){const{children:e,preserveWhitespace:n}=this.props,{generation:r}=this.state,s={key:r,ref:this.editingAreaRef};return x.Children.count(e)?x.cloneElement(x.Children.only(e),s):n?x.createElement("pre",{...s}):x.createElement("div",{...s})}render(){return x.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(e,n,r,s){var o,a;if(!this.editor)return;const i=this.isDelta(this.value)?s.getContents():s.getHTML();i!==this.getEditorContents()&&(this.lastDeltaChangeSet=n,this.value=i,(a=(o=this.props).onChange)==null||a.call(o,e,n,r,s))}onEditorChangeSelection(e,n,r){var a,l,c,u,d,h;if(!this.editor)return;const s=this.getEditorSelection(),i=!s&&e,o=s&&!e;du(e,s)||(this.selection=e,(l=(a=this.props).onChangeSelection)==null||l.call(a,e,n,r),i?(u=(c=this.props).onFocus)==null||u.call(c,e,n,r):o&&((h=(d=this.props).onBlur)==null||h.call(d,s,n,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}If.displayName="React Quill",If.Quill=X,If.defaultProps={theme:"snow",modules:{},readOnly:!1};function P4(t){Promise.resolve().then(t)}var D4={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(an,function(){return function(n){function r(i){if(s[i])return s[i].exports;var o=s[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var s={};return r.m=n,r.c=s,r.i=function(i){return i},r.d=function(i,o,a){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:a})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=38)}([function(n,r){function s(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}n.exports=s},function(n,r,s){var i=s(22),o=typeof self=="object"&&self&&self.Object===Object&&self,a=i||o||Function("return this")();n.exports=a},function(n,r){function s(i){return i!=null&&typeof i=="object"}n.exports=s},function(n,r,s){function i(d){var h=-1,f=d==null?0:d.length;for(this.clear();++h<f;){var p=d[h];this.set(p[0],p[1])}}var o=s(75),a=s(76),l=s(77),c=s(78),u=s(79);i.prototype.clear=o,i.prototype.delete=a,i.prototype.get=l,i.prototype.has=c,i.prototype.set=u,n.exports=i},function(n,r,s){function i(a,l){for(var c=a.length;c--;)if(o(a[c][0],l))return c;return-1}var o=s(8);n.exports=i},function(n,r,s){function i(h){return h==null?h===void 0?u:c:d&&d in Object(h)?a(h):l(h)}var o=s(16),a=s(64),l=s(87),c="[object Null]",u="[object Undefined]",d=o?o.toStringTag:void 0;n.exports=i},function(n,r,s){function i(a,l){var c=a.__data__;return o(l)?c[typeof l=="string"?"string":"hash"]:c.map}var o=s(73);n.exports=i},function(n,r,s){var i=s(11),o=i(Object,"create");n.exports=o},function(n,r){function s(i,o){return i===o||i!==i&&o!==o}n.exports=s},function(n,r,s){function i(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}s.d(r,"a",function(){return o});var o=function a(l){i(this,a),this.onCreate=function(){},this.onDestroy=function(){},this.onUpdate=function(){},this.overlay=l.overlay,this.img=l.img,this.options=l.options,this.requestUpdate=l.onUpdate}},function(n,r,s){function i(a,l,c){l=="__proto__"&&o?o(a,l,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[l]=c}var o=s(21);n.exports=i},function(n,r,s){function i(l,c){var u=a(l,c);return o(u)?u:void 0}var o=s(48),a=s(65);n.exports=i},function(n,r,s){function i(l){return l!=null&&a(l.length)&&!o(l)}var o=s(13),a=s(30);n.exports=i},function(n,r,s){function i(h){if(!a(h))return!1;var f=o(h);return f==c||f==u||f==l||f==d}var o=s(5),a=s(0),l="[object AsyncFunction]",c="[object Function]",u="[object GeneratorFunction]",d="[object Proxy]";n.exports=i},function(n,r){n.exports=function(s){return s.webpackPolyfill||(s.deprecate=function(){},s.paths=[],s.children||(s.children=[]),Object.defineProperty(s,"loaded",{enumerable:!0,get:function(){return s.l}}),Object.defineProperty(s,"id",{enumerable:!0,get:function(){return s.i}}),s.webpackPolyfill=1),s}},function(n,r,s){var i=s(11),o=s(1),a=i(o,"Map");n.exports=a},function(n,r,s){var i=s(1),o=i.Symbol;n.exports=o},function(n,r){function s(i,o,a){switch(a.length){case 0:return i.call(o);case 1:return i.call(o,a[0]);case 2:return i.call(o,a[0],a[1]);case 3:return i.call(o,a[0],a[1],a[2])}return i.apply(o,a)}n.exports=s},function(n,r,s){function i(l,c,u){(u===void 0||a(l[c],u))&&(u!==void 0||c in l)||o(l,c,u)}var o=s(10),a=s(8);n.exports=i},function(n,r,s){function i(h,f,p,m,g){h!==f&&l(f,function(y,v){if(u(y))g||(g=new o),c(h,f,v,p,i,m,g);else{var b=m?m(h[v],y,v+"",h,f,g):void 0;b===void 0&&(b=y),a(h,v,b)}},d)}var o=s(41),a=s(18),l=s(46),c=s(51),u=s(0),d=s(32);n.exports=i},function(n,r,s){function i(c,u){return l(a(c,u,o),c+"")}var o=s(26),a=s(89),l=s(90);n.exports=i},function(n,r,s){var i=s(11),o=function(){try{var a=i(Object,"defineProperty");return a({},"",{}),a}catch{}}();n.exports=o},function(n,r,s){(function(i){var o=typeof i=="object"&&i&&i.Object===Object&&i;n.exports=o}).call(r,s(107))},function(n,r,s){var i=s(88),o=i(Object.getPrototypeOf,Object);n.exports=o},function(n,r){function s(a,l){return!!(l=l??i)&&(typeof a=="number"||o.test(a))&&a>-1&&a%1==0&&a<l}var i=9007199254740991,o=/^(?:0|[1-9]\d*)$/;n.exports=s},function(n,r){function s(o){var a=o&&o.constructor;return o===(typeof a=="function"&&a.prototype||i)}var i=Object.prototype;n.exports=s},function(n,r){function s(i){return i}n.exports=s},function(n,r,s){var i=s(47),o=s(2),a=Object.prototype,l=a.hasOwnProperty,c=a.propertyIsEnumerable,u=i(function(){return arguments}())?i:function(d){return o(d)&&l.call(d,"callee")&&!c.call(d,"callee")};n.exports=u},function(n,r){var s=Array.isArray;n.exports=s},function(n,r,s){(function(i){var o=s(1),a=s(102),l=typeof r=="object"&&r&&!r.nodeType&&r,c=l&&typeof i=="object"&&i&&!i.nodeType&&i,u=c&&c.exports===l,d=u?o.Buffer:void 0,h=d?d.isBuffer:void 0,f=h||a;i.exports=f}).call(r,s(14)(n))},function(n,r){function s(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=i}var i=9007199254740991;n.exports=s},function(n,r,s){var i=s(49),o=s(54),a=s(86),l=a&&a.isTypedArray,c=l?o(l):i;n.exports=c},function(n,r,s){function i(c){return l(c)?o(c,!0):a(c)}var o=s(43),a=s(50),l=s(12);n.exports=i},function(n,r,s){r.a={modules:["DisplaySize","Toolbar","Resize"],overlayStyles:{position:"absolute",boxSizing:"border-box",border:"1px dashed #444"},handleStyles:{position:"absolute",height:"12px",width:"12px",backgroundColor:"white",border:"1px solid #777",boxSizing:"border-box",opacity:"0.80"},displayStyles:{position:"absolute",font:"12px/1.0 Arial, Helvetica, sans-serif",padding:"4px 8px",textAlign:"center",backgroundColor:"white",color:"#333",border:"1px solid #777",boxSizing:"border-box",opacity:"0.80",cursor:"default"},toolbarStyles:{position:"absolute",top:"-12px",right:"0",left:"0",height:"0",minWidth:"100px",font:"12px/1.0 Arial, Helvetica, sans-serif",textAlign:"center",color:"#333",boxSizing:"border-box",cursor:"default"},toolbarButtonStyles:{display:"inline-block",width:"24px",height:"24px",background:"white",border:"1px solid #999",verticalAlign:"middle"},toolbarButtonSvgStyles:{fill:"#444",stroke:"#444",strokeWidth:"2"}}},function(n,r,s){function i(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function o(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!d||typeof d!="object"&&typeof d!="function"?u:d}function a(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var l=s(9);s.d(r,"a",function(){return c});var c=function(u){function d(){var h,f,p,m;i(this,d);for(var g=arguments.length,y=Array(g),v=0;v<g;v++)y[v]=arguments[v];return f=p=o(this,(h=d.__proto__||Object.getPrototypeOf(d)).call.apply(h,[this].concat(y))),p.onCreate=function(){p.display=document.createElement("div"),Object.assign(p.display.style,p.options.displayStyles),p.overlay.appendChild(p.display)},p.onDestroy=function(){},p.onUpdate=function(){if(p.display&&p.img){var b=p.getCurrentSize();if(p.display.innerHTML=b.join(" &times; "),b[0]>120&&b[1]>30)Object.assign(p.display.style,{right:"4px",bottom:"4px",left:"auto"});else if(p.img.style.float=="right"){var C=p.display.getBoundingClientRect();Object.assign(p.display.style,{right:"auto",bottom:"-"+(C.height+4)+"px",left:"-"+(C.width+4)+"px"})}else{var _=p.display.getBoundingClientRect();Object.assign(p.display.style,{right:"-"+(_.width+4)+"px",bottom:"-"+(_.height+4)+"px",left:"auto"})}}},p.getCurrentSize=function(){return[p.img.width,Math.round(p.img.width/p.img.naturalWidth*p.img.naturalHeight)]},m=f,o(p,m)}return a(d,u),d}(l.a)},function(n,r,s){function i(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function o(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!d||typeof d!="object"&&typeof d!="function"?u:d}function a(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var l=s(9);s.d(r,"a",function(){return c});var c=function(u){function d(){var h,f,p,m;i(this,d);for(var g=arguments.length,y=Array(g),v=0;v<g;v++)y[v]=arguments[v];return f=p=o(this,(h=d.__proto__||Object.getPrototypeOf(d)).call.apply(h,[this].concat(y))),p.onCreate=function(){p.boxes=[],p.addBox("nwse-resize"),p.addBox("nesw-resize"),p.addBox("nwse-resize"),p.addBox("nesw-resize"),p.positionBoxes()},p.onDestroy=function(){p.setCursor("")},p.positionBoxes=function(){var b=-parseFloat(p.options.handleStyles.width)/2+"px",C=-parseFloat(p.options.handleStyles.height)/2+"px";[{left:b,top:C},{right:b,top:C},{right:b,bottom:C},{left:b,bottom:C}].forEach(function(_,k){Object.assign(p.boxes[k].style,_)})},p.addBox=function(b){var C=document.createElement("div");Object.assign(C.style,p.options.handleStyles),C.style.cursor=b,C.style.width=p.options.handleStyles.width+"px",C.style.height=p.options.handleStyles.height+"px",C.addEventListener("mousedown",p.handleMousedown,!1),p.overlay.appendChild(C),p.boxes.push(C)},p.handleMousedown=function(b){p.dragBox=b.target,p.dragStartX=b.clientX,p.preDragWidth=p.img.width||p.img.naturalWidth,p.setCursor(p.dragBox.style.cursor),document.addEventListener("mousemove",p.handleDrag,!1),document.addEventListener("mouseup",p.handleMouseup,!1)},p.handleMouseup=function(){p.setCursor(""),document.removeEventListener("mousemove",p.handleDrag),document.removeEventListener("mouseup",p.handleMouseup)},p.handleDrag=function(b){if(p.img){var C=b.clientX-p.dragStartX;p.dragBox===p.boxes[0]||p.dragBox===p.boxes[3]?p.img.width=Math.round(p.preDragWidth-C):p.img.width=Math.round(p.preDragWidth+C),p.requestUpdate()}},p.setCursor=function(b){[document.body,p.img].forEach(function(C){C.style.cursor=b})},m=f,o(p,m)}return a(d,u),d}(l.a)},function(n,r,s){function i(C,_){if(!(C instanceof _))throw new TypeError("Cannot call a class as a function")}function o(C,_){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!_||typeof _!="object"&&typeof _!="function"?C:_}function a(C,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);C.prototype=Object.create(_&&_.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(C,_):C.__proto__=_)}var l=s(105),c=s.n(l),u=s(104),d=s.n(u),h=s(106),f=s.n(h),p=s(9);s.d(r,"a",function(){return b});var m={},g={},y={},v={},b=function(C){function _(){var k,E,A,$;i(this,_);for(var P=arguments.length,O=Array(P),R=0;R<P;R++)O[R]=arguments[R];return E=A=o(this,(k=_.__proto__||Object.getPrototypeOf(_)).call.apply(k,[this].concat(O))),A.onCreate=function(H){m=H,g=new m.Attributor.Style("float","float"),y=new m.Attributor.Style("margin","margin"),v=new m.Attributor.Style("display","display"),A.toolbar=document.createElement("div"),Object.assign(A.toolbar.style,A.options.toolbarStyles),A.overlay.appendChild(A.toolbar),A._defineAlignments(),A._addToolbarButtons()},A.onDestroy=function(){},A.onUpdate=function(){},A._defineAlignments=function(){A.alignments=[{icon:c.a,apply:function(){v.add(A.img,"inline"),g.add(A.img,"left"),y.add(A.img,"0 1em 1em 0")},isApplied:function(){return g.value(A.img)=="left"}},{icon:d.a,apply:function(){v.add(A.img,"block"),g.remove(A.img),y.add(A.img,"auto")},isApplied:function(){return y.value(A.img)=="auto"}},{icon:f.a,apply:function(){v.add(A.img,"inline"),g.add(A.img,"right"),y.add(A.img,"0 0 1em 1em")},isApplied:function(){return g.value(A.img)=="right"}}]},A._addToolbarButtons=function(){var H=[];A.alignments.forEach(function(z,j){var F=document.createElement("span");H.push(F),F.innerHTML=z.icon,F.addEventListener("click",function(){H.forEach(function(V){return V.style.filter=""}),z.isApplied()?(g.remove(A.img),y.remove(A.img),v.remove(A.img)):(A._selectButton(F),z.apply()),A.requestUpdate()}),Object.assign(F.style,A.options.toolbarButtonStyles),j>0&&(F.style.borderLeftWidth="0"),Object.assign(F.children[0].style,A.options.toolbarButtonSvgStyles),z.isApplied()&&A._selectButton(F),A.toolbar.appendChild(F)})},A._selectButton=function(H){H.style.filter="invert(20%)"},$=E,o(A,$)}return a(_,C),_}(p.a)},function(n,r,s){var i=s(17),o=s(20),a=s(63),l=s(101),c=o(function(u){return u.push(void 0,a),i(l,void 0,u)});n.exports=c},function(n,r,s){function i(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=s(37),a=s.n(o),l=s(33),c=s(34),u=s(36),d=s(35),h={DisplaySize:c.a,Toolbar:u.a,Resize:d.a},f=function p(m){var g=this,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,p),this.initializeModules=function(){g.removeModules(),g.modules=g.moduleClasses.map(function(b){return new(h[b]||b)(g)}),g.modules.forEach(function(b){b.onCreate(g.parchment)}),g.onUpdate()},this.onUpdate=function(){g.repositionElements(),g.modules.forEach(function(b){b.onUpdate()})},this.removeModules=function(){g.modules.forEach(function(b){b.onDestroy()}),g.modules=[]},this.handleClick=function(b){if(b.target&&b.target.tagName&&b.target.tagName.toUpperCase()==="IMG"){if(g.img===b.target)return;g.img&&g.hide(),g.show(b.target)}else g.img&&g.hide()},this.show=function(b){g.img=b,g.showOverlay(),g.initializeModules()},this.showOverlay=function(){g.overlay&&g.hideOverlay(),g.quill.setSelection(null),g.setUserSelect("none"),document.addEventListener("keyup",g.checkImage,!0),g.quill.root.addEventListener("input",g.checkImage,!0),g.overlay=document.createElement("div"),Object.assign(g.overlay.style,g.options.overlayStyles),g.quill.root.parentNode.appendChild(g.overlay),g.repositionElements()},this.hideOverlay=function(){g.overlay&&(g.quill.root.parentNode.removeChild(g.overlay),g.overlay=void 0,document.removeEventListener("keyup",g.checkImage),g.quill.root.removeEventListener("input",g.checkImage),g.setUserSelect(""))},this.repositionElements=function(){if(g.overlay&&g.img){var b=g.quill.root.parentNode,C=g.img.getBoundingClientRect(),_=b.getBoundingClientRect();Object.assign(g.overlay.style,{left:C.left-_.left-1+b.scrollLeft+"px",top:C.top-_.top+b.scrollTop+"px",width:C.width+"px",height:C.height+"px"})}},this.hide=function(){g.hideOverlay(),g.removeModules(),g.img=void 0},this.setUserSelect=function(b){["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach(function(C){g.quill.root.style[C]=b,document.documentElement.style[C]=b})},this.checkImage=function(b){g.img&&(b.keyCode!=46&&b.keyCode!=8||window.Quill.find(g.img).deleteAt(0),g.hide())},this.quill=m;var v=!1;y.modules&&(v=y.modules.slice()),y.parchment&&(this.parchment=y.parchment),this.options=a()({},y,l.a),v!==!1&&(this.options.modules=v),document.execCommand("enableObjectResizing",!1,"false"),this.quill.root.addEventListener("click",this.handleClick,!1),this.quill.root.parentNode.style.position=this.quill.root.parentNode.style.position||"relative",this.moduleClasses=this.options.modules,this.modules=[]};r.default=f,window.Quill&&window.Quill.register("modules/imageResize",f)},function(n,r,s){function i(d){var h=-1,f=d==null?0:d.length;for(this.clear();++h<f;){var p=d[h];this.set(p[0],p[1])}}var o=s(66),a=s(67),l=s(68),c=s(69),u=s(70);i.prototype.clear=o,i.prototype.delete=a,i.prototype.get=l,i.prototype.has=c,i.prototype.set=u,n.exports=i},function(n,r,s){function i(d){var h=-1,f=d==null?0:d.length;for(this.clear();++h<f;){var p=d[h];this.set(p[0],p[1])}}var o=s(80),a=s(81),l=s(82),c=s(83),u=s(84);i.prototype.clear=o,i.prototype.delete=a,i.prototype.get=l,i.prototype.has=c,i.prototype.set=u,n.exports=i},function(n,r,s){function i(h){var f=this.__data__=new o(h);this.size=f.size}var o=s(3),a=s(92),l=s(93),c=s(94),u=s(95),d=s(96);i.prototype.clear=a,i.prototype.delete=l,i.prototype.get=c,i.prototype.has=u,i.prototype.set=d,n.exports=i},function(n,r,s){var i=s(1),o=i.Uint8Array;n.exports=o},function(n,r,s){function i(p,m){var g=l(p),y=!g&&a(p),v=!g&&!y&&c(p),b=!g&&!y&&!v&&d(p),C=g||y||v||b,_=C?o(p.length,String):[],k=_.length;for(var E in p)!m&&!f.call(p,E)||C&&(E=="length"||v&&(E=="offset"||E=="parent")||b&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||u(E,k))||_.push(E);return _}var o=s(53),a=s(27),l=s(28),c=s(29),u=s(24),d=s(31),h=Object.prototype,f=h.hasOwnProperty;n.exports=i},function(n,r,s){function i(u,d,h){var f=u[d];c.call(u,d)&&a(f,h)&&(h!==void 0||d in u)||o(u,d,h)}var o=s(10),a=s(8),l=Object.prototype,c=l.hasOwnProperty;n.exports=i},function(n,r,s){var i=s(0),o=Object.create,a=function(){function l(){}return function(c){if(!i(c))return{};if(o)return o(c);l.prototype=c;var u=new l;return l.prototype=void 0,u}}();n.exports=a},function(n,r,s){var i=s(62),o=i();n.exports=o},function(n,r,s){function i(c){return a(c)&&o(c)==l}var o=s(5),a=s(2),l="[object Arguments]";n.exports=i},function(n,r,s){function i(g){return!(!l(g)||a(g))&&(o(g)?m:u).test(c(g))}var o=s(13),a=s(74),l=s(0),c=s(97),u=/^\[object .+?Constructor\]$/,d=Function.prototype,h=Object.prototype,f=d.toString,p=h.hasOwnProperty,m=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");n.exports=i},function(n,r,s){function i(u){return l(u)&&a(u.length)&&!!c[o(u)]}var o=s(5),a=s(30),l=s(2),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,n.exports=i},function(n,r,s){function i(d){if(!o(d))return l(d);var h=a(d),f=[];for(var p in d)(p!="constructor"||!h&&u.call(d,p))&&f.push(p);return f}var o=s(0),a=s(25),l=s(85),c=Object.prototype,u=c.hasOwnProperty;n.exports=i},function(n,r,s){function i(C,_,k,E,A,$,P){var O=C[k],R=_[k],H=P.get(R);if(H)return void o(C,k,H);var z=$?$(O,R,k+"",C,_,P):void 0,j=z===void 0;if(j){var F=h(R),V=!F&&p(R),q=!F&&!V&&v(R);z=R,F||V||q?h(O)?z=O:f(O)?z=c(O):V?(j=!1,z=a(R,!0)):q?(j=!1,z=l(R,!0)):z=[]:y(R)||d(R)?(z=O,d(O)?z=b(O):(!g(O)||E&&m(O))&&(z=u(R))):j=!1}j&&(P.set(R,z),A(z,R,E,$,P),P.delete(R)),o(C,k,z)}var o=s(18),a=s(56),l=s(57),c=s(58),u=s(71),d=s(27),h=s(28),f=s(99),p=s(29),m=s(13),g=s(0),y=s(100),v=s(31),b=s(103);n.exports=i},function(n,r,s){var i=s(98),o=s(21),a=s(26),l=o?function(c,u){return o(c,"toString",{configurable:!0,enumerable:!1,value:i(u),writable:!0})}:a;n.exports=l},function(n,r){function s(i,o){for(var a=-1,l=Array(i);++a<i;)l[a]=o(a);return l}n.exports=s},function(n,r){function s(i){return function(o){return i(o)}}n.exports=s},function(n,r,s){function i(a){var l=new a.constructor(a.byteLength);return new o(l).set(new o(a)),l}var o=s(42);n.exports=i},function(n,r,s){(function(i){function o(f,p){if(p)return f.slice();var m=f.length,g=h?h(m):new f.constructor(m);return f.copy(g),g}var a=s(1),l=typeof r=="object"&&r&&!r.nodeType&&r,c=l&&typeof i=="object"&&i&&!i.nodeType&&i,u=c&&c.exports===l,d=u?a.Buffer:void 0,h=d?d.allocUnsafe:void 0;i.exports=o}).call(r,s(14)(n))},function(n,r,s){function i(a,l){var c=l?o(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}var o=s(55);n.exports=i},function(n,r){function s(i,o){var a=-1,l=i.length;for(o||(o=Array(l));++a<l;)o[a]=i[a];return o}n.exports=s},function(n,r,s){function i(l,c,u,d){var h=!u;u||(u={});for(var f=-1,p=c.length;++f<p;){var m=c[f],g=d?d(u[m],l[m],m,u,l):void 0;g===void 0&&(g=l[m]),h?a(u,m,g):o(u,m,g)}return u}var o=s(44),a=s(10);n.exports=i},function(n,r,s){var i=s(1),o=i["__core-js_shared__"];n.exports=o},function(n,r,s){function i(l){return o(function(c,u){var d=-1,h=u.length,f=h>1?u[h-1]:void 0,p=h>2?u[2]:void 0;for(f=l.length>3&&typeof f=="function"?(h--,f):void 0,p&&a(u[0],u[1],p)&&(f=h<3?void 0:f,h=1),c=Object(c);++d<h;){var m=u[d];m&&l(c,m,d,f)}return c})}var o=s(20),a=s(72);n.exports=i},function(n,r){function s(i){return function(o,a,l){for(var c=-1,u=Object(o),d=l(o),h=d.length;h--;){var f=d[i?h:++c];if(a(u[f],f,u)===!1)break}return o}}n.exports=s},function(n,r,s){function i(l,c,u,d,h,f){return a(l)&&a(c)&&(f.set(c,l),o(l,c,void 0,i,f),f.delete(c)),l}var o=s(19),a=s(0);n.exports=i},function(n,r,s){function i(d){var h=l.call(d,u),f=d[u];try{d[u]=void 0}catch{}var p=c.call(d);return h?d[u]=f:delete d[u],p}var o=s(16),a=Object.prototype,l=a.hasOwnProperty,c=a.toString,u=o?o.toStringTag:void 0;n.exports=i},function(n,r){function s(i,o){return i==null?void 0:i[o]}n.exports=s},function(n,r,s){function i(){this.__data__=o?o(null):{},this.size=0}var o=s(7);n.exports=i},function(n,r){function s(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}n.exports=s},function(n,r,s){function i(u){var d=this.__data__;if(o){var h=d[u];return h===a?void 0:h}return c.call(d,u)?d[u]:void 0}var o=s(7),a="__lodash_hash_undefined__",l=Object.prototype,c=l.hasOwnProperty;n.exports=i},function(n,r,s){function i(c){var u=this.__data__;return o?u[c]!==void 0:l.call(u,c)}var o=s(7),a=Object.prototype,l=a.hasOwnProperty;n.exports=i},function(n,r,s){function i(l,c){var u=this.__data__;return this.size+=this.has(l)?0:1,u[l]=o&&c===void 0?a:c,this}var o=s(7),a="__lodash_hash_undefined__";n.exports=i},function(n,r,s){function i(c){return typeof c.constructor!="function"||l(c)?{}:o(a(c))}var o=s(45),a=s(23),l=s(25);n.exports=i},function(n,r,s){function i(u,d,h){if(!c(h))return!1;var f=typeof d;return!!(f=="number"?a(h)&&l(d,h.length):f=="string"&&d in h)&&o(h[d],u)}var o=s(8),a=s(12),l=s(24),c=s(0);n.exports=i},function(n,r){function s(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}n.exports=s},function(n,r,s){function i(l){return!!a&&a in l}var o=s(60),a=function(){var l=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}();n.exports=i},function(n,r){function s(){this.__data__=[],this.size=0}n.exports=s},function(n,r,s){function i(c){var u=this.__data__,d=o(u,c);return!(d<0)&&(d==u.length-1?u.pop():l.call(u,d,1),--this.size,!0)}var o=s(4),a=Array.prototype,l=a.splice;n.exports=i},function(n,r,s){function i(a){var l=this.__data__,c=o(l,a);return c<0?void 0:l[c][1]}var o=s(4);n.exports=i},function(n,r,s){function i(a){return o(this.__data__,a)>-1}var o=s(4);n.exports=i},function(n,r,s){function i(a,l){var c=this.__data__,u=o(c,a);return u<0?(++this.size,c.push([a,l])):c[u][1]=l,this}var o=s(4);n.exports=i},function(n,r,s){function i(){this.size=0,this.__data__={hash:new o,map:new(l||a),string:new o}}var o=s(39),a=s(3),l=s(15);n.exports=i},function(n,r,s){function i(a){var l=o(this,a).delete(a);return this.size-=l?1:0,l}var o=s(6);n.exports=i},function(n,r,s){function i(a){return o(this,a).get(a)}var o=s(6);n.exports=i},function(n,r,s){function i(a){return o(this,a).has(a)}var o=s(6);n.exports=i},function(n,r,s){function i(a,l){var c=o(this,a),u=c.size;return c.set(a,l),this.size+=c.size==u?0:1,this}var o=s(6);n.exports=i},function(n,r){function s(i){var o=[];if(i!=null)for(var a in Object(i))o.push(a);return o}n.exports=s},function(n,r,s){(function(i){var o=s(22),a=typeof r=="object"&&r&&!r.nodeType&&r,l=a&&typeof i=="object"&&i&&!i.nodeType&&i,c=l&&l.exports===a,u=c&&o.process,d=function(){try{return u&&u.binding&&u.binding("util")}catch{}}();i.exports=d}).call(r,s(14)(n))},function(n,r){function s(a){return o.call(a)}var i=Object.prototype,o=i.toString;n.exports=s},function(n,r){function s(i,o){return function(a){return i(o(a))}}n.exports=s},function(n,r,s){function i(l,c,u){return c=a(c===void 0?l.length-1:c,0),function(){for(var d=arguments,h=-1,f=a(d.length-c,0),p=Array(f);++h<f;)p[h]=d[c+h];h=-1;for(var m=Array(c+1);++h<c;)m[h]=d[h];return m[c]=u(p),o(l,this,m)}}var o=s(17),a=Math.max;n.exports=i},function(n,r,s){var i=s(52),o=s(91),a=o(i);n.exports=a},function(n,r){function s(l){var c=0,u=0;return function(){var d=a(),h=o-(d-u);if(u=d,h>0){if(++c>=i)return arguments[0]}else c=0;return l.apply(void 0,arguments)}}var i=800,o=16,a=Date.now;n.exports=s},function(n,r,s){function i(){this.__data__=new o,this.size=0}var o=s(3);n.exports=i},function(n,r){function s(i){var o=this.__data__,a=o.delete(i);return this.size=o.size,a}n.exports=s},function(n,r){function s(i){return this.__data__.get(i)}n.exports=s},function(n,r){function s(i){return this.__data__.has(i)}n.exports=s},function(n,r,s){function i(u,d){var h=this.__data__;if(h instanceof o){var f=h.__data__;if(!a||f.length<c-1)return f.push([u,d]),this.size=++h.size,this;h=this.__data__=new l(f)}return h.set(u,d),this.size=h.size,this}var o=s(3),a=s(15),l=s(40),c=200;n.exports=i},function(n,r){function s(a){if(a!=null){try{return o.call(a)}catch{}try{return a+""}catch{}}return""}var i=Function.prototype,o=i.toString;n.exports=s},function(n,r){function s(i){return function(){return i}}n.exports=s},function(n,r,s){function i(l){return a(l)&&o(l)}var o=s(12),a=s(2);n.exports=i},function(n,r,s){function i(m){if(!l(m)||o(m)!=c)return!1;var g=a(m);if(g===null)return!0;var y=f.call(g,"constructor")&&g.constructor;return typeof y=="function"&&y instanceof y&&h.call(y)==p}var o=s(5),a=s(23),l=s(2),c="[object Object]",u=Function.prototype,d=Object.prototype,h=u.toString,f=d.hasOwnProperty,p=h.call(Object);n.exports=i},function(n,r,s){var i=s(19),o=s(61),a=o(function(l,c,u,d){i(l,c,u,d)});n.exports=a},function(n,r){function s(){return!1}n.exports=s},function(n,r,s){function i(l){return o(l,a(l))}var o=s(59),a=s(32);n.exports=i},function(n,r){n.exports=`<svg viewbox="0 0 18 18">
122
+ <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>
123
+ <line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"></line>
124
+ <line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"></line>
125
+ </svg>`},function(n,r){n.exports=`<svg viewbox="0 0 18 18">
126
+ <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line>
127
+ <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line>
128
+ <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line>
129
+ </svg>`},function(n,r){n.exports=`<svg viewbox="0 0 18 18">
130
+ <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>
131
+ <line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"></line>
132
+ <line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"></line>
133
+ </svg>`},function(n,r){var s;s=function(){return this}();try{s=s||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(s=window)}n.exports=s}])})})(D4);var ste=D4.exports;const ite=ss(ste);for(var vn=[],$1=0;$1<256;++$1)vn.push(($1+256).toString(16).slice(1));function R4(t,e=0){return(vn[t[e+0]]+vn[t[e+1]]+vn[t[e+2]]+vn[t[e+3]]+"-"+vn[t[e+4]]+vn[t[e+5]]+"-"+vn[t[e+6]]+vn[t[e+7]]+"-"+vn[t[e+8]]+vn[t[e+9]]+"-"+vn[t[e+10]]+vn[t[e+11]]+vn[t[e+12]]+vn[t[e+13]]+vn[t[e+14]]+vn[t[e+15]]).toLowerCase()}var Nf,ote=new Uint8Array(16);function I4(){if(!Nf&&(Nf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Nf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nf(ote)}var P1,Lf,D1=0,R1=0;function ate(t,e,n){var r=0,s=new Array(16);t=t||{};var i=t.node,o=t.clockseq;if(t._v6||(i||(i=P1),o==null&&(o=Lf)),i==null||o==null){var a=t.random||(t.rng||I4)();i==null&&(i=[a[0],a[1],a[2],a[3],a[4],a[5]],!P1&&!t._v6&&(i[0]|=1,P1=i)),o==null&&(o=(a[6]<<8|a[7])&16383,Lf===void 0&&!t._v6&&(Lf=o))}var l=t.msecs!==void 0?t.msecs:Date.now(),c=t.nsecs!==void 0?t.nsecs:R1+1,u=l-D1+(c-R1)/1e4;if(u<0&&t.clockseq===void 0&&(o=o+1&16383),(u<0||l>D1)&&t.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");D1=l,R1=c,Lf=o,l+=122192928e5;var d=((l&268435455)*1e4+c)%4294967296;s[r++]=d>>>24&255,s[r++]=d>>>16&255,s[r++]=d>>>8&255,s[r++]=d&255;var h=l/4294967296*1e4&268435455;s[r++]=h>>>8&255,s[r++]=h&255,s[r++]=h>>>24&15|16,s[r++]=h>>>16&255,s[r++]=o>>>8|128,s[r++]=o&255;for(var f=0;f<6;++f)s[r+f]=i[f];return R4(s)}var lte=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const N4={randomUUID:lte};function L4(t,e,n){if(N4.randomUUID&&!e&&!t)return N4.randomUUID();t=t||{};var r=t.random||(t.rng||I4)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,R4(r)}const B4=t=>{let e=t.httpHandler;return{setHttpHandler(n){e=n},httpHandler(){return e},updateHttpClientConfig(n,r){e.updateHttpClientConfig(n,r)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},j4=t=>({httpHandler:t.httpHandler()});var F4;(function(t){t.HEADER="header",t.QUERY="query"})(F4||(F4={}));var z4;(function(t){t.HEADER="header",t.QUERY="query"})(z4||(z4={}));var Pu;(function(t){t.HTTP="http",t.HTTPS="https"})(Pu||(Pu={}));var Bf;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(Bf||(Bf={}));var H4;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(H4||(H4={}));const I1="__smithy_context";var V4;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(V4||(V4={}));var U4;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(U4||(U4={}));class Pt{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const n=new Pt({...e,headers:{...e.headers}});return n.query&&(n.query=cte(n.query)),n}static isInstance(e){if(!e)return!1;const n=e;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Pt.clone(this)}}function cte(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class Ml{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const n=e;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}function xEe(t){return t}const ute=t=>e=>async n=>{if(!Pt.isInstance(n.request))return e(n);const{request:r}=n,{handlerProtocol:s=""}=t.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return e(n)},dte={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},q4=t=>({applyToStack:e=>{e.add(ute(t),dte)}}),hte=()=>(t,e)=>async n=>{var r,s;try{const i=await t(n),{clientName:o,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:d}=c,h=u??e.inputFilterSensitiveLog,f=d??e.outputFilterSensitiveLog,{$metadata:p,...m}=i.output;return(r=l==null?void 0:l.info)==null||r.call(l,{clientName:o,commandName:a,input:h(n.input),output:f(m),metadata:p}),i}catch(i){const{clientName:o,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:u}=c,d=u??e.inputFilterSensitiveLog;throw(s=l==null?void 0:l.error)==null||s.call(l,{clientName:o,commandName:a,input:d(n.input),error:i,metadata:i.$metadata}),i}},fte={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},W4=t=>({applyToStack:e=>{e.add(hte(),fte)}}),G4="X-Amzn-Trace-Id",pte="AWS_LAMBDA_FUNCTION_NAME",gte="_X_AMZN_TRACE_ID",mte=t=>e=>async n=>{const{request:r}=n;if(!Pt.isInstance(r)||t.runtime!=="node"||r.headers.hasOwnProperty(G4))return e(n);const s=process.env[pte],i=process.env[gte],o=a=>typeof a=="string"&&a.length>0;return o(s)&&o(i)&&(r.headers[G4]=i),e({...n,request:r})},yte={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Y4=t=>({applyToStack:e=>{e.add(mte(t),yte)}}),aa=t=>t[I1]||(t[I1]={}),ys=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e};function bte(t){const e=new Map;for(const n of t)e.set(n.schemeId,n);return e}const vte=(t,e)=>(n,r)=>async s=>{var c;const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,r,s.input)),o=bte(t.httpAuthSchemes),a=aa(r),l=[];for(const u of i){const d=o.get(u.schemeId);if(!d){l.push(`HttpAuthScheme \`${u.schemeId}\` was not enabled for this service.`);continue}const h=d.identityProvider(await e.identityProviderConfigProvider(t));if(!h){l.push(`HttpAuthScheme \`${u.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:f={},signingProperties:p={}}=((c=u.propertiesExtractor)==null?void 0:c.call(u,t,r))||{};u.identityProperties=Object.assign(u.identityProperties||{},f),u.signingProperties=Object.assign(u.signingProperties||{},p),a.selectedHttpAuthScheme={httpAuthOption:u,identity:await h(u.identityProperties),signer:d.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(l.join(`
134
+ `));return n(s)},xte={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},K4=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(vte(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:n}),xte)}}),wte=(t,e)=>n=>async r=>{const{response:s}=await n(r);try{const i=await e(s,t);return{response:s,output:i}}catch(i){if(Object.defineProperty(i,"$response",{value:s}),!("$metadata"in i)){const o="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";i.message+=`
135
+ `+o,typeof i.$responseBodyText<"u"&&i.$response&&(i.$response.body=i.$responseBodyText)}throw i}},_te=(t,e)=>(n,r)=>async s=>{var a;const i=(a=r.endpointV2)!=null&&a.url&&t.urlParser?async()=>t.urlParser(r.endpointV2.url):t.endpoint;if(!i)throw new Error("No valid endpoint provider available.");const o=await e(s.input,{...t,endpoint:i});return n({...s,request:o})},Cte={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},N1={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function jf(t,e,n){return{applyToStack:r=>{r.add(wte(t,n),Cte),r.add(_te(t,e),N1)}}}N1.name;const Ste=t=>e=>{throw e},Ete=(t,e)=>{},Ate=t=>(e,n)=>async r=>{if(!Pt.isInstance(r.request))return e(r);const i=aa(n).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:a,signer:l}=i,c=await e({...r,request:await l.sign(r.request,a,o)}).catch((l.errorHandler||Ste)(o));return(l.successHandler||Ete)(c.response,o),c},Z4={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},X4=t=>({applyToStack:e=>{e.addRelativeTo(Ate(),Z4)}}),Ol=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},to={},$l=new Array(64);for(let t=0,e=65,n=90;t+e<=n;t++){const r=String.fromCharCode(t+e);to[r]=t,$l[t]=r}for(let t=0,e=97,n=122;t+e<=n;t++){const r=String.fromCharCode(t+e),s=t+26;to[r]=s,$l[s]=r}for(let t=0;t<10;t++){to[t.toString(10)]=t+52;const e=t.toString(10),n=t+52;to[e]=n,$l[n]=e}to["+"]=62,$l[62]="+",to["/"]=63,$l[63]="/";const Pl=6,Du=8,Tte=63,L1=t=>{let e=t.length/4*3;t.slice(-2)==="=="?e-=2:t.slice(-1)==="="&&e--;const n=new ArrayBuffer(e),r=new DataView(n);for(let s=0;s<t.length;s+=4){let i=0,o=0;for(let c=s,u=s+3;c<=u;c++)if(t[c]!=="="){if(!(t[c]in to))throw new TypeError(`Invalid character ${t[c]} in base64 string.`);i|=to[t[c]]<<(u-c)*Pl,o+=Pl}else i>>=Pl;const a=s/4*3;i>>=o%Du;const l=Math.floor(o/Du);for(let c=0;c<l;c++){const u=(l-c-1)*Du;r.setUint8(a+c,(i&255<<u)>>u)}}return new Uint8Array(n)},no=t=>new TextEncoder().encode(t),Dl=t=>typeof t=="string"?no(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),Ff=t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(t)};function Ru(t){let e;typeof t=="string"?e=no(t):e=t;const n=typeof e=="object"&&typeof e.length=="number",r=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let i=0;i<e.length;i+=3){let o=0,a=0;for(let c=i,u=Math.min(i+3,e.length);c<u;c++)o|=e[c]<<(u-c-1)*Du,a+=Du;const l=Math.ceil(a/Pl);o<<=l*Pl-a;for(let c=1;c<=l;c++){const u=(l-c)*Pl;s+=$l[(o&Tte<<u)>>u]}s+="==".slice(0,4-l)}return s}function kte(t,e="utf-8"){return e==="base64"?Ru(t):Ff(t)}function Mte(t,e){return e==="base64"?la.mutate(L1(t)):la.mutate(no(t))}class la extends Uint8Array{static fromString(e,n="utf-8"){switch(typeof e){case"string":return Mte(e,n);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,la.prototype),e}transformToString(e="utf-8"){return kte(this,e)}}const Ote=(t,e)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:s,checksumLocationName:i,streamHasher:o}=e,a=n!==void 0&&r!==void 0&&s!==void 0&&i!==void 0&&o!==void 0,l=a?o(s,t):void 0,c=t.getReader();return new ReadableStream({async pull(u){const{value:d,done:h}=await c.read();if(h){if(u.enqueue(`0\r
136
+ `),a){const f=n(await l);u.enqueue(`${i}:${f}\r
137
+ `),u.enqueue(`\r
138
+ `)}u.close()}else u.enqueue(`${(r(d)||0).toString(16)}\r
139
+ ${d}\r
140
+ `)}})},ca=t=>encodeURIComponent(t).replace(/[!'()*]/g,$te),$te=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function Q4(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=ca(n),Array.isArray(r))for(let s=0,i=r.length;s<i;s++)e.push(`${n}=${ca(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${ca(r)}`),e.push(s)}}return e.join("&")}function J4(t,e){return new Request(t,e)}function Pte(t=0){return new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)})}const B1={supported:void 0};class zf{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new zf(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),B1.supported===void 0&&(B1.supported=typeof Request<"u"&&"keepalive"in J4("https://[::1]"))}destroy(){}async handle(e,{abortSignal:n}={}){var y;this.config||(this.config=await this.configProvider);const r=this.config.requestTimeout,s=this.config.keepAlive===!0,i=this.config.credentials;if(n!=null&&n.aborted){const v=new Error("Request aborted");return v.name="AbortError",Promise.reject(v)}let o=e.path;const a=Q4(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let l="";if(e.username!=null||e.password!=null){const v=e.username??"",b=e.password??"";l=`${v}:${b}@`}const{port:c,method:u}=e,d=`${e.protocol}//${l}${e.hostname}${c?`:${c}`:""}${o}`,h=u==="GET"||u==="HEAD"?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:u,credentials:i};(y=this.config)!=null&&y.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),typeof AbortController<"u"&&(f.signal=n),B1.supported&&(f.keepalive=s),typeof this.config.requestInit=="function"&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=J4(d,f),g=[fetch(m).then(v=>{const b=v.headers,C={};for(const k of b.entries())C[k[0]]=k[1];return v.body!=null?{response:new Ml({headers:C,reason:v.statusText,statusCode:v.status,body:v.body})}:v.blob().then(k=>({response:new Ml({headers:C,reason:v.statusText,statusCode:v.status,body:k})}))}),Pte(r)];return n&&g.push(new Promise((v,b)=>{const C=()=>{const _=new Error("Request aborted");_.name="AbortError",b(_)};if(typeof n.addEventListener=="function"){const _=n;_.addEventListener("abort",C,{once:!0}),p=()=>_.removeEventListener("abort",C)}else n.onabort=C})),Promise.race(g).finally(p)}updateHttpClientConfig(e,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[e]=n,r))}httpHandlerConfigs(){return this.config??{}}}const j1=async t=>{var e;return typeof Blob=="function"&&t instanceof Blob||((e=t.constructor)==null?void 0:e.name)==="Blob"?new Uint8Array(await t.arrayBuffer()):Dte(t)};async function Dte(t){const e=[],n=t.getReader();let r=!1,s=0;for(;!r;){const{done:a,value:l}=await n.read();l&&(e.push(l),s+=l.length),r=a}const i=new Uint8Array(s);let o=0;for(const a of e)i.set(a,o),o+=a.length;return i}const eA={},F1={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),eA[t]=e,F1[e]=t}function tA(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2){const r=t.slice(n,n+2).toLowerCase();if(r in F1)e[n/2]=F1[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function ir(t){let e="";for(let n=0;n<t.byteLength;n++)e+=eA[t[n]];return e}const z1=t=>{var e;return typeof ReadableStream=="function"&&(((e=t==null?void 0:t.constructor)==null?void 0:e.name)===ReadableStream.name||t instanceof ReadableStream)},nA="The stream has already been transformed.",Rte=t=>{var s,i;if(!rA(t)&&!z1(t)){const o=((i=(s=t==null?void 0:t.__proto__)==null?void 0:s.constructor)==null?void 0:i.name)||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let e=!1;const n=async()=>{if(e)throw new Error(nA);return e=!0,await j1(t)},r=o=>{if(typeof o.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
141
+ If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return o.stream()};return Object.assign(t,{transformToByteArray:n,transformToString:async o=>{const a=await n();if(o==="base64")return Ru(a);if(o==="hex")return ir(a);if(o===void 0||o==="utf8"||o==="utf-8")return Ff(a);if(typeof TextDecoder=="function")return new TextDecoder(o).decode(a);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(e)throw new Error(nA);if(e=!0,rA(t))return r(t);if(z1(t))return t;throw new Error(`Cannot transform payload to web stream, got ${t}`)}})},rA=t=>typeof Blob=="function"&&t instanceof Blob;async function Ite(t){return typeof t.stream=="function"&&(t=t.stream()),t.tee()}async function Nte(t,e){let n=0;const r=[],s=t.getReader();let i=!1;for(;!i;){const{done:l,value:c}=await s.read();if(c&&(r.push(c),n+=(c==null?void 0:c.byteLength)??0),n>=e)break;i=l}s.releaseLock();const o=new Uint8Array(Math.min(e,n));let a=0;for(const l of r){if(l.byteLength>o.byteLength-a){o.set(l.subarray(0,o.byteLength-a),a);break}else o.set(l,a);a+=l.length}return o}const Lte=typeof ReadableStream=="function"?ReadableStream:function(){};class Bte extends Lte{}const jte=({expectedChecksum:t,checksum:e,source:n,checksumSourceLocation:r,base64Encoder:s})=>{var l;if(!z1(n))throw new Error(`@smithy/util-stream: unsupported source type ${((l=n==null?void 0:n.constructor)==null?void 0:l.name)??n} in ChecksumStream.`);const i=s??Ru;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const o=new TransformStream({start(){},async transform(c,u){e.update(c),u.enqueue(c)},async flush(c){const u=await e.digest(),d=i(u);if(t!==d){const h=new Error(`Checksum mismatch: expected "${t}" but received "${d}" in response header "${r}".`);c.error(h)}else c.terminate()}});n.pipeThrough(o);const a=o.readable;return Object.setPrototypeOf(a,Bte.prototype),a},sA=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return la.mutate(t);if(!t)return la.mutate(new Uint8Array);const n=e.streamCollector(t);return la.mutate(await n)};function iA(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}const Fte=(t,e,n,r,s,i)=>{if(e!=null&&e[n]!==void 0){const o=r();if(o.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");t=t.replace(s,i?o.split("/").map(a=>iA(a)).join("/"):iA(o))}else throw new Error("No value provided for input HTTP label: "+n+".");return t};function H1(t,e){return new zte(t,e)}class zte{constructor(e,n){this.input=e,this.context=n,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:n="https",port:r,path:s}=await this.context.endpoint();this.path=s;for(const i of this.resolvePathStack)i(this.path);return new Pt({protocol:n,hostname:this.hostname||e,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(n=>{this.path=`${n!=null&&n.endsWith("/")?n.slice(0,-1):n||""}`+e}),this}p(e,n,r,s){return this.resolvePathStack.push(i=>{this.path=Fte(i,this.input,e,n,r,s)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}function Hte(t,e,n){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=n}class oA{constructor(e){this.authSchemes=new Map;for(const[n,r]of Object.entries(e))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(e){return this.authSchemes.get(e)}}const Vte=(t=>e=>aA(e)&&e.expiration.getTime()-Date.now()<t)(3e5),aA=t=>t.expiration!==void 0,Ute=(t,e,n)=>{if(t===void 0)return;const r=typeof t!="function"?async()=>Promise.resolve(t):t;let s,i,o,a=!1;const l=async c=>{i||(i=r(c));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return e===void 0?async c=>((!o||c!=null&&c.forceRefresh)&&(s=await l(c)),s):async c=>((!o||c!=null&&c.forceRefresh)&&(s=await l(c)),a?s:n(s)?(e(s)&&await l(c),s):(a=!0,s))},qte=void 0;function Wte(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function lA(t){const e=Ol(t.userAgentAppId??qte);return{...t,customUserAgent:typeof t.customUserAgent=="string"?[[t.customUserAgent]]:t.customUserAgent,userAgentAppId:async()=>{var r,s;const n=await e();if(!Wte(n)){const i=((s=(r=t.logger)==null?void 0:r.constructor)==null?void 0:s.name)==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?i==null||i.warn("userAgentAppId must be a string or undefined."):n.length>50&&(i==null||i.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."))}return n}}}class cA{constructor({size:e,params:n}){this.data=new Map,this.parameters=[],this.capacity=e??50,n&&(this.parameters=n)}get(e,n){const r=this.hash(e);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const s=this.data.keys();let i=0;for(;;){const{value:o,done:a}=s.next();if(this.data.delete(o),a||++i>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(e){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const s of r){const i=String(e[s]??"");if(i.includes("|;"))return!1;n+=i+"|;"}return n}}const Gte=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),uA=t=>Gte.test(t)||t.startsWith("[")&&t.endsWith("]"),Yte=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),V1=(t,e=!1)=>{if(!e)return Yte.test(t);const n=t.split(".");for(const r of n)if(!V1(r))return!1;return!0},Iu={},Nu="endpoints";function ro(t){return typeof t!="object"||t==null?t:"ref"in t?`$${ro(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(ro).join(", ")})`:JSON.stringify(t,null,2)}class _r extends Error{constructor(e){super(e),this.name="EndpointError"}}const Kte=(t,e)=>t===e,Zte=t=>{const e=t.split("."),n=[];for(const r of e){const s=r.indexOf("[");if(s!==-1){if(r.indexOf("]")!==r.length-1)throw new _r(`Path: '${t}' does not end with ']'`);const i=r.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new _r(`Invalid array index: '${i}' in path: '${t}'`);s!==0&&n.push(r.slice(0,s)),n.push(i)}else n.push(r)}return n},dA=(t,e)=>Zte(e).reduce((n,r)=>{if(typeof n!="object")throw new _r(`Index '${r}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},t),Xte=t=>t!=null,Qte=t=>!t,U1={[Pu.HTTP]:80,[Pu.HTTPS]:443},Jte={booleanEquals:Kte,getAttr:dA,isSet:Xte,isValidHostLabel:V1,not:Qte,parseURL:t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:h,port:f,protocol:p="",path:m="",query:g={}}=t,y=new URL(`${p}//${h}${f?`:${f}`:""}${m}`);return y.search=Object.entries(g).map(([v,b])=>`${v}=${b}`).join("&"),y}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;const n=e.href,{host:r,hostname:s,pathname:i,protocol:o,search:a}=e;if(a)return null;const l=o.slice(0,-1);if(!Object.values(Pu).includes(l))return null;const c=uA(s),u=n.includes(`${r}:${U1[l]}`)||typeof t=="string"&&t.includes(`${r}:${U1[l]}`),d=`${r}${u?`:${U1[l]}`:""}`;return{scheme:l,authority:d,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:c}},stringEquals:(t,e)=>t===e,substring:(t,e,n,r)=>e>=n||t.length<n?null:r?t.substring(t.length-n,t.length-e):t.substring(e,n),uriEncode:t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},hA=(t,e)=>{const n=[],r={...e.endpointParams,...e.referenceRecord};let s=0;for(;s<t.length;){const i=t.indexOf("{",s);if(i===-1){n.push(t.slice(s));break}n.push(t.slice(s,i));const o=t.indexOf("}",i);if(o===-1){n.push(t.slice(i));break}t[i+1]==="{"&&t[o+1]==="}"&&(n.push(t.slice(i+1,o)),s=o+2);const a=t.substring(i+1,o);if(a.includes("#")){const[l,c]=a.split("#");n.push(dA(r[l],c))}else n.push(r[a]);s=o+1}return n.join("")},ene=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],Hf=(t,e,n)=>{if(typeof t=="string")return hA(t,n);if(t.fn)return fA(t,n);if(t.ref)return ene(t,n);throw new _r(`'${e}': ${String(t)} is not a string, function or reference.`)},fA=({fn:t,argv:e},n)=>{const r=e.map(i=>["boolean","number"].includes(typeof i)?i:Hf(i,"arg",n)),s=t.split(".");return s[0]in Iu&&s[1]!=null?Iu[s[0]][s[1]](...r):Jte[t](...r)},tne=({assign:t,...e},n)=>{var s,i;if(t&&t in n.referenceRecord)throw new _r(`'${t}' is already defined in Reference Record.`);const r=fA(e,n);return(i=(s=n.logger)==null?void 0:s.debug)==null||i.call(s,`${Nu} evaluateCondition: ${ro(e)} = ${ro(r)}`),{result:r===""?!0:!!r,...t!=null&&{toAssign:{name:t,value:r}}}},q1=(t=[],e)=>{var r,s;const n={};for(const i of t){const{result:o,toAssign:a}=tne(i,{...e,referenceRecord:{...e.referenceRecord,...n}});if(!o)return{result:o};a&&(n[a.name]=a.value,(s=(r=e.logger)==null?void 0:r.debug)==null||s.call(r,`${Nu} assign: ${a.name} := ${ro(a.value)}`))}return{result:!0,referenceRecord:n}},nne=(t,e)=>Object.entries(t).reduce((n,[r,s])=>({...n,[r]:s.map(i=>{const o=Hf(i,"Header value entry",e);if(typeof o!="string")throw new _r(`Header '${r}' value '${o}' is not a string`);return o})}),{}),pA=(t,e)=>{if(Array.isArray(t))return t.map(n=>pA(n,e));switch(typeof t){case"string":return hA(t,e);case"object":if(t===null)throw new _r(`Unexpected endpoint property: ${t}`);return gA(t,e);case"boolean":return t;default:throw new _r(`Unexpected endpoint property type: ${typeof t}`)}},gA=(t,e)=>Object.entries(t).reduce((n,[r,s])=>({...n,[r]:pA(s,e)}),{}),rne=(t,e)=>{const n=Hf(t,"Endpoint URL",e);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new _r(`Endpoint URL must be a string, got ${typeof n}`)},sne=(t,e)=>{var u,d;const{conditions:n,endpoint:r}=t,{result:s,referenceRecord:i}=q1(n,e);if(!s)return;const o={...e,referenceRecord:{...e.referenceRecord,...i}},{url:a,properties:l,headers:c}=r;return(d=(u=e.logger)==null?void 0:u.debug)==null||d.call(u,`${Nu} Resolving endpoint from template: ${ro(r)}`),{...c!=null&&{headers:nne(c,o)},...l!=null&&{properties:gA(l,o)},url:rne(a,o)}},ine=(t,e)=>{const{conditions:n,error:r}=t,{result:s,referenceRecord:i}=q1(n,e);if(s)throw new _r(Hf(r,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},one=(t,e)=>{const{conditions:n,rules:r}=t,{result:s,referenceRecord:i}=q1(n,e);if(s)return mA(r,{...e,referenceRecord:{...e.referenceRecord,...i}})},mA=(t,e)=>{for(const n of t)if(n.type==="endpoint"){const r=sne(n,e);if(r)return r}else if(n.type==="error")ine(n,e);else if(n.type==="tree"){const r=one(n,e);if(r)return r}else throw new _r(`Unknown endpoint rule: ${n}`);throw new _r("Rules evaluation failed")},yA=(t,e)=>{var c,u,d,h;const{endpointParams:n,logger:r}=e,{parameters:s,rules:i}=t;(u=(c=e.logger)==null?void 0:c.debug)==null||u.call(c,`${Nu} Initial EndpointParams: ${ro(n)}`);const o=Object.entries(s).filter(([,f])=>f.default!=null).map(([f,p])=>[f,p.default]);if(o.length>0)for(const[f,p]of o)n[f]=n[f]??p;const a=Object.entries(s).filter(([,f])=>f.required).map(([f])=>f);for(const f of a)if(n[f]==null)throw new _r(`Missing required parameter: '${f}'`);const l=mA(i,{endpointParams:n,logger:r,referenceRecord:{}});return(h=(d=e.logger)==null?void 0:d.debug)==null||h.call(d,`${Nu} Resolved endpoint: ${ro(l)}`),l},bA=(t,e=!1)=>{if(e){for(const n of t.split("."))if(!bA(n))return!1;return!0}return!(!V1(t)||t.length<3||t.length>63||t!==t.toLowerCase()||uA(t))},vA=":",ane="/",lne=t=>{const e=t.split(vA);if(e.length<6)return null;const[n,r,s,i,o,...a]=e;if(n!=="arn"||r===""||s===""||a.join(vA)==="")return null;const l=a.map(c=>c.split(ane)).flat();return{partition:r,service:s,region:i,accountId:o,resourceId:l}};let cne={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const W1={isVirtualHostableS3Bucket:bA,parseArn:lne,partition:t=>{const{partitions:e}=cne;for(const r of e){const{regions:s,outputs:i}=r;for(const[o,a]of Object.entries(s))if(o===t)return{...i,...a}}for(const r of e){const{regionRegex:s,outputs:i}=r;if(new RegExp(s).test(t))return{...i}}const n=e.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};Iu.aws=W1;function une(t,e,n){return t.$source||(t.$source={}),t.$source[e]=n,t}function Wn(t,e,n){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=n}const xA=t=>{var e,n;return Ml.isInstance(t)?((e=t.headers)==null?void 0:e.date)??((n=t.headers)==null?void 0:n.Date):void 0},G1=t=>new Date(Date.now()+t),dne=(t,e)=>Math.abs(G1(e).getTime()-t)>=3e5,wA=(t,e)=>{const n=Date.parse(t);return dne(n,e)?n-Date.now():e},Lu=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},_A=async t=>{var c,u,d;const e=Lu("context",t.context),n=Lu("config",t.config),r=(d=(u=(c=e.endpointV2)==null?void 0:c.properties)==null?void 0:u.authSchemes)==null?void 0:d[0],i=await Lu("signer",n.signer)(r),o=t==null?void 0:t.signingRegion,a=t==null?void 0:t.signingRegionSet,l=t==null?void 0:t.signingName;return{config:n,signer:i,signingRegion:o,signingRegionSet:a,signingName:l}};class Y1{async sign(e,n,r){var d;if(!Pt.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await _A(r),{config:i,signer:o}=s;let{signingRegion:a,signingName:l}=s;const c=r.context;if(((d=c==null?void 0:c.authSchemes)==null?void 0:d.length)??!1){const[h,f]=c.authSchemes;(h==null?void 0:h.name)==="sigv4a"&&(f==null?void 0:f.name)==="sigv4"&&(a=(f==null?void 0:f.signingRegion)??a,l=(f==null?void 0:f.signingName)??l)}return await o.sign(e,{signingDate:G1(i.systemClockOffset),signingRegion:a,signingService:l})}errorHandler(e){return n=>{const r=n.ServerTime??xA(n.$response);if(r){const s=Lu("config",e.config),i=s.systemClockOffset;s.systemClockOffset=wA(r,s.systemClockOffset),s.systemClockOffset!==i&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(e,n){const r=xA(e);if(r){const s=Lu("config",n.config);s.systemClockOffset=wA(r,s.systemClockOffset)}}}class hne extends Y1{async sign(e,n,r){var h;if(!Pt.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:l}=await _A(r),u=(await((h=s.sigv4aSigningRegionSet)==null?void 0:h.call(s))??a??[o]).join(",");return await i.sign(e,{signingDate:G1(s.systemClockOffset),signingRegion:u,signingService:l})}}const fne=(t,e,n)=>{let r,s,i,o=!1;const a=async()=>{s||(s=t());try{r=await s,i=!0,o=!1}finally{s=void 0}return r};return async l=>((!i||l!=null&&l.forceRefresh)&&(r=await a()),r)},pne=t=>(t.sigv4aSigningRegionSet=Ol(t.sigv4aSigningRegionSet),t),gne="X-Amz-Algorithm",mne="X-Amz-Credential",CA="X-Amz-Date",yne="X-Amz-SignedHeaders",bne="X-Amz-Expires",SA="X-Amz-Signature",EA="X-Amz-Security-Token",AA="authorization",TA=CA.toLowerCase(),vne=[AA,TA,"date"],xne=SA.toLowerCase(),K1="x-amz-content-sha256",wne=EA.toLowerCase(),_ne={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Cne=/^proxy-/,Sne=/^sec-/,Z1="AWS4-HMAC-SHA256",Ene="AWS4-HMAC-SHA256-PAYLOAD",Ane="UNSIGNED-PAYLOAD",Tne=50,kA="aws4_request",kne=60*60*24*7,Vf={},X1=[],Q1=(t,e,n)=>`${t}/${e}/${n}/${kA}`,Mne=async(t,e,n,r,s)=>{const i=await MA(t,e.secretAccessKey,e.accessKeyId),o=`${n}:${r}:${s}:${ir(i)}:${e.sessionToken}`;if(o in Vf)return Vf[o];for(X1.push(o);X1.length>Tne;)delete Vf[X1.shift()];let a=`AWS4${e.secretAccessKey}`;for(const l of[n,r,s,kA])a=await MA(t,a,l);return Vf[o]=a},MA=(t,e,n)=>{const r=new t(e);return r.update(Dl(n)),r.digest()},OA=({headers:t},e,n)=>{const r={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const i=s.toLowerCase();(i in _ne||e!=null&&e.has(i)||Cne.test(i)||Sne.test(i))&&(!n||n&&!n.has(i))||(r[i]=t[s].trim().replace(/\s+/g," "))}return r},One=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===xne)continue;const s=ca(r);e.push(s);const i=t[r];typeof i=="string"?n[s]=`${s}=${ca(i)}`:Array.isArray(i)&&(n[s]=i.slice(0).reduce((o,a)=>o.concat([`${s}=${ca(a)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},$A=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",J1=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===K1)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||$A(e)){const r=new n;return r.update(Dl(e)),ir(await r.digest())}return Ane};class $ne{format(e){const n=[];for(const i of Object.keys(e)){const o=no(i);n.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[i]))}const r=new Uint8Array(n.reduce((i,o)=>i+o.byteLength,0));let s=0;for(const i of n)r.set(i,s),s+=i.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const a=no(e.value),l=new DataView(new ArrayBuffer(3+a.byteLength));l.setUint8(0,7),l.setUint16(1,a.byteLength,!1);const c=new Uint8Array(l.buffer);return c.set(a,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Dne.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Pne.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(tA(e.value.replace(/\-/g,"")),1),d}}}var PA;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(PA||(PA={}));const Pne=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Dne=class Z${constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(e));r>-1&&s>0;r--,s/=256)n[r]=s;return e<0&&DA(n),new Z$(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&DA(e),parseInt(ir(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function DA(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Rne=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},Ine=(t,e={})=>{var s,i;const{headers:n,query:r={}}=Pt.clone(t);for(const o of Object.keys(n)){const a=o.toLowerCase();(a.slice(0,6)==="x-amz-"&&!((s=e.unhoistableHeaders)!=null&&s.has(a))||(i=e.hoistableHeaders)!=null&&i.has(a))&&(r[o]=n[o],delete n[o])}return{...t,headers:n,query:r}},RA=t=>{t=Pt.clone(t);for(const e of Object.keys(t.headers))vne.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Nne=t=>Lne(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Lne=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class ey{constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:i,uriEscapePath:o=!0}){this.headerFormatter=new $ne,this.service=s,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=ys(r),this.credentialProvider=ys(n)}async presign(e,n={}){const{signingDate:r=new Date,expiresIn:s=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:a,hoistableHeaders:l,signingRegion:c,signingService:u}=n,d=await this.credentialProvider();this.validateResolvedCredentials(d);const h=c??await this.regionProvider(),{longDate:f,shortDate:p}=Uf(r);if(s>kne)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=Q1(p,h,u??this.service),g=Ine(RA(e),{unhoistableHeaders:o,hoistableHeaders:l});d.sessionToken&&(g.query[EA]=d.sessionToken),g.query[gne]=Z1,g.query[mne]=`${d.accessKeyId}/${m}`,g.query[CA]=f,g.query[bne]=s.toString(10);const y=OA(g,i,a);return g.query[yne]=IA(y),g.query[SA]=await this.getSignature(f,m,this.getSigningKey(d,h,p,u),this.createCanonicalRequest(g,y,await J1(e,this.sha256))),g}async sign(e,n){return typeof e=="string"?this.signString(e,n):e.headers&&e.payload?this.signEvent(e,n):e.message?this.signMessage(e,n):this.signRequest(e,n)}async signEvent({headers:e,payload:n},{signingDate:r=new Date,priorSignature:s,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:l,longDate:c}=Uf(r),u=Q1(l,a,o??this.service),d=await J1({headers:{},body:n},this.sha256),h=new this.sha256;h.update(e);const f=ir(await h.digest()),p=[Ene,c,u,s,f,d].join(`
142
+ `);return this.signString(p,{signingDate:r,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:n=new Date,signingRegion:r,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:r,signingService:s,priorSignature:e.priorSignature}).then(o=>({message:e.message,signature:o}))}async signString(e,{signingDate:n=new Date,signingRegion:r,signingService:s}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=r??await this.regionProvider(),{shortDate:a}=Uf(n),l=new this.sha256(await this.getSigningKey(i,o,a,s));return l.update(Dl(e)),ir(await l.digest())}async signRequest(e,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:s,signingRegion:i,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const l=i??await this.regionProvider(),c=RA(e),{longDate:u,shortDate:d}=Uf(n),h=Q1(d,l,o??this.service);c.headers[TA]=u,a.sessionToken&&(c.headers[wne]=a.sessionToken);const f=await J1(c,this.sha256);!Rne(K1,c.headers)&&this.applyChecksum&&(c.headers[K1]=f);const p=OA(c,s,r),m=await this.getSignature(u,h,this.getSigningKey(a,l,d,o),this.createCanonicalRequest(c,p,f));return c.headers[AA]=`${Z1} Credential=${a.accessKeyId}/${h}, SignedHeaders=${IA(p)}, Signature=${m}`,c}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
143
+ ${this.getCanonicalPath(e)}
144
+ ${One(e)}
145
+ ${s.map(i=>`${i}:${n[i]}`).join(`
146
+ `)}
147
+
148
+ ${s.join(";")}
149
+ ${r}`}async createStringToSign(e,n,r){const s=new this.sha256;s.update(Dl(r));const i=await s.digest();return`${Z1}
150
+ ${e}
151
+ ${n}
152
+ ${ir(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const n=[];for(const i of e.split("/"))(i==null?void 0:i.length)!==0&&i!=="."&&(i===".."?n.pop():n.push(i));const r=`${e!=null&&e.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&(e!=null&&e.endsWith("/"))?"/":""}`;return ca(r).replace(/%2F/g,"/")}return e}async getSignature(e,n,r,s){const i=await this.createStringToSign(e,n,s),o=new this.sha256(await r);return o.update(Dl(i)),ir(await o.digest())}getSigningKey(e,n,r,s){return Mne(this.sha256,e,r,n,s||this.service)}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}}const Uf=t=>{const e=Nne(t).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.slice(0,8)}},IA=t=>Object.keys(t).sort().join(";"),NA=t=>{let e=!1,n;t.credentials&&(e=!0,n=Ute(t.credentials,Vte,aA)),n||(t.credentialDefaultProvider?n=Ol(t.credentialDefaultProvider(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("`credentials` is missing")});const r=async()=>n({callerClientConfig:t}),{signingEscapePath:s=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=Ol(t.signer):t.regionInfoProvider?a=()=>Ol(t.region)().then(async l=>[await t.regionInfoProvider(l,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},l]).then(([l,c])=>{const{signingRegion:u,signingService:d}=l;t.signingRegion=t.signingRegion||u||c,t.signingName=t.signingName||d||t.serviceId;const h={...t,credentials:r,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:s},f=t.signerConstructor||ey;return new f(h)}):a=async l=>{l=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await Ol(t.region)(),properties:{}},l);const c=l.signingRegion,u=l.signingName;t.signingRegion=t.signingRegion||c,t.signingName=t.signingName||u||t.serviceId;const d={...t,credentials:r,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:s},h=t.signerConstructor||ey;return new h(d)},{...t,systemClockOffset:i,signingEscapePath:s,credentials:e?async()=>r().then(l=>une(l,"CREDENTIALS_CODE","e")):r,signer:a}},ua=(t,e)=>{const n=[];if(t&&n.push(t),e)for(const r of e)n.push(r);return n},so=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,qf=()=>{let t=[],e=[],n=!1;const r=new Set,s=d=>d.sort((h,f)=>LA[f.step]-LA[h.step]||BA[f.priority||"normal"]-BA[h.priority||"normal"]),i=d=>{let h=!1;const f=p=>{const m=ua(p.name,p.aliases);if(m.includes(d)){h=!0;for(const g of m)r.delete(g);return!1}return!0};return t=t.filter(f),e=e.filter(f),h},o=d=>{let h=!1;const f=p=>{if(p.middleware===d){h=!0;for(const m of ua(p.name,p.aliases))r.delete(m);return!1}return!0};return t=t.filter(f),e=e.filter(f),h},a=d=>{var h;return t.forEach(f=>{d.add(f.middleware,{...f})}),e.forEach(f=>{d.addRelativeTo(f.middleware,{...f})}),(h=d.identifyOnResolve)==null||h.call(d,u.identifyOnResolve()),d},l=d=>{const h=[];return d.before.forEach(f=>{f.before.length===0&&f.after.length===0?h.push(f):h.push(...l(f))}),h.push(d),d.after.reverse().forEach(f=>{f.before.length===0&&f.after.length===0?h.push(f):h.push(...l(f))}),h},c=(d=!1)=>{const h=[],f=[],p={};return t.forEach(g=>{const y={...g,before:[],after:[]};for(const v of ua(y.name,y.aliases))p[v]=y;h.push(y)}),e.forEach(g=>{const y={...g,before:[],after:[]};for(const v of ua(y.name,y.aliases))p[v]=y;f.push(y)}),f.forEach(g=>{if(g.toMiddleware){const y=p[g.toMiddleware];if(y===void 0){if(d)return;throw new Error(`${g.toMiddleware} is not found when adding ${so(g.name,g.aliases)} middleware ${g.relation} ${g.toMiddleware}`)}g.relation==="after"&&y.after.push(g),g.relation==="before"&&y.before.push(g)}}),s(h).map(l).reduce((g,y)=>(g.push(...y),g),[])},u={add:(d,h={})=>{const{name:f,override:p,aliases:m}=h,g={step:"initialize",priority:"normal",middleware:d,...h},y=ua(f,m);if(y.length>0){if(y.some(v=>r.has(v))){if(!p)throw new Error(`Duplicate middleware name '${so(f,m)}'`);for(const v of y){const b=t.findIndex(_=>{var k;return _.name===v||((k=_.aliases)==null?void 0:k.some(E=>E===v))});if(b===-1)continue;const C=t[b];if(C.step!==g.step||g.priority!==C.priority)throw new Error(`"${so(C.name,C.aliases)}" middleware with ${C.priority} priority in ${C.step} step cannot be overridden by "${so(f,m)}" middleware with ${g.priority} priority in ${g.step} step.`);t.splice(b,1)}}for(const v of y)r.add(v)}t.push(g)},addRelativeTo:(d,h)=>{const{name:f,override:p,aliases:m}=h,g={middleware:d,...h},y=ua(f,m);if(y.length>0){if(y.some(v=>r.has(v))){if(!p)throw new Error(`Duplicate middleware name '${so(f,m)}'`);for(const v of y){const b=e.findIndex(_=>{var k;return _.name===v||((k=_.aliases)==null?void 0:k.some(E=>E===v))});if(b===-1)continue;const C=e[b];if(C.toMiddleware!==g.toMiddleware||C.relation!==g.relation)throw new Error(`"${so(C.name,C.aliases)}" middleware ${C.relation} "${C.toMiddleware}" middleware cannot be overridden by "${so(f,m)}" middleware ${g.relation} "${g.toMiddleware}" middleware.`);e.splice(b,1)}}for(const v of y)r.add(v)}e.push(g)},clone:()=>a(qf()),use:d=>{d.applyToStack(u)},remove:d=>typeof d=="string"?i(d):o(d),removeByTag:d=>{let h=!1;const f=p=>{const{tags:m,name:g,aliases:y}=p;if(m&&m.includes(d)){const v=ua(g,y);for(const b of v)r.delete(b);return h=!0,!1}return!0};return t=t.filter(f),e=e.filter(f),h},concat:d=>{var f;const h=a(qf());return h.use(d),h.identifyOnResolve(n||h.identifyOnResolve()||(((f=d.identifyOnResolve)==null?void 0:f.call(d))??!1)),h},applyToStack:a,identify:()=>c(!0).map(d=>{const h=d.step??d.relation+" "+d.toMiddleware;return so(d.name,d.aliases)+" - "+h}),identifyOnResolve(d){return typeof d=="boolean"&&(n=d),n},resolve:(d,h)=>{for(const f of c().map(p=>p.middleware).reverse())d=f(d,h);return n&&console.log(u.identify()),d}};return u},LA={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},BA={high:3,normal:2,low:1};class jA{constructor(e){this.config=e,this.middlewareStack=qf()}send(e,n,r){const s=typeof n!="function"?n:void 0,i=typeof n=="function"?n:r,o=s===void 0&&this.config.cacheMiddleware===!0;let a;if(o){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(e.constructor)?a=l.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,s),l.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,s);if(i)a(e).then(l=>i(null,l.output),l=>i(l)).catch(()=>{});else return a(e).then(l=>l.output)}destroy(){var e,n,r;(r=(n=(e=this.config)==null?void 0:e.requestHandler)==null?void 0:n.destroy)==null||r.call(n),delete this.handlers}}class Bu{constructor(){this.middlewareStack=qf()}static classBuilder(){return new Bne}resolveMiddlewareWithContext(e,n,r,{middlewareFn:s,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const g of s.bind(this)(d,e,n,r))this.middlewareStack.use(g);const h=e.concat(this.middlewareStack),{logger:f}=n,p={logger:f,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,[I1]:{commandInstance:this,...c},...u},{requestHandler:m}=n;return h.resolve(g=>m.handle(g.request,r||{}),p)}}class Bne{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,n,r={}){return this._smithyContext={service:e,operation:n,...r},this}c(e={}){return this._additionalContext=e,this}n(e,n){return this._clientName=e,this._commandName=n,this}f(e=r=>r,n=r=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=n,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let n;return n=class extends Bu{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,s,i){return this.resolveMiddlewareWithContext(r,s,i,{CommandCtor:n,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Gn="***SensitiveInformation***",Wf=t=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}},Gf=t=>{if(t!=null){if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return String(e)!==String(t)&&WA.warn(qA(`Expected number but observed string: ${t}`)),e}if(typeof t=="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)}},jne=Math.ceil(2**127*(2-2**-23)),FA=t=>{const e=Gf(t);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0&&Math.abs(e)>jne)throw new TypeError(`Expected 32-bit float, got ${t}`);return e},ty=t=>{if(t!=null){if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)}},zA=t=>ny(t,32),HA=t=>ny(t,16),VA=t=>ny(t,8),ny=(t,e)=>{const n=ty(t);if(n!==void 0&&Fne(n,e)!==n)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return n},Fne=(t,e)=>{switch(e){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},Rl=(t,e)=>{if(t==null)throw e?new TypeError(`Expected a non-null value for ${e}`):new TypeError("Expected a non-null value");return t},zne=t=>{if(t==null)return;if(typeof t=="object"&&!Array.isArray(t))return t;const e=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${e}: ${t}`)},Si=t=>{if(t!=null){if(typeof t=="string")return t;if(["boolean","number","bigint"].includes(typeof t))return WA.warn(qA(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)}},Hne=t=>Gf(typeof t=="string"?Il(t):t),Vne=t=>FA(typeof t=="string"?Il(t):t),Une=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Il=t=>{const e=t.match(Une);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)},UA=t=>ty(typeof t=="string"?Il(t):t),ry=t=>zA(typeof t=="string"?Il(t):t),Yf=t=>HA(typeof t=="string"?Il(t):t),qne=t=>VA(typeof t=="string"?Il(t):t),qA=t=>String(new TypeError(t).stack||t).split(`
153
+ `).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(`
154
+ `),WA={warn:console.warn},Wne=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sy=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Kf(t){const e=t.getUTCFullYear(),n=t.getUTCMonth(),r=t.getUTCDay(),s=t.getUTCDate(),i=t.getUTCHours(),o=t.getUTCMinutes(),a=t.getUTCSeconds(),l=s<10?`0${s}`:`${s}`,c=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`;return`${Wne[r]}, ${l} ${sy[n]} ${e} ${c}:${u}:${d} GMT`}const Gne=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),GA=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=Gne.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,s,i,o,a,l,c,u]=e,d=Yf(ju(r)),h=io(s,"month",1,12),f=io(i,"day",1,31),p=Zf(d,h,f,{hours:o,minutes:a,seconds:l,fractionalMilliseconds:c});return u.toUpperCase()!="Z"&&p.setTime(p.getTime()-ire(u)),p},Yne=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Kne=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Zne=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),iy=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Yne.exec(t);if(e){const[n,r,s,i,o,a,l,c]=e;return Zf(Yf(ju(i)),oy(s),io(r,"day",1,31),{hours:o,minutes:a,seconds:l,fractionalMilliseconds:c})}if(e=Kne.exec(t),e){const[n,r,s,i,o,a,l,c]=e;return ere(Zf(Qne(i),oy(s),io(r,"day",1,31),{hours:o,minutes:a,seconds:l,fractionalMilliseconds:c}))}if(e=Zne.exec(t),e){const[n,r,s,i,o,a,l,c]=e;return Zf(Yf(ju(c)),oy(r),io(s.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},Xne=t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=Hne(t);else if(typeof t=="object"&&t.tag===1)e=t.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))},Zf=(t,e,n,r)=>{const s=e-1;return nre(t,s,n),new Date(Date.UTC(t,s,n,io(r.hours,"hour",0,23),io(r.minutes,"minute",0,59),io(r.seconds,"seconds",0,60),sre(r.fractionalMilliseconds)))},Qne=t=>{const e=new Date().getUTCFullYear(),n=Math.floor(e/100)*100+Yf(ju(t));return n<e?n+100:n},Jne=50*365*24*60*60*1e3,ere=t=>t.getTime()-new Date().getTime()>Jne?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,oy=t=>{const e=sy.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},tre=[31,28,31,30,31,30,31,31,30,31,30,31],nre=(t,e,n)=>{let r=tre[e];if(e===1&&rre(t)&&(r=29),n>r)throw new TypeError(`Invalid day for ${sy[e]} in ${t}: ${n}`)},rre=t=>t%4===0&&(t%100!==0||t%400===0),io=(t,e,n,r)=>{const s=qne(ju(t));if(s<n||s>r)throw new TypeError(`${e} must be between ${n} and ${r}, inclusive`);return s},sre=t=>t==null?0:Vne("0."+t)*1e3,ire=t=>{const e=t[0];let n=1;if(e=="+")n=1;else if(e=="-")n=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);const r=Number(t.substring(1,3)),s=Number(t.substring(4,6));return n*(r*60+s)*60*1e3},ju=t=>{let e=0;for(;e<t.length-1&&t.charAt(e)==="0";)e++;return e===0?t:t.slice(e)};class Xf extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Xf.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const ht=(t,e={})=>{Object.entries(e).filter(([,r])=>r!==void 0).forEach(([r,s])=>{(t[r]==null||t[r]==="")&&(t[r]=s)});const n=t.message||t.Message||"UnknownError";return t.message=n,delete t.Message,t},ore=({output:t,parsedBody:e,exceptionCtor:n,errorCode:r})=>{const s=are(t),i=s.httpStatusCode?s.httpStatusCode+"":void 0,o=new n({name:(e==null?void 0:e.code)||(e==null?void 0:e.Code)||r||i||"UnknownError",$fault:"client",$metadata:s});throw ht(o,e)},YA=t=>({output:e,parsedBody:n,errorCode:r})=>{ore({output:e,parsedBody:n,exceptionCtor:t,errorCode:r})},are=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),KA=t=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},lre=t=>{const e=[];for(const n in Bf){const r=Bf[n];t[r]!==void 0&&e.push({algorithmId:()=>r,checksumConstructor:()=>t[r]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(n){this._checksumAlgorithms.push(n)},checksumAlgorithms(){return this._checksumAlgorithms}}},cre=t=>{const e={};return t.checksumAlgorithms().forEach(n=>{e[n.algorithmId()]=n.checksumConstructor()}),e},ure=t=>{let e=t.retryStrategy;return{setRetryStrategy(n){e=n},retryStrategy(){return e}}},dre=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},ZA=t=>({...lre(t),...ure(t)}),XA=t=>({...cre(t),...dre(t)}),QA=t=>{const e="#text";for(const n in t)t.hasOwnProperty(n)&&t[n][e]!==void 0?t[n]=t[n][e]:typeof t[n]=="object"&&t[n]!==null&&(t[n]=QA(t[n]));return t},bs=t=>t!=null;class Qf{trace(){}debug(){}info(){}warn(){}error(){}}function Mt(t,e,n){let r,s,i;if(typeof e>"u"&&typeof n>"u")r={},i=t;else{if(r=t,typeof e=="function")return s=e,i=n,fre(r,s,i);i=e}for(const o of Object.keys(i)){if(!Array.isArray(i[o])){r[o]=i[o];continue}JA(r,null,i,o)}return r}const hre=(t,e)=>{const n={};for(const r in e)JA(n,t,e,r);return n},fre=(t,e,n)=>Mt(t,Object.entries(n).reduce((r,[s,i])=>(Array.isArray(i)?r[s]=i:typeof i=="function"?r[s]=[e,i()]:r[s]=[e,i],r),{})),JA=(t,e,n,r)=>{if(e!==null){let o=n[r];typeof o=="function"&&(o=[,o]);const[a=pre,l=gre,c=r]=o;(typeof a=="function"&&a(e[c])||typeof a!="function"&&a)&&(t[r]=l(e[c]));return}let[s,i]=n[r];if(typeof i=="function"){let o;const a=s===void 0&&(o=i())!=null,l=typeof s=="function"&&!!s(void 0)||typeof s!="function"&&!!s;a?t[r]=o:l&&(t[r]=i())}else{const o=s===void 0&&i!=null,a=typeof s=="function"&&!!s(i)||typeof s!="function"&&!!s;(o||a)&&(t[r]=i)}},pre=t=>t!=null,gre=t=>t,mre=t=>t.toISOString().replace(".000Z","Z"),Mn=t=>{if(t==null)return{};if(Array.isArray(t))return t.filter(e=>e!=null).map(Mn);if(typeof t=="object"){const e={};for(const n of Object.keys(t))t[n]!=null&&(e[n]=Mn(t[n]));return e}return t},e8=(t,e)=>sA(t,e).then(n=>e.utf8Encoder(n)),t8=(t,e)=>e8(t,e).then(n=>{if(n.length)try{return JSON.parse(n)}catch(r){throw(r==null?void 0:r.name)==="SyntaxError"&&Object.defineProperty(r,"$responseBodyText",{value:n}),r}return{}}),yre=async(t,e)=>{const n=await t8(t,e);return n.message=n.message??n.Message,n},bre=(t,e)=>{const n=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),r=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},s=n(t.headers,"x-amzn-errortype");if(s!==void 0)return r(t.headers[s]);if(e.code!==void 0)return r(e.code);if(e.__type!==void 0)return r(e.__type)};var ay={},Jf={};(function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",r="["+e+"]["+n+"]*",s=new RegExp("^"+r+"$"),i=function(a,l){const c=[];let u=l.exec(a);for(;u;){const d=[];d.startIndex=l.lastIndex-u[0].length;const h=u.length;for(let f=0;f<h;f++)d.push(u[f]);c.push(d),u=l.exec(a)}return c},o=function(a){const l=s.exec(a);return!(l===null||typeof l>"u")};t.isExist=function(a){return typeof a<"u"},t.isEmptyObject=function(a){return Object.keys(a).length===0},t.merge=function(a,l,c){if(l){const u=Object.keys(l),d=u.length;for(let h=0;h<d;h++)c==="strict"?a[u[h]]=[l[u[h]]]:a[u[h]]=l[u[h]]}},t.getValue=function(a){return t.isExist(a)?a:""},t.isName=o,t.getAllMatches=i,t.nameRegexp=r})(Jf);const ly=Jf,vre={allowBooleanAttributes:!1,unpairedTags:[]};ay.validate=function(t,e){e=Object.assign({},vre,e);const n=[];let r=!1,s=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let i=0;i<t.length;i++)if(t[i]==="<"&&t[i+1]==="?"){if(i+=2,i=r8(t,i),i.err)return i}else if(t[i]==="<"){let o=i;if(i++,t[i]==="!"){i=s8(t,i);continue}else{let a=!1;t[i]==="/"&&(a=!0,i++);let l="";for(;i<t.length&&t[i]!==">"&&t[i]!==" "&&t[i]!==" "&&t[i]!==`
155
+ `&&t[i]!=="\r";i++)l+=t[i];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),i--),!Tre(l)){let d;return l.trim().length===0?d="Invalid space after '<'.":d="Tag '"+l+"' is an invalid name.",Lt("InvalidTag",d,Yn(t,i))}const c=_re(t,i);if(c===!1)return Lt("InvalidAttr","Attributes for '"+l+"' have open quote.",Yn(t,i));let u=c.value;if(i=c.index,u[u.length-1]==="/"){const d=i-u.length;u=u.substring(0,u.length-1);const h=i8(u,e);if(h===!0)r=!0;else return Lt(h.err.code,h.err.msg,Yn(t,d+h.err.line))}else if(a)if(c.tagClosed){if(u.trim().length>0)return Lt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Yn(t,o));if(n.length===0)return Lt("InvalidTag","Closing tag '"+l+"' has not been opened.",Yn(t,o));{const d=n.pop();if(l!==d.tagName){let h=Yn(t,d.tagStartPos);return Lt("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+h.line+", col "+h.col+") instead of closing tag '"+l+"'.",Yn(t,o))}n.length==0&&(s=!0)}}else return Lt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Yn(t,i));else{const d=i8(u,e);if(d!==!0)return Lt(d.err.code,d.err.msg,Yn(t,i-u.length+d.err.line));if(s===!0)return Lt("InvalidXml","Multiple possible root nodes found.",Yn(t,i));e.unpairedTags.indexOf(l)!==-1||n.push({tagName:l,tagStartPos:o}),r=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=s8(t,i);continue}else if(t[i+1]==="?"){if(i=r8(t,++i),i.err)return i}else break;else if(t[i]==="&"){const d=Ere(t,i);if(d==-1)return Lt("InvalidChar","char '&' is not expected.",Yn(t,i));i=d}else if(s===!0&&!n8(t[i]))return Lt("InvalidXml","Extra text at the end",Yn(t,i));t[i]==="<"&&i--}}else{if(n8(t[i]))continue;return Lt("InvalidChar","char '"+t[i]+"' is not expected.",Yn(t,i))}if(r){if(n.length==1)return Lt("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",Yn(t,n[0].tagStartPos));if(n.length>0)return Lt("InvalidXml","Invalid '"+JSON.stringify(n.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Lt("InvalidXml","Start tag expected.",1);return!0};function n8(t){return t===" "||t===" "||t===`
156
+ `||t==="\r"}function r8(t,e){const n=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){const r=t.substr(n,e-n);if(e>5&&r==="xml")return Lt("InvalidXml","XML declaration allowed only at the start of the document.",Yn(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function s8(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let n=1;for(e+=8;e<t.length;e++)if(t[e]==="<")n++;else if(t[e]===">"&&(n--,n===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}const xre='"',wre="'";function _re(t,e){let n="",r="",s=!1;for(;e<t.length;e++){if(t[e]===xre||t[e]===wre)r===""?r=t[e]:r!==t[e]||(r="");else if(t[e]===">"&&r===""){s=!0;break}n+=t[e]}return r!==""?!1:{value:n,index:e,tagClosed:s}}const Cre=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function i8(t,e){const n=ly.getAllMatches(t,Cre),r={};for(let s=0;s<n.length;s++){if(n[s][1].length===0)return Lt("InvalidAttr","Attribute '"+n[s][2]+"' has no space in starting.",Fu(n[s]));if(n[s][3]!==void 0&&n[s][4]===void 0)return Lt("InvalidAttr","Attribute '"+n[s][2]+"' is without value.",Fu(n[s]));if(n[s][3]===void 0&&!e.allowBooleanAttributes)return Lt("InvalidAttr","boolean attribute '"+n[s][2]+"' is not allowed.",Fu(n[s]));const i=n[s][2];if(!Are(i))return Lt("InvalidAttr","Attribute '"+i+"' is an invalid name.",Fu(n[s]));if(!r.hasOwnProperty(i))r[i]=1;else return Lt("InvalidAttr","Attribute '"+i+"' is repeated.",Fu(n[s]))}return!0}function Sre(t,e){let n=/\d/;for(t[e]==="x"&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(n))break}return-1}function Ere(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Sre(t,e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(t[e]===";")break;return-1}return e}function Lt(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function Are(t){return ly.isName(t)}function Tre(t){return ly.isName(t)}function Yn(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function Fu(t){return t.startIndex+t[1].length}var cy={};const o8={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}},kre=function(t){return Object.assign({},o8,t)};cy.buildOptions=kre,cy.defaultOptions=o8;class Mre{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,n){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:n})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}var Ore=Mre;const $re=Jf;function Pre(t,e){const n={};if(t[e+3]==="O"&&t[e+4]==="C"&&t[e+5]==="T"&&t[e+6]==="Y"&&t[e+7]==="P"&&t[e+8]==="E"){e=e+9;let r=1,s=!1,i=!1,o="";for(;e<t.length;e++)if(t[e]==="<"&&!i)s&&Rre(t,e)?(e+=7,[entityName,val,e]=Dre(t,e+1),val.indexOf("&")===-1&&(n[Bre(entityName)]={regx:RegExp(`&${entityName};`,"g"),val})):s&&Ire(t,e)||s&&Nre(t,e)?e+=8:s&&Lre(t,e)?e+=9:i=!0,r++,o="";else if(t[e]===">"){if(i?t[e-1]==="-"&&t[e-2]==="-"&&(i=!1,r--):r--,r===0)break}else t[e]==="["?s=!0:o+=t[e];if(r!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:e}}function Dre(t,e){let n="";for(;e<t.length&&t[e]!=="'"&&t[e]!=='"';e++)n+=t[e];if(n=n.trim(),n.indexOf(" ")!==-1)throw new Error("External entites are not supported");const r=t[e++];let s="";for(;e<t.length&&t[e]!==r;e++)s+=t[e];return[n,s,e]}function Rre(t,e){return t[e+1]==="!"&&t[e+2]==="E"&&t[e+3]==="N"&&t[e+4]==="T"&&t[e+5]==="I"&&t[e+6]==="T"&&t[e+7]==="Y"}function Ire(t,e){return t[e+1]==="!"&&t[e+2]==="E"&&t[e+3]==="L"&&t[e+4]==="E"&&t[e+5]==="M"&&t[e+6]==="E"&&t[e+7]==="N"&&t[e+8]==="T"}function Nre(t,e){return t[e+1]==="!"&&t[e+2]==="A"&&t[e+3]==="T"&&t[e+4]==="T"&&t[e+5]==="L"&&t[e+6]==="I"&&t[e+7]==="S"&&t[e+8]==="T"}function Lre(t,e){return t[e+1]==="!"&&t[e+2]==="N"&&t[e+3]==="O"&&t[e+4]==="T"&&t[e+5]==="A"&&t[e+6]==="T"&&t[e+7]==="I"&&t[e+8]==="O"&&t[e+9]==="N"}function Bre(t){if($re.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}var jre=Pre;const Fre=/^[-+]?0x[a-fA-F0-9]+$/,zre=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Hre={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function Vre(t,e={}){if(e=Object.assign({},Hre,e),!t||typeof t!="string")return t;let n=t.trim();if(e.skipLike!==void 0&&e.skipLike.test(n))return t;if(e.hex&&Fre.test(n))return Number.parseInt(n,16);{const r=zre.exec(n);if(r){const s=r[1],i=r[2];let o=Ure(r[3]);const a=r[4]||r[6];if(!e.leadingZeros&&i.length>0&&s&&n[2]!==".")return t;if(!e.leadingZeros&&i.length>0&&!s&&n[1]!==".")return t;{const l=Number(n),c=""+l;return c.search(/[eE]/)!==-1||a?e.eNotation?l:t:n.indexOf(".")!==-1?c==="0"&&o===""||c===o||s&&c==="-"+o?l:t:i?o===c||s+o===c?l:t:n===c||n===s+c?l:t}}else return t}}function Ure(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substr(0,t.length-1))),t}var qre=Vre;const a8=Jf,zu=Ore,Wre=jre,Gre=qre;let Yre=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(n,r)=>String.fromCharCode(Number.parseInt(r,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(n,r)=>String.fromCharCode(Number.parseInt(r,16))}},this.addExternalEntities=Kre,this.parseXml=ese,this.parseTextData=Zre,this.resolveNameSpace=Xre,this.buildAttributesMap=Jre,this.isItStopNode=sse,this.replaceEntitiesValue=nse,this.readStopNodeData=ose,this.saveTextToParentTag=rse,this.addChild=tse}};function Kre(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:t[r]}}}function Zre(t,e,n,r,s,i,o){if(t!==void 0&&(this.options.trimValues&&!r&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const a=this.options.tagValueProcessor(e,t,n,s,i);return a==null?t:typeof a!=typeof t||a!==t?a:this.options.trimValues?dy(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?dy(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Xre(t){if(this.options.removeNSPrefix){const e=t.split(":"),n=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=n+e[1])}return t}const Qre=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Jre(t,e,n){if(!this.options.ignoreAttributes&&typeof t=="string"){const r=a8.getAllMatches(t,Qre),s=r.length,i={};for(let o=0;o<s;o++){const a=this.resolveNameSpace(r[o][1]);let l=r[o][4],c=this.options.attributeNamePrefix+a;if(a.length)if(this.options.transformAttributeName&&(c=this.options.transformAttributeName(c)),c==="__proto__"&&(c="#__proto__"),l!==void 0){this.options.trimValues&&(l=l.trim()),l=this.replaceEntitiesValue(l);const u=this.options.attributeValueProcessor(a,l,e);u==null?i[c]=l:typeof u!=typeof l||u!==l?i[c]=u:i[c]=dy(l,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[c]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const o={};return o[this.options.attributesGroupName]=i,o}return i}}const ese=function(t){t=t.replace(/\r\n?/g,`
157
+ `);const e=new zu("!xml");let n=e,r="",s="";for(let i=0;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="/"){const a=da(t,">",i,"Closing Tag is not closed.");let l=t.substring(i+2,a).trim();if(this.options.removeNSPrefix){const d=l.indexOf(":");d!==-1&&(l=l.substr(d+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&(r=this.saveTextToParentTag(r,n,s));const c=s.substring(s.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);let u=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),n=this.tagsNodeStack.pop(),r="",i=a}else if(t[i+1]==="?"){let a=uy(t,i,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,s),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){const l=new zu(a.tagName);l.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(l[":@"]=this.buildAttributesMap(a.tagExp,s,a.tagName)),this.addChild(n,l,s)}i=a.closeIndex+1}else if(t.substr(i+1,3)==="!--"){const a=da(t,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){const l=t.substring(i+4,a-2);r=this.saveTextToParentTag(r,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:l}])}i=a}else if(t.substr(i+1,2)==="!D"){const a=Wre(t,i);this.docTypeEntities=a.entities,i=a.i}else if(t.substr(i+1,2)==="!["){const a=da(t,"]]>",i,"CDATA is not closed.")-2,l=t.substring(i+9,a);r=this.saveTextToParentTag(r,n,s);let c=this.parseTextData(l,n.tagname,s,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:l}]):n.add(this.options.textNodeName,c),i=a+2}else{let a=uy(t,i,this.options.removeNSPrefix),l=a.tagName;const c=a.rawTagName;let u=a.tagExp,d=a.attrExpPresent,h=a.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&r&&n.tagname!=="!xml"&&(r=this.saveTextToParentTag(r,n,s,!1));const f=n;if(f&&this.options.unpairedTags.indexOf(f.tagname)!==-1&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),l!==e.tagname&&(s+=s?"."+l:l),this.isItStopNode(this.options.stopNodes,s,l)){let p="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),i=a.closeIndex;else if(this.options.unpairedTags.indexOf(l)!==-1)i=a.closeIndex;else{const g=this.readStopNodeData(t,c,h+1);if(!g)throw new Error(`Unexpected end of ${c}`);i=g.i,p=g.tagContent}const m=new zu(l);l!==u&&d&&(m[":@"]=this.buildAttributesMap(u,s,l)),p&&(p=this.parseTextData(p,l,s,!0,d,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),m.add(this.options.textNodeName,p),this.addChild(n,m,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const p=new zu(l);l!==u&&d&&(p[":@"]=this.buildAttributesMap(u,s,l)),this.addChild(n,p,s),s=s.substr(0,s.lastIndexOf("."))}else{const p=new zu(l);this.tagsNodeStack.push(n),l!==u&&d&&(p[":@"]=this.buildAttributesMap(u,s,l)),this.addChild(n,p,s),n=p}r="",i=h}}else r+=t[i];return e.child};function tse(t,e,n){const r=this.options.updateTag(e.tagname,n,e[":@"]);r===!1||(typeof r=="string"&&(e.tagname=r),t.addChild(e))}const nse=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function rse(t,e,n,r){return t&&(r===void 0&&(r=Object.keys(e.child).length===0),t=this.parseTextData(t,e.tagname,n,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,r),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function sse(t,e,n){const r="*."+n;for(const s in t){const i=t[s];if(r===i||e===i)return!0}return!1}function ise(t,e,n=">"){let r,s="";for(let i=e;i<t.length;i++){let o=t[i];if(r)o===r&&(r="");else if(o==='"'||o==="'")r=o;else if(o===n[0])if(n[1]){if(t[i+1]===n[1])return{data:s,index:i}}else return{data:s,index:i};else o===" "&&(o=" ");s+=o}}function da(t,e,n,r){const s=t.indexOf(e,n);if(s===-1)throw new Error(r);return s+e.length-1}function uy(t,e,n,r=">"){const s=ise(t,e+1,r);if(!s)return;let i=s.data;const o=s.index,a=i.search(/\s/);let l=i,c=!0;a!==-1&&(l=i.substring(0,a),i=i.substring(a+1).trimStart());const u=l;if(n){const d=l.indexOf(":");d!==-1&&(l=l.substr(d+1),c=l!==s.data.substr(d+1))}return{tagName:l,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:u}}function ose(t,e,n){const r=n;let s=1;for(;n<t.length;n++)if(t[n]==="<")if(t[n+1]==="/"){const i=da(t,">",n,`${e} is not closed`);if(t.substring(n+2,i).trim()===e&&(s--,s===0))return{tagContent:t.substring(r,n),i};n=i}else if(t[n+1]==="?")n=da(t,"?>",n+1,"StopNode is not closed.");else if(t.substr(n+1,3)==="!--")n=da(t,"-->",n+3,"StopNode is not closed.");else if(t.substr(n+1,2)==="![")n=da(t,"]]>",n,"StopNode is not closed.")-2;else{const i=uy(t,n,">");i&&((i&&i.tagName)===e&&i.tagExp[i.tagExp.length-1]!=="/"&&s++,n=i.closeIndex)}}function dy(t,e,n){if(e&&typeof t=="string"){const r=t.trim();return r==="true"?!0:r==="false"?!1:Gre(t,n)}else return a8.isExist(t)?t:""}var ase=Yre,l8={};function lse(t,e){return c8(t,e)}function c8(t,e,n){let r;const s={};for(let i=0;i<t.length;i++){const o=t[i],a=cse(o);let l="";if(n===void 0?l=a:l=n+"."+a,a===e.textNodeName)r===void 0?r=o[a]:r+=""+o[a];else{if(a===void 0)continue;if(o[a]){let c=c8(o[a],e,l);const u=dse(c,e);o[":@"]?use(c,o[":@"],l,e):Object.keys(c).length===1&&c[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?c=c[e.textNodeName]:Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""),s[a]!==void 0&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(c)):e.isArray(a,l,u)?s[a]=[c]:s[a]=c}}}return typeof r=="string"?r.length>0&&(s[e.textNodeName]=r):r!==void 0&&(s[e.textNodeName]=r),s}function cse(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(r!==":@")return r}}function use(t,e,n,r){if(e){const s=Object.keys(e),i=s.length;for(let o=0;o<i;o++){const a=s[o];r.isArray(a,n+"."+a,!0,!0)?t[a]=[e[a]]:t[a]=e[a]}}}function dse(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return!!(r===0||r===1&&(t[n]||typeof t[n]=="boolean"||t[n]===0))}l8.prettify=lse;const{buildOptions:hse}=cy,fse=ase,{prettify:pse}=l8,gse=ay;var mse=class{constructor(e){this.externalEntities={},this.options=hse(e)}parse(e,n){if(typeof e!="string")if(e.toString)e=e.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(n){n===!0&&(n={});const i=gse.validate(e,n);if(i!==!0)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const r=new fse(this.options);r.addExternalEntities(this.externalEntities);const s=r.parseXml(e);return this.options.preserveOrder||s===void 0?s:pse(s,this.options)}addEntity(e,n){if(n.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(n==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=n}};const yse=`
158
+ `;function bse(t,e){let n="";return e.format&&e.indentBy.length>0&&(n=yse),u8(t,e,"",n)}function u8(t,e,n,r){let s="",i=!1;for(let o=0;o<t.length;o++){const a=t[o],l=vse(a);if(l===void 0)continue;let c="";if(n.length===0?c=l:c=`${n}.${l}`,l===e.textNodeName){let p=a[l];xse(c,e)||(p=e.tagValueProcessor(l,p),p=h8(p,e)),i&&(s+=r),s+=p,i=!1;continue}else if(l===e.cdataPropName){i&&(s+=r),s+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,i=!1;continue}else if(l===e.commentPropName){s+=r+`<!--${a[l][0][e.textNodeName]}-->`,i=!0;continue}else if(l[0]==="?"){const p=d8(a[":@"],e),m=l==="?xml"?"":r;let g=a[l][0][e.textNodeName];g=g.length!==0?" "+g:"",s+=m+`<${l}${g}${p}?>`,i=!0;continue}let u=r;u!==""&&(u+=e.indentBy);const d=d8(a[":@"],e),h=r+`<${l}${d}`,f=u8(a[l],e,c,u);e.unpairedTags.indexOf(l)!==-1?e.suppressUnpairedNode?s+=h+">":s+=h+"/>":(!f||f.length===0)&&e.suppressEmptyNode?s+=h+"/>":f&&f.endsWith(">")?s+=h+`>${f}${r}</${l}>`:(s+=h+">",f&&r!==""&&(f.includes("/>")||f.includes("</"))?s+=r+e.indentBy+f+r:s+=f,s+=`</${l}>`),i=!0}return s}function vse(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(t.hasOwnProperty(r)&&r!==":@")return r}}function d8(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){if(!t.hasOwnProperty(r))continue;let s=e.attributeValueProcessor(r,t[r]);s=h8(s,e),s===!0&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${s}"`}return n}function xse(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let n=t.substr(t.lastIndexOf(".")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]==="*."+n)return!0;return!1}function h8(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}var wse=bse;const _se=wse,Cse={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function oo(t){this.options=Object.assign({},Cse,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ase),this.processTextOrObjNode=Sse,this.options.format?(this.indentate=Ese,this.tagEndChar=`>
159
+ `,this.newLine=`
160
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}oo.prototype.build=function(t){return this.options.preserveOrder?_se(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},oo.prototype.j2x=function(t,e){let n="",r="";for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(typeof t[s]>"u")this.isAttribute(s)&&(r+="");else if(t[s]===null)this.isAttribute(s)?r+="":s[0]==="?"?r+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)r+=this.buildTextValNode(t[s],s,"",e);else if(typeof t[s]!="object"){const i=this.isAttribute(s);if(i)n+=this.buildAttrPairStr(i,""+t[s]);else if(s===this.options.textNodeName){let o=this.options.tagValueProcessor(s,""+t[s]);r+=this.replaceEntitiesValue(o)}else r+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const i=t[s].length;let o="",a="";for(let l=0;l<i;l++){const c=t[s][l];if(!(typeof c>"u"))if(c===null)s[0]==="?"?r+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(typeof c=="object")if(this.options.oneListGroup){const u=this.j2x(c,e+1);o+=u.val,this.options.attributesGroupName&&c.hasOwnProperty(this.options.attributesGroupName)&&(a+=u.attrStr)}else o+=this.processTextOrObjNode(c,s,e);else if(this.options.oneListGroup){let u=this.options.tagValueProcessor(s,c);u=this.replaceEntitiesValue(u),o+=u}else o+=this.buildTextValNode(c,s,"",e)}this.options.oneListGroup&&(o=this.buildObjectNode(o,s,a,e)),r+=o}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const i=Object.keys(t[s]),o=i.length;for(let a=0;a<o;a++)n+=this.buildAttrPairStr(i[a],""+t[s][i[a]])}else r+=this.processTextOrObjNode(t[s],s,e);return{attrStr:n,val:r}},oo.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function Sse(t,e,n){const r=this.j2x(t,n+1);return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,n):this.buildObjectNode(r.val,e,r.attrStr,n)}oo.prototype.buildObjectNode=function(t,e,n,r){if(t==="")return e[0]==="?"?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,i="";return e[0]==="?"&&(i="?",s=""),(n||n==="")&&t.indexOf("<")===-1?this.indentate(r)+"<"+e+n+i+">"+t+s:this.options.commentPropName!==!1&&e===this.options.commentPropName&&i.length===0?this.indentate(r)+`<!--${t}-->`+this.newLine:this.indentate(r)+"<"+e+n+i+this.tagEndChar+t+this.indentate(r)+s}},oo.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e},oo.prototype.buildTextValNode=function(t,e,n,r){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(r)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),s===""?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+s+"</"+e+this.tagEndChar}},oo.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};function Ese(t){return this.options.indentBy.repeat(t)}function Ase(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}var Tse=oo,kse={XMLParser:mse,XMLValidator:ay,XMLBuilder:Tse};const f8=(t,e)=>e8(t,e).then(n=>{if(n.length){const r=new kse.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(l,c)=>c.trim()===""&&c.includes(`
161
+ `)?"":void 0});r.addEntity("#xD","\r"),r.addEntity("#10",`
162
+ `);let s;try{s=r.parse(n,!0)}catch(l){throw l&&typeof l=="object"&&Object.defineProperty(l,"$responseBodyText",{value:n}),l}const i="#text",o=Object.keys(s)[0],a=s[o];return a[i]&&(a[o]=a[i],delete a[i]),QA(a)}return{}}),Mse=async(t,e)=>{const n=await f8(t,e);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Ose=(t,e)=>{var n;if(((n=e==null?void 0:e.Error)==null?void 0:n.Code)!==void 0)return e.Error.Code;if((e==null?void 0:e.Code)!==void 0)return e.Code;if(t.statusCode==404)return"NotFound"},$se=/\d{12}\.ddb/;async function Pse(t,e,n){var i,o,a,l,c,u,d;const r=n.request;if(((i=r==null?void 0:r.headers)==null?void 0:i["smithy-protocol"])==="rpc-v2-cbor"&&Wn(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const h=await e.retryStrategy();typeof h.acquireInitialRetryToken=="function"?(a=(o=h.constructor)==null?void 0:o.name)!=null&&a.includes("Adaptive")?Wn(t,"RETRY_MODE_ADAPTIVE","F"):Wn(t,"RETRY_MODE_STANDARD","E"):Wn(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const h=t.endpointV2;switch(String((l=h==null?void 0:h.url)==null?void 0:l.hostname).match($se)&&Wn(t,"ACCOUNT_ID_ENDPOINT","O"),await((c=e.accountIdEndpointMode)==null?void 0:c.call(e))){case"disabled":Wn(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Wn(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Wn(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const s=(d=(u=t.__smithy_context)==null?void 0:u.selectedHttpAuthScheme)==null?void 0:d.identity;if(s!=null&&s.$source){const h=s;h.accountId&&Wn(t,"RESOLVED_ACCOUNT_ID","T");for(const[f,p]of Object.entries(h.$source??{}))Wn(t,f,p)}}const p8="user-agent",hy="x-amz-user-agent",g8=" ",fy="/",Dse=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Rse=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,m8="-",Ise=1024;function Nse(t){let e="";for(const n in t){const r=t[n];if(e.length+r.length+1<=Ise){e.length?e+=","+r:e+=r;continue}break}return e}const Lse=t=>(e,n)=>async r=>{var f,p,m,g;const{request:s}=r;if(!Pt.isInstance(s))return e(r);const{headers:i}=s,o=((f=n==null?void 0:n.userAgent)==null?void 0:f.map(ep))||[],a=(await t.defaultUserAgentProvider()).map(ep);await Pse(n,t,r);const l=n;a.push(`m/${Nse(Object.assign({},(p=n.__smithy_context)==null?void 0:p.features,(m=l.__aws_sdk_context)==null?void 0:m.features))}`);const c=((g=t==null?void 0:t.customUserAgent)==null?void 0:g.map(ep))||[],u=await t.userAgentAppId();u&&a.push(ep([`app/${u}`]));const d=[].concat([...a,...o,...c]).join(g8),h=[...a.filter(y=>y.startsWith("aws-sdk-")),...c].join(g8);return t.runtime!=="browser"?(h&&(i[hy]=i[hy]?`${i[p8]} ${h}`:h),i[p8]=d):i[hy]=d,e({...r,request:s})},ep=t=>{var o;const e=t[0].split(fy).map(a=>a.replace(Dse,m8)).join(fy),n=(o=t[1])==null?void 0:o.replace(Rse,m8),r=e.indexOf(fy),s=e.substring(0,r);let i=e.substring(r+1);return s==="api"&&(i=i.toLowerCase()),[s,i,n].filter(a=>a&&a.length>0).reduce((a,l,c)=>{switch(c){case 0:return l;case 1:return`${a}/${l}`;default:return`${a}#${l}`}},"")},Bse={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},y8=t=>({applyToStack:e=>{e.add(Lse(t),Bse)}});var b8;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(b8||(b8={}));const v8=!1,x8=!1,w8=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),_8=t=>w8(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,C8=t=>{const{region:e,useFipsEndpoint:n}=t;if(!e)throw new Error("Region is missing");return{...t,region:async()=>{if(typeof e=="string")return _8(e);const r=await e();return _8(r)},useFipsEndpoint:async()=>{const r=typeof e=="string"?e:await e();return w8(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}}},S8="content-length";function jse(t){return e=>async n=>{const r=n.request;if(Pt.isInstance(r)){const{body:s,headers:i}=r;if(s&&Object.keys(i).map(o=>o.toLowerCase()).indexOf(S8)===-1)try{const o=t(s);r.headers={...r.headers,[S8]:String(o)}}catch{}}return e({...n,request:r})}}const Fse={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},E8=t=>({applyToStack:e=>{e.add(jse(t.bodyLengthChecker),Fse)}}),zse=async t=>{const e=(t==null?void 0:t.Bucket)||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Wse(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!qse(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},Hse=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Vse=/(\d+\.){3}\d+/,Use=/\.\./,qse=t=>Hse.test(t)&&!Vse.test(t)&&!Use.test(t),Wse=t=>{const[e,n,r,,,s]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,o=!!(i&&n&&r&&s);if(i&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},Gse=(t,e,n)=>{const r=async()=>{const s=n[t]??n[e];return typeof s=="function"?s():s};return t==="credentialScope"||e==="CredentialScope"?async()=>{const s=typeof n.credentials=="function"?await n.credentials():n.credentials;return(s==null?void 0:s.credentialScope)??(s==null?void 0:s.CredentialScope)}:t==="accountId"||e==="AccountId"?async()=>{const s=typeof n.credentials=="function"?await n.credentials():n.credentials;return(s==null?void 0:s.accountId)??(s==null?void 0:s.AccountId)}:t==="endpoint"||e==="endpoint"?async()=>{const s=await r();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:i,hostname:o,port:a,path:l}=s;return`${i}//${o}${a?":"+a:""}${l}`}}return s}:r},A8=async t=>{};function Yse(t){const e={};if(t=t.replace(/^\?/,""),t)for(const n of t.split("&")){let[r,s=null]=n.split("=");r=decodeURIComponent(r),s&&(s=decodeURIComponent(s)),r in e?Array.isArray(e[r])?e[r].push(s):e[r]=[e[r],s]:e[r]=s}return e}const Hu=t=>{if(typeof t=="string")return Hu(new URL(t));const{hostname:e,pathname:n,port:r,protocol:s,search:i}=t;let o;return i&&(o=Yse(i)),{hostname:e,port:r?parseInt(r):void 0,protocol:s,path:n,query:o}},T8=t=>typeof t=="object"?"url"in t?Hu(t.url):t:Hu(t),k8=async(t,e,n,r)=>{if(!n.endpoint){let o;n.serviceConfiguredEndpoint?o=await n.serviceConfiguredEndpoint():o=await A8(n.serviceId),o&&(n.endpoint=()=>Promise.resolve(T8(o)))}const s=await M8(t,e,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(s,r)},M8=async(t,e,n)=>{var i;const r={},s=((i=e==null?void 0:e.getEndpointParameterInstructions)==null?void 0:i.call(e))||{};for(const[o,a]of Object.entries(s))switch(a.type){case"staticContextParams":r[o]=a.value;break;case"contextParams":r[o]=t[a.name];break;case"clientContextParams":case"builtInParams":r[o]=await Gse(a.name,o,n)();break;case"operationContextParams":r[o]=a.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(s).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await zse(r),r},Kse=({config:t,instructions:e})=>(n,r)=>async s=>{var a,l,c;t.endpoint&&Hte(r,"ENDPOINT_OVERRIDE","N");const i=await k8(s.input,{getEndpointParameterInstructions(){return e}},{...t},r);r.endpointV2=i,r.authSchemes=(a=i.properties)==null?void 0:a.authSchemes;const o=(l=r.authSchemes)==null?void 0:l[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const u=aa(r),d=(c=u==null?void 0:u.selectedHttpAuthScheme)==null?void 0:c.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...s})},Zse={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:N1.name},tp=(t,e)=>({applyToStack:n=>{n.addRelativeTo(Kse({config:t,instructions:e}),Zse)}}),O8=t=>{const e=t.tls??!0,{endpoint:n}=t,r=n!=null?async()=>T8(await ys(n)()):void 0,i={...t,endpoint:r,tls:e,isCustomEndpoint:!!n,useDualstackEndpoint:ys(t.useDualstackEndpoint??!1),useFipsEndpoint:ys(t.useFipsEndpoint??!1)};let o;return i.serviceConfiguredEndpoint=async()=>(t.serviceId&&!o&&(o=A8(t.serviceId)),o),i};var Nl;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(Nl||(Nl={}));const Vu=3,$8=Nl.STANDARD,Xse=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Qse=["TimeoutError","RequestTimeout","RequestTimeoutException"],Jse=[500,502,503,504],eie=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],tie=t=>{var e;return(e=t.$metadata)==null?void 0:e.clockSkewCorrected},P8=t=>{var e,n;return((e=t.$metadata)==null?void 0:e.httpStatusCode)===429||Xse.includes(t.name)||((n=t.$retryable)==null?void 0:n.throttling)==!0},py=(t,e=0)=>{var n;return tie(t)||Qse.includes(t.name)||eie.includes((t==null?void 0:t.code)||"")||Jse.includes(((n=t.$metadata)==null?void 0:n.httpStatusCode)||0)||t.cause!==void 0&&e<=10&&py(t.cause,e+1)},nie=t=>{var e;if(((e=t.$metadata)==null?void 0:e.httpStatusCode)!==void 0){const n=t.$metadata.httpStatusCode;return 500<=n&&n<=599&&!py(t)}return!1};class np{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(e==null?void 0:e.beta)??.7,this.minCapacity=(e==null?void 0:e.minCapacity)??1,this.minFillRate=(e==null?void 0:e.minFillRate)??.5,this.scaleConstant=(e==null?void 0:e.scaleConstant)??.4,this.smooth=(e==null?void 0:e.smooth)??.8;const n=this.getCurrentTimeInSeconds();this.lastThrottleTime=n,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const n=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(r=>np.setTimeoutFn(r,n))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const n=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+n),this.lastTimestamp=e}updateClientSendingRate(e){let n;if(this.updateMeasuredRate(),P8(e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),n=Math.floor(e*2)/2;if(this.requestCount++,n>this.lastTxRateBucket){const r=this.requestCount/(n-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=n}}getPrecise(e){return parseFloat(e.toFixed(8))}}np.setTimeoutFn=setTimeout;const gy=100,D8=20*1e3,rie=500,R8=500,sie=5,iie=10,oie=1,aie="amz-sdk-invocation-id",lie="amz-sdk-request",cie=()=>{let t=gy;return{computeNextBackoffDelay:r=>Math.floor(Math.min(D8,Math.random()*2**r*t)),setDelayBase:r=>{t=r}}},I8=({retryDelay:t,retryCount:e,retryCost:n})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(D8,t),getRetryCost:()=>n});class N8{constructor(e){this.maxAttempts=e,this.mode=Nl.STANDARD,this.capacity=R8,this.retryBackoffStrategy=cie(),this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return I8({retryDelay:gy,retryCount:0})}async refreshRetryTokenForRetry(e,n){const r=await this.getMaxAttempts();if(this.shouldRetry(e,n,r)){const s=n.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?rie:gy);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=n.retryAfterHint?Math.max(n.retryAfterHint.getTime()-Date.now()||0,i):i,a=this.getCapacityCost(s);return this.capacity-=a,I8({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(R8,this.capacity+(e.getRetryCost()??oie))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Vu}`),Vu}}shouldRetry(e,n,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(e){return e==="TRANSIENT"?iie:sie}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class uie{constructor(e,n){this.maxAttemptsProvider=e,this.mode=Nl.ADAPTIVE;const{rateLimiter:r}=n??{};this.rateLimiter=r??new np,this.standardRetryStrategy=new N8(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,n){return this.rateLimiter.updateClientSendingRate(n),this.standardRetryStrategy.refreshRetryTokenForRetry(e,n)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let rp;const die=new Uint8Array(16);function hie(){if(!rp&&(rp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rp(die)}const xn=[];for(let t=0;t<256;++t)xn.push((t+256).toString(16).slice(1));function fie(t,e=0){return xn[t[e+0]]+xn[t[e+1]]+xn[t[e+2]]+xn[t[e+3]]+"-"+xn[t[e+4]]+xn[t[e+5]]+"-"+xn[t[e+6]]+xn[t[e+7]]+"-"+xn[t[e+8]]+xn[t[e+9]]+"-"+xn[t[e+10]]+xn[t[e+11]]+xn[t[e+12]]+xn[t[e+13]]+xn[t[e+14]]+xn[t[e+15]]}const L8={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pie(t,e,n){if(L8.randomUUID&&!e&&!t)return L8.randomUUID();t=t||{};const r=t.random||(t.rng||hie)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,fie(r)}const gie=t=>t instanceof Error?t:t instanceof Object?Object.assign(new Error,t):typeof t=="string"?new Error(t):new Error(`AWS SDK error wrapper for ${t}`),B8=t=>{const{retryStrategy:e}=t,n=ys(t.maxAttempts??Vu);return{...t,maxAttempts:n,retryStrategy:async()=>e||(await ys(t.retryMode)()===Nl.ADAPTIVE?new uie(n):new N8(n))}},mie=t=>(t==null?void 0:t.body)instanceof ReadableStream,yie=t=>(e,n)=>async r=>{var o;let s=await t.retryStrategy();const i=await t.maxAttempts();if(bie(s)){s=s;let a=await s.acquireInitialRetryToken(n.partition_id),l=new Error,c=0,u=0;const{request:d}=r,h=Pt.isInstance(d);for(h&&(d.headers[aie]=pie());;)try{h&&(d.headers[lie]=`attempt=${c+1}; max=${i}`);const{response:f,output:p}=await e(r);return s.recordSuccess(a),p.$metadata.attempts=c+1,p.$metadata.totalRetryDelay=u,{response:f,output:p}}catch(f){const p=vie(f);if(l=gie(f),h&&mie(d))throw(o=n.logger instanceof Qf?console:n.logger)==null||o.warn("An error was encountered in a non-retryable streaming request."),l;try{a=await s.refreshRetryTokenForRetry(a,p)}catch{throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=u,l}c=a.getRetryCount();const m=a.getRetryDelay();u+=m,await new Promise(g=>setTimeout(g,m))}}else return s=s,s!=null&&s.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(e,r)},bie=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",vie=t=>{const e={error:t,errorType:xie(t)},n=_ie(t.$response);return n&&(e.retryAfterHint=n),e},xie=t=>P8(t)?"THROTTLING":py(t)?"TRANSIENT":nie(t)?"SERVER_ERROR":"CLIENT_ERROR",wie={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},j8=t=>({applyToStack:e=>{e.add(yie(t),wie)}}),_ie=t=>{if(!Ml.isInstance(t))return;const e=Object.keys(t.headers).find(i=>i.toLowerCase()==="retry-after");if(!e)return;const n=t.headers[e],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(r*1e3)},Cie=async(t,e,n)=>({operation:aa(e).operation,region:await ys(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Sie(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"secretsmanager",region:t.region},propertiesExtractor:(e,n)=>({signingProperties:{config:e,context:n}})}}const Eie=t=>{const e=[];switch(t.operation){default:e.push(Sie(t))}return e},Aie=t=>({...NA(t)}),Tie=t=>({...t,useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"secretsmanager"}),kie={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Mie={name:"@aws-sdk/client-secrets-manager",description:"AWS SDK for JavaScript Secrets Manager Client for Node.js, Browser and React Native",version:"3.716.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-secrets-manager","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo secrets-manager"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.716.0","@aws-sdk/client-sts":"3.716.0","@aws-sdk/core":"3.716.0","@aws-sdk/credential-provider-node":"3.716.0","@aws-sdk/middleware-host-header":"3.714.0","@aws-sdk/middleware-logger":"3.714.0","@aws-sdk/middleware-recursion-detection":"3.714.0","@aws-sdk/middleware-user-agent":"3.716.0","@aws-sdk/region-config-resolver":"3.714.0","@aws-sdk/types":"3.714.0","@aws-sdk/util-endpoints":"3.714.0","@aws-sdk/util-user-agent-browser":"3.714.0","@aws-sdk/util-user-agent-node":"3.716.0","@smithy/config-resolver":"^3.0.13","@smithy/core":"^2.5.5","@smithy/fetch-http-handler":"^4.1.2","@smithy/hash-node":"^3.0.11","@smithy/invalid-dependency":"^3.0.11","@smithy/middleware-content-length":"^3.0.13","@smithy/middleware-endpoint":"^3.2.6","@smithy/middleware-retry":"^3.0.31","@smithy/middleware-serde":"^3.0.11","@smithy/middleware-stack":"^3.0.11","@smithy/node-config-provider":"^3.1.12","@smithy/node-http-handler":"^3.3.2","@smithy/protocol-http":"^4.1.8","@smithy/smithy-client":"^3.5.1","@smithy/types":"^3.7.2","@smithy/url-parser":"^3.0.11","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.31","@smithy/util-defaults-mode-node":"^3.0.31","@smithy/util-endpoints":"^2.1.7","@smithy/util-middleware":"^3.0.11","@smithy/util-retry":"^3.0.11","@smithy/util-utf8":"^3.0.0","@types/uuid":"^9.0.1",tslib:"^2.6.2",uuid:"^9.0.1"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-secrets-manager",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-secrets-manager"}},F8=t=>new TextEncoder().encode(t);var Oie=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:F8;function ao(t){return t instanceof Uint8Array?t:typeof t=="string"?Oie(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function Uu(t){return typeof t=="string"?t.length===0:t.byteLength===0}function z8(t){return new Uint8Array([(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255])}function H8(t){if(!Uint32Array.from){for(var e=new Uint32Array(t.length),n=0;n<t.length;)e[n]=t[n],n+=1;return e}return Uint32Array.from(t)}var V8={name:"SHA-256"},U8={name:"HMAC",hash:V8},$ie=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Pie={};function lo(){return typeof window<"u"?window:typeof self<"u"?self:Pie}var Die=function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!Uu(e)){var n=ao(e),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(n){return lo().crypto.subtle.sign(U8,n,e.toHash).then(function(r){return new Uint8Array(r)})}):Uu(this.toHash)?Promise.resolve($ie):Promise.resolve().then(function(){return lo().crypto.subtle.digest(V8,e.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},t.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(n,r){lo().crypto.subtle.importKey("raw",ao(e.secret),U8,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))},t}();function my(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function yy(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,s&&(i=c[0]&2?s.return:c[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,c[1])).done)return i;switch(s=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,s=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],s=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function q8(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}typeof SuppressedError=="function"&&SuppressedError;var Wr=64,Rie=32,Iie=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Nie=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Lie=Math.pow(2,53)-1,sp=function(){function t(){this.state=Int32Array.from(Nie),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=e.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>Lie)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[n++],r--,this.bufferLength===Wr&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%Wr>=Wr-8){for(var s=this.bufferLength;s<Wr;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<Wr-8;s++)n.setUint8(s,0);n.setUint32(Wr-8,Math.floor(e/4294967296),!0),n.setUint32(Wr-4,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(Rie),s=0;s<8;s++)i[s*4]=this.state[s]>>>24&255,i[s*4+1]=this.state[s]>>>16&255,i[s*4+2]=this.state[s]>>>8&255,i[s*4+3]=this.state[s]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,n=e.buffer,r=e.state,s=r[0],i=r[1],o=r[2],a=r[3],l=r[4],c=r[5],u=r[6],d=r[7],h=0;h<Wr;h++){if(h<16)this.temp[h]=(n[h*4]&255)<<24|(n[h*4+1]&255)<<16|(n[h*4+2]&255)<<8|n[h*4+3]&255;else{var f=this.temp[h-2],p=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;f=this.temp[h-15];var m=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[h]=(p+this.temp[h-7]|0)+(m+this.temp[h-16]|0)}var g=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&c^~l&u)|0)+(d+(Iie[h]+this.temp[h]|0)|0)|0,y=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&o^i&o)|0;d=u,u=c,c=l,l=a+g|0,a=o,o=i,i=s,s=g+y|0}r[0]+=s,r[1]+=i,r[2]+=o,r[3]+=a,r[4]+=l,r[5]+=c,r[6]+=u,r[7]+=d},t}(),Bie=function(){function t(e){this.secret=e,this.hash=new sp,this.reset()}return t.prototype.update=function(e){if(!(Uu(e)||this.error))try{this.hash.update(ao(e))}catch(n){this.error=n}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return my(this,void 0,void 0,function(){return yy(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new sp,this.secret){this.outer=new sp;var e=jie(this.secret),n=new Uint8Array(Wr);n.set(e);for(var r=0;r<Wr;r++)e[r]^=54,n[r]^=92;this.hash.update(e),this.outer.update(n);for(var r=0;r<e.byteLength;r++)e[r]=0}},t}();function jie(t){var e=ao(t);if(e.byteLength>Wr){var n=new sp;n.update(e),e=n.digest()}var r=new Uint8Array(Wr);return r.set(e),r}var Fie=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function W8(t){if(zie(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return Hie(e)}return!1}function zie(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function Hie(t){return t&&Fie.every(function(e){return typeof t[e]=="function"})}var G8=function(){function t(e){W8(lo())?this.hash=new Die(e):this.hash=new Bie(e)}return t.prototype.update=function(e,n){this.hash.update(ao(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t}();const Vie={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Y8={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Bt={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Kn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},co={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class J{static getFirstMatch(e,n){const r=n.match(e);return r&&r.length>0&&r[1]||""}static getSecondMatch(e,n){const r=n.match(e);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(e,n,r){if(e.test(n))return r}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const n=e.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const n=e.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,n,r=!1){const s=J.getVersionPrecision(e),i=J.getVersionPrecision(n);let o=Math.max(s,i),a=0;const l=J.map([e,n],c=>{const u=o-J.getVersionPrecision(c),d=c+new Array(u+1).join(".0");return J.map(d.split("."),h=>new Array(20-h.length).join("0")+h).reverse()});for(r&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}}static map(e,n){const r=[];let s;if(Array.prototype.map)return Array.prototype.map.call(e,n);for(s=0;s<e.length;s+=1)r.push(n(e[s]));return r}static find(e,n){let r,s;if(Array.prototype.find)return Array.prototype.find.call(e,n);for(r=0,s=e.length;r<s;r+=1){const i=e[r];if(n(i,r))return i}}static assign(e,...n){const r=e;let s,i;if(Object.assign)return Object.assign(e,...n);for(s=0,i=n.length;s<i;s+=1){const o=n[s];typeof o=="object"&&o!==null&&Object.keys(o).forEach(l=>{r[l]=o[l]})}return e}static getBrowserAlias(e){return Vie[e]}static getBrowserTypeByAlias(e){return Y8[e]||""}}const lt=/version\/(\d+(\.?_?\d+)+)/i,Uie=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},n=J.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},n=J.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},n=J.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},n=J.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},n=J.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},n=J.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},n=J.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},n=J.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=J.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},n=J.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},n=J.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},n=J.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},n=J.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},n=J.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},n=J.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},n=J.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},n=J.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},n=J.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},n=J.getFirstMatch(lt,t)||J.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},n=J.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},n=J.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},n=J.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},n=J.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},n=J.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},n=J.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},n=J.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},n=J.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},n=J.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){const e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){const e={name:"Android Browser"},n=J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},n=J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},n=J.getFirstMatch(lt,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,s=t.search("\\(")!==-1?n:e;return{name:J.getFirstMatch(s,t),version:J.getSecondMatch(s,t)}}}],qie=[{test:[/Roku\/DVP/],describe(t){const e=J.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:Kn.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=J.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:Kn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=J.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=J.getWindowsVersionName(e);return{name:Kn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:Kn.iOS},n=J.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){const e=J.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=J.getMacOSVersionName(e),r={name:Kn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=J.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:Kn.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){const e=J.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=J.getAndroidVersionName(e),r={name:Kn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=J.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:Kn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=J.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||J.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||J.getFirstMatch(/\bbb(\d+)/i,t);return{name:Kn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=J.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:Kn.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=J.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:Kn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:Kn.Linux}}},{test:[/CrOS/],describe(){return{name:Kn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){const e=J.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:Kn.PlayStation4,version:e}}}],Wie=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){const e=J.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Bt.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Bt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Bt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Bt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Bt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Bt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Bt.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){const e=J.getFirstMatch(/(ipod|iphone)/i,t);return{type:Bt.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Bt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Bt.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Bt.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Bt.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Bt.mobile,vendor:"Microsoft"}}},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Bt.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Bt.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Bt.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Bt.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Bt.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Bt.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Bt.tv}}}],Gie=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:co.Blink};const n=J.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:co.EdgeHTML,version:n}}},{test:[/trident/i],describe(t){const e={name:co.Trident},n=J.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:co.Presto},n=J.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){const e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){const e={name:co.Gecko},n=J.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:co.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:co.WebKit},n=J.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}];class K8{constructor(e,n=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=J.find(Uie,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=J.find(qie,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:n}=this.getOS();return e?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:n}=this.getPlatform();return e?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const e=J.find(Wie,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=J.find(Gie,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return J.assign({},this.parsedResult)}satisfies(e){const n={};let r=0;const s={};let i=0;if(Object.keys(e).forEach(a=>{const l=e[a];typeof l=="string"?(s[a]=l,i+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=J.find(a,u=>this.isOS(u));if(l){const u=this.satisfies(n[l]);if(u!==void 0)return u}const c=J.find(a,u=>this.isPlatform(u));if(c){const u=this.satisfies(n[c]);if(u!==void 0)return u}}if(i>0){const a=Object.keys(s),l=J.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(s[l])}}isBrowser(e,n=!1){const r=this.getBrowserName().toLowerCase();let s=e.toLowerCase();const i=J.getBrowserTypeByAlias(s);return n&&i&&(s=i.toLowerCase()),s===r}compareVersion(e){let n=[0],r=e,s=!1;const i=this.getBrowserVersion();if(typeof i=="string")return e[0]===">"||e[0]==="<"?(r=e.substr(1),e[1]==="="?(s=!0,r=e.substr(2)):n=[],e[0]===">"?n.push(1):n.push(-1)):e[0]==="="?r=e.substr(1):e[0]==="~"&&(s=!0,r=e.substr(1)),n.indexOf(J.compareVersions(i,r,s))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,n=!1){return this.isBrowser(e,n)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(n=>this.is(n))}}/*!
163
+ * Bowser - a browser detector
164
+ * https://github.com/lancedikson/bowser
165
+ * MIT License | (c) Dustin Diaz 2012-2015
166
+ * MIT License | (c) Denis Demchenko 2015-2019
167
+ */class Z8{static getParser(e,n=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new K8(e,n)}static parse(e){return new K8(e).getResult()}static get BROWSER_MAP(){return Y8}static get ENGINE_MAP(){return co}static get OS_MAP(){return Kn}static get PLATFORMS_MAP(){return Bt}}const X8=({serviceId:t,clientVersion:e})=>async n=>{var o,a,l,c,u,d;const r=typeof window<"u"&&((o=window==null?void 0:window.navigator)!=null&&o.userAgent)?Z8.parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",e],["ua","2.1"],[`os/${((a=r==null?void 0:r.os)==null?void 0:a.name)||"other"}`,(l=r==null?void 0:r.os)==null?void 0:l.version],["lang/js"],["md/browser",`${((c=r==null?void 0:r.browser)==null?void 0:c.name)??"unknown"}_${((u=r==null?void 0:r.browser)==null?void 0:u.version)??"unknown"}`]];t&&s.push([`api/${t}`,e]);const i=await((d=n==null?void 0:n.userAgentAppId)==null?void 0:d.call(n));return i&&s.push([`app/${i}`]),s},Q8=t=>()=>Promise.reject(t),J8=typeof TextEncoder=="function"?new TextEncoder:null,eT=t=>{if(typeof t=="string"){if(J8)return J8.encode(t).byteLength;let e=t.length;for(let n=e-1;n>=0;n--){const r=t.charCodeAt(n);r>127&&r<=2047?e++:r>2047&&r<=65535&&(e+=2),r>=56320&&r<=57343&&n--}return e}else{if(typeof t.byteLength=="number")return t.byteLength;if(typeof t.size=="number")return t.size}throw new Error(`Body Length computation failed for ${t}`)},tT="required",or="fn",ar="argv",ha="ref",uo="properties",ho="headers",nT=!0,rT="isSet",qu="booleanEquals",Ll="error",zs="endpoint",Ei="tree",ip="PartitionResult",by="stringEquals",sT={[tT]:!1,type:"String"},iT={[tT]:!0,default:!1,type:"Boolean"},oT={[ha]:"Endpoint"},aT={[or]:qu,[ar]:[{[ha]:"UseFIPS"},!0]},lT={[or]:qu,[ar]:[{[ha]:"UseDualStack"},!0]},Gr={},cT={[or]:"getAttr",[ar]:[{[ha]:ip},"supportsFIPS"]},uT={[or]:qu,[ar]:[!0,{[or]:"getAttr",[ar]:[{[ha]:ip},"supportsDualStack"]}]},vy={[or]:"getAttr",[ar]:[{[ha]:ip},"name"]},dT={url:"https://secretsmanager-fips.{Region}.amazonaws.com",[uo]:{},[ho]:{}},hT={url:"https://secretsmanager.{Region}.amazonaws.com",[uo]:{},[ho]:{}},fT=[aT],pT=[lT],gT=[{[ha]:"Region"}],mT=[{[or]:by,[ar]:["aws",vy]}],yT=[{[or]:by,[ar]:["aws-us-gov",vy]}],Yie={version:"1.0",parameters:{Region:sT,UseDualStack:iT,UseFIPS:iT,Endpoint:sT},rules:[{conditions:[{[or]:rT,[ar]:[oT]}],rules:[{conditions:fT,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Ll},{conditions:pT,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Ll},{endpoint:{url:oT,[uo]:Gr,[ho]:Gr},type:zs}],type:Ei},{conditions:[{[or]:rT,[ar]:gT}],rules:[{conditions:[{[or]:"aws.partition",[ar]:gT,assign:ip}],rules:[{conditions:[aT,lT],rules:[{conditions:[{[or]:qu,[ar]:[nT,cT]},uT],rules:[{conditions:mT,endpoint:dT,type:zs},{conditions:yT,endpoint:dT,type:zs},{endpoint:{url:"https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[uo]:Gr,[ho]:Gr},type:zs}],type:Ei},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Ll}],type:Ei},{conditions:fT,rules:[{conditions:[{[or]:qu,[ar]:[cT,nT]}],rules:[{endpoint:{url:"https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}",[uo]:Gr,[ho]:Gr},type:zs}],type:Ei},{error:"FIPS is enabled but this partition does not support FIPS",type:Ll}],type:Ei},{conditions:pT,rules:[{conditions:[uT],rules:[{conditions:mT,endpoint:hT,type:zs},{conditions:[{[or]:by,[ar]:["aws-cn",vy]}],endpoint:{url:"https://secretsmanager.{Region}.amazonaws.com.cn",[uo]:Gr,[ho]:Gr},type:zs},{conditions:yT,endpoint:hT,type:zs},{endpoint:{url:"https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}",[uo]:Gr,[ho]:Gr},type:zs}],type:Ei},{error:"DualStack is enabled but this partition does not support DualStack",type:Ll}],type:Ei},{endpoint:{url:"https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}",[uo]:Gr,[ho]:Gr},type:zs}],type:Ei}],type:Ei},{error:"Invalid Configuration: Missing Region",type:Ll}]},Kie=new cA({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Zie=(t,e={})=>Kie.get(t,()=>yA(Yie,{endpointParams:t,logger:e.logger}));Iu.aws=W1;const Xie=t=>({apiVersion:"2017-10-17",base64Decoder:(t==null?void 0:t.base64Decoder)??L1,base64Encoder:(t==null?void 0:t.base64Encoder)??Ru,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??Zie,extensions:(t==null?void 0:t.extensions)??[],httpAuthSchemeProvider:(t==null?void 0:t.httpAuthSchemeProvider)??Eie,httpAuthSchemes:(t==null?void 0:t.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Y1}],logger:(t==null?void 0:t.logger)??new Qf,serviceId:(t==null?void 0:t.serviceId)??"Secrets Manager",urlParser:(t==null?void 0:t.urlParser)??Hu,utf8Decoder:(t==null?void 0:t.utf8Decoder)??no,utf8Encoder:(t==null?void 0:t.utf8Encoder)??Ff}),Qie=["in-region","cross-region","mobile","standard","legacy"],bT=({defaultsMode:t}={})=>fne(async()=>{const e=typeof t=="function"?await t():t;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve(Jie()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e==null?void 0:e.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Qie.join(", ")}, got ${e}`)}}),Jie=()=>{var n,r;const t=typeof window<"u"&&((n=window==null?void 0:window.navigator)!=null&&n.userAgent)?Z8.parse(window.navigator.userAgent):void 0,e=(r=t==null?void 0:t.platform)==null?void 0:r.type;return e==="tablet"||e==="mobile"},eoe=t=>{const e=bT(t),n=()=>e().then(KA),r=Xie(t);return{...r,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:(t==null?void 0:t.bodyLengthChecker)??eT,credentialDefaultProvider:(t==null?void 0:t.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(t==null?void 0:t.defaultUserAgentProvider)??X8({serviceId:r.serviceId,clientVersion:Mie.version}),maxAttempts:(t==null?void 0:t.maxAttempts)??Vu,region:(t==null?void 0:t.region)??Q8("Region is missing"),requestHandler:zf.create((t==null?void 0:t.requestHandler)??n),retryMode:(t==null?void 0:t.retryMode)??(async()=>(await n()).retryMode||$8),sha256:(t==null?void 0:t.sha256)??G8,streamCollector:(t==null?void 0:t.streamCollector)??j1,useDualstackEndpoint:(t==null?void 0:t.useDualstackEndpoint)??(()=>Promise.resolve(v8)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(x8))}},vT=t=>{let e=async()=>{if(t.region===void 0)throw new Error("Region is missing from runtimeConfig");const n=t.region;return typeof n=="string"?n:n()};return{setRegion(n){e=n},region(){return e}}},xT=t=>({region:t.region()}),toe=t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,r=t.credentials;return{setHttpAuthScheme(s){const i=e.findIndex(o=>o.schemeId===s.schemeId);i===-1?e.push(s):e.splice(i,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){r=s},credentials(){return r}}},noe=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),op=t=>t,roe=(t,e)=>{const n={...op(vT(t)),...op(ZA(t)),...op(B4(t)),...op(toe(t))};return e.forEach(r=>r.configure(n)),{...t,...xT(n),...XA(n),...j4(n),...noe(n)}};class soe extends jA{constructor(...[e]){const n=eoe(e||{}),r=Tie(n),s=lA(r),i=B8(s),o=C8(i),a=o,l=O8(a),c=Aie(l),u=roe(c,(e==null?void 0:e.extensions)||[]);super(u),this.config=u,this.middlewareStack.use(y8(this.config)),this.middlewareStack.use(j8(this.config)),this.middlewareStack.use(E8(this.config)),this.middlewareStack.use(q4(this.config)),this.middlewareStack.use(W4(this.config)),this.middlewareStack.use(Y4(this.config)),this.middlewareStack.use(K4(this.config,{httpAuthSchemeParametersProvider:Cie,identityProviderConfigProvider:async d=>new oA({"aws.auth#sigv4":d.credentials})})),this.middlewareStack.use(X4(this.config))}destroy(){super.destroy()}}class Zn extends Xf{constructor(e){super(e),Object.setPrototypeOf(this,Zn.prototype)}}class xy extends Zn{constructor(e){super({name:"DecryptionFailure",$fault:"client",...e}),this.name="DecryptionFailure",this.$fault="client",Object.setPrototypeOf(this,xy.prototype),this.Message=e.Message}}class wy extends Zn{constructor(e){super({name:"InternalServiceError",$fault:"server",...e}),this.name="InternalServiceError",this.$fault="server",Object.setPrototypeOf(this,wy.prototype),this.Message=e.Message}}class _y extends Zn{constructor(e){super({name:"InvalidNextTokenException",$fault:"client",...e}),this.name="InvalidNextTokenException",this.$fault="client",Object.setPrototypeOf(this,_y.prototype),this.Message=e.Message}}class Cy extends Zn{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Cy.prototype),this.Message=e.Message}}class Sy extends Zn{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,Sy.prototype),this.Message=e.Message}}class Ey extends Zn{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ey.prototype),this.Message=e.Message}}class Ay extends Zn{constructor(e){super({name:"EncryptionFailure",$fault:"client",...e}),this.name="EncryptionFailure",this.$fault="client",Object.setPrototypeOf(this,Ay.prototype),this.Message=e.Message}}class Ty extends Zn{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ty.prototype),this.Message=e.Message}}class ky extends Zn{constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,ky.prototype),this.Message=e.Message}}class My extends Zn{constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),this.name="PreconditionNotMetException",this.$fault="client",Object.setPrototypeOf(this,My.prototype),this.Message=e.Message}}class Oy extends Zn{constructor(e){super({name:"ResourceExistsException",$fault:"client",...e}),this.name="ResourceExistsException",this.$fault="client",Object.setPrototypeOf(this,Oy.prototype),this.Message=e.Message}}class $y extends Zn{constructor(e){super({name:"PublicPolicyException",$fault:"client",...e}),this.name="PublicPolicyException",this.$fault="client",Object.setPrototypeOf(this,$y.prototype),this.Message=e.Message}}const ioe=t=>({...t,...t.SecretBinary&&{SecretBinary:Gn},...t.SecretString&&{SecretString:Gn}}),ooe=async(t,e)=>{const n=Soe("GetSecretValue");let r;return r=JSON.stringify(Mn(t)),Coe(e,n,"/",void 0,r)},aoe=async(t,e)=>{if(t.statusCode>=300)return loe(t,e);const n=await t8(t.body,e);let r={};return r=woe(n,e),{$metadata:Cr(t),...r}},loe=async(t,e)=>{const n={...t,body:await yre(t.body,e)},r=bre(t,n.body);switch(r){case"DecryptionFailure":case"com.amazonaws.secretsmanager#DecryptionFailure":throw await coe(n);case"InternalServiceError":case"com.amazonaws.secretsmanager#InternalServiceError":throw await doe(n);case"InvalidNextTokenException":case"com.amazonaws.secretsmanager#InvalidNextTokenException":throw await hoe(n);case"InvalidParameterException":case"com.amazonaws.secretsmanager#InvalidParameterException":throw await foe(n);case"InvalidRequestException":case"com.amazonaws.secretsmanager#InvalidRequestException":throw await poe(n);case"ResourceNotFoundException":case"com.amazonaws.secretsmanager#ResourceNotFoundException":throw await xoe(n);case"EncryptionFailure":case"com.amazonaws.secretsmanager#EncryptionFailure":throw await uoe(n);case"LimitExceededException":case"com.amazonaws.secretsmanager#LimitExceededException":throw await goe(n);case"MalformedPolicyDocumentException":case"com.amazonaws.secretsmanager#MalformedPolicyDocumentException":throw await moe(n);case"PreconditionNotMetException":case"com.amazonaws.secretsmanager#PreconditionNotMetException":throw await yoe(n);case"ResourceExistsException":case"com.amazonaws.secretsmanager#ResourceExistsException":throw await voe(n);case"PublicPolicyException":case"com.amazonaws.secretsmanager#PublicPolicyException":throw await boe(n);default:const s=n.body;return _oe({output:t,parsedBody:s,errorCode:r})}},coe=async(t,e)=>{const n=t.body,r=Mn(n),s=new xy({$metadata:Cr(t),...r});return ht(s,n)},uoe=async(t,e)=>{const n=t.body,r=Mn(n),s=new Ay({$metadata:Cr(t),...r});return ht(s,n)},doe=async(t,e)=>{const n=t.body,r=Mn(n),s=new wy({$metadata:Cr(t),...r});return ht(s,n)},hoe=async(t,e)=>{const n=t.body,r=Mn(n),s=new _y({$metadata:Cr(t),...r});return ht(s,n)},foe=async(t,e)=>{const n=t.body,r=Mn(n),s=new Cy({$metadata:Cr(t),...r});return ht(s,n)},poe=async(t,e)=>{const n=t.body,r=Mn(n),s=new Sy({$metadata:Cr(t),...r});return ht(s,n)},goe=async(t,e)=>{const n=t.body,r=Mn(n),s=new Ty({$metadata:Cr(t),...r});return ht(s,n)},moe=async(t,e)=>{const n=t.body,r=Mn(n),s=new ky({$metadata:Cr(t),...r});return ht(s,n)},yoe=async(t,e)=>{const n=t.body,r=Mn(n),s=new My({$metadata:Cr(t),...r});return ht(s,n)},boe=async(t,e)=>{const n=t.body,r=Mn(n),s=new $y({$metadata:Cr(t),...r});return ht(s,n)},voe=async(t,e)=>{const n=t.body,r=Mn(n),s=new Oy({$metadata:Cr(t),...r});return ht(s,n)},xoe=async(t,e)=>{const n=t.body,r=Mn(n),s=new Ey({$metadata:Cr(t),...r});return ht(s,n)},woe=(t,e)=>hre(t,{ARN:Si,CreatedDate:n=>Rl(Xne(Gf(n))),Name:Si,SecretBinary:e.base64Decoder,SecretString:Si,VersionId:Si,VersionStages:Mn}),Cr=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),_oe=YA(Zn),Coe=async(t,e,n,r,s)=>{const{hostname:i,protocol:o="https",port:a,path:l}=await t.endpoint(),c={protocol:o,hostname:i,port:a,method:"POST",path:l.endsWith("/")?l.slice(0,-1)+n:l+n,headers:e};return s!==void 0&&(c.body=s),new Pt(c)};function Soe(t){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`secretsmanager.${t}`}}class wT extends Bu.classBuilder().ep(kie).m(function(e,n,r,s){return[jf(r,this.serialize,this.deserialize),tp(r,e.getEndpointParameterInstructions())]}).s("secretsmanager","GetSecretValue",{}).n("SecretsManagerClient","GetSecretValueCommand").f(void 0,ioe).ser(ooe).de(aoe).build(){}function Eoe(t){return e=>async n=>{var s,i;const{request:r}=n;return Pt.isInstance(r)&&r.body&&t.runtime==="node"&&((i=(s=t.requestHandler)==null?void 0:s.constructor)==null?void 0:i.name)!=="FetchHttpHandler"&&(r.headers={...r.headers,Expect:"100-continue"}),e({...n,request:r})}}const Aoe={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},Toe=t=>({applyToStack:e=>{e.add(Eoe(t),Aoe)}}),_T={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},koe=_T.WHEN_SUPPORTED,Moe=_T.WHEN_SUPPORTED;var Dt;(function(t){t.MD5="MD5",t.CRC32="CRC32",t.CRC32C="CRC32C",t.SHA1="SHA1",t.SHA256="SHA256"})(Dt||(Dt={}));var CT;(function(t){t.HEADER="header",t.TRAILER="trailer"})(CT||(CT={}));const Ooe=Dt.MD5,$oe=Dt.CRC32;var ST;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(ST||(ST={}));const Py=[Dt.CRC32,Dt.CRC32C,Dt.SHA1,Dt.SHA256],Poe=[Dt.SHA256,Dt.SHA1,Dt.CRC32,Dt.CRC32C],Doe=(t,{requestChecksumRequired:e,requestAlgorithmMember:n},r)=>{const s=r?$oe:Ooe;if(!n||!t[n])return e?s:void 0;const i=t[n];if(!Py.includes(i))throw new Error(`The checksum algorithm "${i}" is not supported by the client. Select one of ${Py}.`);return i},Dy=t=>t===Dt.MD5?"content-md5":`x-amz-checksum-${t.toLowerCase()}`,Roe=(t,e)=>{const n=t.toLowerCase();for(const r of Object.keys(e))if(n===r.toLowerCase())return!0;return!1},Ioe=(t,e)=>{const n=t.toLowerCase();for(const r of Object.keys(e))if(r.toLowerCase().startsWith(n))return!0;return!1},Ry=t=>t!==void 0&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!$A(t);var Noe=function(){function t(){this.crc32c=new ET}return t.prototype.update=function(e){Uu(e)||this.crc32c.update(ao(e))},t.prototype.digest=function(){return my(this,void 0,void 0,function(){return yy(this,function(e){return[2,z8(this.crc32c.digest())]})})},t.prototype.reset=function(){this.crc32c=new ET},t}(),ET=function(){function t(){this.checksum=4294967295}return t.prototype.update=function(e){var n,r;try{for(var s=q8(e),i=s.next();!i.done;i=s.next()){var o=i.value;this.checksum=this.checksum>>>8^Boe[(this.checksum^o)&255]}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return this},t.prototype.digest=function(){return(this.checksum^4294967295)>>>0},t}(),Loe=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],Boe=H8(Loe),joe=function(){function t(){this.crc32=new ap}return t.prototype.update=function(e){Uu(e)||this.crc32.update(ao(e))},t.prototype.digest=function(){return my(this,void 0,void 0,function(){return yy(this,function(e){return[2,z8(this.crc32.digest())]})})},t.prototype.reset=function(){this.crc32=new ap},t}(),ap=function(){function t(){this.checksum=4294967295}return t.prototype.update=function(e){var n,r;try{for(var s=q8(e),i=s.next();!i.done;i=s.next()){var o=i.value;this.checksum=this.checksum>>>8^zoe[(this.checksum^o)&255]}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return this},t.prototype.digest=function(){return(this.checksum^4294967295)>>>0},t}(),Foe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],zoe=H8(Foe);const Hoe=()=>joe,AT=(t,e)=>{switch(t){case Dt.MD5:return e.md5;case Dt.CRC32:return Hoe();case Dt.CRC32C:return Noe;case Dt.SHA1:return e.sha1;case Dt.SHA256:return e.sha256;default:throw new Error(`Unsupported checksum algorithm: ${t}`)}},TT=(t,e)=>{const n=new t;return n.update(Dl(e||"")),n.digest()},Voe={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},Uoe=(t,e)=>(n,r)=>async s=>{if(!Pt.isInstance(s.request)||Ioe("x-amz-checksum-",s.request.headers))return n(s);const{request:i,input:o}=s,{body:a,headers:l}=i,{base64Encoder:c,streamHasher:u}=t,{requestChecksumRequired:d,requestAlgorithmMember:h}=e,f=Doe(o,{requestChecksumRequired:d,requestAlgorithmMember:h==null?void 0:h.name},!!r.isS3ExpressBucket);let p=a,m=l;if(f){switch(f){case Dt.CRC32:Wn(r,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Dt.CRC32C:Wn(r,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Dt.SHA1:Wn(r,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Dt.SHA256:Wn(r,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const y=Dy(f),v=AT(f,t);if(Ry(a)){const{getAwsChunkedEncodingStream:b,bodyLengthChecker:C}=t;p=b(a,{base64Encoder:c,bodyLengthChecker:C,checksumLocationName:y,checksumAlgorithmFn:v,streamHasher:u}),m={...l,"content-encoding":l["content-encoding"]?`${l["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":l["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":y},delete m["content-length"]}else if(!Roe(y,l)){const b=await TT(v,a);m={...l,[y]:c(b)}}}return await n({...s,request:{...i,headers:m,body:p}})},kT=(t=[])=>{const e=[];for(const n of Poe)!t.includes(n)||!Py.includes(n)||e.push(n);return e},qoe=t=>{const e=t.lastIndexOf("-");if(e!==-1){const n=t.slice(e+1);if(!n.startsWith("0")){const r=parseInt(n,10);if(!isNaN(r)&&r>=1&&r<=1e4)return!0}}return!1};function MT(t){return new Blob([t]).stream()}const Woe=async(t,{checksumAlgorithmFn:e,base64Encoder:n})=>n(await TT(e,t)),Goe=async(t,{config:e,responseAlgorithms:n})=>{const r=kT(n),{body:s,headers:i}=t;for(const o of r){const a=Dy(o),l=i[a];if(l){const c=AT(o,e),{base64Encoder:u}=e;if(Ry(s)){t.body=jte({expectedChecksum:l,checksumSourceLocation:a,checksum:new c,source:s,base64Encoder:u});return}const d=await Woe(s,{checksumAlgorithmFn:c,base64Encoder:u});if(d===l)break;throw new Error(`Checksum mismatch: expected "${d}" but received "${l}" in response header "${a}".`)}}},Yoe={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Koe=(t,e)=>(n,r)=>async s=>{if(!Pt.isInstance(s.request))return n(s);const i=s.input,o=await n(s),a=o.response;let l;const{requestValidationModeMember:c,responseAlgorithms:u}=e;if(c&&i[c]==="ENABLED"){const{clientName:d,commandName:h}=r;if(d==="S3Client"&&h==="GetObjectCommand"&&kT(u).every(m=>{const g=Dy(m),y=a.headers[g];return!y||qoe(y)}))return o;const p=Ry(a.body);p&&(l=await t.streamCollector(a.body),a.body=MT(l)),await Goe(o.response,{config:t,responseAlgorithms:u}),p&&l&&(a.body=MT(l))}return o},OT=(t,e)=>({applyToStack:n=>{n.add(Uoe(t,e),Voe),n.addRelativeTo(Koe(t,e),Yoe)}}),Zoe=t=>({...t,requestChecksumCalculation:ys(t.requestChecksumCalculation??koe),responseChecksumValidation:ys(t.responseChecksumValidation??Moe)}),Xoe="content-length";function Qoe(){return(t,e)=>async n=>{var s;const{request:r}=n;if(Pt.isInstance(r)&&!(Xoe in r.headers)){const i="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof((s=e==null?void 0:e.logger)==null?void 0:s.warn)=="function"&&!(e.logger instanceof Qf)?e.logger.warn(i):console.warn(i)}return t({...n})}}const Joe={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},eae=t=>({applyToStack:e=>{e.add(Qoe(),Joe)}}),tae=t=>(e,n)=>async r=>{const s=await t.region(),i=t.region;let o=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(t,"region",{writable:!1,value:async()=>n.__s3RegionRedirect}),o=()=>Object.defineProperty(t,"region",{writable:!0,value:i}));try{const a=await e(r);if(n.__s3RegionRedirect){o();const l=await t.region();if(s!==l)throw new Error("Region was not restored following S3 region redirect.")}return a}catch(a){throw o(),a}},nae={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function rae(t){return(e,n)=>async r=>{var s,i,o;try{return await e(r)}catch(a){if(t.followRegionRedirects&&(((s=a==null?void 0:a.$metadata)==null?void 0:s.httpStatusCode)===301||((i=a==null?void 0:a.$metadata)==null?void 0:i.httpStatusCode)===400&&(a==null?void 0:a.name)==="IllegalLocationConstraintException")){try{const l=a.$response.headers["x-amz-bucket-region"];(o=n.logger)==null||o.debug(`Redirecting from ${await t.region()} to ${l}`),n.__s3RegionRedirect=l}catch(l){throw new Error("Region redirect failed: "+l)}return e(r)}throw a}}}const sae={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},iae=t=>({applyToStack:e=>{e.add(rae(t),sae),e.addRelativeTo(tae(t),nae)}}),oae=t=>(e,n)=>async r=>{var o;const s=await e(r),{response:i}=s;if(Ml.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{iy(i.headers.expires)}catch(a){(o=n.logger)==null||o.warn(`AWS SDK Warning for ${n.clientName}::${n.commandName} response parsing (${i.headers.expires}): ${a}`),delete i.headers.expires}}return s},aae={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},lae=t=>({applyToStack:e=>{e.addRelativeTo(oae(),aae)}});class lp{constructor(e={}){this.data=e,this.lastPurgeTime=Date.now()}get(e){const n=this.data[e];if(n)return n}set(e,n){return this.data[e]=n,n}delete(e){delete this.data[e]}async purgeExpired(){const e=Date.now();if(!(this.lastPurgeTime+lp.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>e))for(const n in this.data){const r=this.data[n];if(!r.isRefreshing){const s=await r.identity;s.expiration&&s.expiration.getTime()<e&&delete this.data[n]}}}}lp.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;class Iy{constructor(e,n=!1,r=Date.now()){this._identity=e,this.isRefreshing=n,this.accessed=r}get identity(){return this.accessed=Date.now(),this._identity}}class cp{constructor(e,n=new lp){this.createSessionFn=e,this.cache=n}async getS3ExpressIdentity(e,n){const r=n.Bucket,{cache:s}=this,i=s.get(r);return i?i.identity.then(o=>{var c,u;return(((c=o.expiration)==null?void 0:c.getTime())??0)<Date.now()?s.set(r,new Iy(this.getIdentity(r))).identity:((((u=o.expiration)==null?void 0:u.getTime())??0)<Date.now()+cp.REFRESH_WINDOW_MS&&!i.isRefreshing&&(i.isRefreshing=!0,this.getIdentity(r).then(d=>{s.set(r,new Iy(Promise.resolve(d)))})),o)}):s.set(r,new Iy(this.getIdentity(r))).identity}async getIdentity(e){var s,i;await this.cache.purgeExpired().catch(o=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
168
+ `+o)});const n=await this.createSessionFn(e);if(!((s=n.Credentials)!=null&&s.AccessKeyId)||!((i=n.Credentials)!=null&&i.SecretAccessKey))throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}cp.REFRESH_WINDOW_MS=6e4;const cae="Directory",uae="S3Express",dae="sigv4-s3express",Ny="X-Amz-S3session-Token",Ly=Ny.toLowerCase();class hae extends ey{async signWithCredentials(e,n,r){const s=$T(n);e.headers[Ly]=n.sessionToken;const i=this;return PT(i,s),i.signRequest(e,r??{})}async presignWithCredentials(e,n,r){const s=$T(n);return delete e.headers[Ly],e.headers[Ny]=n.sessionToken,e.query=e.query??{},e.query[Ny]=n.sessionToken,PT(this,s),this.presign(e,r)}}function $T(t){return{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,expiration:t.expiration}}function PT(t,e){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=t.credentialProvider,s=()=>(clearTimeout(n),t.credentialProvider=r,Promise.resolve(e));t.credentialProvider=s}const fae=t=>(e,n)=>async r=>{var s,i,o,a,l;if(n.endpointV2){const c=n.endpointV2,u=((o=(i=(s=c.properties)==null?void 0:s.authSchemes)==null?void 0:i[0])==null?void 0:o.name)===dae;if((((a=c.properties)==null?void 0:a.backend)===uae||((l=c.properties)==null?void 0:l.bucketType)===cae)&&(Wn(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),u){const h=r.input.Bucket;if(h){const f=await t.s3ExpressIdentityProvider.getS3ExpressIdentity(await t.credentials(),{Bucket:h});n.s3ExpressIdentity=f,Pt.isInstance(r.request)&&f.sessionToken&&(r.request.headers[Ly]=f.sessionToken)}}}return e(r)},pae={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},gae=t=>({applyToStack:e=>{e.add(fae(t),pae)}}),mae=async(t,e,n,r)=>{const s=await r.signWithCredentials(n,t,{});if(s.headers["X-Amz-Security-Token"]||s.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return s},yae=t=>e=>{throw e},bae=(t,e)=>{},vae=t=>(e,n)=>async r=>{if(!Pt.isInstance(r.request))return e(r);const i=aa(n).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:a,signer:l}=i;let c;n.s3ExpressIdentity?c=await mae(n.s3ExpressIdentity,o,r.request,await t.signer()):c=await l.sign(r.request,a,o);const u=await e({...r,request:c}).catch((l.errorHandler||yae)(o));return(l.successHandler||bae)(u.response,o),u},xae=t=>({applyToStack:e=>{e.addRelativeTo(vae(t),Z4)}}),wae=(t,{session:e})=>{const[n,r]=e;return{...t,forcePathStyle:t.forcePathStyle??!1,useAccelerateEndpoint:t.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:t.disableMultiregionAccessPoints??!1,followRegionRedirects:t.followRegionRedirects??!1,s3ExpressIdentityProvider:t.s3ExpressIdentityProvider??new cp(async s=>n().send(new r({Bucket:s,SessionMode:"ReadWrite"}))),bucketEndpoint:t.bucketEndpoint??!1}},_ae={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Cae=3e3,Sae=t=>(e,n)=>async r=>{const s=await e(r),{response:i}=s;if(!Ml.isInstance(i))return s;const{statusCode:o,body:a}=i;if(o<200||o>=300||!(typeof(a==null?void 0:a.stream)=="function"||typeof(a==null?void 0:a.pipe)=="function"||typeof(a==null?void 0:a.tee)=="function"))return s;let c=a,u=a;a&&typeof a=="object"&&!(a instanceof Uint8Array)&&([c,u]=await Ite(a)),i.body=u;const d=await Eae(c,{streamCollector:async f=>Nte(f,Cae)});typeof(c==null?void 0:c.destroy)=="function"&&c.destroy();const h=t.utf8Encoder(d.subarray(d.length-16));if(d.length===0&&_ae[n.commandName]){const f=new Error("S3 aborted request");throw f.name="InternalError",f}return h&&h.endsWith("</Error>")&&(i.statusCode=400),s},Eae=(t=new Uint8Array,e)=>t instanceof Uint8Array?Promise.resolve(t):e.streamCollector(t)||Promise.resolve(new Uint8Array),Aae={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},DT=t=>({applyToStack:e=>{e.addRelativeTo(Sae(t),Aae)}}),Tae=t=>typeof t=="string"&&t.indexOf("arn:")===0&&t.split(":").length>=6;function kae(t){return(e,n)=>async r=>{var s,i,o,a;if(t.bucketEndpoint){const l=n.endpointV2;if(l){const c=r.input.Bucket;if(typeof c=="string")try{const u=new URL(c);n.endpointV2={...l,url:u}}catch(u){const d=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${c} could not be parsed as URL.`;throw((i=(s=n.logger)==null?void 0:s.constructor)==null?void 0:i.name)==="NoOpLogger"?console.warn(d):(a=(o=n.logger)==null?void 0:o.warn)==null||a.call(o,d),u}}}return e(r)}}const Mae={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function Oae({bucketEndpoint:t}){return e=>async n=>{const{input:{Bucket:r}}=n;if(!t&&typeof r=="string"&&!Tae(r)&&r.indexOf("/")>=0){const s=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw s.name="InvalidBucketName",s}return e({...n})}}const $ae={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Pae=t=>({applyToStack:e=>{e.add(Oae(t),$ae),e.addRelativeTo(kae(t),Mae)}}),Dae=t=>({...t,eventStreamMarshaller:t.eventStreamSerdeProvider(t)}),Rae={CrtSignerV4:null};class RT{constructor(e){this.sigv4Signer=new hae(e),this.signerOptions=e}async sign(e,n={}){if(n.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(e,n)}return this.sigv4Signer.sign(e,n)}async signWithCredentials(e,n,r={}){if(r.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(e,n,r)}return this.sigv4Signer.signWithCredentials(e,n,r)}async presign(e,n={}){if(n.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(e,n)}return this.sigv4Signer.presign(e,n)}async presignWithCredentials(e,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=null;try{if(e=Rae.CrtSignerV4,typeof e!="function")throw new Error}catch(n){throw n.message=`${n.message}
169
+ Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly.
170
+ You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";].
171
+ For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,n}this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}const By="required",D="type",L="conditions",Y="fn",K="argv",ke="ref",st="assign",fe="url",pe="properties",IT="backend",vs="authSchemes",Sr="disableDoubleEncoding",Er="signingName",Hs="signingRegion",ge="headers",jy="signingRegionSet",Iae=6,Nae=!1,xs=!0,Yr="isSet",un="booleanEquals",xe="error",up="aws.partition",it="stringEquals",jt="getAttr",On="name",$n="substring",NT="bucketSuffix",LT="parseURL",BT="{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",re="endpoint",ee="tree",jT="aws.isVirtualHostableS3Bucket",dp="{url#scheme}://{Bucket}.{url#authority}{url#path}",Vs="not",hp="{url#scheme}://{url#authority}{url#path}",FT="hardwareType",zT="regionPrefix",HT="bucketAliasSuffix",Fy="outpostId",fa="isValidHostLabel",zy="sigv4a",Wu="s3-outposts",Bl="s3",VT="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",UT="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",qT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",WT="aws.parseArn",GT="bucketArn",YT="arnType",fp="",Hy="s3-object-lambda",KT="accesspoint",Vy="accessPointName",ZT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",XT="mrapPartition",QT="outpostType",JT="arnPrefix",e6="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",t6="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",n6="https://s3.{partitionResult#dnsSuffix}",jl={[By]:!1,[D]:"String"},Fl={[By]:!0,default:!1,[D]:"Boolean"},Gu={[By]:!1,[D]:"Boolean"},ws={[Y]:un,[K]:[{[ke]:"Accelerate"},!0]},ft={[Y]:un,[K]:[{[ke]:"UseFIPS"},!0]},pt={[Y]:un,[K]:[{[ke]:"UseDualStack"},!0]},Gt={[Y]:Yr,[K]:[{[ke]:"Endpoint"}]},r6={[Y]:up,[K]:[{[ke]:"Region"}],[st]:"partitionResult"},s6={[Y]:it,[K]:[{[Y]:jt,[K]:[{[ke]:"partitionResult"},On]},"aws-cn"]},pp={[Y]:Yr,[K]:[{[ke]:"Bucket"}]},Ft={[ke]:"Bucket"},Xn={[Y]:LT,[K]:[{[ke]:"Endpoint"}],[st]:"url"},gp={[Y]:un,[K]:[{[Y]:jt,[K]:[{[ke]:"url"},"isIp"]},!0]},i6={[ke]:"url"},o6={[Y]:"uriEncode",[K]:[Ft],[st]:"uri_encoded_bucket"},Ai={[IT]:"S3Express",[vs]:[{[Sr]:!0,[On]:"sigv4",[Er]:"s3express",[Hs]:"{Region}"}]},$e={},a6={[Y]:jT,[K]:[Ft,!1]},Uy={[xe]:"S3Express bucket name is not a valid virtual hostable name.",[D]:xe},mp={[IT]:"S3Express",[vs]:[{[Sr]:!0,[On]:"sigv4-s3express",[Er]:"s3express",[Hs]:"{Region}"}]},l6={[Y]:Yr,[K]:[{[ke]:"UseS3ExpressControlEndpoint"}]},c6={[Y]:un,[K]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Pe={[Y]:Vs,[K]:[Gt]},u6={[xe]:"Unrecognized S3Express bucket name format.",[D]:xe},d6={[Y]:Vs,[K]:[pp]},h6={[ke]:FT},f6={[L]:[Pe],[xe]:"Expected a endpoint to be specified but no endpoint was found",[D]:xe},yp={[vs]:[{[Sr]:!0,[On]:zy,[Er]:Wu,[jy]:["*"]},{[Sr]:!0,[On]:"sigv4",[Er]:Wu,[Hs]:"{Region}"}]},qy={[Y]:un,[K]:[{[ke]:"ForcePathStyle"},!1]},Lae={[ke]:"ForcePathStyle"},Yt={[Y]:un,[K]:[{[ke]:"Accelerate"},!1]},Jt={[Y]:it,[K]:[{[ke]:"Region"},"aws-global"]},dn={[vs]:[{[Sr]:!0,[On]:"sigv4",[Er]:Bl,[Hs]:"us-east-1"}]},We={[Y]:Vs,[K]:[Jt]},hn={[Y]:un,[K]:[{[ke]:"UseGlobalEndpoint"},!0]},p6={[fe]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[pe]:{[vs]:[{[Sr]:!0,[On]:"sigv4",[Er]:Bl,[Hs]:"{Region}"}]},[ge]:{}},Kt={[vs]:[{[Sr]:!0,[On]:"sigv4",[Er]:Bl,[Hs]:"{Region}"}]},fn={[Y]:un,[K]:[{[ke]:"UseGlobalEndpoint"},!1]},Ve={[Y]:un,[K]:[{[ke]:"UseDualStack"},!1]},g6={[fe]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},je={[Y]:un,[K]:[{[ke]:"UseFIPS"},!1]},m6={[fe]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},y6={[fe]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},Wy={[Y]:un,[K]:[{[Y]:jt,[K]:[i6,"isIp"]},!1]},Gy={[fe]:VT,[pe]:Kt,[ge]:{}},Yy={[fe]:dp,[pe]:Kt,[ge]:{}},b6={[re]:Yy,[D]:re},Ky={[fe]:UT,[pe]:Kt,[ge]:{}},v6={[fe]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},bp={[xe]:"Invalid region: region was not a valid DNS name.",[D]:xe},lr={[ke]:GT},x6={[ke]:YT},Zy={[Y]:jt,[K]:[lr,"service"]},Xy={[ke]:Vy},w6={[L]:[pt],[xe]:"S3 Object Lambda does not support Dual-stack",[D]:xe},_6={[L]:[ws],[xe]:"S3 Object Lambda does not support S3 Accelerate",[D]:xe},C6={[L]:[{[Y]:Yr,[K]:[{[ke]:"DisableAccessPoints"}]},{[Y]:un,[K]:[{[ke]:"DisableAccessPoints"},!0]}],[xe]:"Access points are not supported for this operation",[D]:xe},Qy={[L]:[{[Y]:Yr,[K]:[{[ke]:"UseArnRegion"}]},{[Y]:un,[K]:[{[ke]:"UseArnRegion"},!1]},{[Y]:Vs,[K]:[{[Y]:it,[K]:[{[Y]:jt,[K]:[lr,"region"]},"{Region}"]}]}],[xe]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[D]:xe},S6={[Y]:jt,[K]:[{[ke]:"bucketPartition"},On]},E6={[Y]:jt,[K]:[lr,"accountId"]},Jy={[vs]:[{[Sr]:!0,[On]:"sigv4",[Er]:Hy,[Hs]:"{bucketArn#region}"}]},A6={[xe]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[D]:xe},eb={[xe]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[D]:xe},tb={[xe]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[D]:xe},nb={[xe]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[D]:xe},T6={[xe]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[D]:xe},k6={[xe]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[D]:xe},Yu={[vs]:[{[Sr]:!0,[On]:"sigv4",[Er]:Bl,[Hs]:"{bucketArn#region}"}]},M6={[vs]:[{[Sr]:!0,[On]:zy,[Er]:Wu,[jy]:["*"]},{[Sr]:!0,[On]:"sigv4",[Er]:Wu,[Hs]:"{bucketArn#region}"}]},O6={[Y]:WT,[K]:[Ft]},$6={[fe]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[pe]:Kt,[ge]:{}},P6={[fe]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[pe]:Kt,[ge]:{}},D6={[fe]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[pe]:Kt,[ge]:{}},rb={[fe]:e6,[pe]:Kt,[ge]:{}},R6={[fe]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[pe]:Kt,[ge]:{}},I6={[ke]:"UseObjectLambdaEndpoint"},sb={[vs]:[{[Sr]:!0,[On]:"sigv4",[Er]:Hy,[Hs]:"{Region}"}]},N6={[fe]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},L6={[fe]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},B6={[fe]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},ib={[fe]:hp,[pe]:Kt,[ge]:{}},j6={[fe]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[pe]:Kt,[ge]:{}},ob=[{[ke]:"Region"}],Bae=[{[ke]:"Endpoint"}],jae=[Ft],ab=[pt],vp=[ws],pa=[Gt,Xn],F6=[{[Y]:Yr,[K]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[Y]:un,[K]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],z6=[gp],lb=[o6],cb=[a6],zl=[ft],H6=[{[Y]:$n,[K]:[Ft,6,14,!0],[st]:"s3expressAvailabilityZoneId"},{[Y]:$n,[K]:[Ft,14,16,!0],[st]:"s3expressAvailabilityZoneDelim"},{[Y]:it,[K]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ku=[{[L]:[ft],[re]:{[fe]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[pe]:Ai,[ge]:{}},[D]:re},{[re]:{[fe]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[pe]:Ai,[ge]:{}},[D]:re}],V6=[{[Y]:$n,[K]:[Ft,6,15,!0],[st]:"s3expressAvailabilityZoneId"},{[Y]:$n,[K]:[Ft,15,17,!0],[st]:"s3expressAvailabilityZoneDelim"},{[Y]:it,[K]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],U6=[{[Y]:$n,[K]:[Ft,6,19,!0],[st]:"s3expressAvailabilityZoneId"},{[Y]:$n,[K]:[Ft,19,21,!0],[st]:"s3expressAvailabilityZoneDelim"},{[Y]:it,[K]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],q6=[{[Y]:$n,[K]:[Ft,6,20,!0],[st]:"s3expressAvailabilityZoneId"},{[Y]:$n,[K]:[Ft,20,22,!0],[st]:"s3expressAvailabilityZoneDelim"},{[Y]:it,[K]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],W6=[{[Y]:$n,[K]:[Ft,6,26,!0],[st]:"s3expressAvailabilityZoneId"},{[Y]:$n,[K]:[Ft,26,28,!0],[st]:"s3expressAvailabilityZoneDelim"},{[Y]:it,[K]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Zu=[{[L]:[ft],[re]:{[fe]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[pe]:mp,[ge]:{}},[D]:re},{[re]:{[fe]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[pe]:mp,[ge]:{}},[D]:re}],Fae=[pp],G6=[{[Y]:fa,[K]:[{[ke]:Fy},!1]}],Y6=[{[Y]:it,[K]:[{[ke]:zT},"beta"]}],zae=["*"],fo=[r6],K6=[{[Y]:fa,[K]:[{[ke]:"Region"},!1]}],po=[{[Y]:it,[K]:[{[ke]:"Region"},"us-east-1"]}],ub=[{[Y]:it,[K]:[x6,KT]}],Z6=[{[Y]:jt,[K]:[lr,"resourceId[1]"],[st]:Vy},{[Y]:Vs,[K]:[{[Y]:it,[K]:[Xy,fp]}]}],Hae=[lr,"resourceId[1]"],db=[{[Y]:Vs,[K]:[{[Y]:it,[K]:[{[Y]:jt,[K]:[lr,"region"]},fp]}]}],X6=[{[Y]:Vs,[K]:[{[Y]:Yr,[K]:[{[Y]:jt,[K]:[lr,"resourceId[2]"]}]}]}],Vae=[lr,"resourceId[2]"],hb=[{[Y]:up,[K]:[{[Y]:jt,[K]:[lr,"region"]}],[st]:"bucketPartition"}],Q6=[{[Y]:it,[K]:[S6,{[Y]:jt,[K]:[{[ke]:"partitionResult"},On]}]}],fb=[{[Y]:fa,[K]:[{[Y]:jt,[K]:[lr,"region"]},!0]}],pb=[{[Y]:fa,[K]:[E6,!1]}],J6=[{[Y]:fa,[K]:[Xy,!1]}],ek=[{[Y]:fa,[K]:[{[ke]:"Region"},!0]}],Uae={version:"1.0",parameters:{Bucket:jl,Region:jl,UseFIPS:Fl,UseDualStack:Fl,Endpoint:jl,ForcePathStyle:Fl,Accelerate:Fl,UseGlobalEndpoint:Fl,UseObjectLambdaEndpoint:Gu,Key:jl,Prefix:jl,CopySource:jl,DisableAccessPoints:Gu,DisableMultiRegionAccessPoints:Fl,UseArnRegion:Gu,UseS3ExpressControlEndpoint:Gu,DisableS3ExpressSessionAuth:Gu},rules:[{[L]:[{[Y]:Yr,[K]:ob}],rules:[{[L]:[ws,ft],error:"Accelerate cannot be used with FIPS",[D]:xe},{[L]:[pt,Gt],error:"Cannot set dual-stack in combination with a custom endpoint.",[D]:xe},{[L]:[Gt,ft],error:"A custom endpoint cannot be combined with FIPS",[D]:xe},{[L]:[Gt,ws],error:"A custom endpoint cannot be combined with S3 Accelerate",[D]:xe},{[L]:[ft,r6,s6],error:"Partition does not support FIPS",[D]:xe},{[L]:[pp,{[Y]:$n,[K]:[Ft,0,Iae,xs],[st]:NT},{[Y]:it,[K]:[{[ke]:NT},"--x-s3"]}],rules:[{[L]:ab,error:"S3Express does not support Dual-stack.",[D]:xe},{[L]:vp,error:"S3Express does not support S3 Accelerate.",[D]:xe},{[L]:pa,rules:[{[L]:F6,rules:[{[L]:z6,rules:[{[L]:lb,rules:[{endpoint:{[fe]:BT,[pe]:Ai,[ge]:$e},[D]:re}],[D]:ee}],[D]:ee},{[L]:cb,rules:[{endpoint:{[fe]:dp,[pe]:Ai,[ge]:$e},[D]:re}],[D]:ee},Uy],[D]:ee},{[L]:z6,rules:[{[L]:lb,rules:[{endpoint:{[fe]:BT,[pe]:mp,[ge]:$e},[D]:re}],[D]:ee}],[D]:ee},{[L]:cb,rules:[{endpoint:{[fe]:dp,[pe]:mp,[ge]:$e},[D]:re}],[D]:ee},Uy],[D]:ee},{[L]:[l6,c6],rules:[{[L]:[o6,Pe],rules:[{[L]:zl,endpoint:{[fe]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",[pe]:Ai,[ge]:$e},[D]:re},{endpoint:{[fe]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",[pe]:Ai,[ge]:$e},[D]:re}],[D]:ee}],[D]:ee},{[L]:cb,rules:[{[L]:F6,rules:[{[L]:H6,rules:Ku,[D]:ee},{[L]:V6,rules:Ku,[D]:ee},{[L]:U6,rules:Ku,[D]:ee},{[L]:q6,rules:Ku,[D]:ee},{[L]:W6,rules:Ku,[D]:ee},u6],[D]:ee},{[L]:H6,rules:Zu,[D]:ee},{[L]:V6,rules:Zu,[D]:ee},{[L]:U6,rules:Zu,[D]:ee},{[L]:q6,rules:Zu,[D]:ee},{[L]:W6,rules:Zu,[D]:ee},u6],[D]:ee},Uy],[D]:ee},{[L]:[d6,l6,c6],rules:[{[L]:pa,endpoint:{[fe]:hp,[pe]:Ai,[ge]:$e},[D]:re},{[L]:zl,endpoint:{[fe]:"https://s3express-control-fips.{Region}.amazonaws.com",[pe]:Ai,[ge]:$e},[D]:re},{endpoint:{[fe]:"https://s3express-control.{Region}.amazonaws.com",[pe]:Ai,[ge]:$e},[D]:re}],[D]:ee},{[L]:[pp,{[Y]:$n,[K]:[Ft,49,50,xs],[st]:FT},{[Y]:$n,[K]:[Ft,8,12,xs],[st]:zT},{[Y]:$n,[K]:[Ft,0,7,xs],[st]:HT},{[Y]:$n,[K]:[Ft,32,49,xs],[st]:Fy},{[Y]:up,[K]:ob,[st]:"regionPartition"},{[Y]:it,[K]:[{[ke]:HT},"--op-s3"]}],rules:[{[L]:G6,rules:[{[L]:[{[Y]:it,[K]:[h6,"e"]}],rules:[{[L]:Y6,rules:[f6,{[L]:pa,endpoint:{[fe]:"https://{Bucket}.ec2.{url#authority}",[pe]:yp,[ge]:$e},[D]:re}],[D]:ee},{endpoint:{[fe]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[pe]:yp,[ge]:$e},[D]:re}],[D]:ee},{[L]:[{[Y]:it,[K]:[h6,"o"]}],rules:[{[L]:Y6,rules:[f6,{[L]:pa,endpoint:{[fe]:"https://{Bucket}.op-{outpostId}.{url#authority}",[pe]:yp,[ge]:$e},[D]:re}],[D]:ee},{endpoint:{[fe]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[pe]:yp,[ge]:$e},[D]:re}],[D]:ee},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[D]:xe}],[D]:ee},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[D]:xe}],[D]:ee},{[L]:Fae,rules:[{[L]:[Gt,{[Y]:Vs,[K]:[{[Y]:Yr,[K]:[{[Y]:LT,[K]:Bae}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[D]:xe},{[L]:[qy,a6],rules:[{[L]:fo,rules:[{[L]:K6,rules:[{[L]:[ws,s6],error:"S3 Accelerate cannot be used in this region",[D]:xe},{[L]:[pt,ft,Yt,Pe,Jt],endpoint:{[fe]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[pt,ft,Yt,Pe,We,hn],rules:[{endpoint:p6,[D]:re}],[D]:ee},{[L]:[pt,ft,Yt,Pe,We,fn],endpoint:p6,[D]:re},{[L]:[Ve,ft,Yt,Pe,Jt],endpoint:{[fe]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,ft,Yt,Pe,We,hn],rules:[{endpoint:g6,[D]:re}],[D]:ee},{[L]:[Ve,ft,Yt,Pe,We,fn],endpoint:g6,[D]:re},{[L]:[pt,je,ws,Pe,Jt],endpoint:{[fe]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[pt,je,ws,Pe,We,hn],rules:[{endpoint:m6,[D]:re}],[D]:ee},{[L]:[pt,je,ws,Pe,We,fn],endpoint:m6,[D]:re},{[L]:[pt,je,Yt,Pe,Jt],endpoint:{[fe]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[pt,je,Yt,Pe,We,hn],rules:[{endpoint:y6,[D]:re}],[D]:ee},{[L]:[pt,je,Yt,Pe,We,fn],endpoint:y6,[D]:re},{[L]:[Ve,je,Yt,Gt,Xn,gp,Jt],endpoint:{[fe]:VT,[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,je,Yt,Gt,Xn,Wy,Jt],endpoint:{[fe]:dp,[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,je,Yt,Gt,Xn,gp,We,hn],rules:[{[L]:po,endpoint:Gy,[D]:re},{endpoint:Gy,[D]:re}],[D]:ee},{[L]:[Ve,je,Yt,Gt,Xn,Wy,We,hn],rules:[{[L]:po,endpoint:Yy,[D]:re},b6],[D]:ee},{[L]:[Ve,je,Yt,Gt,Xn,gp,We,fn],endpoint:Gy,[D]:re},{[L]:[Ve,je,Yt,Gt,Xn,Wy,We,fn],endpoint:Yy,[D]:re},{[L]:[Ve,je,ws,Pe,Jt],endpoint:{[fe]:UT,[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,je,ws,Pe,We,hn],rules:[{[L]:po,endpoint:Ky,[D]:re},{endpoint:Ky,[D]:re}],[D]:ee},{[L]:[Ve,je,ws,Pe,We,fn],endpoint:Ky,[D]:re},{[L]:[Ve,je,Yt,Pe,Jt],endpoint:{[fe]:qT,[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,je,Yt,Pe,We,hn],rules:[{[L]:po,endpoint:{[fe]:qT,[pe]:Kt,[ge]:$e},[D]:re},{endpoint:v6,[D]:re}],[D]:ee},{[L]:[Ve,je,Yt,Pe,We,fn],endpoint:v6,[D]:re}],[D]:ee},bp],[D]:ee}],[D]:ee},{[L]:[Gt,Xn,{[Y]:it,[K]:[{[Y]:jt,[K]:[i6,"scheme"]},"http"]},{[Y]:jT,[K]:[Ft,xs]},qy,je,Ve,Yt],rules:[{[L]:fo,rules:[{[L]:K6,rules:[b6],[D]:ee},bp],[D]:ee}],[D]:ee},{[L]:[qy,{[Y]:WT,[K]:jae,[st]:GT}],rules:[{[L]:[{[Y]:jt,[K]:[lr,"resourceId[0]"],[st]:YT},{[Y]:Vs,[K]:[{[Y]:it,[K]:[x6,fp]}]}],rules:[{[L]:[{[Y]:it,[K]:[Zy,Hy]}],rules:[{[L]:ub,rules:[{[L]:Z6,rules:[w6,_6,{[L]:db,rules:[C6,{[L]:X6,rules:[Qy,{[L]:hb,rules:[{[L]:fo,rules:[{[L]:Q6,rules:[{[L]:fb,rules:[{[L]:[{[Y]:it,[K]:[E6,fp]}],error:"Invalid ARN: Missing account id",[D]:xe},{[L]:pb,rules:[{[L]:J6,rules:[{[L]:pa,endpoint:{[fe]:ZT,[pe]:Jy,[ge]:$e},[D]:re},{[L]:zl,endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[pe]:Jy,[ge]:$e},[D]:re},{endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[pe]:Jy,[ge]:$e},[D]:re}],[D]:ee},A6],[D]:ee},eb],[D]:ee},tb],[D]:ee},nb],[D]:ee}],[D]:ee}],[D]:ee},T6],[D]:ee},{error:"Invalid ARN: bucket ARN is missing a region",[D]:xe}],[D]:ee},k6],[D]:ee},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[D]:xe}],[D]:ee},{[L]:ub,rules:[{[L]:Z6,rules:[{[L]:db,rules:[{[L]:ub,rules:[{[L]:db,rules:[C6,{[L]:X6,rules:[Qy,{[L]:hb,rules:[{[L]:fo,rules:[{[L]:[{[Y]:it,[K]:[S6,"{partitionResult#name}"]}],rules:[{[L]:fb,rules:[{[L]:[{[Y]:it,[K]:[Zy,Bl]}],rules:[{[L]:pb,rules:[{[L]:J6,rules:[{[L]:vp,error:"Access Points do not support S3 Accelerate",[D]:xe},{[L]:[ft,pt],endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[pe]:Yu,[ge]:$e},[D]:re},{[L]:[ft,Ve],endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[pe]:Yu,[ge]:$e},[D]:re},{[L]:[je,pt],endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[pe]:Yu,[ge]:$e},[D]:re},{[L]:[je,Ve,Gt,Xn],endpoint:{[fe]:ZT,[pe]:Yu,[ge]:$e},[D]:re},{[L]:[je,Ve],endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[pe]:Yu,[ge]:$e},[D]:re}],[D]:ee},A6],[D]:ee},eb],[D]:ee},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[D]:xe}],[D]:ee},tb],[D]:ee},nb],[D]:ee}],[D]:ee}],[D]:ee},T6],[D]:ee}],[D]:ee}],[D]:ee},{[L]:[{[Y]:fa,[K]:[Xy,xs]}],rules:[{[L]:ab,error:"S3 MRAP does not support dual-stack",[D]:xe},{[L]:zl,error:"S3 MRAP does not support FIPS",[D]:xe},{[L]:vp,error:"S3 MRAP does not support S3 Accelerate",[D]:xe},{[L]:[{[Y]:un,[K]:[{[ke]:"DisableMultiRegionAccessPoints"},xs]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[D]:xe},{[L]:[{[Y]:up,[K]:ob,[st]:XT}],rules:[{[L]:[{[Y]:it,[K]:[{[Y]:jt,[K]:[{[ke]:XT},On]},{[Y]:jt,[K]:[lr,"partition"]}]}],rules:[{endpoint:{[fe]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[pe]:{[vs]:[{[Sr]:xs,name:zy,[Er]:Bl,[jy]:zae}]},[ge]:$e},[D]:re}],[D]:ee},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[D]:xe}],[D]:ee}],[D]:ee},{error:"Invalid Access Point Name",[D]:xe}],[D]:ee},k6],[D]:ee},{[L]:[{[Y]:it,[K]:[Zy,Wu]}],rules:[{[L]:ab,error:"S3 Outposts does not support Dual-stack",[D]:xe},{[L]:zl,error:"S3 Outposts does not support FIPS",[D]:xe},{[L]:vp,error:"S3 Outposts does not support S3 Accelerate",[D]:xe},{[L]:[{[Y]:Yr,[K]:[{[Y]:jt,[K]:[lr,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[D]:xe},{[L]:[{[Y]:jt,[K]:Hae,[st]:Fy}],rules:[{[L]:G6,rules:[Qy,{[L]:hb,rules:[{[L]:fo,rules:[{[L]:Q6,rules:[{[L]:fb,rules:[{[L]:pb,rules:[{[L]:[{[Y]:jt,[K]:Vae,[st]:QT}],rules:[{[L]:[{[Y]:jt,[K]:[lr,"resourceId[3]"],[st]:Vy}],rules:[{[L]:[{[Y]:it,[K]:[{[ke]:QT},KT]}],rules:[{[L]:pa,endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[pe]:M6,[ge]:$e},[D]:re},{endpoint:{[fe]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[pe]:M6,[ge]:$e},[D]:re}],[D]:ee},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[D]:xe}],[D]:ee},{error:"Invalid ARN: expected an access point name",[D]:xe}],[D]:ee},{error:"Invalid ARN: Expected a 4-component resource",[D]:xe}],[D]:ee},eb],[D]:ee},tb],[D]:ee},nb],[D]:ee}],[D]:ee}],[D]:ee},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[D]:xe}],[D]:ee},{error:"Invalid ARN: The Outpost Id was not set",[D]:xe}],[D]:ee},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[D]:xe}],[D]:ee},{error:"Invalid ARN: No ARN type specified",[D]:xe}],[D]:ee},{[L]:[{[Y]:$n,[K]:[Ft,0,4,Nae],[st]:JT},{[Y]:it,[K]:[{[ke]:JT},"arn:"]},{[Y]:Vs,[K]:[{[Y]:Yr,[K]:[O6]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[D]:xe},{[L]:[{[Y]:un,[K]:[Lae,xs]},O6],error:"Path-style addressing cannot be used with ARN buckets",[D]:xe},{[L]:lb,rules:[{[L]:fo,rules:[{[L]:[Yt],rules:[{[L]:[pt,Pe,ft,Jt],endpoint:{[fe]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[pt,Pe,ft,We,hn],rules:[{endpoint:$6,[D]:re}],[D]:ee},{[L]:[pt,Pe,ft,We,fn],endpoint:$6,[D]:re},{[L]:[Ve,Pe,ft,Jt],endpoint:{[fe]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,Pe,ft,We,hn],rules:[{endpoint:P6,[D]:re}],[D]:ee},{[L]:[Ve,Pe,ft,We,fn],endpoint:P6,[D]:re},{[L]:[pt,Pe,je,Jt],endpoint:{[fe]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[pt,Pe,je,We,hn],rules:[{endpoint:D6,[D]:re}],[D]:ee},{[L]:[pt,Pe,je,We,fn],endpoint:D6,[D]:re},{[L]:[Ve,Gt,Xn,je,Jt],endpoint:{[fe]:e6,[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,Gt,Xn,je,We,hn],rules:[{[L]:po,endpoint:rb,[D]:re},{endpoint:rb,[D]:re}],[D]:ee},{[L]:[Ve,Gt,Xn,je,We,fn],endpoint:rb,[D]:re},{[L]:[Ve,Pe,je,Jt],endpoint:{[fe]:t6,[pe]:dn,[ge]:$e},[D]:re},{[L]:[Ve,Pe,je,We,hn],rules:[{[L]:po,endpoint:{[fe]:t6,[pe]:Kt,[ge]:$e},[D]:re},{endpoint:R6,[D]:re}],[D]:ee},{[L]:[Ve,Pe,je,We,fn],endpoint:R6,[D]:re}],[D]:ee},{error:"Path-style addressing cannot be used with S3 Accelerate",[D]:xe}],[D]:ee}],[D]:ee}],[D]:ee},{[L]:[{[Y]:Yr,[K]:[I6]},{[Y]:un,[K]:[I6,xs]}],rules:[{[L]:fo,rules:[{[L]:ek,rules:[w6,_6,{[L]:pa,endpoint:{[fe]:hp,[pe]:sb,[ge]:$e},[D]:re},{[L]:zl,endpoint:{[fe]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[pe]:sb,[ge]:$e},[D]:re},{endpoint:{[fe]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[pe]:sb,[ge]:$e},[D]:re}],[D]:ee},bp],[D]:ee}],[D]:ee},{[L]:[d6],rules:[{[L]:fo,rules:[{[L]:ek,rules:[{[L]:[ft,pt,Pe,Jt],endpoint:{[fe]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[ft,pt,Pe,We,hn],rules:[{endpoint:N6,[D]:re}],[D]:ee},{[L]:[ft,pt,Pe,We,fn],endpoint:N6,[D]:re},{[L]:[ft,Ve,Pe,Jt],endpoint:{[fe]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[ft,Ve,Pe,We,hn],rules:[{endpoint:L6,[D]:re}],[D]:ee},{[L]:[ft,Ve,Pe,We,fn],endpoint:L6,[D]:re},{[L]:[je,pt,Pe,Jt],endpoint:{[fe]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[pe]:dn,[ge]:$e},[D]:re},{[L]:[je,pt,Pe,We,hn],rules:[{endpoint:B6,[D]:re}],[D]:ee},{[L]:[je,pt,Pe,We,fn],endpoint:B6,[D]:re},{[L]:[je,Ve,Gt,Xn,Jt],endpoint:{[fe]:hp,[pe]:dn,[ge]:$e},[D]:re},{[L]:[je,Ve,Gt,Xn,We,hn],rules:[{[L]:po,endpoint:ib,[D]:re},{endpoint:ib,[D]:re}],[D]:ee},{[L]:[je,Ve,Gt,Xn,We,fn],endpoint:ib,[D]:re},{[L]:[je,Ve,Pe,Jt],endpoint:{[fe]:n6,[pe]:dn,[ge]:$e},[D]:re},{[L]:[je,Ve,Pe,We,hn],rules:[{[L]:po,endpoint:{[fe]:n6,[pe]:Kt,[ge]:$e},[D]:re},{endpoint:j6,[D]:re}],[D]:ee},{[L]:[je,Ve,Pe,We,fn],endpoint:j6,[D]:re}],[D]:ee},bp],[D]:ee}],[D]:ee}],[D]:ee},{error:"A region must be set when sending requests to S3.",[D]:xe}]},qae=new cA({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),tk=(t,e={})=>qae.get(t,()=>yA(Uae,{endpointParams:t,logger:e.logger}));Iu.aws=W1;const Wae=(t=>async(e,n,r)=>{var a,l,c;if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const s=await t(e,n,r),i=(c=(l=(a=aa(n))==null?void 0:a.commandInstance)==null?void 0:l.constructor)==null?void 0:c.getEndpointParameterInstructions;if(!i)throw new Error(`getEndpointParameterInstructions() is not defined on \`${n.commandName}\``);const o=await M8(r,{getEndpointParameterInstructions:i},e);return Object.assign(s,o)})(async(t,e,n)=>({operation:aa(e).operation,region:await ys(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}));function nk(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:t.region},propertiesExtractor:(e,n)=>({signingProperties:{config:e,context:n}})}}function rk(t){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:t.region},propertiesExtractor:(e,n)=>({signingProperties:{config:e,context:n}})}}const Gae=((t,e,n)=>s=>{var l;const o=(l=t(s).properties)==null?void 0:l.authSchemes;if(!o)return e(s);const a=[];for(const c of o){const{name:u,properties:d={},...h}=c,f=u.toLowerCase();u!==f&&console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${u}\` to \`${f}\``);let p;if(f==="sigv4a"){if(p="aws.auth#sigv4a",o.find(v=>{const b=v.name.toLowerCase();return b!=="sigv4a"&&b.startsWith("sigv4")}))continue}else if(f.startsWith("sigv4"))p="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${f}\``);const m=n[p];if(!m)throw new Error(`Could not find HttpAuthOption create function for \`${p}\``);const g=m(s);g.schemeId=p,g.signingProperties={...g.signingProperties||{},...h,...d},a.push(g)}return a})(tk,t=>{const e=[];switch(t.operation){default:e.push(nk(t)),e.push(rk(t))}return e},{"aws.auth#sigv4":nk,"aws.auth#sigv4a":rk}),Yae=t=>{const e=NA(t);return{...pne(e)}},Kae=t=>({...t,useFipsEndpoint:t.useFipsEndpoint??!1,useDualstackEndpoint:t.useDualstackEndpoint??!1,forcePathStyle:t.forcePathStyle??!1,useAccelerateEndpoint:t.useAccelerateEndpoint??!1,useGlobalEndpoint:t.useGlobalEndpoint??!1,disableMultiregionAccessPoints:t.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"}),gb={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Pn extends Xf{constructor(e){super(e),Object.setPrototypeOf(this,Pn.prototype)}}class mb extends Pn{constructor(e){super({name:"NoSuchUpload",$fault:"client",...e}),this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,mb.prototype)}}class yb extends Pn{constructor(e){super({name:"ObjectNotInActiveTierError",$fault:"client",...e}),this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,yb.prototype)}}class bb extends Pn{constructor(e){super({name:"BucketAlreadyExists",$fault:"client",...e}),this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,bb.prototype)}}class vb extends Pn{constructor(e){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...e}),this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,vb.prototype)}}class xb extends Pn{constructor(e){super({name:"NoSuchBucket",$fault:"client",...e}),this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,xb.prototype)}}var sk;(function(t){t.visit=(e,n)=>e.Prefix!==void 0?n.Prefix(e.Prefix):e.Tag!==void 0?n.Tag(e.Tag):e.And!==void 0?n.And(e.And):n._(e.$unknown[0],e.$unknown[1])})(sk||(sk={}));var ik;(function(t){t.visit=(e,n)=>e.Prefix!==void 0?n.Prefix(e.Prefix):e.Tag!==void 0?n.Tag(e.Tag):e.AccessPointArn!==void 0?n.AccessPointArn(e.AccessPointArn):e.And!==void 0?n.And(e.And):n._(e.$unknown[0],e.$unknown[1])})(ik||(ik={}));class wb extends Pn{constructor(e){super({name:"InvalidObjectState",$fault:"client",...e}),this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,wb.prototype),this.StorageClass=e.StorageClass,this.AccessTier=e.AccessTier}}class _b extends Pn{constructor(e){super({name:"NoSuchKey",$fault:"client",...e}),this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,_b.prototype)}}class Cb extends Pn{constructor(e){super({name:"NotFound",$fault:"client",...e}),this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,Cb.prototype)}}const Zae=t=>({...t,...t.SecretAccessKey&&{SecretAccessKey:Gn},...t.SessionToken&&{SessionToken:Gn}}),Xae=t=>({...t,...t.SSEKMSKeyId&&{SSEKMSKeyId:Gn},...t.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Gn},...t.Credentials&&{Credentials:Zae(t.Credentials)}}),Qae=t=>({...t,...t.SSEKMSKeyId&&{SSEKMSKeyId:Gn},...t.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Gn}}),Jae=t=>({...t,...t.SSEKMSKeyId&&{SSEKMSKeyId:Gn}}),ele=t=>({...t,...t.SSECustomerKey&&{SSECustomerKey:Gn}});class Sb extends Pn{constructor(e){super({name:"EncryptionTypeMismatch",$fault:"client",...e}),this.name="EncryptionTypeMismatch",this.$fault="client",Object.setPrototypeOf(this,Sb.prototype)}}class Eb extends Pn{constructor(e){super({name:"InvalidRequest",$fault:"client",...e}),this.name="InvalidRequest",this.$fault="client",Object.setPrototypeOf(this,Eb.prototype)}}class Ab extends Pn{constructor(e){super({name:"InvalidWriteOffset",$fault:"client",...e}),this.name="InvalidWriteOffset",this.$fault="client",Object.setPrototypeOf(this,Ab.prototype)}}class Tb extends Pn{constructor(e){super({name:"TooManyParts",$fault:"client",...e}),this.name="TooManyParts",this.$fault="client",Object.setPrototypeOf(this,Tb.prototype)}}class kb extends Pn{constructor(e){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...e}),this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,kb.prototype)}}var ok;(function(t){t.visit=(e,n)=>e.Records!==void 0?n.Records(e.Records):e.Stats!==void 0?n.Stats(e.Stats):e.Progress!==void 0?n.Progress(e.Progress):e.Cont!==void 0?n.Cont(e.Cont):e.End!==void 0?n.End(e.End):n._(e.$unknown[0],e.$unknown[1])})(ok||(ok={}));const tle=t=>({...t,...t.SSEKMSKeyId&&{SSEKMSKeyId:Gn},...t.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Gn}}),nle=t=>({...t,...t.SSECustomerKey&&{SSECustomerKey:Gn},...t.SSEKMSKeyId&&{SSEKMSKeyId:Gn},...t.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Gn}}),rle=async(t,e)=>{const n=H1(t,e),r=Mt({},bs,{[yce]:t[Kle],[td]:t[Ju],[nd]:t[ed],[Cp]:t[_p],[go]:[()=>bs(t[ga]),()=>t[ga].toString()]});n.bp("/"),n.p("Bucket",()=>t.Bucket,"{Bucket}",!1);const s=Mt({[fce]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},sle=async(t,e)=>{const n=H1(t,e),r=Mt({},bs,{[$k]:t[pk],[rce]:[()=>bs(t[gk]),()=>Kf(t[gk]).toString()],[Pk]:t[mk],[sce]:[()=>bs(t[yk]),()=>Kf(t[yk]).toString()],[oce]:t[Fle],[Sp]:t[xp],[qk]:t[_k],[Ep]:t[wp],[Vk]:t[wk],[Nk]:t[hk],[mce]:t[Tle]});n.bp("/{Key+}"),n.p("Bucket",()=>t.Bucket,"{Bucket}",!1),n.p("Key",()=>t.Key,"{Key+}",!0);const s=Mt({[Kk]:[,"GetObject"],[ace]:[,t[zle]],[lce]:[,t[Hle]],[cce]:[,t[Vle]],[uce]:[,t[Ule]],[dce]:[,t[qle]],[hce]:[()=>t.ResponseExpires!==void 0,()=>Kf(t[Wle]).toString()],[pce]:[,t[Hb]],[ice]:[()=>t.PartNumber!==void 0,()=>t[jle].toString()]});return n.m("GET").h(r).q(s).b(void 0),n.build()},ile=async(t,e)=>{const n=H1(t,e),r=Mt({},bs,{[Mk]:t[dk]||"application/octet-stream",[gce]:t[Sle],[Ek]:t[ak],[Ak]:t[lk],[Tk]:t[ck],[kk]:t[uk],[Vb]:[()=>bs(t[Ib]),()=>t[Ib].toString()],[ece]:t[kle],[Sce]:t[Ale],[qb]:t[Db],[Wb]:t[Rb],[Gb]:t[Nb],[Yb]:t[Lb],[Ub]:[()=>bs(t[Bb]),()=>Kf(t[Bb]).toString()],[$k]:t[pk],[Pk]:t[mk],[bce]:t[Ple],[vce]:t[Dle],[xce]:t[Rle],[wce]:t[Ile],[Ace]:[()=>bs(t[Ck]),()=>t[Ck].toString()],[td]:t[Ju],[Uk]:t[Qu],[Yk]:t[Sk],[Sp]:t[xp],[qk]:t[_k],[Ep]:t[wp],[nd]:t[ed],[Cp]:t[_p],[go]:[()=>bs(t[ga]),()=>t[ga].toString()],[Vk]:t[wk],[Ece]:t[Xle],[Fk]:t[vk],[Kb]:[()=>bs(t[jb]),()=>mre(t[jb]).toString()],[jk]:t[bk],[Nk]:t[hk],...t.Metadata!==void 0&&Object.keys(t.Metadata).reduce((a,l)=>(a[`x-amz-meta-${l.toLowerCase()}`]=t.Metadata[l],a),{})});n.bp("/{Key+}"),n.p("Bucket",()=>t.Bucket,"{Bucket}",!1),n.p("Key",()=>t.Key,"{Key+}",!0);const s=Mt({[Kk]:[,"PutObject"]});let i,o;return t.Body!==void 0&&(o=t.Body,i=o),n.m("PUT").h(r).q(s).b(i),n.build()},ole=async(t,e)=>{if(t.statusCode!==200&&t.statusCode>=300)return Mb(t,e);const n=Mt({$metadata:Dn(t),[Ju]:[,t.headers[td]],[ed]:[,t.headers[nd]],[_p]:[,t.headers[Cp]],[ga]:[()=>t.headers[go]!==void 0,()=>Wf(t.headers[go])]}),r=Rl(zne(await f8(t.body,e)),"body");return r[Pb]!=null&&(n[Pb]=Cle(r[Pb])),n},ale=async(t,e)=>{if(t.statusCode!==200&&t.statusCode>=300)return Mb(t,e);const n=Mt({$metadata:Dn(t),[Ole]:[()=>t.headers[Rk]!==void 0,()=>Wf(t.headers[Rk])],[Ele]:[,t.headers[Jle]],[Xu]:[,t.headers[Ik]],[Yle]:[,t.headers[_ce]],[Nle]:[()=>t.headers[Dk]!==void 0,()=>Rl(iy(t.headers[Dk]))],[Ib]:[()=>t.headers[Vb]!==void 0,()=>UA(t.headers[Vb])],[fk]:[,t.headers[Ok]],[Db]:[,t.headers[qb]],[Rb]:[,t.headers[Wb]],[Nb]:[,t.headers[Gb]],[Lb]:[,t.headers[Yb]],[Lle]:[()=>t.headers[Lk]!==void 0,()=>ry(t.headers[Lk])],[Hb]:[,t.headers[Gk]],[ak]:[,t.headers[Ek]],[lk]:[,t.headers[Ak]],[ck]:[,t.headers[Tk]],[uk]:[,t.headers[kk]],[Mle]:[,t.headers[tce]],[dk]:[,t.headers[Mk]],[Bb]:[()=>t.headers[Ub]!==void 0,()=>Rl(iy(t.headers[Ub]))],[$le]:[,t.headers[nce]],[Sk]:[,t.headers[Yk]],[Ju]:[,t.headers[td]],[xp]:[,t.headers[Sp]],[wp]:[,t.headers[Ep]],[ed]:[,t.headers[nd]],[ga]:[()=>t.headers[go]!==void 0,()=>Wf(t.headers[go])],[Qu]:[,t.headers[Uk]],[xk]:[,t.headers[Hk]],[Gle]:[,t.headers[Cce]],[Ble]:[()=>t.headers[Bk]!==void 0,()=>ry(t.headers[Bk])],[Qle]:[()=>t.headers[Wk]!==void 0,()=>ry(t.headers[Wk])],[vk]:[,t.headers[Fk]],[jb]:[()=>t.headers[Kb]!==void 0,()=>Rl(GA(t.headers[Kb]))],[bk]:[,t.headers[jk]],Metadata:[,Object.keys(t.headers).filter(s=>s.startsWith("x-amz-meta-")).reduce((s,i)=>(s[i.substring(11)]=t.headers[i],s),{})]}),r=t.body;return e.sdkStreamMixin(r),n.Body=r,n},lle=async(t,e)=>{if(t.statusCode!==200&&t.statusCode>=300)return Mb(t,e);const n=Mt({$metadata:Dn(t),[Xu]:[,t.headers[Ik]],[fk]:[,t.headers[Ok]],[Db]:[,t.headers[qb]],[Rb]:[,t.headers[Wb]],[Nb]:[,t.headers[Gb]],[Lb]:[,t.headers[Yb]],[Ju]:[,t.headers[td]],[Hb]:[,t.headers[Gk]],[xp]:[,t.headers[Sp]],[wp]:[,t.headers[Ep]],[ed]:[,t.headers[nd]],[_p]:[,t.headers[Cp]],[ga]:[()=>t.headers[go]!==void 0,()=>Wf(t.headers[go])],[Zle]:[()=>t.headers[zk]!==void 0,()=>UA(t.headers[zk])],[xk]:[,t.headers[Hk]]});return await sA(t.body,e),n},Mb=async(t,e)=>{const n={...t,body:await Mse(t.body,e)},r=Ose(t,n.body);switch(r){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await ble(n);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await wle(n);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await ule(n);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await dle(n);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await mle(n);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await fle(n);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await yle(n);case"NotFound":case"com.amazonaws.s3#NotFound":throw await vle(n);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await hle(n);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await ple(n);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await gle(n);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await _le(n);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await xle(n);default:const s=n.body;return cle({output:t,parsedBody:s,errorCode:r})}},cle=YA(Pn),ule=async(t,e)=>{const n=Mt({});t.body;const r=new bb({$metadata:Dn(t),...n});return ht(r,t.body)},dle=async(t,e)=>{const n=Mt({});t.body;const r=new vb({$metadata:Dn(t),...n});return ht(r,t.body)},hle=async(t,e)=>{const n=Mt({});t.body;const r=new Sb({$metadata:Dn(t),...n});return ht(r,t.body)},fle=async(t,e)=>{const n=Mt({}),r=t.body;r[$b]!=null&&(n[$b]=Si(r[$b])),r[Qu]!=null&&(n[Qu]=Si(r[Qu]));const s=new wb({$metadata:Dn(t),...n});return ht(s,t.body)},ple=async(t,e)=>{const n=Mt({});t.body;const r=new Eb({$metadata:Dn(t),...n});return ht(r,t.body)},gle=async(t,e)=>{const n=Mt({});t.body;const r=new Ab({$metadata:Dn(t),...n});return ht(r,t.body)},mle=async(t,e)=>{const n=Mt({});t.body;const r=new xb({$metadata:Dn(t),...n});return ht(r,t.body)},yle=async(t,e)=>{const n=Mt({});t.body;const r=new _b({$metadata:Dn(t),...n});return ht(r,t.body)},ble=async(t,e)=>{const n=Mt({});t.body;const r=new mb({$metadata:Dn(t),...n});return ht(r,t.body)},vle=async(t,e)=>{const n=Mt({});t.body;const r=new Cb({$metadata:Dn(t),...n});return ht(r,t.body)},xle=async(t,e)=>{const n=Mt({});t.body;const r=new kb({$metadata:Dn(t),...n});return ht(r,t.body)},wle=async(t,e)=>{const n=Mt({});t.body;const r=new yb({$metadata:Dn(t),...n});return ht(r,t.body)},_le=async(t,e)=>{const n=Mt({});t.body;const r=new Tb({$metadata:Dn(t),...n});return ht(r,t.body)},Cle=(t,e)=>{const n={};return t[Ob]!=null&&(n[Ob]=Si(t[Ob])),t[Fb]!=null&&(n[Fb]=Si(t[Fb])),t[zb]!=null&&(n[zb]=Si(t[zb])),t[Xu]!=null&&(n[Xu]=Rl(GA(t[Xu]))),n},Dn=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),Sle="ACL",Ob="AccessKeyId",Ele="AcceptRanges",$b="AccessTier",ga="BucketKeyEnabled",Pb="Credentials",Ale="ChecksumAlgorithm",ak="CacheControl",Db="ChecksumCRC32",Rb="ChecksumCRC32C",lk="ContentDisposition",ck="ContentEncoding",uk="ContentLanguage",Ib="ContentLength",Tle="ChecksumMode",kle="ContentMD5",Mle="ContentRange",Nb="ChecksumSHA1",Lb="ChecksumSHA256",dk="ContentType",Ole="DeleteMarker",Bb="Expires",hk="ExpectedBucketOwner",$le="ExpiresString",fk="ETag",Xu="Expiration",Ple="GrantFullControl",Dle="GrantRead",Rle="GrantReadACP",Ile="GrantWriteACP",pk="IfMatch",gk="IfModifiedSince",mk="IfNoneMatch",yk="IfUnmodifiedSince",Nle="LastModified",Lle="MissingMeta",bk="ObjectLockLegalHoldStatus",vk="ObjectLockMode",jb="ObjectLockRetainUntilDate",Ble="PartsCount",jle="PartNumber",Fle="Range",xk="RequestCharged",zle="ResponseCacheControl",Hle="ResponseContentDisposition",Vle="ResponseContentEncoding",Ule="ResponseContentLanguage",qle="ResponseContentType",Wle="ResponseExpires",wk="RequestPayer",Gle="ReplicationStatus",Yle="Restore",Fb="SecretAccessKey",Qu="StorageClass",Kle="SessionMode",Ju="ServerSideEncryption",xp="SSECustomerAlgorithm",_k="SSECustomerKey",wp="SSECustomerKeyMD5",_p="SSEKMSEncryptionContext",ed="SSEKMSKeyId",zb="SessionToken",Zle="Size",Xle="Tagging",Qle="TagCount",Hb="VersionId",Ck="WriteOffsetBytes",Sk="WebsiteRedirectLocation",Jle="accept-ranges",Ek="cache-control",Ak="content-disposition",Tk="content-encoding",kk="content-language",Vb="content-length",ece="content-md5",tce="content-range",Mk="content-type",Ub="expires",Ok="etag",nce="expiresstring",$k="if-match",rce="if-modified-since",Pk="if-none-match",sce="if-unmodified-since",Dk="last-modified",ice="partNumber",oce="range",ace="response-cache-control",lce="response-content-disposition",cce="response-content-encoding",uce="response-content-language",dce="response-content-type",hce="response-expires",fce="session",pce="versionId",gce="x-amz-acl",qb="x-amz-checksum-crc32",Wb="x-amz-checksum-crc32c",mce="x-amz-checksum-mode",Gb="x-amz-checksum-sha1",Yb="x-amz-checksum-sha256",yce="x-amz-create-session-mode",Rk="x-amz-delete-marker",Ik="x-amz-expiration",Nk="x-amz-expected-bucket-owner",bce="x-amz-grant-full-control",vce="x-amz-grant-read",xce="x-amz-grant-read-acp",wce="x-amz-grant-write-acp",Lk="x-amz-missing-meta",Bk="x-amz-mp-parts-count",jk="x-amz-object-lock-legal-hold",Fk="x-amz-object-lock-mode",Kb="x-amz-object-lock-retain-until-date",zk="x-amz-object-size",_ce="x-amz-restore",Hk="x-amz-request-charged",Vk="x-amz-request-payer",Cce="x-amz-replication-status",Uk="x-amz-storage-class",Sce="x-amz-sdk-checksum-algorithm",td="x-amz-server-side-encryption",nd="x-amz-server-side-encryption-aws-kms-key-id",go="x-amz-server-side-encryption-bucket-key-enabled",Cp="x-amz-server-side-encryption-context",Sp="x-amz-server-side-encryption-customer-algorithm",qk="x-amz-server-side-encryption-customer-key",Ep="x-amz-server-side-encryption-customer-key-md5",Ece="x-amz-tagging",Wk="x-amz-tagging-count",Gk="x-amz-version-id",Ace="x-amz-write-offset-bytes",Yk="x-amz-website-redirect-location",Kk="x-id";class Tce extends Bu.classBuilder().ep({...gb,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(e,n,r,s){return[jf(r,this.serialize,this.deserialize),tp(r,e.getEndpointParameterInstructions()),DT(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(Qae,Xae).ser(rle).de(ole).build(){}const kce={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.717.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && vitest run -c vitest.config.browser.ts --mode development","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts --mode development && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.716.0","@aws-sdk/client-sts":"3.716.0","@aws-sdk/core":"3.716.0","@aws-sdk/credential-provider-node":"3.716.0","@aws-sdk/middleware-bucket-endpoint":"3.714.0","@aws-sdk/middleware-expect-continue":"3.714.0","@aws-sdk/middleware-flexible-checksums":"3.717.0","@aws-sdk/middleware-host-header":"3.714.0","@aws-sdk/middleware-location-constraint":"3.714.0","@aws-sdk/middleware-logger":"3.714.0","@aws-sdk/middleware-recursion-detection":"3.714.0","@aws-sdk/middleware-sdk-s3":"3.716.0","@aws-sdk/middleware-ssec":"3.714.0","@aws-sdk/middleware-user-agent":"3.716.0","@aws-sdk/region-config-resolver":"3.714.0","@aws-sdk/signature-v4-multi-region":"3.716.0","@aws-sdk/types":"3.714.0","@aws-sdk/util-endpoints":"3.714.0","@aws-sdk/util-user-agent-browser":"3.714.0","@aws-sdk/util-user-agent-node":"3.716.0","@aws-sdk/xml-builder":"3.709.0","@smithy/config-resolver":"^3.0.13","@smithy/core":"^2.5.5","@smithy/eventstream-serde-browser":"^3.0.14","@smithy/eventstream-serde-config-resolver":"^3.0.11","@smithy/eventstream-serde-node":"^3.0.13","@smithy/fetch-http-handler":"^4.1.2","@smithy/hash-blob-browser":"^3.1.10","@smithy/hash-node":"^3.0.11","@smithy/hash-stream-node":"^3.1.10","@smithy/invalid-dependency":"^3.0.11","@smithy/md5-js":"^3.0.11","@smithy/middleware-content-length":"^3.0.13","@smithy/middleware-endpoint":"^3.2.6","@smithy/middleware-retry":"^3.0.31","@smithy/middleware-serde":"^3.0.11","@smithy/middleware-stack":"^3.0.11","@smithy/node-config-provider":"^3.1.12","@smithy/node-http-handler":"^3.3.2","@smithy/protocol-http":"^4.1.8","@smithy/smithy-client":"^3.5.1","@smithy/types":"^3.7.2","@smithy/url-parser":"^3.0.11","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.31","@smithy/util-defaults-mode-node":"^3.0.31","@smithy/util-endpoints":"^2.1.7","@smithy/util-middleware":"^3.0.11","@smithy/util-retry":"^3.0.11","@smithy/util-stream":"^3.3.2","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.2.0",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.716.0","@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};function Zk(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Xk={name:"SHA-1"},Qk={name:"HMAC",hash:Xk},Mce=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),Oce=function(){function t(e){this.toHash=new Uint8Array(0),e!==void 0&&(this.key=new Promise(function(n,r){lo().crypto.subtle.importKey("raw",Jk(e),Qk,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return t.prototype.update=function(e){if(!Zk(e)){var n=Jk(e),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(n){return lo().crypto.subtle.sign(Qk,n,e.toHash).then(function(r){return new Uint8Array(r)})}):Zk(this.toHash)?Promise.resolve(Mce):Promise.resolve().then(function(){return lo().crypto.subtle.digest(Xk,e.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},t.prototype.reset=function(){this.toHash=new Uint8Array(0)},t}();function Jk(t){return typeof t=="string"?F8(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}var $ce=function(){function t(e){if(W8(lo()))this.hash=new Oce(e);else throw new Error("SHA1 not supported")}return t.prototype.update=function(e,n){this.hash.update(ao(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t}();class rd{constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(e));r>-1&&s>0;r--,s/=256)n[r]=s;return e<0&&e7(n),new rd(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&e7(e),parseInt(ir(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function e7(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}class Pce{constructor(e,n){this.toUtf8=e,this.fromUtf8=n}format(e){const n=[];for(const i of Object.keys(e)){const o=this.fromUtf8(i);n.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[i]))}const r=new Uint8Array(n.reduce((i,o)=>i+o.byteLength,0));let s=0;for(const i of n)r.set(i,s),s+=i.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const a=this.fromUtf8(e.value),l=new DataView(new ArrayBuffer(3+a.byteLength));l.setUint8(0,7),l.setUint16(1,a.byteLength,!1);const c=new Uint8Array(l.buffer);return c.set(a,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(rd.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!zce.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(tA(e.value.replace(/\-/g,"")),1),d}}parse(e){const n={};let r=0;for(;r<e.byteLength;){const s=e.getUint8(r++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,s));switch(r+=s,e.getUint8(r++)){case 0:n[i]={type:n7,value:!0};break;case 1:n[i]={type:n7,value:!1};break;case 2:n[i]={type:Dce,value:e.getInt8(r++)};break;case 3:n[i]={type:Rce,value:e.getInt16(r,!1)},r+=2;break;case 4:n[i]={type:Ice,value:e.getInt32(r,!1)},r+=4;break;case 5:n[i]={type:Nce,value:new rd(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:const o=e.getUint16(r,!1);r+=2,n[i]={type:Lce,value:new Uint8Array(e.buffer,e.byteOffset+r,o)},r+=o;break;case 7:const a=e.getUint16(r,!1);r+=2,n[i]={type:Bce,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,a))},r+=a;break;case 8:n[i]={type:jce,value:new Date(new rd(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:const l=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,n[i]={type:Fce,value:`${ir(l.subarray(0,4))}-${ir(l.subarray(4,6))}-${ir(l.subarray(6,8))}-${ir(l.subarray(8,10))}-${ir(l.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return n}}var t7;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(t7||(t7={}));const n7="boolean",Dce="byte",Rce="short",Ice="integer",Nce="long",Lce="binary",Bce="string",jce="timestamp",Fce="uuid",zce=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,r7=4,mo=r7*2,ma=4,Hce=mo+ma*2;function Vce({byteLength:t,byteOffset:e,buffer:n}){if(t<Hce)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,e,t),s=r.getUint32(0,!1);if(t!==s)throw new Error("Reported message length does not match received message length");const i=r.getUint32(r7,!1),o=r.getUint32(mo,!1),a=r.getUint32(t-ma,!1),l=new ap().update(new Uint8Array(n,e,mo));if(o!==l.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${l.digest()})`);if(l.update(new Uint8Array(n,e+mo,t-(mo+ma))),a!==l.digest())throw new Error(`The message checksum (${l.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,e+mo+ma,i),body:new Uint8Array(n,e+mo+ma+i,s-i-(mo+ma+ma))}}class Uce{constructor(e,n){this.headerMarshaller=new Pce(e,n),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),n=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return n}}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const n=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return n}}}encode({headers:e,body:n}){const r=this.headerMarshaller.format(e),s=r.byteLength+n.byteLength+16,i=new Uint8Array(s),o=new DataView(i.buffer,i.byteOffset,i.byteLength),a=new ap;return o.setUint32(0,s,!1),o.setUint32(4,r.byteLength,!1),o.setUint32(8,a.update(i.subarray(0,8)).digest(),!1),i.set(r,12),i.set(n,r.byteLength+12),o.setUint32(s-4,a.update(i.subarray(8,s-4)).digest(),!1),i}decode(e){const{headers:n,body:r}=Vce(e);return{headers:this.headerMarshaller.parse(n),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}class qce{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream)yield this.options.decoder.decode(e)}}class Wce{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream)yield this.options.encoder.encode(e);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Gce{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const n=await this.options.deserializer(e);n!==void 0&&(yield n)}}}class Yce{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream)yield this.options.serializer(e)}}function Kce(t){let e=0,n=0,r=null,s=null;const i=a=>{if(typeof a!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+a);e=a,n=4,r=new Uint8Array(a),new DataView(r.buffer).setUint32(0,a,!1)},o=async function*(){const a=t[Symbol.asyncIterator]();for(;;){const{value:l,done:c}=await a.next();if(c){if(e)if(e===n)yield r;else throw new Error("Truncated event message received.");else return;return}const u=l.length;let d=0;for(;d<u;){if(!r){const f=u-d;s||(s=new Uint8Array(4));const p=Math.min(4-n,f);if(s.set(l.slice(d,d+p),n),n+=p,d+=p,n<4)break;i(new DataView(s.buffer).getUint32(0,!1)),s=null}const h=Math.min(e-n,u-d);r.set(l.slice(d,d+h),n),n+=h,d+=h,e&&e===n&&(yield r,r=null,e=0,n=0)}}};return{[Symbol.asyncIterator]:o}}function Zce(t,e){return async function(n){const{value:r}=n.headers[":message-type"];if(r==="error"){const s=new Error(n.headers[":error-message"].value||"UnknownError");throw s.name=n.headers[":error-code"].value,s}else if(r==="exception"){const s=n.headers[":exception-type"].value,i={[s]:n},o=await t(i);if(o.$unknown){const a=new Error(e(n.body));throw a.name=s,a}throw o[s]}else if(r==="event"){const s={[n.headers[":event-type"].value]:n},i=await t(s);return i.$unknown?void 0:i}else throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}let Xce=class{constructor({utf8Encoder:e,utf8Decoder:n}){this.eventStreamCodec=new Uce(e,n),this.utfEncoder=e}deserialize(e,n){const r=Kce(e);return new Gce({messageStream:new qce({inputStream:r,decoder:this.eventStreamCodec}),deserializer:Zce(n,this.utfEncoder)})}serialize(e,n){return new Wce({messageStream:new Yce({inputStream:e,serializer:n}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const Qce=t=>({[Symbol.asyncIterator]:async function*(){const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}}),Jce=t=>{const e=t[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:s}=await e.next();if(r)return n.close();n.enqueue(s)}})};class eue{constructor({utf8Encoder:e,utf8Decoder:n}){this.universalMarshaller=new Xce({utf8Decoder:n,utf8Encoder:e})}deserialize(e,n){const r=tue(e)?Qce(e):e;return this.universalMarshaller.deserialize(r,n)}serialize(e,n){const r=this.universalMarshaller.serialize(e,n);return typeof ReadableStream=="function"?Jce(r):r}}const tue=t=>typeof ReadableStream=="function"&&t instanceof ReadableStream,nue=t=>new eue(t);async function rue(t,e,n=1024*1024){const r=t.size;let s=0;for(;s<r;){const i=t.slice(s,Math.min(r,s+n));e(new Uint8Array(await i.arrayBuffer())),s+=i.size}}const sue=async function(e,n){const r=new e;return await rue(n,s=>{r.update(s)}),r.digest()},yo=64,iue=16,oue=[1732584193,4023233417,2562383102,271733878];class aue{constructor(){this.reset()}update(e){if(lue(e))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=cue(e);let r=0,{byteLength:s}=n;for(this.bytesHashed+=s;s>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),s--,this.bufferLength===yo&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:s}=this,i=s*8;if(n.setUint8(this.bufferLength++,128),r%yo>=yo-8){for(let o=this.bufferLength;o<yo;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(let o=this.bufferLength;o<yo-8;o++)n.setUint8(o,0);n.setUint32(yo-8,i>>>0,!0),n.setUint32(yo-4,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}const e=new DataView(new ArrayBuffer(iue));for(let n=0;n<4;n++)e.setUint32(n*4,this.state[n],!0);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}hashBuffer(){const{buffer:e,state:n}=this;let r=n[0],s=n[1],i=n[2],o=n[3];r=Rn(r,s,i,o,e.getUint32(0,!0),7,3614090360),o=Rn(o,r,s,i,e.getUint32(4,!0),12,3905402710),i=Rn(i,o,r,s,e.getUint32(8,!0),17,606105819),s=Rn(s,i,o,r,e.getUint32(12,!0),22,3250441966),r=Rn(r,s,i,o,e.getUint32(16,!0),7,4118548399),o=Rn(o,r,s,i,e.getUint32(20,!0),12,1200080426),i=Rn(i,o,r,s,e.getUint32(24,!0),17,2821735955),s=Rn(s,i,o,r,e.getUint32(28,!0),22,4249261313),r=Rn(r,s,i,o,e.getUint32(32,!0),7,1770035416),o=Rn(o,r,s,i,e.getUint32(36,!0),12,2336552879),i=Rn(i,o,r,s,e.getUint32(40,!0),17,4294925233),s=Rn(s,i,o,r,e.getUint32(44,!0),22,2304563134),r=Rn(r,s,i,o,e.getUint32(48,!0),7,1804603682),o=Rn(o,r,s,i,e.getUint32(52,!0),12,4254626195),i=Rn(i,o,r,s,e.getUint32(56,!0),17,2792965006),s=Rn(s,i,o,r,e.getUint32(60,!0),22,1236535329),r=In(r,s,i,o,e.getUint32(4,!0),5,4129170786),o=In(o,r,s,i,e.getUint32(24,!0),9,3225465664),i=In(i,o,r,s,e.getUint32(44,!0),14,643717713),s=In(s,i,o,r,e.getUint32(0,!0),20,3921069994),r=In(r,s,i,o,e.getUint32(20,!0),5,3593408605),o=In(o,r,s,i,e.getUint32(40,!0),9,38016083),i=In(i,o,r,s,e.getUint32(60,!0),14,3634488961),s=In(s,i,o,r,e.getUint32(16,!0),20,3889429448),r=In(r,s,i,o,e.getUint32(36,!0),5,568446438),o=In(o,r,s,i,e.getUint32(56,!0),9,3275163606),i=In(i,o,r,s,e.getUint32(12,!0),14,4107603335),s=In(s,i,o,r,e.getUint32(32,!0),20,1163531501),r=In(r,s,i,o,e.getUint32(52,!0),5,2850285829),o=In(o,r,s,i,e.getUint32(8,!0),9,4243563512),i=In(i,o,r,s,e.getUint32(28,!0),14,1735328473),s=In(s,i,o,r,e.getUint32(48,!0),20,2368359562),r=Nn(r,s,i,o,e.getUint32(20,!0),4,4294588738),o=Nn(o,r,s,i,e.getUint32(32,!0),11,2272392833),i=Nn(i,o,r,s,e.getUint32(44,!0),16,1839030562),s=Nn(s,i,o,r,e.getUint32(56,!0),23,4259657740),r=Nn(r,s,i,o,e.getUint32(4,!0),4,2763975236),o=Nn(o,r,s,i,e.getUint32(16,!0),11,1272893353),i=Nn(i,o,r,s,e.getUint32(28,!0),16,4139469664),s=Nn(s,i,o,r,e.getUint32(40,!0),23,3200236656),r=Nn(r,s,i,o,e.getUint32(52,!0),4,681279174),o=Nn(o,r,s,i,e.getUint32(0,!0),11,3936430074),i=Nn(i,o,r,s,e.getUint32(12,!0),16,3572445317),s=Nn(s,i,o,r,e.getUint32(24,!0),23,76029189),r=Nn(r,s,i,o,e.getUint32(36,!0),4,3654602809),o=Nn(o,r,s,i,e.getUint32(48,!0),11,3873151461),i=Nn(i,o,r,s,e.getUint32(60,!0),16,530742520),s=Nn(s,i,o,r,e.getUint32(8,!0),23,3299628645),r=Ln(r,s,i,o,e.getUint32(0,!0),6,4096336452),o=Ln(o,r,s,i,e.getUint32(28,!0),10,1126891415),i=Ln(i,o,r,s,e.getUint32(56,!0),15,2878612391),s=Ln(s,i,o,r,e.getUint32(20,!0),21,4237533241),r=Ln(r,s,i,o,e.getUint32(48,!0),6,1700485571),o=Ln(o,r,s,i,e.getUint32(12,!0),10,2399980690),i=Ln(i,o,r,s,e.getUint32(40,!0),15,4293915773),s=Ln(s,i,o,r,e.getUint32(4,!0),21,2240044497),r=Ln(r,s,i,o,e.getUint32(32,!0),6,1873313359),o=Ln(o,r,s,i,e.getUint32(60,!0),10,4264355552),i=Ln(i,o,r,s,e.getUint32(24,!0),15,2734768916),s=Ln(s,i,o,r,e.getUint32(52,!0),21,1309151649),r=Ln(r,s,i,o,e.getUint32(16,!0),6,4149444226),o=Ln(o,r,s,i,e.getUint32(44,!0),10,3174756917),i=Ln(i,o,r,s,e.getUint32(8,!0),15,718787259),s=Ln(s,i,o,r,e.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=s+n[1]&4294967295,n[2]=i+n[2]&4294967295,n[3]=o+n[3]&4294967295}reset(){this.state=Uint32Array.from(oue),this.buffer=new DataView(new ArrayBuffer(yo)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function Ap(t,e,n,r,s,i){return e=(e+t&4294967295)+(r+i&4294967295)&4294967295,(e<<s|e>>>32-s)+n&4294967295}function Rn(t,e,n,r,s,i,o){return Ap(e&n|~e&r,t,e,s,i,o)}function In(t,e,n,r,s,i,o){return Ap(e&r|n&~r,t,e,s,i,o)}function Nn(t,e,n,r,s,i,o){return Ap(e^n^r,t,e,s,i,o)}function Ln(t,e,n,r,s,i,o){return Ap(n^(e|~r),t,e,s,i,o)}function lue(t){return typeof t=="string"?t.length===0:t.byteLength===0}function cue(t){return typeof t=="string"?no(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}const uue=t=>({apiVersion:"2006-03-01",base64Decoder:(t==null?void 0:t.base64Decoder)??L1,base64Encoder:(t==null?void 0:t.base64Encoder)??Ru,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??tk,extensions:(t==null?void 0:t.extensions)??[],getAwsChunkedEncodingStream:(t==null?void 0:t.getAwsChunkedEncodingStream)??Ote,httpAuthSchemeProvider:(t==null?void 0:t.httpAuthSchemeProvider)??Gae,httpAuthSchemes:(t==null?void 0:t.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Y1},{schemeId:"aws.auth#sigv4a",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4a"),signer:new hne}],logger:(t==null?void 0:t.logger)??new Qf,sdkStreamMixin:(t==null?void 0:t.sdkStreamMixin)??Rte,serviceId:(t==null?void 0:t.serviceId)??"S3",signerConstructor:(t==null?void 0:t.signerConstructor)??RT,signingEscapePath:(t==null?void 0:t.signingEscapePath)??!1,urlParser:(t==null?void 0:t.urlParser)??Hu,useArnRegion:(t==null?void 0:t.useArnRegion)??!1,utf8Decoder:(t==null?void 0:t.utf8Decoder)??no,utf8Encoder:(t==null?void 0:t.utf8Encoder)??Ff}),due=t=>{const e=bT(t),n=()=>e().then(KA),r=uue(t);return{...r,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:(t==null?void 0:t.bodyLengthChecker)??eT,credentialDefaultProvider:(t==null?void 0:t.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(t==null?void 0:t.defaultUserAgentProvider)??X8({serviceId:r.serviceId,clientVersion:kce.version}),eventStreamSerdeProvider:(t==null?void 0:t.eventStreamSerdeProvider)??nue,maxAttempts:(t==null?void 0:t.maxAttempts)??Vu,md5:(t==null?void 0:t.md5)??aue,region:(t==null?void 0:t.region)??Q8("Region is missing"),requestHandler:zf.create((t==null?void 0:t.requestHandler)??n),retryMode:(t==null?void 0:t.retryMode)??(async()=>(await n()).retryMode||$8),sha1:(t==null?void 0:t.sha1)??$ce,sha256:(t==null?void 0:t.sha256)??G8,streamCollector:(t==null?void 0:t.streamCollector)??j1,streamHasher:(t==null?void 0:t.streamHasher)??sue,useDualstackEndpoint:(t==null?void 0:t.useDualstackEndpoint)??(()=>Promise.resolve(v8)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(x8))}},hue=t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,r=t.credentials;return{setHttpAuthScheme(s){const i=e.findIndex(o=>o.schemeId===s.schemeId);i===-1?e.push(s):e.splice(i,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){r=s},credentials(){return r}}},fue=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Tp=t=>t,pue=(t,e)=>{const n={...Tp(vT(t)),...Tp(ZA(t)),...Tp(B4(t)),...Tp(hue(t))};return e.forEach(r=>r.configure(n)),{...t,...xT(n),...XA(n),...j4(n),...fue(n)}};class gue extends jA{constructor(...[e]){const n=due(e||{}),r=Kae(n),s=lA(r),i=Zoe(s),o=B8(i),a=C8(o),l=a,c=O8(l),u=Dae(c),d=Yae(u),h=wae(d,{session:[()=>this,Tce]}),f=pue(h,(e==null?void 0:e.extensions)||[]);super(f),this.config=f,this.middlewareStack.use(y8(this.config)),this.middlewareStack.use(j8(this.config)),this.middlewareStack.use(E8(this.config)),this.middlewareStack.use(q4(this.config)),this.middlewareStack.use(W4(this.config)),this.middlewareStack.use(Y4(this.config)),this.middlewareStack.use(K4(this.config,{httpAuthSchemeParametersProvider:Wae,identityProviderConfigProvider:async p=>new oA({"aws.auth#sigv4":p.credentials,"aws.auth#sigv4a":p.credentials})})),this.middlewareStack.use(X4(this.config)),this.middlewareStack.use(Pae(this.config)),this.middlewareStack.use(Toe(this.config)),this.middlewareStack.use(iae(this.config)),this.middlewareStack.use(gae(this.config)),this.middlewareStack.use(xae(this.config))}destroy(){super.destroy()}}function mue(t){return e=>async n=>{const r={...n.input},s=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const i of s){const o=r[i.target];if(o){let a;typeof o=="string"?bue(o,t)?a=t.base64Decoder(o):(a=t.utf8Decoder(o),r[i.target]=t.base64Encoder(a)):(a=ArrayBuffer.isView(o)?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):new Uint8Array(o),r[i.target]=t.base64Encoder(a));const l=new t.md5;l.update(a),r[i.hash]=t.base64Encoder(await l.digest())}}return e({...n,input:r})}}const yue={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},s7=t=>({applyToStack:e=>{e.add(mue(t),yue)}});function bue(t,e){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))return!1;try{return e.base64Decoder(t).length===32}catch{return!1}}class vue extends Bu.classBuilder().ep({...gb,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,r,s){return[jf(r,this.serialize,this.deserialize),tp(r,e.getEndpointParameterInstructions()),OT(r,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC32","CRC32C","SHA256","SHA1"]}),s7(r),lae()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(ele,Jae).ser(sle).de(ale).build(){}class xue extends Bu.classBuilder().ep({...gb,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,r,s){return[jf(r,this.serialize,this.deserialize),tp(r,e.getEndpointParameterInstructions()),OT(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),eae(),DT(r),s7(r)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(nle,tle).ser(ile).de(lle).build(){}function wue(t){const{port:e,query:n}=t;let{protocol:r,path:s,hostname:i}=t;r&&r.slice(-1)!==":"&&(r+=":"),e&&(i+=`:${e}`),s&&s.charAt(0)!=="/"&&(s=`/${s}`);let o=n?Q4(n):"";o&&o[0]!=="?"&&(o=`?${o}`);let a="";if(t.username!=null||t.password!=null){const c=t.username??"",u=t.password??"";a=`${c}:${u}@`}let l="";return t.fragment&&(l=`#${t.fragment}`),`${r}//${a}${i}${s}${o}${l}`}const _ue="UNSIGNED-PAYLOAD",Cue="X-Amz-Content-Sha256";class i7{constructor(e){const n={service:e.signingName||e.service||"s3",uriEscapePath:e.uriEscapePath||!1,applyChecksum:e.applyChecksum||!1,...e};this.signer=new RT(n)}presign(e,{unsignableHeaders:n=new Set,hoistableHeaders:r=new Set,unhoistableHeaders:s=new Set,...i}={}){return this.prepareRequest(e,{unsignableHeaders:n,unhoistableHeaders:s,hoistableHeaders:r}),this.signer.presign(e,{expiresIn:900,unsignableHeaders:n,unhoistableHeaders:s,...i})}presignWithCredentials(e,n,{unsignableHeaders:r=new Set,hoistableHeaders:s=new Set,unhoistableHeaders:i=new Set,...o}={}){return this.prepareRequest(e,{unsignableHeaders:r,unhoistableHeaders:i,hoistableHeaders:s}),this.signer.presignWithCredentials(e,n,{expiresIn:900,unsignableHeaders:r,unhoistableHeaders:i,...o})}prepareRequest(e,{unsignableHeaders:n=new Set,unhoistableHeaders:r=new Set,hoistableHeaders:s=new Set}={}){n.add("content-type"),Object.keys(e.headers).map(l=>l.toLowerCase()).filter(l=>l.startsWith("x-amz-server-side-encryption")).forEach(l=>{s.has(l)||r.add(l)}),e.headers[Cue]=_ue;const i=e.headers.host,o=e.port,a=`${e.hostname}${e.port!=null?":"+o:""}`;(!i||i===e.hostname&&e.port!=null)&&(e.headers.host=a)}}const Sue=async(t,e,n={})=>{var d,h,f;let r,s;if(typeof t.config.endpointProvider=="function"){const m=(h=(d=(await k8(e.input,e.constructor,t.config)).properties)==null?void 0:d.authSchemes)==null?void 0:h[0];(m==null?void 0:m.name)==="sigv4a"?s=(f=m==null?void 0:m.signingRegionSet)==null?void 0:f.join(","):s=m==null?void 0:m.signingRegion,r=new i7({...t.config,signingName:m==null?void 0:m.signingName,region:async()=>s})}else r=new i7(t.config);const i=(p,m)=>async g=>{const{request:y}=g;if(!Pt.isInstance(y))throw new Error("Request to be presigned is not an valid HTTP request.");delete y.headers["amz-sdk-invocation-id"],delete y.headers["amz-sdk-request"],delete y.headers["x-amz-user-agent"];let v;const b={...n,signingRegion:n.signingRegion??m.signing_region??s,signingService:n.signingService??m.signing_service};return m.s3ExpressIdentity?v=await r.presignWithCredentials(y,m.s3ExpressIdentity,b):v=await r.presign(y,b),{response:{},output:{$metadata:{httpStatusCode:200},presigned:v}}},o="presignInterceptMiddleware",a=t.middlewareStack.clone();a.addRelativeTo(i,{name:o,relation:"before",toMiddleware:"awsAuthMiddleware",override:!0});const l=e.resolveMiddleware(a,t.config,{}),{output:c}=await l({input:e.input}),{presigned:u}=c;return wue(u)},o7={};class Eue{constructor(e){U(this,"_bucketName");U(this,"_secretManagerClient");U(this,"_s3Client");U(this,"_secretId","");U(this,"_config");this._config={region:e.region,credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}},this._secretId=e.secretId||"",this._bucketName=e.bucketName,this._secretManagerClient=new soe(this._config),this._s3Client=new gue(this._config)}async createPresignedUrlWithClient(e,n="temp"){const r=new vue({Bucket:this._bucketName,Key:`/${n}/${L4()}${e.name}`});return Sue(this._s3Client,r,{expiresIn:60*60})}async handleUpload(e,n="temp"){if(!e)return;const r=e.name.split("/").pop()||"",s=ce().format("YYYY/MM/DD");try{const i=`${n}/${s}/${L4()}/${r}`,o=new xue({Bucket:process.env.NEXT_PUBLIC_AWS_BUCKET_NAME,Key:i,Body:e.file});return await this._s3Client.send(o),`${i}`}catch(i){console.error(i)}}async getPlainTextByHashed(e){const n=await this._secretManagerClient.send(new wT({SecretId:this._secretId})),s=JSON.parse(n.SecretString||"{}").AES;return await this._aesDecode(e,s)||""}async getHashedStringByPlainText(e){try{const n=await this._secretManagerClient.send(new wT({SecretId:this._secretId})),s=JSON.parse(n.SecretString||"{}").AES;return await this._aesEncode(e,s)||""}catch(n){throw console.log("error",n),n}}async _aesDecode(e,n){try{const r=Buffer.from(n,"utf-8"),s=Buffer.from(n.substring(0,16),"utf-8"),i=o7.createDecipheriv("aes-256-cbc",r,s);let o=i.update(e,"base64","utf-8");return o+=i.final("utf-8"),o}catch(r){console.error(r)}}async _aesEncode(e,n){try{const r=Buffer.from(n,"utf-8"),s=Buffer.from(n.substring(0,16),"utf-8"),i=o7.createCipheriv("aes-256-cbc",r,s);let o=i.update(e,"utf-8","base64");return o+=i.final("base64"),o}catch(r){console.error(r)}}}X.register("modules/imageResize",ite);const Aue=["font","size","bold","italic","underline","strike","color","background","script","header","blockquote","code-block","indent","list","direction","align","link","image","video","formula"],Tue=t=>{const{onChange:e,value:n,name:r}=t,s=x.useCallback(u=>{e==null||e(u)},[e]),i=x.useRef(null),o=!!t.awsConfig,a=x.useMemo(()=>new Eue({region:"",accessKeyId:"",secretAccessKey:"",bucketName:"",secretId:void 0}),[]),l=()=>{const u=document.createElement("input");u.setAttribute("type","file"),u.setAttribute("accept","image/*"),u.click(),u.onchange=async()=>{var d;for(const h of Array.from((u==null?void 0:u.files)||[])){const f={uri:URL.createObjectURL(h),name:h.name,file:h,id:ate()};if(/^image\//.test(h.type)){const p=(d=i.current)==null?void 0:d.getEditor(),m=p==null?void 0:p.getSelection(),g=(m==null?void 0:m.index)??0,y=await a.handleUpload(f,"editor"),v=new FileReader;v.readAsDataURL(h),v.onload=()=>{p==null||p.insertEmbed(g,"image",o?y:v.result)}}else alert("You could only upload images.")}}},c=x.useMemo(()=>({toolbar:{container:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],["link","image","video"],[{align:[!1,"center","right","justify"]}],[{color:[]}],["code-block"],["clean"]],handlers:{image:l}},imageResize:{parchment:X.import("parchment"),modules:["Resize","DisplaySize","Toolbar"]}}),[]);return S.jsx(If,{theme:"snow",style:{height:350,margin:4},onChange:s,value:n,ref:i,formats:Aue,modules:c,id:r})},kue={Cell:"_Cell_zrz1w_2",bordered:"_bordered_zrz1w_16",compact:"_compact_zrz1w_19",HeaderCell:"_HeaderCell_zrz1w_22",Row:"_Row_zrz1w_42",isSelected:"_isSelected_zrz1w_42",striped:"_striped_zrz1w_45",Root:"_Root_zrz1w_57"},Mue={variant:"default"},kp=x.createContext(Mue),Oue=t=>{const[e,n]=x.useState(Array.from({length:t.getRowModel().rows.length+1},()=>{var o;return((o=t.options.defaultColumn)==null?void 0:o.size)??150})),[r,s]=x.useState(!1);return{columnsSize:e,isResizing:r,handleResize:o=>{const a=e[o];let l;const c=d=>{if(!l){l=d.clientX;return}const f=d.clientX-l,p=Math.max(50,a+f);n(m=>{const g=[...m];return g[o]=p,g})},u=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),s(!1)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u),s(!0)}}},Hl=qe.bind(kue),$ue={Root:t=>{const{children:e,className:n,variant:r="default",...s}=t,i=x.useMemo(()=>({variant:r}),[r]);return S.jsx(kp,{value:i,children:S.jsx("table",{...s,className:Hl("Root",n),children:e})})},Header:t=>{const{className:e,children:n,ref:r,...s}=t;return S.jsx("thead",{...s,ref:r,className:Hl("Header",e),children:n})},Body:t=>{const{className:e,children:n,ref:r,...s}=t;return S.jsx("tbody",{...s,ref:r,className:Hl("Body",e),children:n})},Row:t=>{const{className:e,children:n,ref:r,...s}=t,{variant:i}=x.use(kp);return S.jsx("tr",{...s,className:Hl("Row",i,e),ref:r,children:n})},Cell:t=>{const{className:e,children:n,size:r,ref:s,isSelected:i,...o}=t,{variant:a}=x.use(kp);return S.jsx("td",{...o,ref:s,className:Hl("Cell",a,e,{isSelected:i}),style:{...o.style,...r?{width:r}:{}},children:n})},HeaderCell:t=>{const{className:e,children:n,size:r,ref:s,...i}=t,{variant:o}=x.use(kp);return S.jsx("th",{...i,ref:s,className:Hl("HeaderCell",o,e),style:{...i.style,...r?{width:r}:{}},children:n})},useRowResize:Oue},Pue={WeeklyCalendarRoot:"_WeeklyCalendarRoot_1xja2_3",CalendarHeader:"_CalendarHeader_1xja2_12",Empty:"_Empty_1xja2_16",CalendarHeaderContent:"_CalendarHeaderContent_1xja2_19",CalendarBody:"_CalendarBody_1xja2_24",StandardTime:"_StandardTime_1xja2_30",DateCellRow:"_DateCellRow_1xja2_36",DateCell:"_DateCell_1xja2_36",today:"_today_1xja2_49",DayText:"_DayText_1xja2_52",Date:"_Date_1xja2_36",TimelineWrapper:"_TimelineWrapper_1xja2_60",noLines:"_noLines_1xja2_68",Timeline:"_Timeline_1xja2_60",TimeText:"_TimeText_1xja2_77",DateColumnRow:"_DateColumnRow_1xja2_83",DateColumnRowInner:"_DateColumnRowInner_1xja2_89",DateColumn:"_DateColumn_1xja2_83",DateColumnInner:"_DateColumnInner_1xja2_106",TodayIndicator:"_TodayIndicator_1xja2_111",TimeCriteria:"_TimeCriteria_1xja2_130",TimeCriteriaCell:"_TimeCriteriaCell_1xja2_133",EventItem:"_EventItem_1xja2_136",dragging:"_dragging_1xja2_145",allowCreate:"_allowCreate_1xja2_148",draggable:"_draggable_1xja2_154"},Mp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vl(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Zb(t){return"nodeType"in t}function cr(t){var e,n;return t?Vl(t)?t:Zb(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Xb(t){const{Document:e}=cr(t);return t instanceof e}function sd(t){return Vl(t)?!1:t instanceof cr(t).HTMLElement}function a7(t){return t instanceof cr(t).SVGElement}function Ul(t){return t?Vl(t)?t.document:Zb(t)?Xb(t)?t:sd(t)||a7(t)?t.ownerDocument:document:document:document}const bo=Mp?x.useLayoutEffect:x.useEffect;function Qb(t){const e=x.useRef(t);return bo(()=>{e.current=t}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function Due(){const t=x.useRef(null),e=x.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=x.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function id(t,e){e===void 0&&(e=[t]);const n=x.useRef(t);return bo(()=>{n.current!==t&&(n.current=t)},e),n}function od(t,e){const n=x.useRef();return x.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Op(t){const e=Qb(t),n=x.useRef(null),r=x.useCallback(s=>{s!==n.current&&(e==null||e(s,n.current)),n.current=s},[]);return[n,r]}function Jb(t){const e=x.useRef();return x.useEffect(()=>{e.current=t},[t]),e.current}let ev={};function $p(t,e){return x.useMemo(()=>{if(e)return e;const n=ev[t]==null?0:ev[t]+1;return ev[t]=n,t+"-"+n},[t,e])}function l7(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((i,o)=>{const a=Object.entries(o);for(const[l,c]of a){const u=i[l];u!=null&&(i[l]=u+t*c)}return i},{...e})}}const ql=l7(1),Pp=l7(-1);function Rue(t){return"clientX"in t&&"clientY"in t}function c7(t){if(!t)return!1;const{KeyboardEvent:e}=cr(t.target);return e&&t instanceof e}function Iue(t){if(!t)return!1;const{TouchEvent:e}=cr(t.target);return e&&t instanceof e}function tv(t){if(Iue(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return Rue(t)?{x:t.clientX,y:t.clientY}:null}const u7="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Nue(t){return t.matches(u7)?t:t.querySelector(u7)}const Lue={display:"none"};function Bue(t){let{id:e,value:n}=t;return x.createElement("div",{id:e,style:Lue},n)}function jue(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return x.createElement("div",{id:e,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function Fue(){const[t,e]=x.useState("");return{announce:x.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const d7=x.createContext(null);function zue(t){const e=x.useContext(d7);x.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Hue(){const[t]=x.useState(()=>new Set),e=x.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[x.useCallback(r=>{let{type:s,event:i}=r;t.forEach(o=>{var a;return(a=o[s])==null?void 0:a.call(o,i)})},[t]),e]}const Vue={draggable:`
172
+ To pick up a draggable item, press the space bar.
173
+ While dragging, use the arrow keys to move the item.
174
+ Press space again to drop the item in its new position, or press escape to cancel.
175
+ `},Uue={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function que(t){let{announcements:e=Uue,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=Vue}=t;const{announce:i,announcement:o}=Fue(),a=$p("DndLiveRegion"),[l,c]=x.useState(!1);if(x.useEffect(()=>{c(!0)},[]),zue(x.useMemo(()=>({onDragStart(d){let{active:h}=d;i(e.onDragStart({active:h}))},onDragMove(d){let{active:h,over:f}=d;e.onDragMove&&i(e.onDragMove({active:h,over:f}))},onDragOver(d){let{active:h,over:f}=d;i(e.onDragOver({active:h,over:f}))},onDragEnd(d){let{active:h,over:f}=d;i(e.onDragEnd({active:h,over:f}))},onDragCancel(d){let{active:h,over:f}=d;i(e.onDragCancel({active:h,over:f}))}}),[i,e])),!l)return null;const u=x.createElement(x.Fragment,null,x.createElement(Bue,{id:r,value:s.draggable}),x.createElement(jue,{id:a,announcement:o}));return n?Pr.createPortal(u,n):u}var en;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(en||(en={}));function Dp(){}const _s=Object.freeze({x:0,y:0});function Wue(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function Gue(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Yue(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),o=s-r,a=i-n;if(r<s&&n<i){const l=e.width*e.height,c=t.width*t.height,u=o*a,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const Kue=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const i of r){const{id:o}=i,a=n.get(o);if(a){const l=Yue(a,e);l>0&&s.push({id:o,data:{droppableContainer:i,value:l}})}}return s.sort(Wue)};function Zue(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function h7(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:_s}function Xue(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];return s.reduce((o,a)=>({...o,top:o.top+t*a.y,bottom:o.bottom+t*a.y,left:o.left+t*a.x,right:o.right+t*a.x}),{...n})}}const Que=Xue(1);function Jue(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function ede(t,e,n){const r=Jue(e);if(!r)return t;const{scaleX:s,scaleY:i,x:o,y:a}=r,l=t.left-o-(1-s)*parseFloat(n),c=t.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=s?t.width/s:t.width,d=i?t.height/i:t.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const tde={ignoreTransform:!1};function ad(t,e){e===void 0&&(e=tde);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:u}=cr(t).getComputedStyle(t);c&&(n=ede(n,c,u))}const{top:r,left:s,width:i,height:o,bottom:a,right:l}=n;return{top:r,left:s,width:i,height:o,bottom:a,right:l}}function f7(t){return ad(t,{ignoreTransform:!0})}function nde(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function rde(t,e){return e===void 0&&(e=cr(t).getComputedStyle(t)),e.position==="fixed"}function sde(t,e){e===void 0&&(e=cr(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const i=e[s];return typeof i=="string"?n.test(i):!1})}function nv(t,e){const n=[];function r(s){if(e!=null&&n.length>=e||!s)return n;if(Xb(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!sd(s)||a7(s)||n.includes(s))return n;const i=cr(t).getComputedStyle(s);return s!==t&&sde(s,i)&&n.push(s),rde(s,i)?n:r(s.parentNode)}return t?r(t):n}function p7(t){const[e]=nv(t,1);return e??null}function rv(t){return!Mp||!t?null:Vl(t)?t:Zb(t)?Xb(t)||t===Ul(t).scrollingElement?window:sd(t)?t:null:null}function g7(t){return Vl(t)?t.scrollX:t.scrollLeft}function m7(t){return Vl(t)?t.scrollY:t.scrollTop}function sv(t){return{x:g7(t),y:m7(t)}}var pn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(pn||(pn={}));function y7(t){return!Mp||!t?!1:t===document.scrollingElement}function b7(t){const e={x:0,y:0},n=y7(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,i=t.scrollLeft<=e.x,o=t.scrollTop>=r.y,a=t.scrollLeft>=r.x;return{isTop:s,isLeft:i,isBottom:o,isRight:a,maxScroll:r,minScroll:e}}const ide={x:.2,y:.2};function ode(t,e,n,r,s){let{top:i,left:o,right:a,bottom:l}=n;r===void 0&&(r=10),s===void 0&&(s=ide);const{isTop:c,isBottom:u,isLeft:d,isRight:h}=b7(t),f={x:0,y:0},p={x:0,y:0},m={height:e.height*s.y,width:e.width*s.x};return!c&&i<=e.top+m.height?(f.y=pn.Backward,p.y=r*Math.abs((e.top+m.height-i)/m.height)):!u&&l>=e.bottom-m.height&&(f.y=pn.Forward,p.y=r*Math.abs((e.bottom-m.height-l)/m.height)),!h&&a>=e.right-m.width?(f.x=pn.Forward,p.x=r*Math.abs((e.right-m.width-a)/m.width)):!d&&o<=e.left+m.width&&(f.x=pn.Backward,p.x=r*Math.abs((e.left+m.width-o)/m.width)),{direction:f,speed:p}}function ade(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:o}=window;return{top:0,left:0,right:i,bottom:o,width:i,height:o}}const{top:e,left:n,right:r,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:s,width:t.clientWidth,height:t.clientHeight}}function v7(t){return t.reduce((e,n)=>ql(e,sv(n)),_s)}function lde(t){return t.reduce((e,n)=>e+g7(n),0)}function cde(t){return t.reduce((e,n)=>e+m7(n),0)}function ude(t,e){if(e===void 0&&(e=ad),!t)return;const{top:n,left:r,bottom:s,right:i}=e(t);p7(t)&&(s<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const dde=[["x",["left","right"],lde],["y",["top","bottom"],cde]];class iv{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=nv(n),s=v7(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,o,a]of dde)for(const l of o)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=s[i]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ld{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var s;(s=this.target)==null||s.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function hde(t){const{EventTarget:e}=cr(t);return t instanceof e?t:Ul(t)}function ov(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var Kr;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Kr||(Kr={}));function x7(t){t.preventDefault()}function fde(t){t.stopPropagation()}var ct;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ct||(ct={}));const w7={start:[ct.Space,ct.Enter],cancel:[ct.Esc],end:[ct.Space,ct.Enter,ct.Tab]},pde=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case ct.Right:return{...n,x:n.x+25};case ct.Left:return{...n,x:n.x-25};case ct.Down:return{...n,y:n.y+25};case ct.Up:return{...n,y:n.y-25}}};class _7{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new ld(Ul(n)),this.windowListeners=new ld(cr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kr.Resize,this.handleCancel),this.windowListeners.add(Kr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Kr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&ude(r),n(_s)}handleKeyDown(e){if(c7(e)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:i=w7,coordinateGetter:o=pde,scrollBehavior:a="smooth"}=s,{code:l}=e;if(i.end.includes(l)){this.handleEnd(e);return}if(i.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:_s;this.referenceCoordinates||(this.referenceCoordinates=u);const d=o(e,{active:n,context:r.current,currentCoordinates:u});if(d){const h=Pp(d,u),f={x:0,y:0},{scrollableAncestors:p}=r.current;for(const m of p){const g=e.code,{isTop:y,isRight:v,isLeft:b,isBottom:C,maxScroll:_,minScroll:k}=b7(m),E=ade(m),A={x:Math.min(g===ct.Right?E.right-E.width/2:E.right,Math.max(g===ct.Right?E.left:E.left+E.width/2,d.x)),y:Math.min(g===ct.Down?E.bottom-E.height/2:E.bottom,Math.max(g===ct.Down?E.top:E.top+E.height/2,d.y))},$=g===ct.Right&&!v||g===ct.Left&&!b,P=g===ct.Down&&!C||g===ct.Up&&!y;if($&&A.x!==d.x){const O=m.scrollLeft+h.x,R=g===ct.Right&&O<=_.x||g===ct.Left&&O>=k.x;if(R&&!h.y){m.scrollTo({left:O,behavior:a});return}R?f.x=m.scrollLeft-O:f.x=g===ct.Right?m.scrollLeft-_.x:m.scrollLeft-k.x,f.x&&m.scrollBy({left:-f.x,behavior:a});break}else if(P&&A.y!==d.y){const O=m.scrollTop+h.y,R=g===ct.Down&&O<=_.y||g===ct.Up&&O>=k.y;if(R&&!h.x){m.scrollTo({top:O,behavior:a});return}R?f.y=m.scrollTop-O:f.y=g===ct.Down?m.scrollTop-_.y:m.scrollTop-k.y,f.y&&m.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(e,ql(Pp(d,this.referenceCoordinates),f))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}_7.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=w7,onActivation:s}=e,{active:i}=n;const{code:o}=t.nativeEvent;if(r.start.includes(o)){const a=i.activatorNode.current;return a&&t.target!==a?!1:(t.preventDefault(),s==null||s({event:t.nativeEvent}),!0)}return!1}}];function C7(t){return!!(t&&"distance"in t)}function S7(t){return!!(t&&"delay"in t)}class av{constructor(e,n,r){var s;r===void 0&&(r=hde(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:o}=i;this.props=e,this.events=n,this.document=Ul(o),this.documentListeners=new ld(this.document),this.listeners=new ld(r),this.windowListeners=new ld(cr(o)),this.initialCoordinates=(s=tv(i))!=null?s:_s,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Kr.Resize,this.handleCancel),this.windowListeners.add(Kr.DragStart,x7),this.windowListeners.add(Kr.VisibilityChange,this.handleCancel),this.windowListeners.add(Kr.ContextMenu,x7),this.documentListeners.add(Kr.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(S7(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(C7(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:s}=this.props;s(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(Kr.Click,fde,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kr.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:s,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!s)return;const l=(n=tv(e))!=null?n:_s,c=Pp(s,l);if(!r&&a){if(C7(a)){if(a.tolerance!=null&&ov(c,a.tolerance))return this.handleCancel();if(ov(c,a.distance))return this.handleStart()}if(S7(a)&&ov(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===ct.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const gde={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class E7 extends av{constructor(e){const{event:n}=e,r=Ul(n.target);super(e,gde,r)}}E7.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const mde={move:{name:"mousemove"},end:{name:"mouseup"}};var lv;(function(t){t[t.RightClick=2]="RightClick"})(lv||(lv={}));class yde extends av{constructor(e){super(e,mde,Ul(e.event.target))}}yde.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===lv.RightClick?!1:(r==null||r({event:n}),!0)}}];const cv={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class bde extends av{constructor(e){super(e,cv)}static setup(){return window.addEventListener(cv.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(cv.move.name,e)};function e(){}}}bde.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:s}=n;return s.length>1?!1:(r==null||r({event:n}),!0)}}];var cd;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(cd||(cd={}));var Rp;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Rp||(Rp={}));function vde(t){let{acceleration:e,activator:n=cd.Pointer,canScroll:r,draggingRect:s,enabled:i,interval:o=5,order:a=Rp.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:h}=t;const f=wde({delta:d,disabled:!i}),[p,m]=Due(),g=x.useRef({x:0,y:0}),y=x.useRef({x:0,y:0}),v=x.useMemo(()=>{switch(n){case cd.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case cd.DraggableRect:return s}},[n,s,l]),b=x.useRef(null),C=x.useCallback(()=>{const k=b.current;if(!k)return;const E=g.current.x*y.current.x,A=g.current.y*y.current.y;k.scrollBy(E,A)},[]),_=x.useMemo(()=>a===Rp.TreeOrder?[...c].reverse():c,[a,c]);x.useEffect(()=>{if(!i||!c.length||!v){m();return}for(const k of _){if((r==null?void 0:r(k))===!1)continue;const E=c.indexOf(k),A=u[E];if(!A)continue;const{direction:$,speed:P}=ode(k,A,v,e,h);for(const O of["x","y"])f[O][$[O]]||(P[O]=0,$[O]=0);if(P.x>0||P.y>0){m(),b.current=k,p(C,o),g.current=P,y.current=$;return}}g.current={x:0,y:0},y.current={x:0,y:0},m()},[e,C,r,m,i,o,JSON.stringify(v),JSON.stringify(f),p,c,_,u,JSON.stringify(h)])}const xde={x:{[pn.Backward]:!1,[pn.Forward]:!1},y:{[pn.Backward]:!1,[pn.Forward]:!1}};function wde(t){let{delta:e,disabled:n}=t;const r=Jb(e);return od(s=>{if(n||!r||!s)return xde;const i={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[pn.Backward]:s.x[pn.Backward]||i.x===-1,[pn.Forward]:s.x[pn.Forward]||i.x===1},y:{[pn.Backward]:s.y[pn.Backward]||i.y===-1,[pn.Forward]:s.y[pn.Forward]||i.y===1}}},[n,e,r])}function _de(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return od(s=>{var i;return e==null?null:(i=r??s)!=null?i:null},[r,e])}function Cde(t,e){return x.useMemo(()=>t.reduce((n,r)=>{const{sensor:s}=r,i=s.activators.map(o=>({eventName:o.eventName,handler:e(o.handler,r)}));return[...n,...i]},[]),[t,e])}var ud;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(ud||(ud={}));var uv;(function(t){t.Optimized="optimized"})(uv||(uv={}));const A7=new Map;function Sde(t,e){let{dragging:n,dependencies:r,config:s}=e;const[i,o]=x.useState(null),{frequency:a,measure:l,strategy:c}=s,u=x.useRef(t),d=g(),h=id(d),f=x.useCallback(function(y){y===void 0&&(y=[]),!h.current&&o(v=>v===null?y:v.concat(y.filter(b=>!v.includes(b))))},[h]),p=x.useRef(null),m=od(y=>{if(d&&!n)return A7;if(!y||y===A7||u.current!==t||i!=null){const v=new Map;for(let b of t){if(!b)continue;if(i&&i.length>0&&!i.includes(b.id)&&b.rect.current){v.set(b.id,b.rect.current);continue}const C=b.node.current,_=C?new iv(l(C),C):null;b.rect.current=_,_&&v.set(b.id,_)}return v}return y},[t,i,n,d,l]);return x.useEffect(()=>{u.current=t},[t]),x.useEffect(()=>{d||f()},[n,d]),x.useEffect(()=>{i&&i.length>0&&o(null)},[JSON.stringify(i)]),x.useEffect(()=>{d||typeof a!="number"||p.current!==null||(p.current=setTimeout(()=>{f(),p.current=null},a))},[a,d,f,...r]),{droppableRects:m,measureDroppableContainers:f,measuringScheduled:i!=null};function g(){switch(c){case ud.Always:return!1;case ud.BeforeDragging:return n;default:return!n}}}function T7(t,e){return od(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function Ede(t,e){return T7(t,e)}function Ade(t){let{callback:e,disabled:n}=t;const r=Qb(e),s=x.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return x.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Ip(t){let{callback:e,disabled:n}=t;const r=Qb(e),s=x.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return x.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Tde(t){return new iv(ad(t),t)}function k7(t,e,n){e===void 0&&(e=Tde);const[r,s]=x.useState(null);function i(){s(l=>{if(!t)return null;if(t.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=e(t);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const o=Ade({callback(l){if(t)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(t)){i();break}}}}),a=Ip({callback:i});return bo(()=>{i(),t?(a==null||a.observe(t),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[t]),r}function kde(t){const e=T7(t);return h7(t,e)}const M7=[];function Mde(t){const e=x.useRef(t),n=od(r=>t?r&&r!==M7&&t&&e.current&&t.parentNode===e.current.parentNode?r:nv(t):M7,[t]);return x.useEffect(()=>{e.current=t},[t]),n}function Ode(t){const[e,n]=x.useState(null),r=x.useRef(t),s=x.useCallback(i=>{const o=rv(i.target);o&&n(a=>a?(a.set(o,sv(o)),new Map(a)):null)},[]);return x.useEffect(()=>{const i=r.current;if(t!==i){o(i);const a=t.map(l=>{const c=rv(l);return c?(c.addEventListener("scroll",s,{passive:!0}),[c,sv(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=t}return()=>{o(t),o(i)};function o(a){a.forEach(l=>{const c=rv(l);c==null||c.removeEventListener("scroll",s)})}},[s,t]),x.useMemo(()=>t.length?e?Array.from(e.values()).reduce((i,o)=>ql(i,o),_s):v7(t):_s,[t,e])}function O7(t,e){e===void 0&&(e=[]);const n=x.useRef(null);return x.useEffect(()=>{n.current=null},e),x.useEffect(()=>{const r=t!==_s;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?Pp(t,n.current):_s}function $de(t){x.useEffect(()=>{if(!Mp)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function Pde(t,e){return x.useMemo(()=>t.reduce((n,r)=>{let{eventName:s,handler:i}=r;return n[s]=o=>{i(o,e)},n},{}),[t,e])}function $7(t){return x.useMemo(()=>t?nde(t):null,[t])}const P7=[];function Dde(t,e){e===void 0&&(e=ad);const[n]=t,r=$7(n?cr(n):null),[s,i]=x.useState(P7);function o(){i(()=>t.length?t.map(l=>y7(l)?r:new iv(e(l),l)):P7)}const a=Ip({callback:o});return bo(()=>{a==null||a.disconnect(),o(),t.forEach(l=>a==null?void 0:a.observe(l))},[t]),s}function Rde(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return sd(e)?e:t}function Ide(t){let{measure:e}=t;const[n,r]=x.useState(null),s=x.useCallback(c=>{for(const{target:u}of c)if(sd(u)){r(d=>{const h=e(u);return d?{...d,width:h.width,height:h.height}:h});break}},[e]),i=Ip({callback:s}),o=x.useCallback(c=>{const u=Rde(c);i==null||i.disconnect(),u&&(i==null||i.observe(u)),r(u?e(u):null)},[e,i]),[a,l]=Op(o);return x.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Nde=[{sensor:E7,options:{}},{sensor:_7,options:{}}],Lde={current:{}},Np={draggable:{measure:f7},droppable:{measure:f7,strategy:ud.WhileDragging,frequency:uv.Optimized},dragOverlay:{measure:ad}};class dd extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const Bde={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dd,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Dp},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Np,measureDroppableContainers:Dp,windowRect:null,measuringScheduled:!1},jde={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Dp,draggableNodes:new Map,over:null,measureDroppableContainers:Dp},Lp=x.createContext(jde),Fde=x.createContext(Bde);function zde(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dd}}}function Hde(t,e){switch(e.type){case en.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case en.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case en.DragEnd:case en.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case en.RegisterDroppable:{const{element:n}=e,{id:r}=n,s=new dd(t.droppable.containers);return s.set(r,n),{...t,droppable:{...t.droppable,containers:s}}}case en.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=e,i=t.droppable.containers.get(n);if(!i||r!==i.key)return t;const o=new dd(t.droppable.containers);return o.set(n,{...i,disabled:s}),{...t,droppable:{...t.droppable,containers:o}}}case en.UnregisterDroppable:{const{id:n,key:r}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const i=new dd(t.droppable.containers);return i.delete(n),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function Vde(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:s}=x.useContext(Lp),i=Jb(r),o=Jb(n==null?void 0:n.id);return x.useEffect(()=>{if(!e&&!r&&i&&o!=null){if(!c7(i)||document.activeElement===i.target)return;const a=s.get(o);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=Nue(u);if(d){d.focus();break}}})}},[r,e,s,o,i]),null}function Ude(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((s,i)=>i({transform:s,...r}),n):n}function qde(t){return x.useMemo(()=>({draggable:{...Np.draggable,...t==null?void 0:t.draggable},droppable:{...Np.droppable,...t==null?void 0:t.droppable},dragOverlay:{...Np.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function Wde(t){let{activeNode:e,measure:n,initialRect:r,config:s=!0}=t;const i=x.useRef(!1),{x:o,y:a}=typeof s=="boolean"?{x:s,y:s}:s;bo(()=>{if(!o&&!a||!e){i.current=!1;return}if(i.current||!r)return;const c=e==null?void 0:e.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=h7(u,r);if(o||(d.x=0),a||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=p7(c);h&&h.scrollBy({top:d.y,left:d.x})}},[e,o,a,r,n])}const D7=x.createContext({..._s,scaleX:1,scaleY:1});var vo;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(vo||(vo={}));const Gde=x.memo(function(e){var n,r,s,i;let{id:o,accessibility:a,autoScroll:l=!0,children:c,sensors:u=Nde,collisionDetection:d=Kue,measuring:h,modifiers:f,...p}=e;const m=x.useReducer(Hde,void 0,zde),[g,y]=m,[v,b]=Hue(),[C,_]=x.useState(vo.Uninitialized),k=C===vo.Initialized,{draggable:{active:E,nodes:A,translate:$},droppable:{containers:P}}=g,O=E!=null?A.get(E):null,R=x.useRef({initial:null,translated:null}),H=x.useMemo(()=>{var Tt;return E!=null?{id:E,data:(Tt=O==null?void 0:O.data)!=null?Tt:Lde,rect:R}:null},[E,O]),z=x.useRef(null),[j,F]=x.useState(null),[V,q]=x.useState(null),Q=id(p,Object.values(p)),B=$p("DndDescribedBy",o),W=x.useMemo(()=>P.getEnabled(),[P]),se=qde(h),{droppableRects:ne,measureDroppableContainers:oe,measuringScheduled:te}=Sde(W,{dragging:k,dependencies:[$.x,$.y],config:se.droppable}),ue=_de(A,E),Ce=x.useMemo(()=>V?tv(V):null,[V]),be=$a(),Te=Ede(ue,se.draggable.measure);Wde({activeNode:E!=null?A.get(E):null,config:be.layoutShiftCompensation,initialRect:Te,measure:se.draggable.measure});const de=k7(ue,se.draggable.measure,Te),Le=k7(ue?ue.parentElement:null),Z=x.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:ne,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Be=P.getNodeFor((n=Z.current.over)==null?void 0:n.id),ot=Ide({measure:se.dragOverlay.measure}),Et=(r=ot.nodeRef.current)!=null?r:ue,tn=k?(s=ot.rect)!=null?s:de:null,Qn=!!(ot.nodeRef.current&&ot.rect),As=kde(Qn?null:de),ts=$7(Et?cr(Et):null),gt=Mde(k?Be??ue:null),N=Dde(gt),he=Ude(f,{transform:{x:$.x-As.x,y:$.y-As.y,scaleX:1,scaleY:1},activatorEvent:V,active:H,activeNodeRect:de,containerNodeRect:Le,draggingNodeRect:tn,over:Z.current.over,overlayNodeRect:ot.rect,scrollableAncestors:gt,scrollableAncestorRects:N,windowRect:ts}),me=Ce?ql(Ce,$):null,Oe=Ode(gt),at=O7(Oe),Ze=O7(Oe,[de]),Ee=ql(he,at),mt=tn?Que(tn,he):null,gn=H&&mt?d({active:H,collisionRect:mt,droppableRects:ne,droppableContainers:W,pointerCoordinates:me}):null,Qe=Gue(gn,"id"),[Ht,Mr]=x.useState(null),fr=Qn?he:ql(he,Ze),ns=Zue(fr,(i=Ht==null?void 0:Ht.rect)!=null?i:null,de),Zt=x.useRef(null),Oa=x.useCallback((Tt,nn)=>{let{sensor:Vt,options:pr}=nn;if(z.current==null)return;const mn=A.get(z.current);if(!mn)return;const rn=Tt.nativeEvent,sn=new Vt({active:z.current,activeNode:mn,event:rn,options:pr,context:Z,onAbort(ut){if(!A.get(ut))return;const{onDragAbort:gr}=Q.current,$r={id:ut};gr==null||gr($r),v({type:"onDragAbort",event:$r})},onPending(ut,rs,gr,$r){if(!A.get(ut))return;const{onDragPending:ks}=Q.current,yt={id:ut,constraint:rs,initialCoordinates:gr,offset:$r};ks==null||ks(yt),v({type:"onDragPending",event:yt})},onStart(ut){const rs=z.current;if(rs==null)return;const gr=A.get(rs);if(!gr)return;const{onDragStart:$r}=Q.current,Xs={activatorEvent:rn,active:{id:rs,data:gr.data,rect:R}};Pr.unstable_batchedUpdates(()=>{$r==null||$r(Xs),_(vo.Initializing),y({type:en.DragStart,initialCoordinates:ut,active:rs}),v({type:"onDragStart",event:Xs}),F(Zt.current),q(rn)})},onMove(ut){y({type:en.DragMove,coordinates:ut})},onEnd:Ts(en.DragEnd),onCancel:Ts(en.DragCancel)});Zt.current=sn;function Ts(ut){return async function(){const{active:gr,collisions:$r,over:Xs,scrollAdjustedTranslate:ks}=Z.current;let yt=null;if(gr&&ks){const{cancelDrop:$i}=Q.current;yt={activatorEvent:rn,active:gr,collisions:$r,delta:ks,over:Xs},ut===en.DragEnd&&typeof $i=="function"&&await Promise.resolve($i(yt))&&(ut=en.DragCancel)}z.current=null,Pr.unstable_batchedUpdates(()=>{y({type:ut}),_(vo.Uninitialized),Mr(null),F(null),q(null),Zt.current=null;const $i=ut===en.DragEnd?"onDragEnd":"onDragCancel";if(yt){const Pa=Q.current[$i];Pa==null||Pa(yt),v({type:$i,event:yt})}})}}},[A]),ko=x.useCallback((Tt,nn)=>(Vt,pr)=>{const mn=Vt.nativeEvent,rn=A.get(pr);if(z.current!==null||!rn||mn.dndKit||mn.defaultPrevented)return;const sn={active:rn};Tt(Vt,nn.options,sn)===!0&&(mn.dndKit={capturedBy:nn.sensor},z.current=pr,Oa(Vt,nn))},[A,Oa]),Zs=Cde(u,ko);$de(u),bo(()=>{de&&C===vo.Initializing&&_(vo.Initialized)},[de,C]),x.useEffect(()=>{const{onDragMove:Tt}=Q.current,{active:nn,activatorEvent:Vt,collisions:pr,over:mn}=Z.current;if(!nn||!Vt)return;const rn={active:nn,activatorEvent:Vt,collisions:pr,delta:{x:Ee.x,y:Ee.y},over:mn};Pr.unstable_batchedUpdates(()=>{Tt==null||Tt(rn),v({type:"onDragMove",event:rn})})},[Ee.x,Ee.y]),x.useEffect(()=>{const{active:Tt,activatorEvent:nn,collisions:Vt,droppableContainers:pr,scrollAdjustedTranslate:mn}=Z.current;if(!Tt||z.current==null||!nn||!mn)return;const{onDragOver:rn}=Q.current,sn=pr.get(Qe),Ts=sn&&sn.rect.current?{id:sn.id,rect:sn.rect.current,data:sn.data,disabled:sn.disabled}:null,ut={active:Tt,activatorEvent:nn,collisions:Vt,delta:{x:mn.x,y:mn.y},over:Ts};Pr.unstable_batchedUpdates(()=>{Mr(Ts),rn==null||rn(ut),v({type:"onDragOver",event:ut})})},[Qe]),bo(()=>{Z.current={activatorEvent:V,active:H,activeNode:ue,collisionRect:mt,collisions:gn,droppableRects:ne,draggableNodes:A,draggingNode:Et,draggingNodeRect:tn,droppableContainers:P,over:Ht,scrollableAncestors:gt,scrollAdjustedTranslate:Ee},R.current={initial:tn,translated:mt}},[H,ue,gn,mt,A,Et,tn,ne,P,Ht,gt,Ee]),vde({...be,delta:$,draggingRect:mt,pointerCoordinates:me,scrollableAncestors:gt,scrollableAncestorRects:N});const Or=x.useMemo(()=>({active:H,activeNode:ue,activeNodeRect:de,activatorEvent:V,collisions:gn,containerNodeRect:Le,dragOverlay:ot,draggableNodes:A,droppableContainers:P,droppableRects:ne,over:Ht,measureDroppableContainers:oe,scrollableAncestors:gt,scrollableAncestorRects:N,measuringConfiguration:se,measuringScheduled:te,windowRect:ts}),[H,ue,de,V,gn,Le,ot,A,P,ne,Ht,oe,gt,N,se,te,ts]),Mo=x.useMemo(()=>({activatorEvent:V,activators:Zs,active:H,activeNodeRect:de,ariaDescribedById:{draggable:B},dispatch:y,draggableNodes:A,over:Ht,measureDroppableContainers:oe}),[V,Zs,H,de,y,B,A,Ht,oe]);return x.createElement(d7.Provider,{value:b},x.createElement(Lp.Provider,{value:Mo},x.createElement(Fde.Provider,{value:Or},x.createElement(D7.Provider,{value:ns},c)),x.createElement(Vde,{disabled:(a==null?void 0:a.restoreFocus)===!1})),x.createElement(que,{...a,hiddenTextDescribedById:B}));function $a(){const Tt=(j==null?void 0:j.autoScrollEnabled)===!1,nn=typeof l=="object"?l.enabled===!1:l===!1,Vt=k&&!Tt&&!nn;return typeof l=="object"?{...l,enabled:Vt}:{enabled:Vt}}}),Yde=x.createContext(null),R7="button",Kde="Draggable";function Zde(t){let{id:e,data:n,disabled:r=!1,attributes:s}=t;const i=$p(Kde),{activators:o,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:h}=x.useContext(Lp),{role:f=R7,roleDescription:p="draggable",tabIndex:m=0}=s??{},g=(l==null?void 0:l.id)===e,y=x.useContext(g?D7:Yde),[v,b]=Op(),[C,_]=Op(),k=Pde(o,e),E=id(n);bo(()=>(d.set(e,{id:e,key:i,node:v,activatorNode:C,data:E}),()=>{const $=d.get(e);$&&$.key===i&&d.delete(e)}),[d,e]);const A=x.useMemo(()=>({role:f,tabIndex:m,"aria-disabled":r,"aria-pressed":g&&f===R7?!0:void 0,"aria-roledescription":p,"aria-describedby":u.draggable}),[r,f,m,g,p,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:A,isDragging:g,listeners:r?void 0:k,node:v,over:h,setNodeRef:b,setActivatorNodeRef:_,transform:y}}const Xde="Droppable",Qde={timeout:25};function Jde(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:s}=t;const i=$p(Xde),{active:o,dispatch:a,over:l,measureDroppableContainers:c}=x.useContext(Lp),u=x.useRef({disabled:n}),d=x.useRef(!1),h=x.useRef(null),f=x.useRef(null),{disabled:p,updateMeasurementsFor:m,timeout:g}={...Qde,...s},y=id(m??r),v=x.useCallback(()=>{if(!d.current){d.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),f.current=null},g)},[g]),b=Ip({callback:v,disabled:p||!o}),C=x.useCallback((A,$)=>{b&&($&&(b.unobserve($),d.current=!1),A&&b.observe(A))},[b]),[_,k]=Op(C),E=id(e);return x.useEffect(()=>{!b||!_.current||(b.disconnect(),d.current=!1,b.observe(_.current))},[_,b]),x.useEffect(()=>(a({type:en.RegisterDroppable,element:{id:r,key:i,disabled:n,node:_,rect:h,data:E}}),()=>a({type:en.UnregisterDroppable,key:i,id:r})),[r]),x.useEffect(()=>{n!==u.current.disabled&&(a({type:en.SetDroppableDisabled,id:r,key:i,disabled:n}),u.current.disabled=n)},[r,i,n,a]),{active:o,rect:h,isOver:(l==null?void 0:l.id)===r,node:_,over:l,setNodeRef:k}}const I7={minHour:0,maxHour:24,columnCount:5,step:15,enableCreateByDrag:!0,enableMoveByDrag:!0,popperHideDelay:200,popperOffset:[0,0]},Wl=x.createContext(I7);ce.extend(h_),ce.extend(u_);const ehe=t=>{const[e,n]=t.split(":"),r=e[0],s=e.slice(1);return`GMT ${r}${s}${n!=="00"?`:${n}`:""}`},the=()=>{const t=ce.tz.guess(),e=ce().tz(t).format("Z");return ehe(e)},nhe=new Map([["ko",["일","월","화","수","목","금","토"]],["en",["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]],["ja",["日","月","火","水","木","金","土"]],["zh",["日","一","二","三","四","五","六"]],["vi",["CN","T2","T3","T4","T5","T6","T7"]],["fr",["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]],["de",["So","Mo","Di","Mi","Do","Fr","Sa"]],["es",["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]],["it",["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]],["ru",["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]]]),N7=(t,e="ko")=>{var n;return(n=nhe.get(e))==null?void 0:n[t]};function L7(t){const{clickOffsetY:e,columnHeight:n,date:r,minHour:s=0,maxHour:i=24,step:o=15}=t,a=e/n,l=Math.max(0,Math.min(1,a)),c=i-s,d=(s+l*c)*60,h=d%o,f=o/2;let p=0;h>=f?p=d+(o-h):p=d-h;const m=Math.floor(p/60),g=Math.floor(p%60);return ce(r).startOf("day").add(m,"hour").add(g,"minute")}function rhe(t){const{id:e,startTime:n,endTime:r,createdAt:s}=t,i=ce(n);if(!r)return[{...t,isAllDay:!0}];const o=ce(r);if(o.isBefore(i))return[{...t,isAllDay:!1,realStartTime:i.format("YYYY-MM-DD HH:mm:ss"),realEndTime:o.format("YYYY-MM-DD HH:mm:ss")}];if(o.diff(i,"hours",!0)>=24)return[{...t,isAllDay:!0,realStartTime:i.format("YYYY-MM-DD HH:mm:ss"),realEndTime:o.format("YYYY-MM-DD HH:mm:ss")}];const l=[];let c=i.clone();for(;c.isBefore(o);){const u=c.endOf("day"),d=u.isBefore(o)?u:o;l.push({...t,id:e,createdAt:s,startTime:c.format("YYYY-MM-DD HH:mm:ss"),endTime:d.format("YYYY-MM-DD HH:mm:ss"),isAllDay:!1,realStartTime:i.format("YYYY-MM-DD HH:mm:ss"),realEndTime:o.format("YYYY-MM-DD HH:mm:ss")}),c=d.add(1,"millisecond")}return l}function she(t){const e=[];for(const n of t){const r=rhe(n);e.push(...r)}return e}function ihe({startTime:t,endTime:e,minHour:n,maxHour:r}){const s=ce(t),i=ce(e),o=s.startOf("day"),a=o.add(n,"hour").valueOf(),l=o.add(r,"hour").valueOf(),c=l-a;let u=s.valueOf(),d=i.valueOf();u<a&&(u=a),d>l&&(d=l),d<u&&(d=u);const h=(u-a)/c,f=(d-a)/c,p=h*100,m=Math.max(0,f-h)*100;return{topPercent:p,heightPercent:m}}function ohe({events:t,minHour:e,maxHour:n}){const r=[...t].sort((c,u)=>{const d=ce(c.startTime).valueOf(),h=ce(u.startTime).valueOf();if(d!==h)return d-h;const f=c.endTime?ce(c.endTime).valueOf():d,p=u.endTime?ce(u.endTime).valueOf():h;if(f!==p)return f-p;const m=c.title||"",g=u.title||"";return m!==g?m.localeCompare(g):ce(c.createdAt).valueOf()-ce(u.createdAt).valueOf()}),s=[],i=[];function o(c){for(let u=i.length-1;u>=0;u--)i[u].ev.endVal<=c&&i.splice(u,1)}function a(){const c=new Set;for(const d of i)c.add(d.ev.columnIndex);let u=0;for(;c.has(u);)u++;return u}for(const c of r){const u=ce(c.startTime).valueOf(),d=c.endTime?ce(c.endTime).valueOf():u;o(u);const h=c.endTime||c.startTime,{topPercent:f,heightPercent:p}=ihe({startTime:c.startTime,endTime:h,minHour:e,maxHour:n}),m={...c,startVal:u,endVal:d,duration:d-u,created:ce(c.createdAt).valueOf(),columnIndex:-1,columnsCount:1,topPercent:f,heightPercent:p,zIndex:1,startStr:c.startTime,endStr:c.endTime||c.startTime,realStartTime:c.realStartTime,realEndTime:c.realEndTime},g=a();m.columnIndex=g,i.push({ev:m});let y=0;for(const b of i)b.ev.columnIndex>y&&(y=b.ev.columnIndex);const v=y+1;for(const b of i)b.ev.columnsCount=Math.max(b.ev.columnsCount,v);s.push(m)}for(let c=0;c<s.length;c++)for(let u=c+1;u<s.length;u++){const d=s[c],h=s[u];d.startVal<h.endVal&&h.startVal<d.endVal&&(d.duration!==h.duration?d.duration<h.duration?d.zIndex<=h.zIndex&&(d.zIndex=h.zIndex+1):h.zIndex<=d.zIndex&&(h.zIndex=d.zIndex+1):d.created<h.created?h.zIndex<=d.zIndex&&(h.zIndex=d.zIndex+1):d.created>h.created&&d.zIndex<=h.zIndex&&(d.zIndex=h.zIndex+1))}return s.map(c=>{const u=100/c.columnsCount,d=u*c.columnIndex;return{...c,leftPercent:d,widthPercent:u,startTime:c.startStr,endTime:c.endStr}})}var B7={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(an,function(){return function(n,r,s){var i=function(o,a){if(!a||!a.length||a.length===1&&!a[0]||a.length===1&&Array.isArray(a[0])&&!a[0].length)return null;var l;a.length===1&&a[0].length>0&&(a=a[0]),l=(a=a.filter(function(u){return u}))[0];for(var c=1;c<a.length;c+=1)a[c].isValid()&&!a[c][o](l)||(l=a[c]);return l};s.max=function(){var o=[].slice.call(arguments,0);return i("isAfter",o)},s.min=function(){var o=[].slice.call(arguments,0);return i("isBefore",o)}}})})(B7);var ahe=B7.exports;const lhe=ss(ahe);ce.extend(lhe);const wn=qe.bind(Pue),che=t=>{const{id:e,height:n,widthPercent:r,leftPercent:s,topPercent:i,title:o,realStartTime:a,realEndTime:l}=t,{currentDate:c,columnCount:u,enableMoveByDrag:d,popperHideDelay:h,popperOffset:f,eventItemAs:p,eventItemPopperAs:m}=x.useContext(Wl),{setNodeRef:g,listeners:y,attributes:v,transform:b,active:C}=Zde({id:e,data:{supports:new Array(u).fill(0).map((W,se)=>ce(c).add(se,"day").format("YYYY-MM-DD")),attributes:{"data-id":e}}}),[_,k]=x.useState(null),[E,A]=x.useState(null),[$,P]=x.useState(null),[O,R]=x.useState(!1),H=x.useRef(null),{styles:z,attributes:j}=Zw(_,E,{placement:"auto",modifiers:[{name:"arrow",options:{element:$}},{name:"offset",options:{offset:f}}]}),F=(C==null?void 0:C.id)===e,V=x.useCallback(()=>{H.current&&(clearTimeout(H.current),H.current=null),R(!0)},[]),q=x.useCallback(()=>{H.current=window.setTimeout(()=>{R(!1)},h)},[h]),Q=()=>p?x.createElement(p,{key:e,...t,onMouseEnter:V,onMouseLeave:q,ref:k,style:{top:`${i}%`,height:n,width:`min(${r}%, 100%)`,left:`${s}%`,color:"black",overflow:"hidden",alignSelf:"flex-start",position:"absolute",borderRadius:4,cursor:d?"move":"default",transform:d&&b?`translate(${b.x}px, ${b.y}px)`:void 0}}):null,B=()=>m?x.createElement(m,{...t,popperRef:A,onMouseEnter:V,onMouseLeave:q,popperStyle:{...z.popper,zIndex:9999,background:"#333",color:"#fff",padding:"6px 8px",borderRadius:4,fontSize:12,boxShadow:"0 2px 4px rgba(0,0,0,0.3)"},popperAttributes:{...j.popper},title:o,realStartTime:a,realEndTime:l,arrowRef:P,arrowStyle:{...z.arrow,width:"8px",height:"8px",transform:"rotate(90deg)"},arrowAttributes:{...j.arrow}}):null;return S.jsxs("div",{...d?v:{},...d?y:{},ref:g,children:[p?Q():S.jsx("div",{"data-id":e,className:wn("EventItem",{dragging:F&&d,draggable:d}),ref:k,style:{top:`${i}%`,height:n,width:`min(${r}%, 100%)`,left:`${s}%`,color:"white",overflow:"hidden",alignSelf:"flex-start",position:"absolute",borderRadius:4,border:"1px solid #ccc",cursor:d?"move":"default",transform:d&&b?`translate(${b.x}px, ${b.y}px)`:void 0},onMouseEnter:V,onMouseLeave:q,onMouseDown:W=>{d&&W.stopPropagation()},onClick:W=>{W.stopPropagation()},children:o},e),!F&&O&&(m?B():S.jsxs("div",{ref:A,onMouseEnter:V,onMouseLeave:q,style:{...z.popper,zIndex:9999,background:"#333",color:"#fff",padding:"6px 8px",borderRadius:4,fontSize:12,boxShadow:"0 2px 4px rgba(0,0,0,0.3)"},...j.popper,children:[S.jsxs("div",{style:{whiteSpace:"nowrap"},children:[S.jsx("div",{children:S.jsx("strong",{children:o})}),S.jsxs("div",{children:[ce(a).format("MM.DD HH:mm"),l&&` ~ ${ce(l).format("MM.DD HH:mm")}`]})]}),S.jsx("div",{ref:P,style:{...z.arrow,width:"8px",height:"8px",transform:"rotate(90deg)"},...j.arrow})]}))]})},uhe=t=>{const{date:e}=t,{minHour:n,maxHour:r,step:s,events:i=[],enableCreateByDrag:o,itemHeight:a=48,type:l="default"}=x.useContext(Wl),[c,u]=x.useState(null),[d,h]=x.useState(null),{setNodeRef:f}=Jde({id:e}),p=ohe({events:i.filter(Z=>!Z.isAllDay&&ce(Z.startTime).format("YYYY-MM-DD")===e),minHour:n,maxHour:r}),m=ce().valueOf(),g=ce(e).startOf("day").add(n,"hour").format("YYYY-MM-DD HH:mm"),y=ce(e).startOf("day").add(r,"hour").subtract(1,"millisecond").format("YYYY-MM-DD HH:mm"),v=ce(g).valueOf(),C=ce(y).valueOf()-v,k=(m-v)/C*100,E=k>100?100:k<=0?0:k;x.useEffect(()=>{h(E)},[]);const A=ce().isSame(e,"day"),$=()=>{},O=(r-n)*a,R=p.filter(Z=>ce(Z.startTime).format("YYYY-MM-DD")===e&&!Z.isAllDay),[H,z]=x.useState(!1),[j,F]=x.useState(null),[V,q]=x.useState(null),[Q,B]=x.useState(null),[W,se]=x.useState(null),[ne,oe]=x.useState(null),te=x.useRef(null),ue=Z=>{if(!o||Z.button!==0)return;z(!0);const Be=Z.nativeEvent.offsetY;if(F(Be),q(Be),te.current){const ot=te.current.clientHeight,Et=L7({clickOffsetY:Be,columnHeight:ot,date:e,minHour:n,maxHour:r,step:s});oe(Et),B(Et),se(Et)}},Ce=Z=>{if(!o||!H||!ne)return;const Be=Z.nativeEvent.offsetY;if(q(Be),!te.current)return;const ot=te.current.clientHeight,Et=L7({clickOffsetY:Be,columnHeight:ot,date:e,minHour:n,maxHour:r,step:s}),tn=ce.min(ne,Et),Qn=ce.max(ne,Et);B(tn),se(Qn)},be=Z=>{o&&(Z.stopPropagation(),H&&(z(!1),Q&&W&&Q.isSame(W),oe(null),F(null),q(null),B(null),se(null)))};let Te=0,de=0;if(j!==null&&V!==null){const Z=Math.min(j,V),Be=Math.max(j,V);Te=Z,de=Be-Z}const Le=x.useMemo(()=>{const Z=(Q==null?void 0:Q.format("HH:mm"))??"",Be=(W==null?void 0:W.format("HH:mm"))??"";return`(제목 없음)
176
+ ${Z} ~ ${Be}`},[Q,W]);return S.jsxs("div",{className:wn("DateColumn",l,{dragging:H&&o,allowCreate:o}),ref:f,onClick:$,onMouseDown:o?ue:void 0,onMouseMove:o?Ce:void 0,onMouseUp:o?be:void 0,style:{cursor:o?"cell":"default","--bg-start-white":a-1+"px","--bg-end-white":a-1+"px","--bg-line-white":a+"px"},children:[S.jsxs("div",{className:wn("DateColumnInner"),ref:te,style:{height:O},children:[A&&d?S.jsx("div",{className:wn("TodayIndicator"),style:{top:`${d}%`}}):null,R.map(Z=>{const Be=Math.max(((c==null?void 0:c.clientHeight)||0)*(Z.heightPercent/100),24);return S.jsx(che,{...Z,endTime:Z.realEndTime,height:Be,title:Z.title??""},Z.id)}),H&&S.jsx("div",{style:{position:"absolute",top:Te,left:0,width:"100%",height:de,backgroundColor:"#F4511E",pointerEvents:"none",fontSize:11,borderRadius:4,padding:4,boxShadow:"0 0 4px rgba(0,0,0,0.2)",whiteSpace:"pre-wrap",color:"white",zIndex:100},children:Le})]}),S.jsx("div",{ref:u,style:{width:8,height:`${O}px`}})]})},dhe={Root:t=>{const{children:e,enableCreateByDrag:n=!0,enableMoveByDrag:r=!0,type:s="default",className:i,events:o,...a}=t;function l(){}const c={...I7,...a,events:she(o||[]),type:s,enableCreateByDrag:n,enableMoveByDrag:r};return S.jsx(Gde,{onDragEnd:l,children:S.jsx(Wl,{value:c,children:S.jsx("div",{className:wn("WeeklyCalendarRoot",i),children:e})})})},Timelines:t=>{const{className:e,as:n}=t,{minHour:r,maxHour:s,itemHeight:i=48,type:o="default"}=x.useContext(Wl),a=s-r,l=Array.from({length:a+1},(u,d)=>ce().startOf("day").add(r+d,"hour").format("HH:mm")),c=u=>n?x.createElement(n,{key:u.toString(),itemHeight:i,minHour:r,maxHour:s,time:u}):S.jsx("div",{className:wn("Timeline"),style:{height:i},children:S.jsx("span",{className:wn("TimeText"),children:u})},u);return S.jsx("div",{className:wn("TimelineWrapper",e,o),children:l.map(u=>c(u))})},StandardTime:()=>S.jsx("div",{className:wn("ShrinkedColumn","StandardTime"),children:the()}),DateCellRow:()=>{const{currentDate:t=ce().format("YYYY-MM-DD"),columnCount:e}=x.useContext(Wl),n=Array.from({length:e},(r,s)=>({realDate:ce(t).add(s,"day"),date:ce(t).add(s,"day").format("DD"),dayText:N7(ce(t).add(s,"day").get("day"),"ko")}));return S.jsx("div",{className:wn("DateCellRow"),children:n.map(r=>S.jsxs("div",{className:wn("DateCell",{today:ce().isSame(r.realDate,"day")}),children:[S.jsx("div",{className:wn("DayText"),children:r.dayText}),S.jsx("div",{className:wn("Date"),children:r.date})]},r.date))})},DateColumnRow:t=>{const{onScroll:e}=t,{currentDate:n=ce().format("YYYY-MM-DD"),columnCount:r,minHour:s,maxHour:i}=x.useContext(Wl),o=Array.from({length:r},(c,u)=>({date:ce(n).add(u,"day").format("YYYY-MM-DD"),dayText:N7(ce(n).add(u,"day").get("day"),"ko")})),a=i-s,l=Array.from({length:a},(c,u)=>ce().startOf("day").add(s+u,"hour").format("HH:mm"));return S.jsx("div",{className:wn("DateColumnRow"),onScroll:e,children:S.jsxs("div",{className:wn("DateColumnRowInner"),children:[S.jsx("div",{className:wn("TimeCriteria"),children:l.map(c=>S.jsx("div",{className:wn("TimeCriteriaCell")},c))}),o.map(c=>S.jsx(uhe,{date:c.date},c.date))]})})}},hhe={Root:"_Root_fhkj1_7",Column:"_Column_fhkj1_13",Item:"_Item_fhkj1_21",isSelected:"_isSelected_fhkj1_32",ItemWrap:"_ItemWrap_fhkj1_35",isDragging:"_isDragging_fhkj1_40",Divider:"_Divider_fhkj1_43"},fhe={selectedValue:{},itemHeight:36,itemViewCount:5,onChange:()=>{}},dv=x.createContext(fhe),hd=qe.bind(hhe),j7=t=>{const{children:e,isDragging:n,...r}=t;return S.jsx("div",{...r,className:hd("ItemWrap",r.className,{isDragging:n}),children:e})},phe={Root:t=>{const{children:e,selectedValue:n,itemHeight:r=36,itemViewCount:s=5,onChange:i,as:o,...a}=t,l={selectedValue:n,itemHeight:r,itemViewCount:s,onChange:i},c=hd("Root",a.className),u=S.jsx("div",{className:hd("Divider"),style:{"--item-height":`${r}px`}});return S.jsx(dv,{value:l,children:o?o({defaultClassName:c,children:e,divider:u}):S.jsxs("div",{...a,className:c,children:[e,u]})})},Column:t=>{const{as:e,children:n,...r}=t,{itemHeight:s,itemViewCount:i,selectedValue:o,onChange:a}=x.use(dv),l=x.useRef(null),[c,u]=x.useState(!1),[d,h]=x.useState(0),[f,p]=x.useState(0),m=(i/2-.5)*s,g=x.Children.toArray(n),y=g.findIndex(A=>{if(x.isValidElement(A)){const{name:$,value:P}=A.props;return o[$]===P}return!1}),v=A=>{u(!0),h("touches"in A?A.touches[0].clientY:A.clientY)},b=A=>{if(!c)return;const P=("touches"in A?A.touches[0].clientY:A.clientY)-d,O=y*s,R=-(g.length-1-y)*s,H=s*1.2,z=.2;let j=P;if(P>O){const F=P-O;j=O+Math.min(H,F*z)}else if(P<R){const F=R-P;j=R-Math.min(H,F*z)}p(j)},C=()=>{if(!c)return;u(!1),p(0);const A=Math.round(f/s),$=Math.min(Math.max(0,y-A),g.length-1),P=g[$];if(x.isValidElement(P)){const{name:O,value:R}=P.props;a(H=>({...H,[O]:R}))}};x.useEffect(()=>{const A=P=>{P.preventDefault()},$=l.current;return $&&($.addEventListener("wheel",A,{passive:!1}),$.addEventListener("touchmove",A,{passive:!1})),()=>{$&&($.removeEventListener("wheel",A),$.removeEventListener("touchmove",A))}},[]);const _=A=>{A.stopPropagation();const $=A.deltaY>0?1:-1,P=y+$;if(P>=0&&P<g.length){const O=g[P];if(x.isValidElement(O)){const{name:R,value:H}=O.props;a(z=>({...z,[R]:H}))}}},k=hd("Column",r.className),E={height:`${s*i}px`,...r.style};return e?e({onWheel:_,onTouchStart:v,onTouchMove:b,onTouchEnd:C,defaultClassName:k,defaultStyle:E,children:S.jsx(j7,{isDragging:c,style:{transform:`translateY(${m-y*s+(c?f:0)}px)`},children:n})}):S.jsx("div",{...r,ref:l,className:k,style:E,onWheel:_,onTouchStart:v,onTouchMove:b,onTouchEnd:C,children:S.jsx(j7,{isDragging:c,style:{transform:`translateY(${m-y*s+(c?f:0)}px)`},children:n})})},Item:t=>{const{as:e,name:n,value:r,...s}=t,{selectedValue:i,itemHeight:o,onChange:a}=x.use(dv),l=()=>{a(h=>({...h,[n]:r}))},c=i[n]===r,u=hd("Item",s.className,{isSelected:c}),d={"--item-height":`${o}px`,...s.style};return e?e({onClick:l,isSelected:c,defaultClassName:u,defaultStyle:d}):S.jsx("div",{...s,onClick:l,className:u,style:d,children:r})}},ghe={Wrapper:"_Wrapper_1vafp_1",Logo:"_Logo_1vafp_5",List:"_List_1vafp_13",Item:"_Item_1vafp_17",active:"_active_1vafp_42",TextGroup:"_TextGroup_1vafp_49",Label:"_Label_1vafp_55",secondary:"_secondary_1vafp_59",list:"_list_1vafp_62",Subtitle:"_Subtitle_1vafp_65",full:"_full_1vafp_69",title:"_title_1vafp_82",disabled:"_disabled_1vafp_86"},F7={list:[],onClick:t=>{window.location.href=t}},hv=x.createContext(F7),Ti=qe.bind(ghe),mhe=t=>{const{className:e,src:n}=t;return S.jsxs("div",{className:Ti("Logo",e),children:[S.jsx("img",{src:n,alt:"logo"}),t.children]})},z7=t=>{const{className:e,label:n,icon:r,subtitle:s,type:i,disabled:o,href:a,hasChildren:l,isOpen:c=!0,isActive:u=!1}=t,{onClick:d}=x.use(hv),[h,f]=x.useState(c);return S.jsxs(x.Fragment,{children:[S.jsxs("button",{className:Ti("Item",{full:i==="full",secondary:i==="secondary",list:i==="list",title:i==="title",active:u,disabled:o},e),disabled:o,onClick:p=>{if(p.stopPropagation(),!l)return d==null?void 0:d(a);f(!h)},children:[r&&S.jsx(Ke,{name:r,size:20,color:o?"#C4CDD5":"#637381",className:Ti("Icon")}),S.jsxs("div",{className:Ti("TextGroup"),children:[S.jsx("span",{className:Ti("Label",{secondary:i==="secondary",list:i==="list"}),children:n}),i==="full"&&S.jsx("span",{className:Ti("Subtitle"),children:s})]}),l&&S.jsx(Ke,{name:h?"ExpandMore":"ArrowRight",size:20,color:o?"#C4CDD5":"#637381",className:Ti("Icon")})]}),h&&S.jsx(x.Fragment,{children:t.children})]})},yhe={Logo:mhe,List:t=>{const{className:e}=t,n=x.use(hv),r=s=>s.map(i=>S.jsx(z7,{label:i.label,subtitle:i.subtitle,icon:i.icon,type:i.type,href:i.href,disabled:i.isPreparing,hasChildren:i.children&&i.children.length>0,isOpen:i.isOpen||!1,isActive:i.isActive||!1,children:i.children&&r(i.children)},i.href));return S.jsx("div",{className:Ti("List",e),children:r(n.list)})},Item:z7,Root:t=>{const{children:e,className:n}=t;return S.jsx(hv,{value:{...F7,...t},children:S.jsx("div",{className:Ti("Wrapper",n),children:e})})}},bhe=new Map([["ko","한국어"],["en","English"],["ja","日本語"],["zh-CN","简体中文"]]);function H7({list:t,depth:e=1,isCommerce:n=!1,maxDepth:r,pathName:s}){return t.map(i=>{const o=i.href,a=Array.from(bhe.keys()),l=s!=null&&s.split("/").some(d=>a.includes(d))?(s==null?void 0:s.split("/")[e+1])===i.key:(s==null?void 0:s.split("/")[e])===i.key,c=i.children&&i.children.length>0?!1:s!=null&&s.split("/").some(d=>a.includes(d))?"/"+s.split("/").slice(2).join("/")===o||("/"+s.split("/").slice(2).join("/")).startsWith(o+"/"):s===o||s.startsWith(o+"/");i.isOpen=l,i.isActive=c;const u=i.children?H7({list:(i==null?void 0:i.children)||[],depth:e+1,maxDepth:r,isCommerce:n,pathName:s}):[];return{...i,href:o,children:r&&e>=r?[]:u,depth:e}})}const vhe={Root:"_Root_mi439_2",medium:"_medium_mi439_8",small:"_small_mi439_11",PageItem:"_PageItem_mi439_14",square:"_square_mi439_25",round:"_round_mi439_28",active:"_active_mi439_31",disabled:"_disabled_mi439_36",Icon:"_Icon_mi439_39"},xhe={colorType:"primary",variant:"soft",size:"medium",total:0,currentPage:1,pageCount:5,onClick:()=>{}},fd=x.createContext(xhe),whe=()=>{const t={primary:{text:{backgroundColor:T.primary.pMain,color:`var(--textContrast, ${T.primary.pContrastText})`,borderColor:"transparent"},soft:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightPrimary, ${T.light.swapDarkLightPrimary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}},standard:{text:{backgroundColor:`var(--inheritBgcolor,${T.light.inheritBgcolor})`,color:`var(--inheritColor, ${T.light.inheritColor})`,borderColor:"transparent"},soft:{backgroundColor:le.grey8,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}}},e={primary:{text:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent"},soft:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent"},disabled:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}},standard:{text:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent"},soft:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent"},disabled:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}}};return{selected:t,unselected:e}},Bp=qe.bind(vhe),_he=()=>{const{size:t,onClick:e,limit:n=15,currentPage:r,disabled:s,total:i,pageCount:o}=x.use(fd),a=s||r===i||i<=o,l=()=>{a||e({offset:r*n,limit:n})};return S.jsx("button",{className:Bp("Icon",t,{disabled:a}),onClick:l,children:S.jsx(Ke,{name:"GoNext",size:t==="medium"?24:20,color:a?"#C4CDD5":"#1C252E"})})},Che=()=>{const{size:t,onClick:e,limit:n=15,currentPage:r,disabled:s,total:i,pageCount:o}=x.use(fd),a=s||r===1||i<=o,l=()=>{a||e({offset:(r-2)*n,limit:n})};return S.jsx("button",{className:Bp("Icon",t,{disabled:a}),onClick:l,children:S.jsx(Ke,{name:"GoBefore",size:t==="medium"?24:20,color:a?"#C4CDD5":"#1C252E"})})},V7=t=>{const{active:e,onClick:n,page:r}=t,{shapeType:s="round",variant:i,colorType:o,disabled:a}=x.use(fd),c=whe()[e?"selected":"unselected"][o],u={"--color":c[a?"disabled":i].color,"--background-color":c[a?"disabled":i].backgroundColor,"--border-color":c[i].borderColor};return S.jsx("button",{onClick:n.bind(null,r),className:Bp("PageItem",s,{active:e,disabled:a}),style:u,children:r})},She={Next:_he,Prev:Che,PageItem:V7,PageList:t=>{const{itemAs:e}=t,{onClick:n,total:r,currentPage:s,pageCount:i,limit:o=15,disabled:a}=x.use(fd),l=[];let c=s-Math.floor(i/2);c<1&&(c=1);let u=c+i-1;u>r&&(u=r,c=Math.max(1,u-i+1));for(let h=c;h<=u;h++)l.push(h);if(r===0)return null;const d=h=>{a||s!==h&&n({offset:(h-1)*o,limit:o})};return S.jsx(x.Fragment,{children:l.map((h,f)=>S.jsx(x.Fragment,{children:e?e({page:h,active:s===h,onClick:d}):S.jsx(V7,{onClick:d,active:s===h,page:h})},f))})},Root:t=>{const{variant:e,shapeType:n="round",colorType:r,size:s,total:i,limit:o=15,offset:a=0,children:l,pageCount:c,disabled:u,onClick:d}=t,h=i<o?1:Math.ceil(i/o),f=Math.ceil(a/o)+1;return a>i&&console.error("[Pagination] offset can't be greater than total"),S.jsx(fd,{value:{shapeType:n,variant:e,colorType:r,size:s,total:h,limit:o,offset:a,currentPage:f,pageCount:c,disabled:u,onClick:d},children:S.jsx("nav",{className:Bp("Root",s),children:l})})}};var fv={},jp={},ur={};Object.defineProperty(ur,"__esModule",{value:!0});function Ehe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ahe=function t(e,n){Ehe(this,t),this.data=e,this.text=n.text||e,this.options=n};ur.default=Ahe,Object.defineProperty(jp,"__esModule",{value:!0}),jp.CODE39=void 0;var The=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),khe=ur,Mhe=Ohe(khe);function Ohe(t){return t.__esModule?t:{default:t}}function $he(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Phe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Dhe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Rhe=function(t){Dhe(e,t);function e(n,r){return $he(this,e),n=n.toUpperCase(),r.mod43&&(n+=Lhe(Bhe(n))),Phe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return The(e,[{key:"encode",value:function(){for(var r=pv("*"),s=0;s<this.data.length;s++)r+=pv(this.data[s])+"0";return r+=pv("*"),{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e}(Mhe.default),U7=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],Ihe=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function pv(t){return Nhe(q7(t))}function Nhe(t){return Ihe[t].toString(2)}function Lhe(t){return U7[t]}function q7(t){return U7.indexOf(t)}function Bhe(t){for(var e=0,n=0;n<t.length;n++)e+=q7(t[n]);return e=e%43,e}jp.CODE39=Rhe;var Us={},gv={},Gl={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});var pd;function mv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var W7=Ct.SET_A=0,G7=Ct.SET_B=1,Y7=Ct.SET_C=2;Ct.SHIFT=98;var jhe=Ct.START_A=103,Fhe=Ct.START_B=104,zhe=Ct.START_C=105;Ct.MODULO=103,Ct.STOP=106,Ct.FNC1=207,Ct.SET_BY_CODE=(pd={},mv(pd,jhe,W7),mv(pd,Fhe,G7),mv(pd,zhe,Y7),pd),Ct.SWAP={101:W7,100:G7,99:Y7},Ct.A_START_CHAR="Ð",Ct.B_START_CHAR="Ñ",Ct.C_START_CHAR="Ò",Ct.A_CHARS="[\0-_È-Ï]",Ct.B_CHARS="[ -È-Ï]",Ct.C_CHARS="(Ï*[0-9]{2}Ï*)",Ct.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],Object.defineProperty(Gl,"__esModule",{value:!0});var Hhe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Vhe=ur,Uhe=qhe(Vhe),Ar=Ct;function qhe(t){return t.__esModule?t:{default:t}}function Whe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ghe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Yhe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Khe=function(t){Yhe(e,t);function e(n,r){Whe(this,e);var s=Ghe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n.substring(1),r));return s.bytes=n.split("").map(function(i){return i.charCodeAt(0)}),s}return Hhe(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.bytes,s=r.shift()-105,i=Ar.SET_BY_CODE[s];if(i===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&r.unshift(Ar.FNC1);var o=e.next(r,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(s)+o.result+e.getBar((o.checksum+s)%Ar.MODULO)+e.getBar(Ar.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var r=this.options.ean128||!1;return typeof r=="string"&&(r=r.toLowerCase()==="true"),r}}],[{key:"getBar",value:function(r){return Ar.BARS[r]?Ar.BARS[r].toString():""}},{key:"correctIndex",value:function(r,s){if(s===Ar.SET_A){var i=r.shift();return i<32?i+64:i-32}else return s===Ar.SET_B?r.shift()-32:(r.shift()-48)*10+r.shift()-48}},{key:"next",value:function(r,s,i){if(!r.length)return{result:"",checksum:0};var o=void 0,a=void 0;if(r[0]>=200){a=r.shift()-105;var l=Ar.SWAP[a];l!==void 0?o=e.next(r,s+1,l):((i===Ar.SET_A||i===Ar.SET_B)&&a===Ar.SHIFT&&(r[0]=i===Ar.SET_A?r[0]>95?r[0]-96:r[0]:r[0]<32?r[0]+96:r[0]),o=e.next(r,s+1,i))}else a=e.correctIndex(r,i),o=e.next(r,s+1,i);var c=e.getBar(a),u=a*s;return{result:c+o.result,checksum:u+o.checksum}}}]),e}(Uhe.default);Gl.default=Khe;var yv={};Object.defineProperty(yv,"__esModule",{value:!0});var xo=Ct,K7=function(e){return e.match(new RegExp("^"+xo.A_CHARS+"*"))[0].length},Z7=function(e){return e.match(new RegExp("^"+xo.B_CHARS+"*"))[0].length},X7=function(e){return e.match(new RegExp("^"+xo.C_CHARS+"*"))[0]};function bv(t,e){var n=e?xo.A_CHARS:xo.B_CHARS,r=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(r)return r[1]+"Ì"+Q7(t.substring(r[1].length));var s=t.match(new RegExp("^"+n+"+"))[0];return s.length===t.length?t:s+String.fromCharCode(e?205:206)+bv(t.substring(s.length),!e)}function Q7(t){var e=X7(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var r=K7(t)>=Z7(t);return e+String.fromCharCode(r?206:205)+bv(t,r)}yv.default=function(t){var e=void 0,n=X7(t).length;if(n>=2)e=xo.C_START_CHAR+Q7(t);else{var r=K7(t)>Z7(t);e=(r?xo.A_START_CHAR:xo.B_START_CHAR)+bv(t,r)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(s,i){return"Ë"+i})},Object.defineProperty(gv,"__esModule",{value:!0});var Zhe=Gl,Xhe=J7(Zhe),Qhe=yv,Jhe=J7(Qhe);function J7(t){return t&&t.__esModule?t:{default:t}}function efe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vv(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function tfe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var nfe=function(t){tfe(e,t);function e(n,r){if(efe(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(n))var s=vv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,Jhe.default)(n),r));else var s=vv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return vv(s)}return e}(Xhe.default);gv.default=nfe;var xv={};Object.defineProperty(xv,"__esModule",{value:!0});var rfe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),sfe=Gl,ife=ofe(sfe),e9=Ct;function ofe(t){return t.__esModule?t:{default:t}}function afe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lfe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function cfe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ufe=function(t){cfe(e,t);function e(n,r){return afe(this,e),lfe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,e9.A_START_CHAR+n,r))}return rfe(e,[{key:"valid",value:function(){return new RegExp("^"+e9.A_CHARS+"+$").test(this.data)}}]),e}(ife.default);xv.default=ufe;var wv={};Object.defineProperty(wv,"__esModule",{value:!0});var dfe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),hfe=Gl,ffe=pfe(hfe),t9=Ct;function pfe(t){return t.__esModule?t:{default:t}}function gfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mfe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function yfe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var bfe=function(t){yfe(e,t);function e(n,r){return gfe(this,e),mfe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t9.B_START_CHAR+n,r))}return dfe(e,[{key:"valid",value:function(){return new RegExp("^"+t9.B_CHARS+"+$").test(this.data)}}]),e}(ffe.default);wv.default=bfe;var _v={};Object.defineProperty(_v,"__esModule",{value:!0});var vfe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),xfe=Gl,wfe=_fe(xfe),n9=Ct;function _fe(t){return t.__esModule?t:{default:t}}function Cfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sfe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Efe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Afe=function(t){Efe(e,t);function e(n,r){return Cfe(this,e),Sfe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n9.C_START_CHAR+n,r))}return vfe(e,[{key:"valid",value:function(){return new RegExp("^"+n9.C_CHARS+"+$").test(this.data)}}]),e}(wfe.default);_v.default=Afe,Object.defineProperty(Us,"__esModule",{value:!0}),Us.CODE128C=Us.CODE128B=Us.CODE128A=Us.CODE128=void 0;var Tfe=gv,kfe=Fp(Tfe),Mfe=xv,Ofe=Fp(Mfe),$fe=wv,Pfe=Fp($fe),Dfe=_v,Rfe=Fp(Dfe);function Fp(t){return t&&t.__esModule?t:{default:t}}Us.CODE128=kfe.default,Us.CODE128A=Ofe.default,Us.CODE128B=Pfe.default,Us.CODE128C=Rfe.default;var dr={},Cv={},Zr={};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.SIDE_BIN="101",Zr.MIDDLE_BIN="01010",Zr.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Zr.EAN2_STRUCTURE=["LL","LG","GL","GG"],Zr.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Zr.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"];var zp={},ya={};Object.defineProperty(ya,"__esModule",{value:!0});var Ife=Zr,Nfe=function(e,n,r){var s=e.split("").map(function(o,a){return Ife.BINARIES[n[a]]}).map(function(o,a){return o?o[e[a]]:""});if(r){var i=e.length-1;s=s.map(function(o,a){return a<i?o+r:o})}return s.join("")};ya.default=Nfe,Object.defineProperty(zp,"__esModule",{value:!0});var Lfe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Yl=Zr,Bfe=ya,r9=s9(Bfe),jfe=ur,Ffe=s9(jfe);function s9(t){return t&&t.__esModule?t:{default:t}}function zfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hfe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Vfe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ufe=function(t){Vfe(e,t);function e(n,r){zfe(this,e);var s=Hfe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return s.fontSize=!r.flat&&r.fontSize>r.width*10?r.width*10:r.fontSize,s.guardHeight=r.height+s.fontSize/2+r.textMargin,s}return Lfe(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(r,s){return this.text.substr(r,s)}},{key:"leftEncode",value:function(r,s){return(0,r9.default)(r,s)}},{key:"rightText",value:function(r,s){return this.text.substr(r,s)}},{key:"rightEncode",value:function(r,s){return(0,r9.default)(r,s)}},{key:"encodeGuarded",value:function(){var r={fontSize:this.fontSize},s={height:this.guardHeight};return[{data:Yl.SIDE_BIN,options:s},{data:this.leftEncode(),text:this.leftText(),options:r},{data:Yl.MIDDLE_BIN,options:s},{data:this.rightEncode(),text:this.rightText(),options:r},{data:Yl.SIDE_BIN,options:s}]}},{key:"encodeFlat",value:function(){var r=[Yl.SIDE_BIN,this.leftEncode(),Yl.MIDDLE_BIN,this.rightEncode(),Yl.SIDE_BIN];return{data:r.join(""),text:this.text}}}]),e}(Ffe.default);zp.default=Ufe,Object.defineProperty(Cv,"__esModule",{value:!0});var qfe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),gd=function t(e,n,r){e===null&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,n);if(s===void 0){var i=Object.getPrototypeOf(e);return i===null?void 0:t(i,n,r)}else{if("value"in s)return s.value;var o=s.get;return o===void 0?void 0:o.call(r)}},Wfe=Zr,Gfe=zp,Yfe=Kfe(Gfe);function Kfe(t){return t.__esModule?t:{default:t}}function Zfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xfe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Qfe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i9=function(e){var n=e.substr(0,12).split("").map(function(r){return+r}).reduce(function(r,s,i){return i%2?r+s*3:r+s},0);return(10-n%10)%10},Jfe=function(t){Qfe(e,t);function e(n,r){Zfe(this,e),n.search(/^[0-9]{12}$/)!==-1&&(n+=i9(n));var s=Xfe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return s.lastChar=r.lastChar,s}return qfe(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===i9(this.data)}},{key:"leftText",value:function(){return gd(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var r=this.data.substr(1,6),s=Wfe.EAN13_STRUCTURE[this.data[0]];return gd(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,s)}},{key:"rightText",value:function(){return gd(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var r=this.data.substr(7,6);return gd(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRRRR")}},{key:"encodeGuarded",value:function(){var r=gd(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(r.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(r.push({data:"00"}),r.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),r}}]),e}(Yfe.default);Cv.default=Jfe;var Sv={};Object.defineProperty(Sv,"__esModule",{value:!0});var epe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Hp=function t(e,n,r){e===null&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,n);if(s===void 0){var i=Object.getPrototypeOf(e);return i===null?void 0:t(i,n,r)}else{if("value"in s)return s.value;var o=s.get;return o===void 0?void 0:o.call(r)}},tpe=zp,npe=rpe(tpe);function rpe(t){return t.__esModule?t:{default:t}}function spe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ipe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ope(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o9=function(e){var n=e.substr(0,7).split("").map(function(r){return+r}).reduce(function(r,s,i){return i%2?r+s:r+s*3},0);return(10-n%10)%10},ape=function(t){ope(e,t);function e(n,r){return spe(this,e),n.search(/^[0-9]{7}$/)!==-1&&(n+=o9(n)),ipe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return epe(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===o9(this.data)}},{key:"leftText",value:function(){return Hp(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var r=this.data.substr(0,4);return Hp(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,"LLLL")}},{key:"rightText",value:function(){return Hp(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var r=this.data.substr(4,4);return Hp(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRR")}}]),e}(npe.default);Sv.default=ape;var Ev={};Object.defineProperty(Ev,"__esModule",{value:!0});var lpe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),cpe=Zr,upe=ya,dpe=a9(upe),hpe=ur,fpe=a9(hpe);function a9(t){return t&&t.__esModule?t:{default:t}}function ppe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gpe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function mpe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ype=function(e){var n=e.split("").map(function(r){return+r}).reduce(function(r,s,i){return i%2?r+s*9:r+s*3},0);return n%10},bpe=function(t){mpe(e,t);function e(n,r){return ppe(this,e),gpe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return lpe(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var r=cpe.EAN5_STRUCTURE[ype(this.data)];return{data:"1011"+(0,dpe.default)(this.data,r,"01"),text:this.text}}}]),e}(fpe.default);Ev.default=bpe;var Av={};Object.defineProperty(Av,"__esModule",{value:!0});var vpe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),xpe=Zr,wpe=ya,_pe=l9(wpe),Cpe=ur,Spe=l9(Cpe);function l9(t){return t&&t.__esModule?t:{default:t}}function Epe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ape(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Tpe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var kpe=function(t){Tpe(e,t);function e(n,r){return Epe(this,e),Ape(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return vpe(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var r=xpe.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,_pe.default)(this.data,r,"01"),text:this.text}}}]),e}(Spe.default);Av.default=kpe;var md={};Object.defineProperty(md,"__esModule",{value:!0});var Mpe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();md.checksum=Tv;var Ope=ya,Kl=c9(Ope),$pe=ur,Ppe=c9($pe);function c9(t){return t&&t.__esModule?t:{default:t}}function Dpe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rpe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ipe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Npe=function(t){Ipe(e,t);function e(n,r){Dpe(this,e),n.search(/^[0-9]{11}$/)!==-1&&(n+=Tv(n));var s=Rpe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return s.displayValue=r.displayValue,r.fontSize>r.width*10?s.fontSize=r.width*10:s.fontSize=r.fontSize,s.guardHeight=r.height+s.fontSize/2+r.textMargin,s}return Mpe(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==Tv(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var r="";return r+="101",r+=(0,Kl.default)(this.data.substr(0,6),"LLLLLL"),r+="01010",r+=(0,Kl.default)(this.data.substr(6,6),"RRRRRR"),r+="101",{data:r,text:this.text}}},{key:"guardedEncoding",value:function(){var r=[];return this.displayValue&&r.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),r.push({data:"101"+(0,Kl.default)(this.data[0],"L"),options:{height:this.guardHeight}}),r.push({data:(0,Kl.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),r.push({data:"01010",options:{height:this.guardHeight}}),r.push({data:(0,Kl.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),r.push({data:(0,Kl.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&r.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),r}}]),e}(Ppe.default);function Tv(t){var e=0,n;for(n=1;n<11;n+=2)e+=parseInt(t[n]);for(n=0;n<11;n+=2)e+=parseInt(t[n])*3;return(10-e%10)%10}md.default=Npe;var kv={};Object.defineProperty(kv,"__esModule",{value:!0});var Lpe=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Bpe=ya,jpe=u9(Bpe),Fpe=ur,zpe=u9(Fpe),Hpe=md;function u9(t){return t&&t.__esModule?t:{default:t}}function Vpe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mv(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Upe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var qpe=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],Wpe=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],Gpe=function(t){Upe(e,t);function e(n,r){Vpe(this,e);var s=Mv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));if(s.isValid=!1,n.search(/^[0-9]{6}$/)!==-1)s.middleDigits=n,s.upcA=d9(n,"0"),s.text=r.text||""+s.upcA[0]+n+s.upcA[s.upcA.length-1],s.isValid=!0;else if(n.search(/^[01][0-9]{7}$/)!==-1)if(s.middleDigits=n.substring(1,n.length-1),s.upcA=d9(s.middleDigits,n[0]),s.upcA[s.upcA.length-1]===n[n.length-1])s.isValid=!0;else return Mv(s);else return Mv(s);return s.displayValue=r.displayValue,r.fontSize>r.width*10?s.fontSize=r.width*10:s.fontSize=r.fontSize,s.guardHeight=r.height+s.fontSize/2+r.textMargin,s}return Lpe(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var r="";return r+="101",r+=this.encodeMiddleDigits(),r+="010101",{data:r,text:this.text}}},{key:"guardedEncoding",value:function(){var r=[];return this.displayValue&&r.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),r.push({data:"101",options:{height:this.guardHeight}}),r.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),r.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&r.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),r}},{key:"encodeMiddleDigits",value:function(){var r=this.upcA[0],s=this.upcA[this.upcA.length-1],i=Wpe[parseInt(s)][parseInt(r)];return(0,jpe.default)(this.middleDigits,i)}}]),e}(zpe.default);function d9(t,e){for(var n=parseInt(t[t.length-1]),r=qpe[n],s="",i=0,o=0;o<r.length;o++){var a=r[o];a==="X"?s+=t[i++]:s+=a}return s=""+e+s,""+s+(0,Hpe.checksum)(s)}kv.default=Gpe,Object.defineProperty(dr,"__esModule",{value:!0}),dr.UPCE=dr.UPC=dr.EAN2=dr.EAN5=dr.EAN8=dr.EAN13=void 0;var Ype=Cv,Kpe=Zl(Ype),Zpe=Sv,Xpe=Zl(Zpe),Qpe=Ev,Jpe=Zl(Qpe),ege=Av,tge=Zl(ege),nge=md,rge=Zl(nge),sge=kv,ige=Zl(sge);function Zl(t){return t&&t.__esModule?t:{default:t}}dr.EAN13=Kpe.default,dr.EAN8=Xpe.default,dr.EAN5=Jpe.default,dr.EAN2=tge.default,dr.UPC=rge.default,dr.UPCE=ige.default;var Xl={},Vp={},yd={};Object.defineProperty(yd,"__esModule",{value:!0}),yd.START_BIN="1010",yd.END_BIN="11101",yd.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"],Object.defineProperty(Vp,"__esModule",{value:!0});var oge=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Up=yd,age=ur,lge=cge(age);function cge(t){return t.__esModule?t:{default:t}}function uge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dge(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function hge(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var fge=function(t){hge(e,t);function e(){return uge(this,e),dge(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return oge(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var r=this,s=this.data.match(/.{2}/g).map(function(i){return r.encodePair(i)}).join("");return{data:Up.START_BIN+s+Up.END_BIN,text:this.text}}},{key:"encodePair",value:function(r){var s=Up.BINARIES[r[1]];return Up.BINARIES[r[0]].split("").map(function(i,o){return(i==="1"?"111":"1")+(s[o]==="1"?"000":"0")}).join("")}}]),e}(lge.default);Vp.default=fge;var Ov={};Object.defineProperty(Ov,"__esModule",{value:!0});var pge=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),gge=Vp,mge=yge(gge);function yge(t){return t.__esModule?t:{default:t}}function bge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vge(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function xge(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h9=function(e){var n=e.substr(0,13).split("").map(function(r){return parseInt(r,10)}).reduce(function(r,s,i){return r+s*(3-i%2*2)},0);return Math.ceil(n/10)*10-n},wge=function(t){xge(e,t);function e(n,r){return bge(this,e),n.search(/^[0-9]{13}$/)!==-1&&(n+=h9(n)),vge(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return pge(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===h9(this.data)}}]),e}(mge.default);Ov.default=wge,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.ITF14=Xl.ITF=void 0;var _ge=Vp,Cge=f9(_ge),Sge=Ov,Ege=f9(Sge);function f9(t){return t&&t.__esModule?t:{default:t}}Xl.ITF=Cge.default,Xl.ITF14=Ege.default;var Xr={},ba={};Object.defineProperty(ba,"__esModule",{value:!0});var Age=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Tge=ur,kge=Mge(Tge);function Mge(t){return t.__esModule?t:{default:t}}function Oge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $ge(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Pge(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Dge=function(t){Pge(e,t);function e(n,r){return Oge(this,e),$ge(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Age(e,[{key:"encode",value:function(){for(var r="110",s=0;s<this.data.length;s++){var i=parseInt(this.data[s]),o=i.toString(2);o=Rge(o,4-o.length);for(var a=0;a<o.length;a++)r+=o[a]=="0"?"100":"110"}return r+="1001",{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e}(kge.default);function Rge(t,e){for(var n=0;n<e;n++)t="0"+t;return t}ba.default=Dge;var $v={},va={};Object.defineProperty(va,"__esModule",{value:!0}),va.mod10=Ige,va.mod11=Nge;function Ige(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2===0?e+=r:e+=r*2%10+Math.floor(r*2/10)}return(10-e%10)%10}function Nge(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var s=parseInt(t[t.length-1-r]);e+=n[r%n.length]*s}return(11-e%11)%11}Object.defineProperty($v,"__esModule",{value:!0});var Lge=ba,Bge=Fge(Lge),jge=va;function Fge(t){return t.__esModule?t:{default:t}}function zge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hge(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Vge(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Uge=function(t){Vge(e,t);function e(n,r){return zge(this,e),Hge(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n+(0,jge.mod10)(n),r))}return e}(Bge.default);$v.default=Uge;var Pv={};Object.defineProperty(Pv,"__esModule",{value:!0});var qge=ba,Wge=Yge(qge),Gge=va;function Yge(t){return t.__esModule?t:{default:t}}function Kge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zge(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Xge(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Qge=function(t){Xge(e,t);function e(n,r){return Kge(this,e),Zge(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n+(0,Gge.mod11)(n),r))}return e}(Wge.default);Pv.default=Qge;var Dv={};Object.defineProperty(Dv,"__esModule",{value:!0});var Jge=ba,e0e=t0e(Jge),p9=va;function t0e(t){return t.__esModule?t:{default:t}}function n0e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r0e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function s0e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i0e=function(t){s0e(e,t);function e(n,r){return n0e(this,e),n+=(0,p9.mod10)(n),n+=(0,p9.mod10)(n),r0e(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return e}(e0e.default);Dv.default=i0e;var Rv={};Object.defineProperty(Rv,"__esModule",{value:!0});var o0e=ba,a0e=l0e(o0e),g9=va;function l0e(t){return t.__esModule?t:{default:t}}function c0e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u0e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function d0e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h0e=function(t){d0e(e,t);function e(n,r){return c0e(this,e),n+=(0,g9.mod11)(n),n+=(0,g9.mod10)(n),u0e(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return e}(a0e.default);Rv.default=h0e,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.MSI1110=Xr.MSI1010=Xr.MSI11=Xr.MSI10=Xr.MSI=void 0;var f0e=ba,p0e=bd(f0e),g0e=$v,m0e=bd(g0e),y0e=Pv,b0e=bd(y0e),v0e=Dv,x0e=bd(v0e),w0e=Rv,_0e=bd(w0e);function bd(t){return t&&t.__esModule?t:{default:t}}Xr.MSI=p0e.default,Xr.MSI10=m0e.default,Xr.MSI11=b0e.default,Xr.MSI1010=x0e.default,Xr.MSI1110=_0e.default;var qp={};Object.defineProperty(qp,"__esModule",{value:!0}),qp.pharmacode=void 0;var C0e=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),S0e=ur,E0e=A0e(S0e);function A0e(t){return t.__esModule?t:{default:t}}function T0e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k0e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function M0e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var O0e=function(t){M0e(e,t);function e(n,r){T0e(this,e);var s=k0e(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return s.number=parseInt(n,10),s}return C0e(e,[{key:"encode",value:function(){for(var r=this.number,s="";!isNaN(r)&&r!=0;)r%2===0?(s="11100"+s,r=(r-2)/2):(s="100"+s,r=(r-1)/2);return s=s.slice(0,-2),{data:s,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(E0e.default);qp.pharmacode=O0e;var Wp={};Object.defineProperty(Wp,"__esModule",{value:!0}),Wp.codabar=void 0;var $0e=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),P0e=ur,D0e=R0e(P0e);function R0e(t){return t.__esModule?t:{default:t}}function I0e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N0e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function L0e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var B0e=function(t){L0e(e,t);function e(n,r){I0e(this,e),n.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(n="A"+n+"A");var s=N0e(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n.toUpperCase(),r));return s.text=s.options.text||s.text.replace(/[A-D]/g,""),s}return $0e(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var r=[],s=this.getEncodings(),i=0;i<this.data.length;i++)r.push(s[this.data.charAt(i)]),i!==this.data.length-1&&r.push("0");return{text:this.text,data:r.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(D0e.default);Wp.codabar=B0e;var Gp={};Object.defineProperty(Gp,"__esModule",{value:!0}),Gp.GenericBarcode=void 0;var j0e=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),F0e=ur,z0e=H0e(F0e);function H0e(t){return t.__esModule?t:{default:t}}function V0e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U0e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function q0e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var W0e=function(t){q0e(e,t);function e(n,r){return V0e(this,e),U0e(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return j0e(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(z0e.default);Gp.GenericBarcode=W0e,Object.defineProperty(fv,"__esModule",{value:!0});var G0e=jp,Yp=Us,Ql=dr,m9=Xl,vd=Xr,Y0e=qp,K0e=Wp,Z0e=Gp;fv.default={CODE39:G0e.CODE39,CODE128:Yp.CODE128,CODE128A:Yp.CODE128A,CODE128B:Yp.CODE128B,CODE128C:Yp.CODE128C,EAN13:Ql.EAN13,EAN8:Ql.EAN8,EAN5:Ql.EAN5,EAN2:Ql.EAN2,UPC:Ql.UPC,UPCE:Ql.UPCE,ITF14:m9.ITF14,ITF:m9.ITF,MSI:vd.MSI,MSI10:vd.MSI10,MSI11:vd.MSI11,MSI1010:vd.MSI1010,MSI1110:vd.MSI1110,pharmacode:Y0e.pharmacode,codabar:K0e.codabar,GenericBarcode:Z0e.GenericBarcode};var Jl={};Object.defineProperty(Jl,"__esModule",{value:!0});var X0e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};Jl.default=function(t,e){return X0e({},t,e)};var Iv={};Object.defineProperty(Iv,"__esModule",{value:!0}),Iv.default=Q0e;function Q0e(t){var e=[];function n(r){if(Array.isArray(r))for(var s=0;s<r.length;s++)n(r[s]);else r.text=r.text||"",r.data=r.data||"",e.push(r)}return n(t),e}var Nv={};Object.defineProperty(Nv,"__esModule",{value:!0}),Nv.default=J0e;function J0e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}var Lv={},Bv={},Kp={};Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.default=eme;function eme(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],typeof t[n]=="string"&&(t[n]=parseInt(t[n],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}var Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});var tme={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};Zp.default=tme,Object.defineProperty(Bv,"__esModule",{value:!0});var nme=Kp,rme=b9(nme),sme=Zp,y9=b9(sme);function b9(t){return t&&t.__esModule?t:{default:t}}function ime(t){var e={};for(var n in y9.default)y9.default.hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,rme.default)(e),e}Bv.default=ime;var jv={},Fv={},Tr={};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.getTotalWidthOfEncodings=Tr.calculateEncodingAttributes=Tr.getBarcodePadding=Tr.getEncodingHeight=Tr.getMaximumHeightOfEncodings=void 0;var ome=Jl,ame=lme(ome);function lme(t){return t.__esModule?t:{default:t}}function v9(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function x9(t,e,n){if(n.displayValue&&e<t){if(n.textAlign=="center")return Math.floor((t-e)/2);if(n.textAlign=="left")return 0;if(n.textAlign=="right")return Math.floor(t-e)}return 0}function cme(t,e,n){for(var r=0;r<t.length;r++){var s=t[r],i=(0,ame.default)(e,s.options),o;i.displayValue?o=hme(s.text,i,n):o=0;var a=s.data.length*i.width;s.width=Math.ceil(Math.max(o,a)),s.height=v9(s,i),s.barcodePadding=x9(o,a,i)}}function ume(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}function dme(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e}function hme(t,e,n){var r;if(n)r=n;else if(typeof document<"u")r=document.createElement("canvas").getContext("2d");else return 0;r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var s=r.measureText(t);if(!s)return 0;var i=s.width;return i}Tr.getMaximumHeightOfEncodings=dme,Tr.getEncodingHeight=v9,Tr.getBarcodePadding=x9,Tr.calculateEncodingAttributes=cme,Tr.getTotalWidthOfEncodings=ume,Object.defineProperty(Fv,"__esModule",{value:!0});var fme=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),pme=Jl,gme=mme(pme),zv=Tr;function mme(t){return t.__esModule?t:{default:t}}function yme(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var bme=function(){function t(e,n,r){yme(this,t),this.canvas=e,this.encodings=n,this.options=r}return fme(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var n=0;n<this.encodings.length;n++){var r=(0,gme.default)(this.options,this.encodings[n].options);this.drawCanvasBarcode(r,this.encodings[n]),this.drawCanvasText(r,this.encodings[n]),this.moveCanvasDrawing(this.encodings[n])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var n=this.canvas.getContext("2d");n.save(),(0,zv.calculateEncodingAttributes)(this.encodings,this.options,n);var r=(0,zv.getTotalWidthOfEncodings)(this.encodings),s=(0,zv.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=r+this.options.marginLeft+this.options.marginRight,this.canvas.height=s,n.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(n.fillStyle=this.options.background,n.fillRect(0,0,this.canvas.width,this.canvas.height)),n.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(n,r){var s=this.canvas.getContext("2d"),i=r.data,o;n.textPosition=="top"?o=n.marginTop+n.fontSize+n.textMargin:o=n.marginTop,s.fillStyle=n.lineColor;for(var a=0;a<i.length;a++){var l=a*n.width+r.barcodePadding;i[a]==="1"?s.fillRect(l,o,n.width,n.height):i[a]&&s.fillRect(l,o,n.width,n.height*i[a])}}},{key:"drawCanvasText",value:function(n,r){var s=this.canvas.getContext("2d"),i=n.fontOptions+" "+n.fontSize+"px "+n.font;if(n.displayValue){var o,a;n.textPosition=="top"?a=n.marginTop+n.fontSize-n.textMargin:a=n.height+n.textMargin+n.marginTop+n.fontSize,s.font=i,n.textAlign=="left"||r.barcodePadding>0?(o=0,s.textAlign="left"):n.textAlign=="right"?(o=r.width-1,s.textAlign="right"):(o=r.width/2,s.textAlign="center"),s.fillText(r.text,o,a)}}},{key:"moveCanvasDrawing",value:function(n){var r=this.canvas.getContext("2d");r.translate(n.width,0)}},{key:"restoreCanvas",value:function(){var n=this.canvas.getContext("2d");n.restore()}}]),t}();Fv.default=bme;var Hv={};Object.defineProperty(Hv,"__esModule",{value:!0});var vme=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),xme=Jl,wme=_me(xme),Vv=Tr;function _me(t){return t.__esModule?t:{default:t}}function Cme(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Xp="http://www.w3.org/2000/svg",Sme=function(){function t(e,n,r){Cme(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return vme(t,[{key:"render",value:function(){var n=this.options.marginLeft;this.prepareSVG();for(var r=0;r<this.encodings.length;r++){var s=this.encodings[r],i=(0,wme.default)(this.options,s.options),o=this.createGroup(n,i.marginTop,this.svg);this.setGroupOptions(o,i),this.drawSvgBarcode(o,i,s),this.drawSVGText(o,i,s),n+=s.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,Vv.calculateEncodingAttributes)(this.encodings,this.options);var n=(0,Vv.getTotalWidthOfEncodings)(this.encodings),r=(0,Vv.getMaximumHeightOfEncodings)(this.encodings),s=n+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(s,r),this.options.background&&this.drawRect(0,0,s,r,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(n,r,s){var i=s.data,o;r.textPosition=="top"?o=r.fontSize+r.textMargin:o=0;for(var a=0,l=0,c=0;c<i.length;c++)l=c*r.width+s.barcodePadding,i[c]==="1"?a++:a>0&&(this.drawRect(l-r.width*a,o,r.width*a,r.height,n),a=0);a>0&&this.drawRect(l-r.width*(a-1),o,r.width*a,r.height,n)}},{key:"drawSVGText",value:function(n,r,s){var i=this.document.createElementNS(Xp,"text");if(r.displayValue){var o,a;i.setAttribute("style","font:"+r.fontOptions+" "+r.fontSize+"px "+r.font),r.textPosition=="top"?a=r.fontSize-r.textMargin:a=r.height+r.textMargin+r.fontSize,r.textAlign=="left"||s.barcodePadding>0?(o=0,i.setAttribute("text-anchor","start")):r.textAlign=="right"?(o=s.width-1,i.setAttribute("text-anchor","end")):(o=s.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",o),i.setAttribute("y",a),i.appendChild(this.document.createTextNode(s.text)),n.appendChild(i)}}},{key:"setSvgAttributes",value:function(n,r){var s=this.svg;s.setAttribute("width",n+"px"),s.setAttribute("height",r+"px"),s.setAttribute("x","0px"),s.setAttribute("y","0px"),s.setAttribute("viewBox","0 0 "+n+" "+r),s.setAttribute("xmlns",Xp),s.setAttribute("version","1.1"),s.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(n,r,s){var i=this.document.createElementNS(Xp,"g");return i.setAttribute("transform","translate("+n+", "+r+")"),s.appendChild(i),i}},{key:"setGroupOptions",value:function(n,r){n.setAttribute("style","fill:"+r.lineColor+";")}},{key:"drawRect",value:function(n,r,s,i,o){var a=this.document.createElementNS(Xp,"rect");return a.setAttribute("x",n),a.setAttribute("y",r),a.setAttribute("width",s),a.setAttribute("height",i),o.appendChild(a),a}}]),t}();Hv.default=Sme;var Uv={};Object.defineProperty(Uv,"__esModule",{value:!0});var Eme=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function Ame(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Tme=function(){function t(e,n,r){Ame(this,t),this.object=e,this.encodings=n,this.options=r}return Eme(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();Uv.default=Tme,Object.defineProperty(jv,"__esModule",{value:!0});var kme=Fv,Mme=qv(kme),Ome=Hv,$me=qv(Ome),Pme=Uv,Dme=qv(Pme);function qv(t){return t&&t.__esModule?t:{default:t}}jv.default={CanvasRenderer:Mme.default,SVGRenderer:$me.default,ObjectRenderer:Dme.default};var ec={};Object.defineProperty(ec,"__esModule",{value:!0});function Wv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gv(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Yv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Rme=function(t){Yv(e,t);function e(n,r){Wv(this,e);var s=Gv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.name="InvalidInputException",s.symbology=n,s.input=r,s.message='"'+s.input+'" is not a valid input for '+s.symbology,s}return e}(Error),Ime=function(t){Yv(e,t);function e(){Wv(this,e);var n=Gv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="InvalidElementException",n.message="Not supported type to render on",n}return e}(Error),Nme=function(t){Yv(e,t);function e(){Wv(this,e);var n=Gv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="NoElementException",n.message="No element to render on.",n}return e}(Error);ec.InvalidInputException=Rme,ec.InvalidElementException=Ime,ec.NoElementException=Nme,Object.defineProperty(Lv,"__esModule",{value:!0});var Lme=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bme=Bv,Kv=w9(Bme),jme=jv,xd=w9(jme),Fme=ec;function w9(t){return t&&t.__esModule?t:{default:t}}function Zv(t){if(typeof t=="string")return zme(t);if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(Zv(t[n]));return e}else{if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLImageElement)return Hme(t);if(t&&t.nodeName&&t.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&t instanceof SVGElement)return{element:t,options:(0,Kv.default)(t),renderer:xd.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)return{element:t,options:(0,Kv.default)(t),renderer:xd.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:xd.default.CanvasRenderer};if(t&&(typeof t>"u"?"undefined":Lme(t))==="object"&&!t.nodeName)return{element:t,renderer:xd.default.ObjectRenderer};throw new Fme.InvalidElementException}}function zme(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var n=[],r=0;r<e.length;r++)n.push(Zv(e[r]));return n}}function Hme(t){var e=document.createElement("canvas");return{element:e,options:(0,Kv.default)(t),renderer:xd.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}Lv.default=Zv;var Xv={};Object.defineProperty(Xv,"__esModule",{value:!0});var Vme=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function Ume(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var qme=function(){function t(e){Ume(this,t),this.api=e}return Vme(t,[{key:"handleCatch",value:function(n){if(n.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw n.message;else throw n;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(n){try{var r=n.apply(void 0,arguments);return this.api._options.valid(!0),r}catch(s){return this.handleCatch(s),this.api}}}]),t}();Xv.default=qme;var Wme=fv,xa=wo(Wme),Gme=Jl,wd=wo(Gme),Yme=Iv,_9=wo(Yme),Kme=Nv,C9=wo(Kme),Zme=Lv,Xme=wo(Zme),Qme=Kp,Jme=wo(Qme),e1e=Xv,t1e=wo(e1e),S9=ec,n1e=Zp,E9=wo(n1e);function wo(t){return t&&t.__esModule?t:{default:t}}var ki=function(){},Qp=function(e,n,r){var s=new ki;if(typeof e>"u")throw Error("No element to render on was provided.");return s._renderProperties=(0,Xme.default)(e),s._encodings=[],s._options=E9.default,s._errorHandler=new t1e.default(s),typeof n<"u"&&(r=r||{},r.format||(r.format=k9()),s.options(r)[r.format](n,r).render()),s};Qp.getModule=function(t){return xa.default[t]};for(var A9 in xa.default)xa.default.hasOwnProperty(A9)&&r1e(xa.default,A9);function r1e(t,e){ki.prototype[e]=ki.prototype[e.toUpperCase()]=ki.prototype[e.toLowerCase()]=function(n,r){var s=this;return s._errorHandler.wrapBarcodeCall(function(){r.text=typeof r.text>"u"?void 0:""+r.text;var i=(0,wd.default)(s._options,r);i=(0,Jme.default)(i);var o=t[e],a=T9(n,o,i);return s._encodings.push(a),s})}}function T9(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new S9.InvalidInputException(r.constructor.name,t);var s=r.encode();s=(0,_9.default)(s);for(var i=0;i<s.length;i++)s[i].options=(0,wd.default)(n,s[i].options);return s}function k9(){return xa.default.CODE128?"CODE128":Object.keys(xa.default)[0]}ki.prototype.options=function(t){return this._options=(0,wd.default)(this._options,t),this},ki.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},ki.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var t;for(var e in this._renderProperties){t=this._renderProperties[e];var n=(0,wd.default)(this._options,t.options);n.format=="auto"&&(n.format=k9()),this._errorHandler.wrapBarcodeCall(function(){var r=n.value,s=xa.default[n.format.toUpperCase()],i=T9(r,s,n);Qv(t,i,n)})}}},ki.prototype.render=function(){if(!this._renderProperties)throw new S9.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)Qv(this._renderProperties[t],this._encodings,this._options);else Qv(this._renderProperties,this._encodings,this._options);return this},ki.prototype._defaults=E9.default;function Qv(t,e,n){e=(0,_9.default)(e);for(var r=0;r<e.length;r++)e[r].options=(0,wd.default)(n,e[r].options),(0,C9.default)(e[r].options);(0,C9.default)(n);var s=t.renderer,i=new s(t.element,e,n);i.render(),t.afterRender&&t.afterRender()}typeof window<"u"&&(window.JsBarcode=Qp),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),Qp(n,t,e)});var s1e=Qp,Jv={exports:{}},Jp={exports:{}},et={};/** @license React v16.13.1
177
+ * react-is.production.min.js
178
+ *
179
+ * Copyright (c) Facebook, Inc. and its affiliates.
180
+ *
181
+ * This source code is licensed under the MIT license found in the
182
+ * LICENSE file in the root directory of this source tree.
183
+ */var M9;function i1e(){if(M9)return et;M9=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,f=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function b(_){if(typeof _=="object"&&_!==null){var k=_.$$typeof;switch(k){case e:switch(_=_.type,_){case l:case c:case r:case i:case s:case d:return _;default:switch(_=_&&_.$$typeof,_){case a:case u:case p:case f:case o:return _;default:return k}}case n:return k}}}function C(_){return b(_)===c}return et.AsyncMode=l,et.ConcurrentMode=c,et.ContextConsumer=a,et.ContextProvider=o,et.Element=e,et.ForwardRef=u,et.Fragment=r,et.Lazy=p,et.Memo=f,et.Portal=n,et.Profiler=i,et.StrictMode=s,et.Suspense=d,et.isAsyncMode=function(_){return C(_)||b(_)===l},et.isConcurrentMode=C,et.isContextConsumer=function(_){return b(_)===a},et.isContextProvider=function(_){return b(_)===o},et.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},et.isForwardRef=function(_){return b(_)===u},et.isFragment=function(_){return b(_)===r},et.isLazy=function(_){return b(_)===p},et.isMemo=function(_){return b(_)===f},et.isPortal=function(_){return b(_)===n},et.isProfiler=function(_){return b(_)===i},et.isStrictMode=function(_){return b(_)===s},et.isSuspense=function(_){return b(_)===d},et.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===c||_===i||_===s||_===d||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===p||_.$$typeof===f||_.$$typeof===o||_.$$typeof===a||_.$$typeof===u||_.$$typeof===g||_.$$typeof===y||_.$$typeof===v||_.$$typeof===m)},et.typeOf=b,et}var tt={};/** @license React v16.13.1
184
+ * react-is.development.js
185
+ *
186
+ * Copyright (c) Facebook, Inc. and its affiliates.
187
+ *
188
+ * This source code is licensed under the MIT license found in the
189
+ * LICENSE file in the root directory of this source tree.
190
+ */var O9;function o1e(){return O9||(O9=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,f=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function b(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===c||Z===i||Z===s||Z===d||Z===h||typeof Z=="object"&&Z!==null&&(Z.$$typeof===p||Z.$$typeof===f||Z.$$typeof===o||Z.$$typeof===a||Z.$$typeof===u||Z.$$typeof===g||Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===m)}function C(Z){if(typeof Z=="object"&&Z!==null){var Be=Z.$$typeof;switch(Be){case e:var ot=Z.type;switch(ot){case l:case c:case r:case i:case s:case d:return ot;default:var Et=ot&&ot.$$typeof;switch(Et){case a:case u:case p:case f:case o:return Et;default:return Be}}case n:return Be}}}var _=l,k=c,E=a,A=o,$=e,P=u,O=r,R=p,H=f,z=n,j=i,F=s,V=d,q=!1;function Q(Z){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(Z)||C(Z)===l}function B(Z){return C(Z)===c}function W(Z){return C(Z)===a}function se(Z){return C(Z)===o}function ne(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===e}function oe(Z){return C(Z)===u}function te(Z){return C(Z)===r}function ue(Z){return C(Z)===p}function Ce(Z){return C(Z)===f}function be(Z){return C(Z)===n}function Te(Z){return C(Z)===i}function de(Z){return C(Z)===s}function Le(Z){return C(Z)===d}tt.AsyncMode=_,tt.ConcurrentMode=k,tt.ContextConsumer=E,tt.ContextProvider=A,tt.Element=$,tt.ForwardRef=P,tt.Fragment=O,tt.Lazy=R,tt.Memo=H,tt.Portal=z,tt.Profiler=j,tt.StrictMode=F,tt.Suspense=V,tt.isAsyncMode=Q,tt.isConcurrentMode=B,tt.isContextConsumer=W,tt.isContextProvider=se,tt.isElement=ne,tt.isForwardRef=oe,tt.isFragment=te,tt.isLazy=ue,tt.isMemo=Ce,tt.isPortal=be,tt.isProfiler=Te,tt.isStrictMode=de,tt.isSuspense=Le,tt.isValidElementType=b,tt.typeOf=C}()),tt}var $9;function P9(){return $9||($9=1,process.env.NODE_ENV==="production"?Jp.exports=i1e():Jp.exports=o1e()),Jp.exports}/*
191
+ object-assign
192
+ (c) Sindre Sorhus
193
+ @license MIT
194
+ */var e2,D9;function a1e(){if(D9)return e2;D9=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function s(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return e2=s()?Object.assign:function(i,o){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)e.call(a,d)&&(l[d]=a[d]);if(t){c=t(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},e2}var t2,R9;function n2(){if(R9)return t2;R9=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return t2=t,t2}var r2,I9;function N9(){return I9||(I9=1,r2=Function.call.bind(Object.prototype.hasOwnProperty)),r2}var s2,L9;function l1e(){if(L9)return s2;L9=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=n2(),n={},r=N9();t=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function s(i,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=i[u](o,u,l,a,null,e)}catch(p){d=p}if(d&&!(d instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";t("Failed "+a+" type: "+d.message+(f??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},s2=s,s2}var i2,B9;function c1e(){if(B9)return i2;B9=1;var t=P9(),e=a1e(),n=n2(),r=N9(),s=l1e(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return i2=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(B){var W=B&&(c&&B[c]||B[u]);if(typeof W=="function")return W}var h="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(),arrayOf:b,element:C(),elementType:_(),instanceOf:k,node:P(),objectOf:A,oneOf:E,oneOfType:$,shape:R,exact:H};function p(B,W){return B===W?B!==0||1/B===1/W:B!==B&&W!==W}function m(B,W){this.message=B,this.data=W&&typeof W=="object"?W:{},this.stack=""}m.prototype=Error.prototype;function g(B){if(process.env.NODE_ENV!=="production")var W={},se=0;function ne(te,ue,Ce,be,Te,de,Le){if(be=be||h,de=de||Ce,Le!==n){if(l){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Be=be+":"+Ce;!W[Be]&&se<3&&(i("You are manually calling a React.PropTypes validation function for the `"+de+"` prop on `"+be+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[Be]=!0,se++)}}return ue[Ce]==null?te?ue[Ce]===null?new m("The "+Te+" `"+de+"` is marked as required "+("in `"+be+"`, but its value is `null`.")):new m("The "+Te+" `"+de+"` is marked as required in "+("`"+be+"`, but its value is `undefined`.")):null:B(ue,Ce,be,Te,de)}var oe=ne.bind(null,!1);return oe.isRequired=ne.bind(null,!0),oe}function y(B){function W(se,ne,oe,te,ue,Ce){var be=se[ne],Te=F(be);if(Te!==B){var de=V(be);return new m("Invalid "+te+" `"+ue+"` of type "+("`"+de+"` supplied to `"+oe+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return g(W)}function v(){return g(o)}function b(B){function W(se,ne,oe,te,ue){if(typeof B!="function")return new m("Property `"+ue+"` of component `"+oe+"` has invalid PropType notation inside arrayOf.");var Ce=se[ne];if(!Array.isArray(Ce)){var be=F(Ce);return new m("Invalid "+te+" `"+ue+"` of type "+("`"+be+"` supplied to `"+oe+"`, expected an array."))}for(var Te=0;Te<Ce.length;Te++){var de=B(Ce,Te,oe,te,ue+"["+Te+"]",n);if(de instanceof Error)return de}return null}return g(W)}function C(){function B(W,se,ne,oe,te){var ue=W[se];if(!a(ue)){var Ce=F(ue);return new m("Invalid "+oe+" `"+te+"` of type "+("`"+Ce+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return g(B)}function _(){function B(W,se,ne,oe,te){var ue=W[se];if(!t.isValidElementType(ue)){var Ce=F(ue);return new m("Invalid "+oe+" `"+te+"` of type "+("`"+Ce+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return g(B)}function k(B){function W(se,ne,oe,te,ue){if(!(se[ne]instanceof B)){var Ce=B.name||h,be=Q(se[ne]);return new m("Invalid "+te+" `"+ue+"` of type "+("`"+be+"` supplied to `"+oe+"`, expected ")+("instance of `"+Ce+"`."))}return null}return g(W)}function E(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function W(se,ne,oe,te,ue){for(var Ce=se[ne],be=0;be<B.length;be++)if(p(Ce,B[be]))return null;var Te=JSON.stringify(B,function(Le,Z){var Be=V(Z);return Be==="symbol"?String(Z):Z});return new m("Invalid "+te+" `"+ue+"` of value `"+String(Ce)+"` "+("supplied to `"+oe+"`, expected one of "+Te+"."))}return g(W)}function A(B){function W(se,ne,oe,te,ue){if(typeof B!="function")return new m("Property `"+ue+"` of component `"+oe+"` has invalid PropType notation inside objectOf.");var Ce=se[ne],be=F(Ce);if(be!=="object")return new m("Invalid "+te+" `"+ue+"` of type "+("`"+be+"` supplied to `"+oe+"`, expected an object."));for(var Te in Ce)if(r(Ce,Te)){var de=B(Ce,Te,oe,te,ue+"."+Te,n);if(de instanceof Error)return de}return null}return g(W)}function $(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var W=0;W<B.length;W++){var se=B[W];if(typeof se!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(se)+" at index "+W+"."),o}function ne(oe,te,ue,Ce,be){for(var Te=[],de=0;de<B.length;de++){var Le=B[de],Z=Le(oe,te,ue,Ce,be,n);if(Z==null)return null;Z.data&&r(Z.data,"expectedType")&&Te.push(Z.data.expectedType)}var Be=Te.length>0?", expected one of type ["+Te.join(", ")+"]":"";return new m("Invalid "+Ce+" `"+be+"` supplied to "+("`"+ue+"`"+Be+"."))}return g(ne)}function P(){function B(W,se,ne,oe,te){return z(W[se])?null:new m("Invalid "+oe+" `"+te+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return g(B)}function O(B,W,se,ne,oe){return new m((B||"React class")+": "+W+" type `"+se+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+oe+"`.")}function R(B){function W(se,ne,oe,te,ue){var Ce=se[ne],be=F(Ce);if(be!=="object")return new m("Invalid "+te+" `"+ue+"` of type `"+be+"` "+("supplied to `"+oe+"`, expected `object`."));for(var Te in B){var de=B[Te];if(typeof de!="function")return O(oe,te,ue,Te,V(de));var Le=de(Ce,Te,oe,te,ue+"."+Te,n);if(Le)return Le}return null}return g(W)}function H(B){function W(se,ne,oe,te,ue){var Ce=se[ne],be=F(Ce);if(be!=="object")return new m("Invalid "+te+" `"+ue+"` of type `"+be+"` "+("supplied to `"+oe+"`, expected `object`."));var Te=e({},se[ne],B);for(var de in Te){var Le=B[de];if(r(B,de)&&typeof Le!="function")return O(oe,te,ue,de,V(Le));if(!Le)return new m("Invalid "+te+" `"+ue+"` key `"+de+"` supplied to `"+oe+"`.\nBad object: "+JSON.stringify(se[ne],null," ")+`
195
+ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Z=Le(Ce,de,oe,te,ue+"."+de,n);if(Z)return Z}return null}return g(W)}function z(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(z);if(B===null||a(B))return!0;var W=d(B);if(W){var se=W.call(B),ne;if(W!==B.entries){for(;!(ne=se.next()).done;)if(!z(ne.value))return!1}else for(;!(ne=se.next()).done;){var oe=ne.value;if(oe&&!z(oe[1]))return!1}}else return!1;return!0;default:return!1}}function j(B,W){return B==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function F(B){var W=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":j(W,B)?"symbol":W}function V(B){if(typeof B>"u"||B===null)return""+B;var W=F(B);if(W==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return W}function q(B){var W=V(B);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function Q(B){return!B.constructor||!B.constructor.name?h:B.constructor.name}return f.checkPropTypes=s,f.resetWarningCache=s.resetWarningCache,f.PropTypes=f,f},i2}var o2,j9;function u1e(){if(j9)return o2;j9=1;var t=n2();function e(){}function n(){}return n.resetWarningCache=e,o2=function(){function r(o,a,l,c,u,d){if(d!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function s(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},o2}if(process.env.NODE_ENV!=="production"){var d1e=P9(),h1e=!0;Jv.exports=c1e()(d1e.isElement,h1e)}else Jv.exports=u1e()();var f1e=Jv.exports;function eg(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?eg=function(n){return typeof n}:eg=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},eg(t)}var tc=a2(x),p1e=a2(s1e),Rt=a2(f1e);function a2(t){return t&&t.__esModule?t:{default:t}}function g1e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m1e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y1e(t,e,n){return m1e(t.prototype,e),t}function b1e(t,e){return e&&(eg(e)==="object"||typeof e=="function")?e:F9(t)}function l2(t){return l2=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},l2(t)}function F9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v1e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c2(t,e)}function c2(t,e){return c2=Object.setPrototypeOf||function(r,s){return r.__proto__=s,r},c2(t,e)}var u2,d2=tc.default.version.split(/[.-]/);d2[0]==="0"&&(d2[1]==="13"||d2[1]==="12")?u2=function(e){return e.getDOMNode()}:u2=function(e){return e};var h2=function(t){v1e(e,t);function e(n){var r;return g1e(this,e),r=b1e(this,l2(e).call(this,n)),r.renderElementRef=tc.default.createRef(),r.update=r.update.bind(F9(r)),r}return y1e(e,[{key:"shouldComponentUpdate",value:function(r){var s=this;return Object.keys(e.propTypes).some(function(i){return s.props[i]!==r[i]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var r=u2(this.renderElementRef.current);try{new p1e.default(r,this.props.value,Object.assign({},this.props))}catch(s){window.console.error(s)}}},{key:"render",value:function(){var r=this.props,s=r.id,i=r.className;if(this.props.renderer==="svg")return tc.default.createElement("svg",{ref:this.renderElementRef,id:s,className:i});if(this.props.renderer==="canvas")return tc.default.createElement("canvas",{ref:this.renderElementRef,id:s,className:i});if(this.props.renderer==="img")return tc.default.createElement("img",{ref:this.renderElementRef,id:s,className:i})}}]),e}(tc.default.Component);h2.propTypes={value:Rt.default.string.isRequired,renderer:Rt.default.string,format:Rt.default.string,width:Rt.default.number,height:Rt.default.number,displayValue:Rt.default.bool,fontOptions:Rt.default.string,font:Rt.default.string,textAlign:Rt.default.string,textPosition:Rt.default.string,textMargin:Rt.default.number,fontSize:Rt.default.number,background:Rt.default.string,lineColor:Rt.default.string,margin:Rt.default.number,marginTop:Rt.default.number,marginBottom:Rt.default.number,marginLeft:Rt.default.number,marginRight:Rt.default.number,id:Rt.default.string,className:Rt.default.string,ean128:Rt.default.bool},h2.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1};var x1e=h2;const w1e=ss(x1e),_1e={},z9=qe.bind(_1e),C1e=t=>{const{value:e,className:n,ref:r,type:s="EAN8"}=t,i=x.useRef(null),o=x.useCallback(async()=>{try{const l=i.current;if(!l){alert("바코드를 찾을 수 없습니다.");return}const c=l.querySelector("svg");if(!c){alert("바코드를 찾을 수 없습니다.");return}const d=new XMLSerializer().serializeToString(c),h=`data:image/svg+xml;base64,${btoa(d)}`,f=new Image;f.src=h,f.onload=async()=>{const p=document.createElement("canvas");p.width=f.width,p.height=f.height;const m=p.getContext("2d");if(!m){alert("이미지를 처리할 수 없습니다.");return}m.drawImage(f,0,0),p.toBlob(async g=>{if(!g){alert("이미지를 생성하는 데 실패했습니다.");return}try{const y=new ClipboardItem({"image/png":g});await navigator.clipboard.write([y]),alert("바코드 이미지가 클립보드에 복사되었습니다!")}catch(y){console.error("복사 실패:",y),alert("바코드 복사에 실패했습니다.")}},"image/png")},f.onerror=()=>{alert("이미지를 로드하는 데 실패했습니다.")}}catch(l){console.error("복사 실패:",l),alert("바코드 복사에 실패했습니다.")}},[]),a=x.useCallback(()=>{try{const l=i.current;if(!l){alert("바코드를 찾을 수 없습니다.");return}const c=l.querySelector("svg");if(!c){alert("바코드를 찾을 수 없습니다.");return}const d=new XMLSerializer().serializeToString(c),h=new Blob([d],{type:"image/svg+xml"}),f=URL.createObjectURL(h),p=document.createElement("a");p.href=f,p.download=`EAN_${e}.svg`,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(f)}catch(l){console.error("다운로드 실패:",l),alert("바코드 다운로드에 실패했습니다.")}},[e]);return x.useImperativeHandle(r,()=>({copy:o,download:a}),[o,a]),e.length!==12&&s==="EAN13"?S.jsx("div",{children:"12자리의 숫자를 입력해주세요."}):e.length!==7&&s==="EAN8"?S.jsx("div",{children:"7자리의 숫자를 입력해주세요."}):S.jsx("div",{className:z9("Wrapper",n),ref:i,children:S.jsx("div",{className:z9("CodeContainer"),children:S.jsx(w1e,{value:e,format:s})})})},S1e={};var E1e=Object.defineProperty,tg=Object.getOwnPropertySymbols,H9=Object.prototype.hasOwnProperty,V9=Object.prototype.propertyIsEnumerable,U9=(t,e,n)=>e in t?E1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,f2=(t,e)=>{for(var n in e||(e={}))H9.call(e,n)&&U9(t,n,e[n]);if(tg)for(var n of tg(e))V9.call(e,n)&&U9(t,n,e[n]);return t},p2=(t,e)=>{var n={};for(var r in t)H9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&tg)for(var r of tg(t))e.indexOf(r)<0&&V9.call(t,r)&&(n[r]=t[r]);return n};/**
196
+ * @license QR Code generator library (TypeScript)
197
+ * Copyright (c) Project Nayuki.
198
+ * SPDX-License-Identifier: MIT
199
+ */var wa;(t=>{const e=class Ue{constructor(l,c,u,d){if(this.version=l,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],l<Ue.MIN_VERSION||l>Ue.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let h=[];for(let p=0;p<this.size;p++)h.push(!1);for(let p=0;p<this.size;p++)this.modules.push(h.slice()),this.isFunction.push(h.slice());this.drawFunctionPatterns();const f=this.addEccAndInterleave(u);if(this.drawCodewords(f),d==-1){let p=1e9;for(let m=0;m<8;m++){this.applyMask(m),this.drawFormatBits(m);const g=this.getPenaltyScore();g<p&&(d=m,p=g),this.applyMask(m)}}s(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}static encodeText(l,c){const u=t.QrSegment.makeSegments(l);return Ue.encodeSegments(u,c)}static encodeBinary(l,c){const u=t.QrSegment.makeBytes(l);return Ue.encodeSegments([u],c)}static encodeSegments(l,c,u=1,d=40,h=-1,f=!0){if(!(Ue.MIN_VERSION<=u&&u<=d&&d<=Ue.MAX_VERSION)||h<-1||h>7)throw new RangeError("Invalid value");let p,m;for(p=u;;p++){const b=Ue.getNumDataCodewords(p,c)*8,C=o.getTotalBits(l,p);if(C<=b){m=C;break}if(p>=d)throw new RangeError("Data too long")}for(const b of[Ue.Ecc.MEDIUM,Ue.Ecc.QUARTILE,Ue.Ecc.HIGH])f&&m<=Ue.getNumDataCodewords(p,b)*8&&(c=b);let g=[];for(const b of l){n(b.mode.modeBits,4,g),n(b.numChars,b.mode.numCharCountBits(p),g);for(const C of b.getData())g.push(C)}s(g.length==m);const y=Ue.getNumDataCodewords(p,c)*8;s(g.length<=y),n(0,Math.min(4,y-g.length),g),n(0,(8-g.length%8)%8,g),s(g.length%8==0);for(let b=236;g.length<y;b^=253)n(b,8,g);let v=[];for(;v.length*8<g.length;)v.push(0);return g.forEach((b,C)=>v[C>>>3]|=b<<7-(C&7)),new Ue(p,c,v,h)}getModule(l,c){return 0<=l&&l<this.size&&0<=c&&c<this.size&&this.modules[c][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const l=this.getAlignmentPatternPositions(),c=l.length;for(let u=0;u<c;u++)for(let d=0;d<c;d++)u==0&&d==0||u==0&&d==c-1||u==c-1&&d==0||this.drawAlignmentPattern(l[u],l[d]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(l){const c=this.errorCorrectionLevel.formatBits<<3|l;let u=c;for(let h=0;h<10;h++)u=u<<1^(u>>>9)*1335;const d=(c<<10|u)^21522;s(d>>>15==0);for(let h=0;h<=5;h++)this.setFunctionModule(8,h,r(d,h));this.setFunctionModule(8,7,r(d,6)),this.setFunctionModule(8,8,r(d,7)),this.setFunctionModule(7,8,r(d,8));for(let h=9;h<15;h++)this.setFunctionModule(14-h,8,r(d,h));for(let h=0;h<8;h++)this.setFunctionModule(this.size-1-h,8,r(d,h));for(let h=8;h<15;h++)this.setFunctionModule(8,this.size-15+h,r(d,h));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let u=0;u<12;u++)l=l<<1^(l>>>11)*7973;const c=this.version<<12|l;s(c>>>18==0);for(let u=0;u<18;u++){const d=r(c,u),h=this.size-11+u%3,f=Math.floor(u/3);this.setFunctionModule(h,f,d),this.setFunctionModule(f,h,d)}}drawFinderPattern(l,c){for(let u=-4;u<=4;u++)for(let d=-4;d<=4;d++){const h=Math.max(Math.abs(d),Math.abs(u)),f=l+d,p=c+u;0<=f&&f<this.size&&0<=p&&p<this.size&&this.setFunctionModule(f,p,h!=2&&h!=4)}}drawAlignmentPattern(l,c){for(let u=-2;u<=2;u++)for(let d=-2;d<=2;d++)this.setFunctionModule(l+d,c+u,Math.max(Math.abs(d),Math.abs(u))!=1)}setFunctionModule(l,c,u){this.modules[c][l]=u,this.isFunction[c][l]=!0}addEccAndInterleave(l){const c=this.version,u=this.errorCorrectionLevel;if(l.length!=Ue.getNumDataCodewords(c,u))throw new RangeError("Invalid argument");const d=Ue.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][c],h=Ue.ECC_CODEWORDS_PER_BLOCK[u.ordinal][c],f=Math.floor(Ue.getNumRawDataModules(c)/8),p=d-f%d,m=Math.floor(f/d);let g=[];const y=Ue.reedSolomonComputeDivisor(h);for(let b=0,C=0;b<d;b++){let _=l.slice(C,C+m-h+(b<p?0:1));C+=_.length;const k=Ue.reedSolomonComputeRemainder(_,y);b<p&&_.push(0),g.push(_.concat(k))}let v=[];for(let b=0;b<g[0].length;b++)g.forEach((C,_)=>{(b!=m-h||_>=p)&&v.push(C[b])});return s(v.length==f),v}drawCodewords(l){if(l.length!=Math.floor(Ue.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let d=0;d<this.size;d++)for(let h=0;h<2;h++){const f=u-h,m=(u+1&2)==0?this.size-1-d:d;!this.isFunction[m][f]&&c<l.length*8&&(this.modules[m][f]=r(l[c>>>3],7-(c&7)),c++)}}s(c==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let c=0;c<this.size;c++)for(let u=0;u<this.size;u++){let d;switch(l){case 0:d=(u+c)%2==0;break;case 1:d=c%2==0;break;case 2:d=u%3==0;break;case 3:d=(u+c)%3==0;break;case 4:d=(Math.floor(u/3)+Math.floor(c/2))%2==0;break;case 5:d=u*c%2+u*c%3==0;break;case 6:d=(u*c%2+u*c%3)%2==0;break;case 7:d=((u+c)%2+u*c%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[c][u]&&d&&(this.modules[c][u]=!this.modules[c][u])}}getPenaltyScore(){let l=0;for(let h=0;h<this.size;h++){let f=!1,p=0,m=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[h][g]==f?(p++,p==5?l+=Ue.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,m),f||(l+=this.finderPenaltyCountPatterns(m)*Ue.PENALTY_N3),f=this.modules[h][g],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,m)*Ue.PENALTY_N3}for(let h=0;h<this.size;h++){let f=!1,p=0,m=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[g][h]==f?(p++,p==5?l+=Ue.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,m),f||(l+=this.finderPenaltyCountPatterns(m)*Ue.PENALTY_N3),f=this.modules[g][h],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,m)*Ue.PENALTY_N3}for(let h=0;h<this.size-1;h++)for(let f=0;f<this.size-1;f++){const p=this.modules[h][f];p==this.modules[h][f+1]&&p==this.modules[h+1][f]&&p==this.modules[h+1][f+1]&&(l+=Ue.PENALTY_N2)}let c=0;for(const h of this.modules)c=h.reduce((f,p)=>f+(p?1:0),c);const u=this.size*this.size,d=Math.ceil(Math.abs(c*20-u*10)/u)-1;return s(0<=d&&d<=9),l+=d*Ue.PENALTY_N4,s(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let u=[6];for(let d=this.size-7;u.length<l;d-=c)u.splice(1,0,d);return u}}static getNumRawDataModules(l){if(l<Ue.MIN_VERSION||l>Ue.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*l+128)*l+64;if(l>=2){const u=Math.floor(l/7)+2;c-=(25*u-10)*u-55,l>=7&&(c-=36)}return s(208<=c&&c<=29648),c}static getNumDataCodewords(l,c){return Math.floor(Ue.getNumRawDataModules(l)/8)-Ue.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l]*Ue.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let c=[];for(let d=0;d<l-1;d++)c.push(0);c.push(1);let u=1;for(let d=0;d<l;d++){for(let h=0;h<c.length;h++)c[h]=Ue.reedSolomonMultiply(c[h],u),h+1<c.length&&(c[h]^=c[h+1]);u=Ue.reedSolomonMultiply(u,2)}return c}static reedSolomonComputeRemainder(l,c){let u=c.map(d=>0);for(const d of l){const h=d^u.shift();u.push(0),c.forEach((f,p)=>u[p]^=Ue.reedSolomonMultiply(f,h))}return u}static reedSolomonMultiply(l,c){if(l>>>8||c>>>8)throw new RangeError("Byte out of range");let u=0;for(let d=7;d>=0;d--)u=u<<1^(u>>>7)*285,u^=(c>>>d&1)*l;return s(u>>>8==0),u}finderPenaltyCountPatterns(l){const c=l[1];s(c<=this.size*3);const u=c>0&&l[2]==c&&l[3]==c*3&&l[4]==c&&l[5]==c;return(u&&l[0]>=c*4&&l[6]>=c?1:0)+(u&&l[6]>=c*4&&l[0]>=c?1:0)}finderPenaltyTerminateAndCount(l,c,u){return l&&(this.finderPenaltyAddHistory(c,u),c=0),c+=this.size,this.finderPenaltyAddHistory(c,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(l,c){c[0]==0&&(l+=this.size),c.pop(),c.unshift(l)}};e.MIN_VERSION=1,e.MAX_VERSION=40,e.PENALTY_N1=3,e.PENALTY_N2=3,e.PENALTY_N3=40,e.PENALTY_N4=10,e.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],e.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=e;function n(a,l,c){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let u=l-1;u>=0;u--)c.push(a>>>u&1)}function r(a,l){return(a>>>l&1)!=0}function s(a){if(!a)throw new Error("Assertion error")}const i=class It{constructor(l,c,u){if(this.mode=l,this.numChars=c,this.bitData=u,c<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(l){let c=[];for(const u of l)n(u,8,c);return new It(It.Mode.BYTE,l.length,c)}static makeNumeric(l){if(!It.isNumeric(l))throw new RangeError("String contains non-numeric characters");let c=[];for(let u=0;u<l.length;){const d=Math.min(l.length-u,3);n(parseInt(l.substring(u,u+d),10),d*3+1,c),u+=d}return new It(It.Mode.NUMERIC,l.length,c)}static makeAlphanumeric(l){if(!It.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let c=[],u;for(u=0;u+2<=l.length;u+=2){let d=It.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u))*45;d+=It.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u+1)),n(d,11,c)}return u<l.length&&n(It.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u)),6,c),new It(It.Mode.ALPHANUMERIC,l.length,c)}static makeSegments(l){return l==""?[]:It.isNumeric(l)?[It.makeNumeric(l)]:It.isAlphanumeric(l)?[It.makeAlphanumeric(l)]:[It.makeBytes(It.toUtf8ByteArray(l))]}static makeEci(l){let c=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)n(l,8,c);else if(l<16384)n(2,2,c),n(l,14,c);else if(l<1e6)n(6,3,c),n(l,21,c);else throw new RangeError("ECI assignment value out of range");return new It(It.Mode.ECI,0,c)}static isNumeric(l){return It.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return It.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,c){let u=0;for(const d of l){const h=d.mode.numCharCountBits(c);if(d.numChars>=1<<h)return 1/0;u+=4+h+d.bitData.length}return u}static toUtf8ByteArray(l){l=encodeURI(l);let c=[];for(let u=0;u<l.length;u++)l.charAt(u)!="%"?c.push(l.charCodeAt(u)):(c.push(parseInt(l.substring(u+1,u+3),16)),u+=2);return c}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let o=i;t.QrSegment=i})(wa||(wa={})),(t=>{(e=>{const n=class{constructor(s,i){this.ordinal=s,this.formatBits=i}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(wa||(wa={})),(t=>{(e=>{const n=class{constructor(s,i){this.modeBits=s,this.numBitsCharCount=i}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(wa||(wa={}));var nc=wa;/**
200
+ * @license qrcode.react
201
+ * Copyright (c) Paul O'Shannessy
202
+ * SPDX-License-Identifier: ISC
203
+ */var A1e={L:nc.QrCode.Ecc.LOW,M:nc.QrCode.Ecc.MEDIUM,Q:nc.QrCode.Ecc.QUARTILE,H:nc.QrCode.Ecc.HIGH},q9=128,W9="L",G9="#FFFFFF",Y9="#000000",K9=!1,Z9=1,T1e=4,k1e=0,M1e=.1;function X9(t,e=0){const n=[];return t.forEach(function(r,s){let i=null;r.forEach(function(o,a){if(!o&&i!==null){n.push(`M${i+e} ${s+e}h${a-i}v1H${i+e}z`),i=null;return}if(a===r.length-1){if(!o)return;i===null?n.push(`M${a+e},${s+e} h1v1H${a+e}z`):n.push(`M${i+e},${s+e} h${a+1-i}v1H${i+e}z`);return}o&&i===null&&(i=a)})}),n.join("")}function Q9(t,e){return t.slice().map((n,r)=>r<e.y||r>=e.y+e.h?n:n.map((s,i)=>i<e.x||i>=e.x+e.w?s:!1))}function O1e(t,e,n,r){if(r==null)return null;const s=t.length+n*2,i=Math.floor(e*M1e),o=s/e,a=(r.width||i)*o,l=(r.height||i)*o,c=r.x==null?t.length/2-a/2:r.x*o,u=r.y==null?t.length/2-l/2:r.y*o,d=r.opacity==null?1:r.opacity;let h=null;if(r.excavate){let p=Math.floor(c),m=Math.floor(u),g=Math.ceil(a+c-p),y=Math.ceil(l+u-m);h={x:p,y:m,w:g,h:y}}const f=r.crossOrigin;return{x:c,y:u,h:l,w:a,excavation:h,opacity:d,crossOrigin:f}}function $1e(t,e){return e!=null?Math.max(Math.floor(e),0):t?T1e:k1e}function J9({value:t,level:e,minVersion:n,includeMargin:r,marginSize:s,imageSettings:i,size:o,boostLevel:a}){let l=x.useMemo(()=>{const p=(Array.isArray(t)?t:[t]).reduce((m,g)=>(m.push(...nc.QrSegment.makeSegments(g)),m),[]);return nc.QrCode.encodeSegments(p,A1e[e],n,void 0,void 0,a)},[t,e,n,a]);const{cells:c,margin:u,numCells:d,calculatedImageSettings:h}=x.useMemo(()=>{let f=l.getModules();const p=$1e(r,s),m=f.length+p*2,g=O1e(f,o,p,i);return{cells:f,margin:p,numCells:m,calculatedImageSettings:g}},[l,o,i,r,s]);return{qrcode:l,margin:u,cells:c,numCells:d,calculatedImageSettings:h}}var P1e=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),eM=x.forwardRef(function(e,n){const r=e,{value:s,size:i=q9,level:o=W9,bgColor:a=G9,fgColor:l=Y9,includeMargin:c=K9,minVersion:u=Z9,boostLevel:d,marginSize:h,imageSettings:f}=r,m=p2(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:g}=m,y=p2(m,["style"]),v=f==null?void 0:f.src,b=x.useRef(null),C=x.useRef(null),_=x.useCallback(z=>{b.current=z,typeof n=="function"?n(z):n&&(n.current=z)},[n]),[k,E]=x.useState(!1),{margin:A,cells:$,numCells:P,calculatedImageSettings:O}=J9({value:s,level:o,minVersion:u,boostLevel:d,includeMargin:c,marginSize:h,imageSettings:f,size:i});x.useEffect(()=>{if(b.current!=null){const z=b.current,j=z.getContext("2d");if(!j)return;let F=$;const V=C.current,q=O!=null&&V!==null&&V.complete&&V.naturalHeight!==0&&V.naturalWidth!==0;q&&O.excavation!=null&&(F=Q9($,O.excavation));const Q=window.devicePixelRatio||1;z.height=z.width=i*Q;const B=i/P*Q;j.scale(B,B),j.fillStyle=a,j.fillRect(0,0,P,P),j.fillStyle=l,P1e?j.fill(new Path2D(X9(F,A))):$.forEach(function(W,se){W.forEach(function(ne,oe){ne&&j.fillRect(oe+A,se+A,1,1)})}),O&&(j.globalAlpha=O.opacity),q&&j.drawImage(V,O.x+A,O.y+A,O.w,O.h)}}),x.useEffect(()=>{E(!1)},[v]);const R=f2({height:i,width:i},g);let H=null;return v!=null&&(H=x.createElement("img",{src:v,key:v,style:{display:"none"},onLoad:()=>{E(!0)},ref:C,crossOrigin:O==null?void 0:O.crossOrigin})),x.createElement(x.Fragment,null,x.createElement("canvas",f2({style:R,height:i,width:i,ref:_,role:"img"},y)),H)});eM.displayName="QRCodeCanvas";var D1e=x.forwardRef(function(e,n){const r=e,{value:s,size:i=q9,level:o=W9,bgColor:a=G9,fgColor:l=Y9,includeMargin:c=K9,minVersion:u=Z9,boostLevel:d,title:h,marginSize:f,imageSettings:p}=r,m=p2(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:g,cells:y,numCells:v,calculatedImageSettings:b}=J9({value:s,level:o,minVersion:u,boostLevel:d,includeMargin:c,marginSize:f,imageSettings:p,size:i});let C=y,_=null;p!=null&&b!=null&&(b.excavation!=null&&(C=Q9(y,b.excavation)),_=x.createElement("image",{href:p.src,height:b.h,width:b.w,x:b.x+g,y:b.y+g,preserveAspectRatio:"none",opacity:b.opacity,crossOrigin:b.crossOrigin}));const k=X9(C,g);return x.createElement("svg",f2({height:i,width:i,viewBox:`0 0 ${v} ${v}`,ref:n,role:"img"},m),!!h&&x.createElement("title",null,h),x.createElement("path",{fill:a,d:`M0,0 h${v}v${v}H0z`,shapeRendering:"crispEdges"}),x.createElement("path",{fill:l,d:k,shapeRendering:"crispEdges"}),_)});D1e.displayName="QRCodeSVG";const R1e=qe.bind(S1e),I1e=t=>{const{link:e,className:n,ref:r}=t,s=x.useRef(null),i=x.useCallback(async()=>{var o;try{const a=(o=s.current)==null?void 0:o.querySelector("canvas");if(!a)return;a.toBlob(async l=>{if(!l)return;const c=new ClipboardItem({"image/png":l});await navigator.clipboard.write([c])},"image/png")}catch(a){console.error("복사 실패:",a)}},[s]);return x.useImperativeHandle(r,()=>({copy:i}),[i]),S.jsx("div",{className:R1e("Wrapper",n),children:S.jsx("div",{ref:s,children:S.jsx(eM,{value:e,size:256})})})},N1e={ChipsWrapper:"_ChipsWrapper_1o2k6_2",large:"_large_1o2k6_12",medium:"_medium_1o2k6_18",small:"_small_1o2k6_24",outlined:"_outlined_1o2k6_30",round:"_round_1o2k6_33",square:"_square_1o2k6_39"},L1e=()=>{const t={contained:{backgroundColor:T.primary.pMain,color:T.primary.pContrastText,borderColor:"transparent",hover:{backgroundColor:T.primary.pDark,color:T.primary.pContrastText,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:T.primary.pMain,borderColor:T.primary.p48,hover:{backgroundColor:T.primary.p8,color:T.primary.pMain,borderColor:T.primary.pMain}},soft:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightPrimary, ${T.light.swapDarkLightPrimary})`,borderColor:"transparent",hover:{backgroundColor:T.primary.p16,color:`var(--swapDarkLightPrimary, ${T.light.swapDarkLightPrimary})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:T.primary.pMain,borderColor:"transparent",hover:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightDeepGreen, ${T.light.swapDarkLightDeepGreen})`,borderColor:"transparent"}}},e={contained:{backgroundColor:`var(--inheritBgcolor, ${T.light.inheritBgcolor})`,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent",hover:{backgroundColor:`var(--inheritHover, ${T.light.inheritHover})`,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:le.grey32,hover:{backgroundColor:`var(--actionHover, ${T.light.actionHover})`,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:`var(--textSecondary, ${T.light.textSecondary})`}},soft:{backgroundColor:le.grey8,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent",hover:{backgroundColor:le.grey24,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent",hover:{backgroundColor:`var(--actionHover, ${T.light.actionHover})`,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent"}}},n={contained:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent",hover:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`,hover:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--actionDisabled, ${T.light.actionDisabled})`}},soft:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent",hover:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent",hover:{backgroundColor:"transparent",color:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"}}},r={contained:{backgroundColor:le.grey8,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent",hover:{backgroundColor:T.primary.pMain,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"}},outlined:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:le.grey32,hover:{backgroundColor:T.primary.p8,color:T.primary.pMain,borderColor:T.primary.pMain}},soft:{backgroundColor:le.grey8,color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:"transparent",hover:{backgroundColor:le.grey24,color:T.primary.p16,borderColor:"transparent"}},text:{backgroundColor:"transparent",color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent",hover:{backgroundColor:T.primary.p8,color:`var(--swapDarkLightDeepGreen, ${T.light.swapDarkLightDeepGreen})`,borderColor:"transparent"}}};return{primary:t,inherit:e,disabled:n,dual:r}},B1e=qe.bind(N1e),j1e=t=>{const{className:e,children:n,size:r="medium",variant:s="outlined",colorType:i="primary",checked:o,shapeType:a="round",disabled:l,onClick:c}=t,u=x.useRef(null),d=L1e(),h=d[i],f=l?d.disabled[s].backgroundColor:o?h[s].hover.backgroundColor:h[s].backgroundColor,p=l?d.disabled[s].borderColor:o?h[s].hover.borderColor:h[s].borderColor,m=l?d.disabled[s].color:o?h[s].hover.color:h[s].color;return S.jsx("div",{className:B1e("ChipsWrapper",r,s,e,a,{checked:o}),style:{"--default-background-color":f,"--default-border-color":p,"--default-tint-color":m},ref:u,onClick:c,children:n})},F1e={Label:"_Label_trpqa_2",cursor:"_cursor_trpqa_14",medium:"_medium_trpqa_17",small:"_small_trpqa_23",xSmall:"_xSmall_trpqa_29"},z1e=()=>{const t={filled:{backgroundColor:`var(--inheritBgcolor, ${T.light.inheritBgcolor})`,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,borderColor:`var(--textPrimary, ${T.light.textPrimary})`},outlineBack:{backgroundColor:le.grey8,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:le.grey48},soft:{backgroundColor:le.grey8,color:`var(--textSecondary, ${T.light.textSecondary})`,borderColor:"transparent"},inverted:{backgroundColor:ae.grey.Grey3,color:ae.grey.Grey8,borderColor:"transparent"}},e={filled:{backgroundColor:we.red.Main,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:we.red.Main,borderColor:we.red.Main},outlineBack:{backgroundColor:le.red8,color:we.red.Main,borderColor:le.red48},soft:{backgroundColor:le.red12,color:`var(--swapDarkLightRed, ${T.light.swapDarkLightRed})`,borderColor:"transparent"},inverted:{backgroundColor:we.red.Lighter,color:we.red.Darker,borderColor:"transparent"}},n={filled:{backgroundColor:we.cyanBlue.Main,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:we.cyanBlue.Main,borderColor:we.cyanBlue.Main},outlineBack:{backgroundColor:le.cyanBlue8,color:we.cyanBlue.Main,borderColor:le.cyanBlue48},soft:{backgroundColor:le.cyanBlue12,color:`var(--swapDarkLightCyanBlue, ${T.light.swapDarkLightCyanBlue})`,borderColor:"transparent"},inverted:{backgroundColor:we.cyanBlue.Lighter,color:we.cyanBlue.Darker,borderColor:"transparent"}},r={filled:{backgroundColor:we.blue.Main,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:we.blue.Main,borderColor:we.blue.Main},outlineBack:{backgroundColor:le.blue4,color:we.blue.Main,borderColor:le.blue48},soft:{backgroundColor:le.blue12,color:`var(--swapDarkLightBlue, ${T.light.swapDarkLightBlue})`,borderColor:"transparent"},inverted:{backgroundColor:we.blue.Lighter,color:we.blue.Darker,borderColor:"transparent"}},s={filled:{backgroundColor:we.purple.Main,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:we.purple.Main,borderColor:we.purple.Main},outlineBack:{backgroundColor:le.purple8,color:we.purple.Main,borderColor:le.purple48},soft:{backgroundColor:le.purple12,color:`var(--swapDarkLightPurple, ${T.light.swapDarkLightPurple})`,borderColor:"transparent"},inverted:{backgroundColor:we.purple.Lighter,color:we.purple.Darker,borderColor:"transparent"}},i={filled:{backgroundColor:we.gold.Main,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:we.gold.Main,borderColor:we.gold.Main},outlineBack:{backgroundColor:le.gold4,color:we.gold.Main,borderColor:le.gold48},soft:{backgroundColor:le.gold12,color:`var(--swapDarkLightGold, ${T.light.swapDarkLightGold})`,borderColor:"transparent"},inverted:{backgroundColor:we.gold.Lighter,color:we.gold.Darker,borderColor:"transparent"}},o={filled:{backgroundColor:we.lightGreen.Main,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:we.lightGreen.Main,borderColor:we.lightGreen.Main},outlineBack:{backgroundColor:le.lightGreen4,color:we.lightGreen.Main,borderColor:le.lightGreen48},soft:{backgroundColor:le.lightGreen12,color:`var(--swapDarkLightLightGreen, ${T.light.swapDarkLightLightGreen})`,borderColor:"transparent"},inverted:{backgroundColor:we.lightGreen.Lighter,color:we.lightGreen.Darker,borderColor:"transparent"}},a={filled:{backgroundColor:we.deepGreen.Main,color:`var(--textContrast, ${T.light.textContrast})`,borderColor:"transparent"},outlined:{backgroundColor:"transparent",color:we.deepGreen.Main,borderColor:we.deepGreen.Main},outlineBack:{backgroundColor:le.deepGreen4,color:we.deepGreen.Main,borderColor:le.deepGreen48},soft:{backgroundColor:le.deepGreen12,color:`var(--swapDarkLightDeepGreen, ${T.light.swapDarkLightDeepGreen})`,borderColor:"transparent"},inverted:{backgroundColor:we.deepGreen.Lighter,color:we.deepGreen.Darker,borderColor:"transparent"}};return{inherit:t,red:e,cyanBlue:n,blue:r,purple:s,gold:i,lightGreen:o,deepGreen:a}},H1e=qe.bind(F1e),V1e=t=>{const{children:e,size:n="small",color:r,variant:s="filled",onClick:i}=t,a=z1e()[r];return S.jsx("div",{...t,className:H1e("Label",n,t.className,{cursor:!!i}),onClick:i,style:{"--color":a[s].color,"--background-color":a[s].backgroundColor,"--border-color":a[s].borderColor},children:e})},U1e={Body:"_Body_1px9a_2",ColumnWrap:"_ColumnWrap_1px9a_11",Column:"_Column_1px9a_11",visible:"_visible_1px9a_23",selected:"_selected_1px9a_26",Date:"_Date_1px9a_29",Text:"_Text_1px9a_32"};var q1e={exports:{}};(function(t,e){(function(n,r){t.exports=r(l_)})(an,function(n){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=r(n),i={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(o){return o+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(o){return o<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return s.default.locale(i,null,!0),i})})(q1e);const W1e={columnWidth:48,isDragging:!1,hasMoved:!1,startX:0,setIsDragging:()=>{},setHasMoved:()=>{},setStartX:()=>{}},g2=x.createContext(W1e);ce.locale("ko");const _d=qe.bind(U1e),G1e={Column:t=>{const{date:e,visible:n,className:r,selected:s,onClick:i,disabled:o,between:a,both:l,start:c,end:u,dateClassName:d,textClassName:h}=t,{columnWidth:f,isDragging:p,hasMoved:m}=x.useContext(g2),g=y=>{if(p||m){y.preventDefault();return}i==null||i(e)};return S.jsxs("button",{className:_d("Column",r,{between:a,both:l,start:c,end:u,visible:n,selected:s}),disabled:o,style:{visibility:n||ce(e).isSame(ce(),"month")?"visible":"hidden",width:`${f}px`},onClick:g,children:[S.jsx("div",{className:_d("Date",d),children:ce(e).format("ddd")}),S.jsx("div",{className:_d("Text",h),children:ce(e).format("D")})]})},Body:t=>{const{className:e,columnWrapClassName:n,columnRender:r}=t,{isDragging:s,startX:i,setIsDragging:o,setHasMoved:a,setStartX:l,bodyRef:c,columnWrapRef:u}=x.useContext(g2),[d,h]=x.useState(0),[f,p]=x.useState(0),[m,g]=x.useState(0),[y,v]=x.useState(0),[b,C]=x.useState(0),[_,k]=x.useState(!1),E=x.useRef(null),A=x.useCallback(O=>{o(!0),a(!1);const R="touches"in O?O.touches[0].clientX:O.clientX;h(R),p(i),g(Date.now()),v(R),C(0),E.current&&(cancelAnimationFrame(E.current),E.current=null)},[o,a,i,h,p,g,v,C]),$=x.useCallback(O=>{if(!s||!(u!=null&&u.current)||!(c!=null&&c.current))return;const R="touches"in O?O.touches[0].clientX:O.clientX;Math.abs(R-d)>5&&a(!0);const H=Date.now(),z=H-m;z>0&&C((R-y)/z),g(H),v(R);const j=R-d,F=f+j,V=u.current.scrollWidth-c.current.clientWidth;if(F>0||F<-V){k(!0);const q=F>0?F/3:-V+(F+V)/3;l(q)}else k(!1),l(F)},[s,u,c,d,a,m,y,f,l,k,C]),P=x.useCallback(()=>{if(s){if(o(!1),_&&(c!=null&&c.current)&&(u!=null&&u.current)){const O=u.current.scrollWidth-c.current.clientWidth,R=i>0?0:-O;let H=i;const z=()=>{const j=R-H;if(Math.abs(j)<.5){l(R),k(!1),E.current&&(cancelAnimationFrame(E.current),E.current=null);return}H+=j*.2,l(H),E.current=requestAnimationFrame(z)};E.current&&cancelAnimationFrame(E.current),E.current=requestAnimationFrame(z);return}if(Math.abs(b)>.1){let O=b*30,R=i;const H=()=>{var F,V;if(Math.abs(O)<.1){E.current&&(cancelAnimationFrame(E.current),E.current=null);return}O*=.8,R+=O;const z=(((F=u==null?void 0:u.current)==null?void 0:F.scrollWidth)??0)-(((V=c==null?void 0:c.current)==null?void 0:V.clientWidth)??0),j=Math.min(0,Math.max(-z,R));j!==R&&(O=0),R=j,l(R),E.current=requestAnimationFrame(H)};E.current&&cancelAnimationFrame(E.current),E.current=requestAnimationFrame(H)}setTimeout(()=>{a(!1)},0)}},[s,o,_,c,u,i,l,k,b,a]);return x.useEffect(()=>{const O=H=>{$(H)},R=()=>{P()};return s?(window.addEventListener("mousemove",O),window.addEventListener("mouseup",R)):(window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",R)),()=>{window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",R)}},[s,$,P]),x.useEffect(()=>()=>{E.current&&(cancelAnimationFrame(E.current),E.current=null)},[]),S.jsx("div",{ref:c,className:_d("Body",e),onMouseDown:A,onTouchStart:A,onTouchMove:$,onTouchEnd:P,children:S.jsx("div",{ref:u,className:_d("ColumnWrap",n),style:{transform:`translateX(${i}px)`,transition:i===0&&!s?"transform 0.05s linear":"none"},children:i!==void 0?r():null})})},Root:t=>{const{children:e,columnWidth:n=48}=t,{currentDate:r}=x.use(Ni),[s,i]=x.useState(!1),[o,a]=x.useState(!1),[l,c]=x.useState(0),[u,d]=x.useState(!0),h=x.useRef(null),f=x.useRef(null),p=x.useRef(null),m=x.useRef({startX:l,isFirstRender:u});return x.useEffect(()=>{m.current={startX:l,isFirstRender:u}}),x.useEffect(()=>{const g=ce(r).date()-1;if(g!==-1&&(h!=null&&h.current)&&(f!=null&&f.current)&&n){const y=h.current.offsetWidth,v=y/2,b=g*n,C=v-b-n/2,_=f.current.scrollWidth-y,k=Math.min(0,Math.max(-_,C));if(m.current.isFirstRender){c(k),d(!1);return}const E=m.current.startX,A=k-E,$=250,P=performance.now(),O=R=>{const H=R-P,z=Math.min(H/$,1),j=E+A*(z*(2-z));c(j),z<1?p.current=requestAnimationFrame(O):p.current&&(cancelAnimationFrame(p.current),p.current=null)};p.current&&(cancelAnimationFrame(p.current),p.current=null),p.current=requestAnimationFrame(O)}return()=>{p.current&&(cancelAnimationFrame(p.current),p.current=null)}},[r,n,d,c]),S.jsx(g2.Provider,{value:{columnWidth:n,isDragging:s,hasMoved:o,startX:l,setIsDragging:i,setHasMoved:a,setStartX:c,bodyRef:h,columnWrapRef:f},children:e})}},tM=new Set;function ng(t,e,n){t||tM.has(e)||(console.warn(e),tM.add(e))}function Y1e(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&ng(!1,"motion() is deprecated. Use motion.create() instead."),t(...r));return new Proxy(n,{get:(r,s)=>s==="create"?t:(e.has(s)||e.set(s,t(s)),e.get(s))})}function rg(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const m2=t=>Array.isArray(t);function nM(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Cd(t){return typeof t=="string"||Array.isArray(t)}function rM(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function y2(t,e,n,r){if(typeof e=="function"){const[s,i]=rM(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=rM(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function sg(t,e,n){const r=t.getProps();return y2(r,e,n!==void 0?n:r.custom,t)}const b2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],v2=["initial",...b2],Sd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_a=new Set(Sd),qs=t=>t*1e3,Mi=t=>t/1e3,K1e={type:"spring",stiffness:500,damping:25,restSpeed:10},Z1e=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),X1e={type:"keyframes",duration:.8},Q1e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},J1e=(t,{keyframes:e})=>e.length>2?X1e:_a.has(t)?t.startsWith("scale")?Z1e(e[1]):K1e:Q1e;function x2(t,e){return t?t[e]||t.default||t:void 0}const eye={skipAnimations:!1,useManualTiming:!1},tye=t=>t!==null;function ig(t,{repeat:e,repeatType:n="loop"},r){const s=t.filter(tye),i=e&&n!=="loop"&&e%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const hr=t=>t;let rc=hr,Ws=hr;process.env.NODE_ENV!=="production"&&(rc=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Ws=(t,e)=>{if(!t)throw new Error(e)});function nye(t){let e=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,d=!1)=>{const f=d&&r?e:n;return u&&i.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(o=c,r){s=!0;return}r=!0,[e,n]=[n,e],e.forEach(a),e.clear(),r=!1,s&&(s=!1,l.process(c))}};return l}const og=["read","resolveKeyframes","update","preRender","render","postRender"],rye=40;function sM(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=og.reduce((y,v)=>(y[v]=nye(i),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=o,f=()=>{const y=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(y-s.timestamp,rye),1),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(f))},p=()=>{n=!0,r=!0,s.isProcessing||t(f)};return{schedule:og.reduce((y,v)=>{const b=o[v];return y[v]=(C,_=!1,k=!1)=>(n||p(),b.schedule(C,_,k)),y},{}),cancel:y=>{for(let v=0;v<og.length;v++)o[og[v]].cancel(y)},state:s,steps:o}}const{schedule:St,cancel:_o,state:_n,steps:w2}=sM(typeof requestAnimationFrame<"u"?requestAnimationFrame:hr,!0),iM=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,sye=1e-7,iye=12;function oye(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=iM(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>sye&&++a<iye);return o}function Ed(t,e,n,r){if(t===e&&n===r)return hr;const s=i=>oye(i,0,1,t,n);return i=>i===0||i===1?i:iM(s(i),e,r)}const oM=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,aM=t=>e=>1-t(1-e),lM=Ed(.33,1.53,.69,.99),_2=aM(lM),cM=oM(_2),uM=t=>(t*=2)<1?.5*_2(t):.5*(2-Math.pow(2,-10*(t-1))),C2=t=>1-Math.sin(Math.acos(t)),dM=aM(C2),hM=oM(C2),fM=t=>/^0[^.\s]+$/u.test(t);function aye(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||fM(t):!0}const pM=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),gM=t=>e=>typeof e=="string"&&e.startsWith(t),mM=gM("--"),lye=gM("var(--"),S2=t=>lye(t)?cye.test(t.split("/*")[0].trim()):!1,cye=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,uye=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dye(t){const e=uye.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}const hye=4;function yM(t,e,n=1){Ws(n<=hye,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,s]=dye(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const o=i.trim();return pM(o)?parseFloat(o):o}return S2(s)?yM(s,e,n+1):s}const Oi=(t,e,n)=>n>e?e:n<t?t:n,sc={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ad={...sc,transform:t=>Oi(0,1,t)},ag={...sc,default:1},Td=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Co=Td("deg"),Gs=Td("%"),Me=Td("px"),fye=Td("vh"),pye=Td("vw"),bM={...Gs,parse:t=>Gs.parse(t)/100,transform:t=>Gs.transform(t*100)},gye=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),vM=t=>t===sc||t===Me,xM=(t,e)=>parseFloat(t.split(", ")[e]),wM=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return xM(s[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?xM(i[1],t):0}},mye=new Set(["x","y","z"]),yye=Sd.filter(t=>!mye.has(t));function bye(t){const e=[];return yye.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const ic={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:wM(4,13),y:wM(5,14)};ic.translateX=ic.x,ic.translateY=ic.y;const _M=t=>e=>e.test(t),CM=[sc,Me,Gs,Co,pye,fye,{test:t=>t==="auto",parse:t=>t}],SM=t=>CM.find(_M(t)),Ca=new Set;let E2=!1,A2=!1;function EM(){if(A2){const t=Array.from(Ca).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=bye(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}A2=!1,E2=!1,Ca.forEach(t=>t.complete()),Ca.clear()}function AM(){Ca.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(A2=!0)})}function vye(){AM(),EM()}class T2{constructor(e,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ca.add(this),E2||(E2=!0,St.read(AM),St.resolveKeyframes(EM))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const o=s==null?void 0:s.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),s&&o===void 0&&s.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ca.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ca.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const kd=t=>Math.round(t*1e5)/1e5,k2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xye(t){return t==null}const wye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,M2=(t,e)=>n=>!!(typeof n=="string"&&wye.test(n)&&n.startsWith(t)||e&&!xye(n)&&Object.prototype.hasOwnProperty.call(n,e)),TM=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(k2);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},_ye=t=>Oi(0,255,t),O2={...sc,transform:t=>Math.round(_ye(t))},Sa={test:M2("rgb","red"),parse:TM("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+O2.transform(t)+", "+O2.transform(e)+", "+O2.transform(n)+", "+kd(Ad.transform(r))+")"};function Cye(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const $2={test:M2("#"),parse:Cye,transform:Sa.transform},oc={test:M2("hsl","hue"),parse:TM("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Gs.transform(kd(e))+", "+Gs.transform(kd(n))+", "+kd(Ad.transform(r))+")"},Bn={test:t=>Sa.test(t)||$2.test(t)||oc.test(t),parse:t=>Sa.test(t)?Sa.parse(t):oc.test(t)?oc.parse(t):$2.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Sa.transform(t):oc.transform(t)},Sye=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Eye(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(k2))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Sye))===null||n===void 0?void 0:n.length)||0)>0}const kM="number",MM="color",Aye="var",Tye="var(",OM="${}",kye=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Md(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(kye,l=>(Bn.test(l)?(r.color.push(i),s.push(MM),n.push(Bn.parse(l))):l.startsWith(Tye)?(r.var.push(i),s.push(Aye),n.push(l)):(r.number.push(i),s.push(kM),n.push(parseFloat(l))),++i,OM)).split(OM);return{values:n,split:a,indexes:r,types:s}}function $M(t){return Md(t).values}function PM(t){const{split:e,types:n}=Md(t),r=e.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],s[o]!==void 0){const a=n[o];a===kM?i+=kd(s[o]):a===MM?i+=Bn.transform(s[o]):i+=s[o]}return i}}const Mye=t=>typeof t=="number"?0:t;function Oye(t){const e=$M(t);return PM(t)(e.map(Mye))}const So={test:Eye,parse:$M,createTransformer:PM,getAnimatableNone:Oye},$ye=new Set(["brightness","contrast","saturate","opacity"]);function Pye(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(k2)||[];if(!r)return t;const s=n.replace(r,"");let i=$ye.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const Dye=/\b([a-z-]*)\(.*?\)/gu,P2={...So,getAnimatableNone:t=>{const e=t.match(Dye);return e?e.map(Pye).join(" "):t}},Rye={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,radius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,top:Me,right:Me,bottom:Me,left:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,backgroundPositionX:Me,backgroundPositionY:Me},Iye={rotate:Co,rotateX:Co,rotateY:Co,rotateZ:Co,scale:ag,scaleX:ag,scaleY:ag,scaleZ:ag,skew:Co,skewX:Co,skewY:Co,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:Ad,originX:bM,originY:bM,originZ:Me},DM={...sc,transform:Math.round},D2={...Rye,...Iye,zIndex:DM,size:Me,fillOpacity:Ad,strokeOpacity:Ad,numOctaves:DM},Nye={...D2,color:Bn,backgroundColor:Bn,outlineColor:Bn,fill:Bn,stroke:Bn,borderColor:Bn,borderTopColor:Bn,borderRightColor:Bn,borderBottomColor:Bn,borderLeftColor:Bn,filter:P2,WebkitFilter:P2},R2=t=>Nye[t];function RM(t,e){let n=R2(t);return n!==P2&&(n=So),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Lye=new Set(["auto","none","0"]);function Bye(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!Lye.has(i)&&Md(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=RM(n,s)}class IM extends T2{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),S2(c))){const u=yM(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!gye.has(r)||e.length!==2)return;const[s,i]=e,o=SM(s),a=SM(i);if(o!==a)if(vM(o)&&vM(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)aye(e[s])&&r.push(s);r.length&&Bye(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ic[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=ic[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function I2(t){return typeof t=="function"}let lg;function jye(){lg=void 0}const Ys={now:()=>(lg===void 0&&Ys.set(_n.isProcessing||eye.useManualTiming?_n.timestamp:performance.now()),lg),set:t=>{lg=t,queueMicrotask(jye)}},NM=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(So.test(t)||t==="0")&&!t.startsWith("url("));function Fye(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function zye(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=NM(s,e),a=NM(i,e);return rc(o===a,`You are trying to animate ${e} from "${s}" to "${i}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${i} via the \`style\` property.`),!o||!a?!1:Fye(t)||(n==="spring"||I2(n))&&r}const Hye=40;class LM{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ys.now(),this.options={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Hye?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&vye(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Ys.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!zye(e,r,s,i))if(o)this.options.duration=0;else{l==null||l(ig(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const ac=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},BM=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=t(ac(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function jM(t,e){return e?t*(1e3/e):0}const Vye=5;function FM(t,e,n){const r=Math.max(e-Vye,0);return jM(n-t(r),e-r)}const Ot={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},N2=.001;function Uye({duration:t=Ot.duration,bounce:e=Ot.bounce,velocity:n=Ot.velocity,mass:r=Ot.mass}){let s,i;rc(t<=qs(Ot.maxDuration),"Spring duration must be 10 seconds or less");let o=1-e;o=Oi(Ot.minDamping,Ot.maxDamping,o),t=Oi(Ot.minDuration,Ot.maxDuration,Mi(t)),o<1?(s=c=>{const u=c*o,d=u*t,h=u-n,f=L2(c,o),p=Math.exp(-d);return N2-h/f*p},i=c=>{const d=c*o*t,h=d*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-d),m=L2(Math.pow(c,2),o);return(-s(c)+N2>0?-1:1)*((h-f)*p)/m}):(s=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-N2+u*d},i=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=Wye(s,i,a);if(t=qs(t),isNaN(l))return{stiffness:Ot.stiffness,damping:Ot.damping,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:t}}}const qye=12;function Wye(t,e,n){let r=n;for(let s=1;s<qye;s++)r=r-t(r)/e(r);return r}function L2(t,e){return t*Math.sqrt(1-e*e)}const B2=2e4;function zM(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<B2;)e+=n,r=t.next(e);return e>=B2?1/0:e}const Gye=["duration","bounce"],Yye=["stiffness","damping","mass"];function HM(t,e){return e.some(n=>t[n]!==void 0)}function Kye(t){let e={velocity:Ot.velocity,stiffness:Ot.stiffness,damping:Ot.damping,mass:Ot.mass,isResolvedFromDuration:!1,...t};if(!HM(t,Yye)&&HM(t,Gye))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Oi(.05,1,1-t.bounce)*Math.sqrt(s);e={...e,mass:Ot.mass,stiffness:s,damping:i}}else{const n=Uye(t);e={...e,...n,mass:Ot.mass},e.isResolvedFromDuration=!0}return e}function VM(t=Ot.visualDuration,e=Ot.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=Kye({...n,velocity:-Mi(n.velocity||0)}),p=h||0,m=c/(2*Math.sqrt(l*u)),g=o-i,y=Mi(Math.sqrt(l/u)),v=Math.abs(g)<5;r||(r=v?Ot.restSpeed.granular:Ot.restSpeed.default),s||(s=v?Ot.restDelta.granular:Ot.restDelta.default);let b;if(m<1){const _=L2(y,m);b=k=>{const E=Math.exp(-m*y*k);return o-E*((p+m*y*g)/_*Math.sin(_*k)+g*Math.cos(_*k))}}else if(m===1)b=_=>o-Math.exp(-y*_)*(g+(p+y*g)*_);else{const _=y*Math.sqrt(m*m-1);b=k=>{const E=Math.exp(-m*y*k),A=Math.min(_*k,300);return o-E*((p+m*y*g)*Math.sinh(A)+_*g*Math.cosh(A))/_}}const C={calculatedDuration:f&&d||null,next:_=>{const k=b(_);if(f)a.done=_>=d;else{let E=0;m<1&&(E=_===0?qs(p):FM(b,_,k));const A=Math.abs(E)<=r,$=Math.abs(o-k)<=s;a.done=A&&$}return a.value=a.done?o:k,a},toString:()=>{const _=Math.min(zM(C),B2),k=BM(E=>C.next(_*E).value,_,30);return _+"ms "+k}};return C}function UM({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},f=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const g=d+m,y=o===void 0?g:o(g);y!==g&&(m=y-d);const v=A=>-m*Math.exp(-A/r),b=A=>y+v(A),C=A=>{const $=v(A),P=b(A);h.done=Math.abs($)<=c,h.value=h.done?y:P};let _,k;const E=A=>{f(h.value)&&(_=A,k=VM({keyframes:[h.value,p(h.value)],velocity:FM(b,A,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:A=>{let $=!1;return!k&&_===void 0&&($=!0,C(A),E(A)),_!==void 0&&A>=_?k.next(A-_):(!$&&C(A),h)}}}const Zye=Ed(.42,0,1,1),Xye=Ed(0,0,.58,1),qM=Ed(.42,0,.58,1),Qye=t=>Array.isArray(t)&&typeof t[0]!="number",j2=t=>Array.isArray(t)&&typeof t[0]=="number",WM={linear:hr,easeIn:Zye,easeInOut:qM,easeOut:Xye,circIn:C2,circInOut:hM,circOut:dM,backIn:_2,backInOut:cM,backOut:lM,anticipate:uM},GM=t=>{if(j2(t)){Ws(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,s]=t;return Ed(e,n,r,s)}else if(typeof t=="string")return Ws(WM[t]!==void 0,`Invalid easing type '${t}'`),WM[t];return t},Jye=(t,e)=>n=>e(t(n)),Od=(...t)=>t.reduce(Jye),$t=(t,e,n)=>t+(e-t)*n;function F2(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ebe({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=F2(l,a,t+1/3),i=F2(l,a,t),o=F2(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function cg(t,e){return n=>n>0?e:t}const z2=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},tbe=[$2,Sa,oc],nbe=t=>tbe.find(e=>e.test(t));function YM(t){const e=nbe(t);if(rc(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===oc&&(n=ebe(n)),n}const KM=(t,e)=>{const n=YM(t),r=YM(e);if(!n||!r)return cg(t,e);const s={...n};return i=>(s.red=z2(n.red,r.red,i),s.green=z2(n.green,r.green,i),s.blue=z2(n.blue,r.blue,i),s.alpha=$t(n.alpha,r.alpha,i),Sa.transform(s))},H2=new Set(["none","hidden"]);function rbe(t,e){return H2.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function sbe(t,e){return n=>$t(t,e,n)}function V2(t){return typeof t=="number"?sbe:typeof t=="string"?S2(t)?cg:Bn.test(t)?KM:abe:Array.isArray(t)?ZM:typeof t=="object"?Bn.test(t)?KM:ibe:cg}function ZM(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>V2(i)(i,e[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function ibe(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=V2(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function obe(t,e){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],a=t.indexes[o][s[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,s[o]++}return r}const abe=(t,e)=>{const n=So.createTransformer(e),r=Md(t),s=Md(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?H2.has(t)&&!s.values.length||H2.has(e)&&!r.values.length?rbe(t,e):Od(ZM(obe(r,s),s.values),n):(rc(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),cg(t,e))};function XM(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?$t(t,e,n):V2(t)(t,e)}function lbe(t,e,n){const r=[],s=n||XM,i=t.length-1;for(let o=0;o<i;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||hr:e;a=Od(l,a)}r.push(a)}return r}function cbe(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(Ws(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=lbe(e,r,s),a=o.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const d=ac(t[u],t[u+1],c);return o[u](d)};return n?c=>l(Oi(t[0],t[i-1],c)):l}function ube(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=ac(0,e,r);t.push($t(n,1,s))}}function dbe(t){const e=[0];return ube(e,t.length-1),e}function hbe(t,e){return t.map(n=>n*e)}function fbe(t,e){return t.map(()=>e||qM).splice(0,t.length-1)}function ug({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=Qye(r)?r.map(GM):GM(r),i={done:!1,value:e[0]},o=hbe(n&&n.length===e.length?n:dbe(e),t),a=cbe(o,e,{ease:Array.isArray(s)?s:fbe(e,s)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const pbe=t=>{const e=({timestamp:n})=>t(n);return{start:()=>St.update(e,!0),stop:()=>_o(e),now:()=>_n.isProcessing?_n.timestamp:Ys.now()}},gbe={decay:UM,inertia:UM,tween:ug,keyframes:ug,spring:VM},mbe=t=>t/100;class U2 extends LM{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||T2,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=I2(n)?n:gbe[n]||ug;let l,c;a!==ug&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ws(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=Od(mbe,XM(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=zM(u));const{calculatedDuration:d}=u,h=d+s,f=h*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:f,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,C=i;if(f){const A=Math.min(this.currentTime,u)/d;let $=Math.floor(A),P=A%1;!P&&A>=1&&(P=1),P===1&&$--,$=Math.min($,f+1),!!($%2)&&(p==="reverse"?(P=1-P,m&&(P-=m/d)):p==="mirror"&&(C=o)),b=Oi(0,1,P)*d}const _=v?{done:!1,value:l[0]}:C.next(b);a&&(_.value=a(_.value));let{done:k}=_;!v&&c!==null&&(k=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&s!==void 0&&(_.value=ig(l,this.options,s)),g&&g(_.value),E&&this.finish(),_}get duration(){const{resolved:e}=this;return e?Mi(e.calculatedDuration):0}get time(){return Mi(this.currentTime)}set time(e){e=qs(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Mi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=pbe,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ybe=new Set(["opacity","clipPath","filter","transform"]);function q2(t){let e;return()=>(e===void 0&&(e=t()),e)}const bbe={linearEasing:void 0};function vbe(t,e){const n=q2(t);return()=>{var r;return(r=bbe[e])!==null&&r!==void 0?r:n()}}const dg=vbe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function QM(t){return!!(typeof t=="function"&&dg()||!t||typeof t=="string"&&(t in W2||dg())||j2(t)||Array.isArray(t)&&t.every(QM))}const $d=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,W2={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$d([0,.65,.55,1]),circOut:$d([.55,0,1,.45]),backIn:$d([.31,.01,.66,-.59]),backOut:$d([.33,1.53,.69,.99])};function JM(t,e){if(t)return typeof t=="function"&&dg()?BM(t,e):j2(t)?$d(t):Array.isArray(t)?t.map(n=>JM(n,e)||W2.easeOut):W2[t]}function xbe(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=JM(a,s);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function eO(t,e){t.timeline=e,t.onfinish=null}const wbe=q2(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hg=10,_be=2e4;function Cbe(t){return I2(t.type)||t.type==="spring"||!QM(t.ease)}function Sbe(t,e){const n=new U2({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const s=[];let i=0;for(;!r.done&&i<_be;)r=n.sample(i),s.push(r.value),i+=hg;return{times:void 0,keyframes:s,duration:i-hg,ease:"linear"}}const tO={anticipate:uM,backInOut:cM,circInOut:hM};function Ebe(t){return t in tO}class nO extends LM{constructor(e){super(e);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new IM(i,(o,a)=>this.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:s=300,times:i,ease:o,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&dg()&&Ebe(o)&&(o=tO[o]),Cbe(this.options)){const{onComplete:h,onUpdate:f,motionValue:p,element:m,...g}=this.options,y=Sbe(e,g);e=y.keyframes,e.length===1&&(e[1]=e[0]),s=y.duration,i=y.times,o=y.ease,a="keyframes"}const d=xbe(l.owner.current,c,e,{...this.options,duration:s,times:i,ease:o});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(eO(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:h}=this.options;l.set(ig(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:s,times:i,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Mi(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Mi(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qs(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return hr;const{animation:r}=n;eO(r,e)}return hr}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:h,...f}=this.options,p=new U2({...f,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),m=qs(this.time);c.setWithVelocity(p.sample(m-hg).value,p.sample(m).value,hg)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=e;return wbe()&&r&&ybe.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const Abe=q2(()=>window.ScrollTimeline!==void 0);class Tbe{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e,n){const r=this.animations.map(s=>Abe()&&s.attachTimeline?s.attachTimeline(e):n(s));return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function kbe({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const G2=(t,e,n,r={},s,i)=>o=>{const a=x2(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-qs(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:s};kbe(a)||(u={...u,...J1e(t,u)}),u.duration&&(u.duration=qs(u.duration)),u.repeatDelay&&(u.repeatDelay=qs(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!i&&e.get()!==void 0){const h=ig(u.keyframes,a);if(h!==void 0)return St.update(()=>{u.onUpdate(h),u.onComplete()}),new Tbe([])}return!i&&nO.supports(u)?new nO(u):new U2(u)},Mbe=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Obe=t=>m2(t)?t[t.length-1]||0:t;function Y2(t,e){t.indexOf(e)===-1&&t.push(e)}function K2(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Z2{constructor(){this.subscriptions=[]}add(e){return Y2(this.subscriptions,e),()=>K2(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const rO=30,$be=t=>!isNaN(parseFloat(t));class Pbe{constructor(e,n={}){this.version="11.15.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=Ys.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Ys.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=$be(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&ng(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Z2);const r=this.events[e].add(n);return e==="change"?()=>{r(),St.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ys.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>rO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rO);return jM(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pd(t,e){return new Pbe(t,e)}function Dbe(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pd(n))}function X2(t,e){const n=sg(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Obe(i[o]);Dbe(t,o,a)}}const Q2=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sO="data-"+Q2("framerAppearId");function iO(t){return t.props[sO]}const jn=t=>!!(t&&t.getVelocity);function Rbe(t){return!!(jn(t)&&t.add)}function J2(t,e){const n=t.getValue("willChange");if(Rbe(n))return n.add(e)}function Ibe({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function oO(t,e,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(o=r);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const d in l){const h=t.getValue(d,(i=t.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&Ibe(u,d))continue;const p={delay:n,...x2(o||{},d)};let m=!1;if(window.MotionHandoffAnimation){const y=iO(t);if(y){const v=window.MotionHandoffAnimation(y,d,St);v!==null&&(p.startTime=v,m=!0)}}J2(t,d),h.start(G2(d,h,f,t.shouldReduceMotion&&_a.has(d)?{type:!1}:p,t,m));const g=h.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{St.update(()=>{a&&X2(t,a)})}),c}function ex(t,e,n={}){var r;const s=sg(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(oO(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return Nbe(t,e,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function Nbe(t,e,n=0,r=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(Lbe).forEach((c,u)=>{c.notify("AnimationStart",e),o.push(ex(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function Lbe(t,e){return t.sortNodePosition(e)}function aO(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>ex(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=ex(t,e,n);else{const s=typeof e=="function"?sg(t,e,n.custom):e;r=Promise.all(oO(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const Bbe=v2.length;function lO(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?lO(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Bbe;n++){const r=v2[n],s=t.props[r];(Cd(s)||s===!1)&&(e[r]=s)}return e}const jbe=[...b2].reverse(),Fbe=b2.length;function zbe(t){return e=>Promise.all(e.map(({animation:n,options:r})=>aO(t,n,r)))}function Hbe(t){let e=zbe(t),n=cO(),r=!0;const s=l=>(c,u)=>{var d;const h=sg(t,u,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function i(l){e=l(t)}function o(l){const{props:c}=t,u=lO(t.parent)||{},d=[],h=new Set;let f={},p=1/0;for(let g=0;g<Fbe;g++){const y=jbe[g],v=n[y],b=c[y]!==void 0?c[y]:u[y],C=Cd(b),_=y===l?v.isActive:null;_===!1&&(p=g);let k=b===u[y]&&b!==c[y]&&C;if(k&&r&&t.manuallyAnimateOnMount&&(k=!1),v.protectedKeys={...f},!v.isActive&&_===null||!b&&!v.prevProp||rg(b)||typeof b=="boolean")continue;const E=Vbe(v.prevProp,b);let A=E||y===l&&v.isActive&&!k&&C||g>p&&C,$=!1;const P=Array.isArray(b)?b:[b];let O=P.reduce(s(y),{});_===!1&&(O={});const{prevResolvedValues:R={}}=v,H={...R,...O},z=V=>{A=!0,h.has(V)&&($=!0,h.delete(V)),v.needsAnimating[V]=!0;const q=t.getValue(V);q&&(q.liveStyle=!1)};for(const V in H){const q=O[V],Q=R[V];if(f.hasOwnProperty(V))continue;let B=!1;m2(q)&&m2(Q)?B=!nM(q,Q):B=q!==Q,B?q!=null?z(V):h.add(V):q!==void 0&&h.has(V)?z(V):v.protectedKeys[V]=!0}v.prevProp=b,v.prevResolvedValues=O,v.isActive&&(f={...f,...O}),r&&t.blockInitialAnimation&&(A=!1),A&&(!(k&&E)||$)&&d.push(...P.map(V=>({animation:V,options:{type:y}})))}if(h.size){const g={};h.forEach(y=>{const v=t.getBaseTarget(y),b=t.getValue(y);b&&(b.liveStyle=!0),g[y]=v??null}),d.push({animation:g})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=cO(),r=!0}}}function Vbe(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!nM(e,t):!1}function Ea(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cO(){return{animate:Ea(!0),whileInView:Ea(),whileHover:Ea(),whileTap:Ea(),whileDrag:Ea(),whileFocus:Ea(),exit:Ea()}}class Eo{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Ube extends Eo{constructor(e){super(e),e.animationState||(e.animationState=Hbe(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();rg(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let qbe=0;class Wbe extends Eo{constructor(){super(...arguments),this.id=qbe++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Gbe={animation:{Feature:Ube},exit:{Feature:Wbe}},Cs={x:!1,y:!1};function uO(){return Cs.x||Cs.y}function Ybe(t,e,n){var r;if(t instanceof Element)return[t];if(typeof t=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function dO(t,e){const n=Ybe(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function hO(t){return e=>{e.pointerType==="touch"||uO()||t(e)}}function Kbe(t,e,n={}){const[r,s,i]=dO(t,n),o=hO(a=>{const{target:l}=a,c=e(a);if(!c||!l)return;const u=hO(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,s)});return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const tx=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Dd=new WeakSet;function fO(t){return e=>{e.key==="Enter"&&t(e)}}function nx(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Zbe=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=fO(()=>{if(Dd.has(n))return;nx(n,"down");const s=fO(()=>{nx(n,"up")}),i=()=>nx(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)},Xbe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qbe(t){return Xbe.has(t.tagName)||t.tabIndex!==-1}const pO=(t,e)=>e?t===e?!0:pO(t,e.parentElement):!1;function gO(t){return tx(t)&&!uO()}function Jbe(t,e,n={}){const[r,s,i]=dO(t,n),o=a=>{const l=a.currentTarget;if(!gO(a)||Dd.has(l))return;Dd.add(l);const c=e(a),u=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!gO(f)||!Dd.has(l))&&(Dd.delete(l),c&&c(f,{success:p}))},d=f=>{u(f,n.useGlobalTarget||pO(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{Qbe(a)||(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",c=>Zbe(c,s),s)}),i}function eve(t){return t==="x"||t==="y"?Cs[t]?null:(Cs[t]=!0,()=>{Cs[t]=!1}):Cs.x||Cs.y?null:(Cs.x=Cs.y=!0,()=>{Cs.x=Cs.y=!1})}function Rd(t){return{point:{x:t.pageX,y:t.pageY}}}const tve=t=>e=>tx(e)&&t(e,Rd(e));function Id(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function Nd(t,e,n,r){return Id(t,e,tve(n),r)}const mO=(t,e)=>Math.abs(t-e);function nve(t,e){const n=mO(t.x,e.x),r=mO(t.y,e.y);return Math.sqrt(n**2+r**2)}class yO{constructor(e,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=sx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=nve(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:p}=d,{timestamp:m}=_n;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;h||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=rx(h,this.transformPagePoint),St.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=sx(d.type==="pointercancel"?this.lastMoveEventInfo:rx(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,g),p&&p(d,g)},!tx(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Rd(e),a=rx(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=_n;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,sx(a,this.history)),this.removeListeners=Od(Nd(this.contextWindow,"pointermove",this.handlePointerMove),Nd(this.contextWindow,"pointerup",this.handlePointerUp),Nd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),_o(this.updatePoint)}}function rx(t,e){return e?{point:e(t.point)}:t}function bO(t,e){return{x:t.x-e.x,y:t.y-e.y}}function sx({point:t},e){return{point:t,delta:bO(t,vO(e)),offset:bO(t,rve(e)),velocity:sve(e,.1)}}function rve(t){return t[0]}function vO(t){return t[t.length-1]}function sve(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=vO(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>qs(e)));)n--;if(!r)return{x:0,y:0};const i=Mi(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function lc(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const xO=1e-4,ive=1-xO,ove=1+xO,wO=.01,ave=0-wO,lve=0+wO;function kr(t){return t.max-t.min}function cve(t,e,n){return Math.abs(t-e)<=n}function _O(t,e,n,r=.5){t.origin=r,t.originPoint=$t(e.min,e.max,t.origin),t.scale=kr(n)/kr(e),t.translate=$t(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ive&&t.scale<=ove||isNaN(t.scale))&&(t.scale=1),(t.translate>=ave&&t.translate<=lve||isNaN(t.translate))&&(t.translate=0)}function Ld(t,e,n,r){_O(t.x,e.x,n.x,r?r.originX:void 0),_O(t.y,e.y,n.y,r?r.originY:void 0)}function CO(t,e,n){t.min=n.min+e.min,t.max=t.min+kr(e)}function uve(t,e,n){CO(t.x,e.x,n.x),CO(t.y,e.y,n.y)}function SO(t,e,n){t.min=e.min-n.min,t.max=t.min+kr(e)}function Bd(t,e,n){SO(t.x,e.x,n.x),SO(t.y,e.y,n.y)}function dve(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?$t(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?$t(n,t,r.max):Math.min(t,n)),t}function EO(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function hve(t,{top:e,left:n,bottom:r,right:s}){return{x:EO(t.x,n,s),y:EO(t.y,e,r)}}function AO(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function fve(t,e){return{x:AO(t.x,e.x),y:AO(t.y,e.y)}}function pve(t,e){let n=.5;const r=kr(t),s=kr(e);return s>r?n=ac(e.min,e.max-r,t.min):r>s&&(n=ac(t.min,t.max-s,e.min)),Oi(0,1,n)}function gve(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const ix=.35;function mve(t=ix){return t===!1?t=0:t===!0&&(t=ix),{x:TO(t,"left","right"),y:TO(t,"top","bottom")}}function TO(t,e,n){return{min:kO(t,e),max:kO(t,n)}}function kO(t,e){return typeof t=="number"?t:t[e]||0}const MO=()=>({translate:0,scale:1,origin:0,originPoint:0}),cc=()=>({x:MO(),y:MO()}),OO=()=>({min:0,max:0}),zt=()=>({x:OO(),y:OO()});function Qr(t){return[t("x"),t("y")]}function $O({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function yve({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bve(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ox(t){return t===void 0||t===1}function ax({scale:t,scaleX:e,scaleY:n}){return!ox(t)||!ox(e)||!ox(n)}function Aa(t){return ax(t)||PO(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function PO(t){return DO(t.x)||DO(t.y)}function DO(t){return t&&t!=="0%"}function fg(t,e,n){const r=t-n,s=e*r;return n+s}function RO(t,e,n,r,s){return s!==void 0&&(t=fg(t,s,r)),fg(t,n,r)+e}function lx(t,e=0,n=1,r,s){t.min=RO(t.min,e,n,r,s),t.max=RO(t.max,e,n,r,s)}function IO(t,{x:e,y:n}){lx(t.x,e.translate,e.scale,e.originPoint),lx(t.y,n.translate,n.scale,n.originPoint)}const NO=.999999999999,LO=1.0000000000001;function vve(t,e,n,r=!1){const s=n.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&dc(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,IO(t,o)),r&&Aa(i.latestValues)&&dc(t,i.latestValues))}e.x<LO&&e.x>NO&&(e.x=1),e.y<LO&&e.y>NO&&(e.y=1)}function uc(t,e){t.min=t.min+e,t.max=t.max+e}function BO(t,e,n,r,s=.5){const i=$t(t.min,t.max,s);lx(t,e,n,i,r)}function dc(t,e){BO(t.x,e.x,e.scaleX,e.scale,e.originX),BO(t.y,e.y,e.scaleY,e.scale,e.originY)}function jO(t,e){return $O(bve(t.getBoundingClientRect(),e))}function xve(t,e,n){const r=jO(t,n),{scroll:s}=e;return s&&(uc(r.x,s.offset.x),uc(r.y,s.offset.y)),r}const FO=({current:t})=>t?t.ownerDocument.defaultView:null,wve=new WeakMap;class _ve{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=zt(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Rd(u).point)},i=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:p}=this.getProps();if(h&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eve(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qr(g=>{let y=this.getAxisMotionValue(g).get()||0;if(Gs.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[g];b&&(y=kr(b)*(parseFloat(y)/100))}}this.originPoint[g]=y}),p&&St.postRender(()=>p(u,d)),J2(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:g}=d;if(f&&this.currentDirection===null){this.currentDirection=Cve(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Qr(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new yO(e,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:FO(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&St.postRender(()=>i(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!pg(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=dve(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&lc(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=hve(s.layoutBox,n):this.constraints=!1,this.elastic=mve(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Qr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gve(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lc(e))return!1;const r=e.current;Ws(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=xve(r,s.root,this.visualElement.getTransformPagePoint());let o=fve(s.layout.layoutBox,i);if(n){const a=n(yve(o));this.hasMutatedConstraints=!!a,a&&(o=$O(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Qr(u=>{if(!pg(u,n,this.currentDirection))return;let d=l[u]||{};o&&(d={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return J2(this.visualElement,e),r.start(G2(e,r,0,n,this.visualElement,!1))}stopAnimation(){Qr(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Qr(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Qr(n=>{const{drag:r}=this.getProps();if(!pg(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(e[n]-$t(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!lc(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Qr(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=pve({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qr(o=>{if(!pg(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set($t(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;wve.set(this.visualElement,this);const e=this.visualElement.current,n=Nd(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();lc(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),St.read(r);const o=Id(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Qr(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ix,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function pg(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Cve(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Sve extends Eo{constructor(e){super(e),this.removeGroupControls=hr,this.removeListeners=hr,this.controls=new _ve(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||hr}unmount(){this.removeGroupControls(),this.removeListeners()}}const zO=t=>(e,n)=>{t&&St.postRender(()=>t(e,n))};class Eve extends Eo{constructor(){super(...arguments),this.removePointerDownListener=hr}onPointerDown(e){this.session=new yO(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:FO(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:zO(e),onStart:zO(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&St.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Nd(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const cx=x.createContext(null);function Ave(){const t=x.useContext(cx);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,s=x.useId();x.useEffect(()=>r(s),[]);const i=x.useCallback(()=>n&&n(s),[s,n]);return!e&&n?[!1,i]:[!0]}const HO=x.createContext({}),VO=x.createContext({}),gg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function UO(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const jd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Me.test(t))t=parseFloat(t);else return t;const n=UO(t,e.target.x),r=UO(t,e.target.y);return`${n}% ${r}%`}},Tve={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=So.parse(t);if(s.length>5)return r;const i=So.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=$t(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},mg={};function kve(t){Object.assign(mg,t)}const{schedule:ux,cancel:x8e}=sM(queueMicrotask,!1);class Mve extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;kve(Ove),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),gg.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||St.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ux.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function qO(t){const[e,n]=Ave(),r=x.useContext(HO);return S.jsx(Mve,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(VO),isPresent:e,safeToRemove:n})}const Ove={borderRadius:{...jd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:jd,borderTopRightRadius:jd,borderBottomLeftRadius:jd,borderBottomRightRadius:jd,boxShadow:Tve},WO=["TopLeft","TopRight","BottomLeft","BottomRight"],$ve=WO.length,GO=t=>typeof t=="string"?parseFloat(t):t,YO=t=>typeof t=="number"||Me.test(t);function Pve(t,e,n,r,s,i){s?(t.opacity=$t(0,n.opacity!==void 0?n.opacity:1,Dve(r)),t.opacityExit=$t(e.opacity!==void 0?e.opacity:1,0,Rve(r))):i&&(t.opacity=$t(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<$ve;o++){const a=`border${WO[o]}Radius`;let l=KO(e,a),c=KO(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||YO(l)===YO(c)?(t[a]=Math.max($t(GO(l),GO(c),r),0),(Gs.test(c)||Gs.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=$t(e.rotate||0,n.rotate||0,r))}function KO(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Dve=ZO(0,.5,dM),Rve=ZO(.5,.95,hr);function ZO(t,e,n){return r=>r<t?0:r>e?1:n(ac(t,e,r))}function XO(t,e){t.min=e.min,t.max=e.max}function Jr(t,e){XO(t.x,e.x),XO(t.y,e.y)}function QO(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function JO(t,e,n,r,s){return t-=e,t=fg(t,1/n,r),s!==void 0&&(t=fg(t,1/s,r)),t}function Ive(t,e=0,n=1,r=.5,s,i=t,o=t){if(Gs.test(e)&&(e=parseFloat(e),e=$t(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=$t(i.min,i.max,r);t===i&&(a-=e),t.min=JO(t.min,e,n,a,s),t.max=JO(t.max,e,n,a,s)}function e$(t,e,[n,r,s],i,o){Ive(t,e[n],e[r],e[s],e.scale,i,o)}const Nve=["x","scaleX","originX"],Lve=["y","scaleY","originY"];function t$(t,e,n,r){e$(t.x,e,Nve,n?n.x:void 0,r?r.x:void 0),e$(t.y,e,Lve,n?n.y:void 0,r?r.y:void 0)}function n$(t){return t.translate===0&&t.scale===1}function r$(t){return n$(t.x)&&n$(t.y)}function s$(t,e){return t.min===e.min&&t.max===e.max}function Bve(t,e){return s$(t.x,e.x)&&s$(t.y,e.y)}function i$(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function o$(t,e){return i$(t.x,e.x)&&i$(t.y,e.y)}function a$(t){return kr(t.x)/kr(t.y)}function l$(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class jve{constructor(){this.members=[]}add(e){Y2(this.members,e),e.scheduleRender()}remove(e){if(K2(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Fve(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const zve=(t,e)=>t.depth-e.depth;class Hve{constructor(){this.children=[],this.isDirty=!1}add(e){Y2(this.children,e),this.isDirty=!0}remove(e){K2(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(zve),this.isDirty=!1,this.children.forEach(e)}}function yg(t){const e=jn(t)?t.get():t;return Mbe(e)?e.toValue():e}function Vve(t,e){const n=Ys.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(_o(r),t(i-e))};return St.read(r,!0),()=>_o(r)}function Uve(t){return t instanceof SVGElement&&t.tagName!=="svg"}function qve(t,e,n){const r=jn(t)?t:Pd(t);return r.start(G2("",r,e,n)),r.animation}const Ta={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Fd=typeof window<"u"&&window.MotionDebug!==void 0,dx=["","X","Y","Z"],Wve={visibility:"hidden"},c$=1e3;let Gve=0;function hx(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function u$(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=iO(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",St,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&u$(r)}function d$({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Gve++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Fd&&(Ta.totalNodes=Ta.resolvedTargetDeltas=Ta.recalculatedProjection=0),this.nodes.forEach(Zve),this.nodes.forEach(t2e),this.nodes.forEach(n2e),this.nodes.forEach(Xve),Fd&&window.MotionDebug.record(Ta)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hve)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Z2),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Uve(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let d;const h=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Vve(h,250),gg.hasAnimatedSinceResize&&(gg.hasAnimatedSinceResize=!1,this.nodes.forEach(f$))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||a2e,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!o$(this.targetLayout,p)||f,b=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const C={...x2(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else h||f$(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,_o(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r2e),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&u$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(h$);return}this.isUpdating||this.nodes.forEach(Jve),this.isUpdating=!1,this.nodes.forEach(e2e),this.nodes.forEach(Yve),this.nodes.forEach(Kve),this.clearAllSnapshots();const a=Ys.now();_n.delta=Oi(0,1e3/60,a-_n.timestamp),_n.timestamp=a,_n.isProcessing=!0,w2.update.process(_n),w2.preRender.process(_n),w2.render.process(_n),_n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ux.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qve),this.sharedNodes.forEach(s2e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,St.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){St.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=zt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!r$(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||Aa(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),l2e(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return zt();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(c2e))){const{scroll:u}=this.root;u&&(uc(l.x,u.offset.x),uc(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=zt();if(Jr(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&Jr(l,o),uc(l.x,d.offset.x),uc(l.y,d.offset.y))}return l}applyTransform(o,a=!1){const l=zt();Jr(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&dc(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Aa(u.latestValues)&&dc(l,u.latestValues)}return Aa(this.latestValues)&&dc(l,this.latestValues),l}removeTransform(o){const a=zt();Jr(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Aa(c.latestValues))continue;ax(c.latestValues)&&c.updateSnapshot();const u=zt(),d=c.measurePageBox();Jr(u,d),t$(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Aa(this.latestValues)&&t$(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=_n.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),Bd(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Jr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=zt(),this.targetWithTransforms=zt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uve(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Jr(this.target,this.layout.layoutBox),IO(this.target,this.targetDelta)):Jr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),Bd(this.relativeTargetOrigin,this.target,f.target),Jr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Fd&&Ta.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ax(this.parent.latestValues)||PO(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===_n.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Jr(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;vve(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=zt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(QO(this.prevProjectionDelta.x,this.projectionDelta.x),QO(this.prevProjectionDelta.y,this.projectionDelta.y)),Ld(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!l$(this.projectionDelta.x,this.prevProjectionDelta.x)||!l$(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Fd&&Ta.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cc(),this.projectionDelta=cc(),this.projectionDeltaWithTransform=cc()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=cc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=zt(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,g=this.getStack(),y=!g||g.members.length<=1,v=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(o2e));this.animationProgress=0;let b;this.mixTargetDelta=C=>{const _=C/1e3;p$(d.x,o.x,_),p$(d.y,o.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bd(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),i2e(this.relativeTarget,this.relativeTargetOrigin,h,_),b&&Bve(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=zt()),Jr(b,this.relativeTarget)),m&&(this.animationValues=u,Pve(u,c,this.latestValues,_,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_o(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=St.update(()=>{gg.hasAnimatedSinceResize=!0,this.currentAnimation=qve(0,c$,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(c$),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&v$(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||zt();const d=kr(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=kr(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Jr(a,l),dc(a,u),Ld(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new jve),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&hx("z",o,c,this.animationValues);for(let u=0;u<dx.length;u++)hx(`rotate${dx[u]}`,o,c,this.animationValues),hx(`skew${dx[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Wve;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=yg(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=yg(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Aa(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Fve(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in mg){if(h[m]===void 0)continue;const{correct:g,applyTo:y}=mg[m],v=c.transform==="none"?h[m]:g(h[m],d);if(y){const b=y.length;for(let C=0;C<b;C++)c[y[C]]=v}else c[m]=v}return this.options.layoutId&&(c.pointerEvents=d===this?yg(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(h$),this.root.sharedNodes.clear()}}}function Yve(t){t.updateLayout()}function Kve(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;i==="size"?Qr(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=kr(h);h.min=r[d].min,h.max=h.min+f}):v$(i,n.layoutBox,r)&&Qr(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=kr(r[d]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+f)});const a=cc();Ld(a,r,n.layoutBox);const l=cc();o?Ld(l,t.applyTransform(s,!0),n.measuredBox):Ld(l,r,n.layoutBox);const c=!r$(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=zt();Bd(p,n.layoutBox,h.layoutBox);const m=zt();Bd(m,r,f.layoutBox),o$(p,m)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Zve(t){Fd&&Ta.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Xve(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Qve(t){t.clearSnapshot()}function h$(t){t.clearMeasurements()}function Jve(t){t.isLayoutDirty=!1}function e2e(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function f$(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function t2e(t){t.resolveTargetDelta()}function n2e(t){t.calcProjection()}function r2e(t){t.resetSkewAndRotation()}function s2e(t){t.removeLeadSnapshot()}function p$(t,e,n){t.translate=$t(e.translate,0,n),t.scale=$t(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function g$(t,e,n,r){t.min=$t(e.min,n.min,r),t.max=$t(e.max,n.max,r)}function i2e(t,e,n,r){g$(t.x,e.x,n.x,r),g$(t.y,e.y,n.y,r)}function o2e(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const a2e={duration:.45,ease:[.4,0,.1,1]},m$=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),y$=m$("applewebkit/")&&!m$("chrome/")?Math.round:hr;function b$(t){t.min=y$(t.min),t.max=y$(t.max)}function l2e(t){b$(t.x),b$(t.y)}function v$(t,e,n){return t==="position"||t==="preserve-aspect"&&!cve(a$(e),a$(n),.2)}function c2e(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const u2e=d$({attachResizeListener:(t,e)=>Id(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fx={current:void 0},x$=d$({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!fx.current){const t=new u2e({});t.mount(window),t.setOptions({layoutScroll:!0}),fx.current=t}return fx.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),d2e={pan:{Feature:Eve},drag:{Feature:Sve,ProjectionNode:x$,MeasureLayout:qO}};function w$(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&St.postRender(()=>i(e,Rd(e)))}class h2e extends Eo{mount(){const{current:e}=this.node;e&&(this.unmount=Kbe(e,n=>(w$(this.node,n,"Start"),r=>w$(this.node,r,"End"))))}unmount(){}}class f2e extends Eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Od(Id(this.node.current,"focus",()=>this.onFocus()),Id(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _$(t,e,n){const{props:r}=t;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&St.postRender(()=>i(e,Rd(e)))}class p2e extends Eo{mount(){const{current:e}=this.node;e&&(this.unmount=Jbe(e,n=>(_$(this.node,n,"Start"),(r,{success:s})=>_$(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const px=new WeakMap,gx=new WeakMap,g2e=t=>{const e=px.get(t.target);e&&e(t)},m2e=t=>{t.forEach(g2e)};function y2e({root:t,...e}){const n=t||document;gx.has(n)||gx.set(n,{});const r=gx.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(m2e,{root:t,...e})),r[s]}function b2e(t,e,n){const r=y2e(e);return px.set(t,n),r.observe(t),()=>{px.delete(t),r.unobserve(t)}}const v2e={some:0,all:1};class x2e extends Eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:v2e[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return b2e(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(w2e(e,n))&&this.startObserver()}unmount(){}}function w2e({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const _2e={inView:{Feature:x2e},tap:{Feature:p2e},focus:{Feature:f2e},hover:{Feature:h2e}},C2e={layout:{ProjectionNode:x$,MeasureLayout:qO}},C$=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),bg=x.createContext({}),mx=typeof window<"u",S$=mx?x.useLayoutEffect:x.useEffect,E$=x.createContext({strict:!1});function S2e(t,e,n,r,s){var i,o;const{visualElement:a}=x.useContext(bg),l=x.useContext(E$),c=x.useContext(cx),u=x.useContext(C$).reducedMotion,d=x.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,f=x.useContext(VO);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&E2e(d.current,n,s,f);const p=x.useRef(!1);x.useInsertionEffect(()=>{h&&p.current&&h.update(n,c)});const m=n[sO],g=x.useRef(!!m&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return S$(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),ux.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())}),x.useEffect(()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,m)}),g.current=!1))}),h}function E2e(t,e,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:A$(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&lc(a),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function A$(t){if(t)return t.options.allowProjection!==!1?t.projection:A$(t.parent)}function A2e(t,e,n){return x.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):lc(n)&&(n.current=r))},[e])}function vg(t){return rg(t.animate)||v2.some(e=>Cd(t[e]))}function T$(t){return!!(vg(t)||t.variants)}function T2e(t,e){if(vg(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Cd(n)?n:void 0,animate:Cd(r)?r:void 0}}return t.inherit!==!1?e:{}}function k2e(t){const{initial:e,animate:n}=T2e(t,x.useContext(bg));return x.useMemo(()=>({initial:e,animate:n}),[k$(e),k$(n)])}function k$(t){return Array.isArray(t)?t.join(" "):t}const M$={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},hc={};for(const t in M$)hc[t]={isEnabled:e=>M$[t].some(n=>!!e[n])};function M2e(t){for(const e in t)hc[e]={...hc[e],...t[e]}}const O2e=Symbol.for("motionComponentSymbol");function $2e({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:s}){t&&M2e(t);function i(a,l){let c;const u={...x.useContext(C$),...a,layoutId:P2e(a)},{isStatic:d}=u,h=k2e(a),f=r(a,d);if(!d&&mx){D2e(u,t);const p=R2e(u);c=p.MeasureLayout,h.visualElement=S2e(s,f,u,e,p.ProjectionNode)}return S.jsxs(bg.Provider,{value:h,children:[c&&h.visualElement?S.jsx(c,{visualElement:h.visualElement,...u}):null,n(s,a,A2e(f,h.visualElement,l),f,d,h.visualElement)]})}const o=x.forwardRef(i);return o[O2e]=s,o}function P2e({layoutId:t}){const e=x.useContext(HO).id;return e&&t!==void 0?e+"-"+t:t}function D2e(t,e){const n=x.useContext(E$).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?rc(!1,r):Ws(!1,r)}}function R2e(t){const{drag:e,layout:n}=hc;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const I2e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yx(t){return typeof t!="string"||t.includes("-")?!1:!!(I2e.indexOf(t)>-1||/[A-Z]/u.test(t))}function O$(t,{style:e,vars:n},r,s){Object.assign(t.style,e,s&&s.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const $$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function P$(t,e,n,r){O$(t,e,void 0,r);for(const s in e.attrs)t.setAttribute($$.has(s)?s:Q2(s),e.attrs[s])}function D$(t,{layout:e,layoutId:n}){return _a.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!mg[t]||t==="opacity")}function bx(t,e,n){var r;const{style:s}=t,i={};for(const o in s)(jn(s[o])||e.style&&jn(e.style[o])||D$(o,t)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function R$(t,e,n){const r=bx(t,e,n);for(const s in t)if(jn(t[s])||jn(e[s])){const i=Sd.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}function I$(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}function N2e({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,s,i){const o={latestValues:L2e(r,s,i,t),renderState:e()};return n&&(o.mount=a=>n(r,a,o)),o}const N$=t=>(e,n)=>{const r=x.useContext(bg),s=x.useContext(cx),i=()=>N2e(t,e,r,s);return n?i():I$(i)};function L2e(t,e,n,r){const s={},i=r(t,{});for(const h in i)s[h]=yg(i[h]);let{initial:o,animate:a}=t;const l=vg(t),c=T$(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!rg(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=y2(t,h[f]);if(p){const{transitionEnd:m,transition:g,...y}=p;for(const v in y){let b=y[v];if(Array.isArray(b)){const C=u?b.length-1:0;b=b[C]}b!==null&&(s[v]=b)}for(const v in m)s[v]=m[v]}}}return s}const vx=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),L$=()=>({...vx(),attrs:{}}),B$=(t,e)=>e&&typeof t=="number"?e.transform(t):t,B2e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},j2e=Sd.length;function F2e(t,e,n){let r="",s=!0;for(let i=0;i<j2e;i++){const o=Sd[i],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=B$(a,D2[o]);if(!l){s=!1;const u=B2e[o]||o;r+=`${u}(${c}) `}n&&(e[o]=c)}}return r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function xx(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(_a.has(l)){o=!0;continue}else if(mM(l)){s[l]=c;continue}else{const u=B$(c,D2[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(e.transform||(o||n?r.transform=F2e(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function j$(t,e,n){return typeof t=="string"?t:Me.transform(e+n*t)}function z2e(t,e,n){const r=j$(e,t.x,t.width),s=j$(n,t.y,t.height);return`${r} ${s}`}const H2e={offset:"stroke-dashoffset",array:"stroke-dasharray"},V2e={offset:"strokeDashoffset",array:"strokeDasharray"};function U2e(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?H2e:V2e;t[i.offset]=Me.transform(-r);const o=Me.transform(e),a=Me.transform(n);t[i.array]=`${o} ${a}`}function wx(t,{attrX:e,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(xx(t,c,d),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f,dimensions:p}=t;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(s!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=z2e(p,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&U2e(h,o,a,l,!1)}const _x=t=>typeof t=="string"&&t.toLowerCase()==="svg",q2e={useVisualState:N$({scrapeMotionValuesFromProps:R$,createRenderState:L$,onMount:(t,e,{renderState:n,latestValues:r})=>{St.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),St.render(()=>{wx(n,r,_x(e.tagName),t.transformTemplate),P$(e,n)})}})},W2e={useVisualState:N$({scrapeMotionValuesFromProps:bx,createRenderState:vx})};function F$(t,e,n){for(const r in e)!jn(e[r])&&!D$(r,n)&&(t[r]=e[r])}function G2e({transformTemplate:t},e){return x.useMemo(()=>{const n=vx();return xx(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Y2e(t,e){const n=t.style||{},r={};return F$(r,n,t),Object.assign(r,G2e(t,e)),r}function K2e(t,e){const n={},r=Y2e(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const Z2e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function xg(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Z2e.has(t)}let z$=t=>!xg(t);function X2e(t){t&&(z$=e=>e.startsWith("on")?!xg(e):t(e))}try{X2e(require("@emotion/is-prop-valid").default)}catch{}function Q2e(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||(z$(s)||n===!0&&xg(s)||!e&&!xg(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}function J2e(t,e,n,r){const s=x.useMemo(()=>{const i=L$();return wx(i,e,_x(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};F$(i,t.style,t),s.style={...i,...s.style}}return s}function exe(t=!1){return(n,r,s,{latestValues:i},o)=>{const l=(yx(n)?J2e:K2e)(r,i,o,n),c=Q2e(r,typeof n=="string",t),u=n!==x.Fragment?{...c,...l,ref:s}:{},{children:d}=r,h=x.useMemo(()=>jn(d)?d.get():d,[d]);return x.createElement(n,{...u,children:h})}}function txe(t,e){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...yx(r)?q2e:W2e,preloadedFeatures:t,useRender:exe(s),createVisualElement:e,Component:r};return $2e(o)}}const Cx={current:null},H$={current:!1};function nxe(){if(H$.current=!0,!!mx)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Cx.current=t.matches;t.addListener(e),e()}else Cx.current=!1}function rxe(t,e,n){for(const r in e){const s=e[r],i=n[r];if(jn(s))t.addValue(r,s),process.env.NODE_ENV==="development"&&ng(s.version==="11.15.0",`Attempting to mix Motion versions ${s.version} with 11.15.0 may not work as expected.`);else if(jn(i))t.addValue(r,Pd(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(r);t.addValue(r,Pd(o!==void 0?o:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const V$=new WeakMap,sxe=[...CM,Bn,So],ixe=t=>sxe.find(_M(t)),U$=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class oxe{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=T2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Ys.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,St.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=vg(n),this.isVariantNode=T$(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&jn(f)&&f.set(l[h],!1)}}mount(e){this.current=e,V$.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),H$.current||nxe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Cx.current,process.env.NODE_ENV!=="production"&&ng(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){V$.delete(this.current),this.projection&&this.projection.unmount(),_o(this.notifyUpdate),_o(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=_a.has(e),s=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&St.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in hc){const n=hc[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<U$.length;r++){const s=U$[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=e[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=rxe(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Pd(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(pM(s)||fM(s))?s=parseFloat(s):!ixe(s)&&So.test(n)&&(s=RM(e,n)),this.setBaseTarget(e,jn(s)?s.get():s)),jn(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=y2(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[e])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!jn(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Z2),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class q$ extends oxe{constructor(){super(...arguments),this.KeyframeResolver=IM}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;jn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function axe(t){return window.getComputedStyle(t)}class lxe extends q${constructor(){super(...arguments),this.type="html",this.renderInstance=O$}readValueFromInstance(e,n){if(_a.has(n)){const r=R2(n);return r&&r.default||0}else{const r=axe(e),s=(mM(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return jO(e,n)}build(e,n,r){xx(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return bx(e,n,r)}}class cxe extends q${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_a.has(n)){const r=R2(n);return r&&r.default||0}return n=$$.has(n)?n:Q2(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return R$(e,n,r)}build(e,n,r){wx(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,s){P$(e,n,r,s)}mount(e){this.isSVGTag=_x(e.tagName),super.mount(e)}}const uxe=(t,e)=>yx(t)?new cxe(e):new lxe(e,{allowProjection:t!==x.Fragment}),dxe=txe({...Gbe,..._2e,...d2e,...C2e},uxe),hxe=Y1e(dxe);function fxe(t){t.values.forEach(e=>e.stop())}function Sx(t,e){[...e].reverse().forEach(r=>{const s=t.getVariant(r);s&&X2(t,s),t.variantChildren&&t.variantChildren.forEach(i=>{Sx(i,e)})})}function pxe(t,e){if(Array.isArray(e))return Sx(t,e);if(typeof e=="string")return Sx(t,[e]);X2(t,e)}function gxe(){let t=!1;const e=new Set,n={subscribe(r){return e.add(r),()=>void e.delete(r)},start(r,s){Ws(t,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const i=[];return e.forEach(o=>{i.push(aO(o,r,{transitionOverride:s}))}),Promise.all(i)},set(r){return Ws(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),e.forEach(s=>{pxe(s,r)})},stop(){e.forEach(r=>{fxe(r)})},mount(){return t=!0,()=>{t=!1,n.stop()}}};return n}function mxe(){const t=I$(gxe);return S$(t.mount,[]),t}const yxe=mxe,bxe={Dimmed:"_Dimmed_dueb9_2",Wrapper:"_Wrapper_dueb9_21",open:"_open_dueb9_28",top:"_top_dueb9_31",bottom:"_bottom_dueb9_38",left:"_left_dueb9_46",right:"_right_dueb9_53"},vxe={},Ex=x.createContext(vxe),W$=qe.bind(bxe),xxe={Root:t=>{const{children:e,...n}=t,r={...n};return x.useEffect(()=>(document.body.style.overflow=n.open?"hidden":"",()=>{document.body.style.overflow=""}),[n.open]),S.jsx(Ex,{value:r,children:e})},Content:t=>{const{children:e,...n}=t,{open:r,dragElastic:s,dragConstraints:i,drag:o=!0,direction:a="bottom",dragDirectionLock:l=!0,dragMomentum:c=!1,handleClose:u}=x.use(Ex),d=yxe(),h=x.useRef(null),[f,p]=x.useState(0);x.useEffect(()=>{window!=null&&p(window.innerHeight)},[]);const g={bottom:{initial:{y:"100%",x:0},animate:{y:r?0:"100%"},drag:"y",dragElastic:{top:.05,bottom:1},dragConstraints:{top:0,bottom:f},shouldClose:b=>b.offset.y>20},top:{initial:{y:"-100%",x:0},animate:{y:r?0:"-100%"},drag:"y",dragElastic:{top:1,bottom:.05},dragConstraints:{bottom:0},shouldClose:b=>b.offset.y<-20},left:{initial:{x:"-100%",y:0},animate:{x:r?0:"-100%"},drag:"x",dragElastic:{left:1,right:.05},dragConstraints:{right:0},shouldClose:b=>b.offset.x<-20},right:{initial:{x:"100%",y:0},animate:{x:r?0:"100%"},drag:"x",dragElastic:{left:.05,right:1},dragConstraints:{left:0},shouldClose:b=>b.offset.x>20}}[a],y={...g,dragDirectionLock:l,dragMomentum:c,drag:o&&g.drag,dragElastic:s??g.dragElastic,dragConstraints:i??g.dragConstraints,animate:{...g.animate,transition:{type:"tween",duration:.25,ease:"easeInOut"}}},v=x.useCallback((b,C)=>{g.shouldClose(C)?u==null||u():d.start("visible")},[d,g,u]);return S.jsx(hxe.div,{...n,...y,ref:h,className:W$("Wrapper",n.className,a,{open:r}),onDragEnd:v,children:e})},Dimmed:()=>{const{open:t,handleClose:e}=x.use(Ex);return t?S.jsx("div",{className:W$("Dimmed"),onClick:e}):null}},wxe=t=>{const{children:e,dimmedColor:n,onClose:r}=t,s={transparent:"transparent",light:"#00000033",dark:"#0000007a"};return S.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100dvw",height:"100dvh",zIndex:9999,backgroundColor:s[n]},onClick:r,children:e})},_xe=t=>{const{children:e,visible:n,dimmedColor:r="dark",selector:s="body",onClose:i}=t,[o,a]=x.useState(null);return x.useEffect(()=>{a(document.querySelector(s))},[s]),S.jsx(x.Fragment,{children:o&&n?Pr.createPortal(S.jsx(wxe,{onClose:i,dimmedColor:r,children:e}),o):S.jsx(x.Fragment,{})})},Cxe={id:"",bodyScroll:!1,dimmedDisabled:!1},Ax=x.createContext(Cxe),Sxe={Layer:"_Layer_14dap_2",bodyScroll:"_bodyScroll_14dap_2",Contents:"_Contents_14dap_13",Dimmed:"_Dimmed_14dap_23"},Tx=qe.bind(Sxe),Exe={Root:t=>{const{children:e,dimmedDisabled:n=!1,...r}=t,s={...r,dimmedDisabled:n};return S.jsx(Ax,{value:s,children:e})},Layer:t=>{const{children:e,...n}=t,{id:r,bodyScroll:s}=x.useContext(Ax);return S.jsx("div",{...n,id:r,popover:"manual",className:Tx("Layer",n.className,{bodyScroll:s}),children:e})},Dimmed:t=>{const{onClick:e,...n}=t,{id:r,dimmedDisabled:s}=x.useContext(Ax);return S.jsx("button",{...n,className:Tx("Dimmed",n.className),...!s&&{onClick:e,popoverTargetAction:"hide",popoverTarget:r}})},Contents:t=>{const{children:e,...n}=t;return S.jsx("div",{...n,className:Tx("Contents",n.className),children:e})},usePopup:()=>{const t=x.useId(),e=x.useRef(null),n=a=>({popoverTargetAction:a,popoverTarget:t}),r={hide:n("hide"),toggle:n("toggle"),show:n("show")},s=x.useCallback(()=>{var a;return(a=e.current)==null?void 0:a.showPopover()},[]),i=x.useCallback(()=>{var a;return(a=e.current)==null?void 0:a.hidePopover()},[]),o=x.useCallback(()=>{var a;return(a=e.current)==null?void 0:a.togglePopover()},[]);return{id:t,controlAttr:r,ref:e,show:s,hide:i,toggle:o}}},Axe={InputWrapper:"_InputWrapper_1xjez_2",row:"_row_1xjez_17",contained:"_contained_1xjez_21",large:"_large_1xjez_24",error:"_error_1xjez_30",warning:"_warning_1xjez_33",success:"_success_1xjez_36",focused:"_focused_1xjez_39",disabled:"_disabled_1xjez_42",Input:"_Input_1xjez_2",readOnly:"_readOnly_1xjez_70",TimeRange:"_TimeRange_1xjez_80",Colon:"_Colon_1xjez_86",Separator:"_Separator_1xjez_101",HelperText:"_HelperText_1xjez_116",TimeInputLabel:"_TimeInputLabel_1xjez_128",small:"_small_1xjez_152",TimeInputRoot:"_TimeInputRoot_1xjez_162"},Txe={value:"",variant:"outlined",focused:!1,direction:"column"},ka=x.createContext(Txe),kxe=()=>{const t={inactive:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},focused:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`},readOnly:{backgroundColor:"transparent",color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`},error:{backgroundColor:"transparent",color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:`var(--componentTextfieldOutline, ${T.light.componentTextfieldOutline})`}},e={inactive:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent"},focused:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:`var(--actionAction, ${T.light.actionAction})`},readOnly:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textPrimary, ${T.light.textPrimary})`,placeholder:`var(--textTertiary, ${T.light.textTertiary})`,borderColor:"transparent"},disabled:{backgroundColor:`var(--actionDisabledBackground, ${T.light.actionDisabledBackground})`,color:`var(--textDisabled, ${T.light.textDisabled})`,placeholder:`var(--textDisabled, ${T.light.textDisabled})`,borderColor:"transparent"},error:{backgroundColor:`var(--componentTextfieldFilled, ${T.light.componentTextfieldFilled})`,color:`var(--textError, ${T.light.textError})`,placeholder:`var(--textError, ${T.light.textError})`,borderColor:"transparent"}};return{outlined:t,contained:e}},Ma=qe.bind(Axe),Mxe={Root:t=>{const{children:e,className:n,value:r="",size:s="small",disabled:i=!1,readOnly:o=!1,focused:a,variant:l="outlined",direction:c="column",flexBasis:u,status:d,onChange:h}=t,[f,p]=x.useState(r),[m,g]=x.useState(),[y,v]=x.useState(a),b=x.useRef([]),C=(O,R)=>{if(!O)return"";const H=parseInt(O);return H<=R?String(H).padStart(2,"0"):""},_=x.useCallback(()=>{i||o||v(!0)},[i,o]),k=x.useCallback((O,R,H)=>{const z=C(O,R);p(z),b.current[H].value=z,v(!1)},[]),E=x.useCallback((O,R)=>{const z=b.current[R].value;switch(O.key){case"Backspace":z===""&&R>0&&(O.preventDefault(),b.current[R-1].focus());break;case"Tab":if(O.shiftKey)R>0&&(O.preventDefault(),b.current[R-1].focus());else if(R<3){if(O.preventDefault(),z&&z.length===1){const j=R%2===0?23:59;k(z,j,R)}b.current[R+1].focus()}break}},[k]),A=x.useCallback(()=>{const O=b.current.map(z=>z.value),R=`${O[0]}:${O[1]}`,H=`${O[2]}:${O[3]}`;parseInt(O[2]+O[3])<=parseInt(O[0]+O[1])?g("error"):(g(void 0),h&&h({start:R,end:H}))},[h]),$=x.useCallback((O,R)=>{const H=O.target.value;if(p(H),H&&H.length===2&&R<3){const z=R%2===0?23:59;parseInt(H)>z&&(b.current[R].value=z.toString()),b.current[R+1].focus()}b.current.every(z=>z.value)?A():b.current.every(z=>z.value==="")&&(h&&h({start:"",end:""}),g(void 0))},[A,h]),P=x.useMemo(()=>({value:f,disabled:i,readOnly:o,inputRefs:b,status:d??m,size:s,variant:l,focused:y,direction:c,flexBasis:u,onChange:h,handleChange:$,handleBlur:k,handleKeyDown:E,handleFocus:_}),[f,i,o,s,l,y,c,u,d,m,h,$,k,E,_]);return x.useEffect(()=>{v(a)},[a]),S.jsx(ka.Provider,{value:P,children:S.jsx("div",{className:Ma("TimeInputRoot",n,c),children:e})})},Label:t=>{const{className:e,children:n,focusedColor:r}=t,{focused:s,status:i,size:o,direction:a,flexBasis:l}=x.use(ka);return S.jsx("span",{className:Ma("TimeInputLabel",e,i,o,a,{focused:s}),style:{color:s?r:void 0,...l?{"--basis":l}:{}},children:n})},Input:t=>{const{index:e,placeholder:n,...r}=t,{inputRefs:s,status:i,disabled:o,readOnly:a,focused:l,handleChange:c,handleBlur:u,handleKeyDown:d,handleFocus:h}=x.use(ka),f=e%2===0?23:59,p=m=>{var v;const g=m.target.value,y=parseInt(g);if(!g||isNaN(y)){c==null||c(m,e);return}y>f&&(m.target.value=f.toString()),c==null||c(m,e),g.length===2&&e<3&&((v=s==null?void 0:s.current[e+1])==null||v.focus())};return S.jsx("input",{...r,className:Ma("Input",r.className,i,{disabled:o,readOnly:a,focused:l}),type:"number",ref:m=>{m&&(s.current[e]=m)},onChange:p,onBlur:()=>u==null?void 0:u(s.current[e].value,f,e),onFocus:h,placeholder:n,onKeyDown:m=>d==null?void 0:d(m,e),readOnly:a,disabled:o,min:0,max:f})},TimeRange:t=>{const{children:e,...n}=t;return S.jsx("div",{...n,className:Ma("TimeRange",n.className),children:e})},Colon:t=>{const{...e}=t,{status:n,disabled:r}=x.use(ka);return S.jsx("span",{...e,className:Ma("Colon",e.className,n,{disabled:r}),children:":"})},Separator:t=>{const{...e}=t,{status:n,disabled:r}=x.use(ka);return S.jsx("span",{...e,className:Ma("Separator",e.className,n,{disabled:r}),children:"-"})},HelperText:t=>{const{children:e,...n}=t,{status:r,disabled:s}=x.use(ka);return!r||s?null:S.jsx(La,{...n,status:r,children:e??"종료 시간이 시작 시간보다 커야 합니다."})},InputWrapper:t=>{const{children:e,...n}=t,{size:r,variant:s,status:i,focused:o,disabled:a,direction:l}=x.use(ka),u=kxe()[s??"outlined"];return S.jsx("div",{...n,className:Ma("InputWrapper",n.className,r,s,i,l,{focused:o,disabled:a}),style:{"--background-color":a?u.disabled.backgroundColor:u.inactive.backgroundColor,"--border-color":o?u.focused.borderColor:u.inactive.borderColor,"--color":a?u.disabled.color:u.inactive.color},children:e})}},Oxe={List:"_List_qifih_2",s:"_s_qifih_8",row:"_row_qifih_8",m:"_m_qifih_11",l:"_l_qifih_14",column:"_column_qifih_17",TextWrapper:"_TextWrapper_qifih_20",Title:"_Title_qifih_32",text:"_text_qifih_39",contentsHeader:"_contentsHeader_qifih_54",Label:"_Label_qifih_59"},zd=qe.bind(Oxe),$xe=t=>{const{direction:e="row",type:n="default",size:r="m",icon:s,title:i,label:o,children:a,...l}=t,c=(i==null?void 0:i.value)||(o==null?void 0:o.value);if(n!=="default"&&s)throw new Error("text 또는 contentsHeader 타입에서는 icon을 사용할 수 없습니다.");if(n==="default"&&i)throw new Error("default 타입에서는 title을 사용할 수 없습니다.");if(!o)throw new Error("label이 필요합니다.");return S.jsxs("div",{...l,className:zd("List",l.className,r,e),children:[c&&S.jsxs("div",{className:zd("TextWrapper",e),children:[(i==null?void 0:i.value)&&S.jsx("div",{...i,className:zd("Title",i.className,n,r,e),children:i==null?void 0:i.value}),(o==null?void 0:o.value)&&S.jsx("div",{...o,className:zd("Label",o.className,r),children:o==null?void 0:o.value})]}),a,n==="default"&&S.jsx(Ke,{...s,name:(s==null?void 0:s.name)??"ExpandMore",size:(s==null?void 0:s.size)??24,className:zd("Icon",s==null?void 0:s.className)})]})},Ao={xxs:40,xs:48,sm:56,s:72,m:96,l:120,xl:160,xxl:192},G$={size:"m",aspectRatio:"1/1",variant:"square",objectFit:"cover",isReload:!1},fc=x.createContext(G$),Pxe={Wrapper:"_Wrapper_2o1lh_2",ImageWrapper:"_ImageWrapper_2o1lh_11",Image:"_Image_2o1lh_11",isLoading:"_isLoading_2o1lh_20","skeleton-loading":"_skeleton-loading_2o1lh_1",square:"_square_2o1lh_23",circle:"_circle_2o1lh_26",cover:"_cover_2o1lh_29",contain:"_contain_2o1lh_32",UploadInput:"_UploadInput_2o1lh_35",EmptyImage:"_EmptyImage_2o1lh_38",Text:"_Text_2o1lh_55",ErrorImage:"_ErrorImage_2o1lh_61",EditButton:"_EditButton_2o1lh_78",FileInput:"_FileInput_2o1lh_98",RemoveButton:"_RemoveButton_2o1lh_101"},Ss=qe.bind(Pxe),wg=t=>{const{index:e,iconSize:n,...r}=t,{size:s,variant:i,onRemove:o}=x.use(fc),a=x.useCallback(c=>c?typeof c=="string"?Ao[c]:c:0,[]),l=x.useMemo(()=>{const c=a(s);return i==="circle"?{iconSize:n||(typeof s!="string"?24:c<=72?16:c<=96?20:24),borderWidth:c<=72?2:3,exactSize:c<=72?24:c<=96?32:c<=120?40:48}:{iconSize:n||(c<=72?16:c<=96?20:24),exactSize:c<=96?24:c<=160?40:48}},[i,s,n,a]);return S.jsx("div",{...r,className:Ss("RemoveButton",r.className,i),style:{"--borderWidth":`${l.borderWidth}px`,"--exactSize":`${l.exactSize}px`,...r.style},onClick:c=>{var u;(u=t.onClick)==null||u.call(t,c),o==null||o(e)},children:S.jsx(Ke,{name:"Close",size:l.iconSize,color:"white"})})},_g=t=>{const{index:e,iconName:n="ModeEdit",...r}=t,{size:s,variant:i,onEdit:o}=x.use(fc),a=x.useId(),l=x.useCallback(u=>u?typeof u=="string"?Ao[u]:u:0,[]),c=x.useMemo(()=>{const u=l(s);return{iconSize:t.iconSize||(typeof s!="string"?24:u<=72?16:u<=96?20:24),borderWidth:u<=72?2:3,translate:u<=120?8:12,exactSize:u<=72?24:u<=96?32:u<=120?40:48}},[s,t.iconSize,l]);return S.jsxs("label",{htmlFor:a,children:[S.jsx("div",{...r,className:Ss("EditButton",r.className,i),style:{"--borderWidth":`${c.borderWidth}px`,"--translate":`${c.translate}px`,"--exactSize":`${c.exactSize}px`,...r.style},children:S.jsx(Ke,{name:n,size:c.iconSize})}),S.jsx("input",{className:Ss("FileInput"),type:"file",id:a,onChange:u=>{var d;(d=t.onChange)==null||d.call(t,u),o==null||o(u,e)}})]})},Dxe={Root:t=>{const{children:e,size:n,aspectRatio:r,variant:s,objectFit:i,isReload:o,onEdit:a,onRemove:l,onUpload:c,...u}=t,d=x.useMemo(()=>({...G$,size:n,aspectRatio:r,variant:s,objectFit:i,isReload:o,onEdit:a,onRemove:l,onUpload:c}),[n,r,s,i,o,a,l,c]);return S.jsx(fc,{value:d,children:S.jsx("div",{...u,className:Ss("Wrapper",u.className),children:e})})},Image:t=>{const{children:e,index:n,...r}=t,{size:s,aspectRatio:i,variant:o,objectFit:a,isReload:l,onEdit:c,onRemove:u}=x.use(fc),[d,h]=x.useState(!0),[f,p]=x.useState(!1),[m,g]=x.useState(r.src),y=x.Children.toArray(e).some(_=>x.isValidElement(_)&&_.type===_g),v=x.Children.toArray(e).some(_=>x.isValidElement(_)&&_.type===wg),b=x.useMemo(()=>{if(typeof s=="string"){const _=Ao[s];return _<=96?24:_<=160?32:40}return 24},[s]),C=x.useCallback(()=>{if(m&&l)return()=>{h(!0),p(!1)}},[m,l]);return x.useEffect(()=>{g(r.src)},[r.src]),!m||f?S.jsxs("div",{className:Ss("ImageWrapper"),children:[S.jsxs("div",{ref:C,className:Ss("ErrorImage",r.className,o),style:{"--aspectRatio":i,...typeof s=="string"?{width:Ao[s]}:{width:s},...r.style},children:[S.jsx(Ke,{name:"WarningAmber",size:b}),e]}),y||v?e:S.jsxs(S.Fragment,{children:[c&&S.jsx(_g,{index:n}),u&&S.jsx(wg,{index:n})]})]}):S.jsxs("div",{className:Ss("ImageWrapper"),children:[S.jsx("img",{...r,src:m,className:Ss("Image",r.className,o,a,{isLoading:d}),style:{"--aspectRatio":i,...typeof s=="string"?{width:Ao[s]}:{width:s},...r.style},onLoad:()=>{h(!1),p(!1)},onError:()=>{h(!1),p(!0)}}),y||v?e:S.jsxs(S.Fragment,{children:[c&&S.jsx(_g,{index:n}),u&&S.jsx(wg,{index:n})]})]})},Upload:t=>{const{children:e,id:n,...r}=t,{onUpload:s}=x.use(fc);return S.jsxs("label",{htmlFor:n,children:[S.jsx("input",{...r,type:"file",id:n,className:Ss("UploadInput"),onChange:r.onChange??s}),e]})},EmptyImage:t=>{const{iconName:e="AddAPhoto",...n}=t,{size:r,aspectRatio:s,variant:i}=x.use(fc),o=x.useMemo(()=>{if(typeof r=="string"){const a=Ao[r];return a<=56?16:a<=72?20:24}return 24},[r]);return S.jsxs("div",{...n,className:Ss("EmptyImage",n.className,i),style:{"--aspectRatio":s,...typeof r=="string"?{width:Ao[r]}:{width:r},...n.style},children:[S.jsx(Ke,{name:e,size:t.iconSize||o}),S.jsx("span",{className:Ss("Text"),children:"사진 추가"})]})},RemoveButton:wg,EditButton:_g,THUMBNAIL_SIZES:Ao};ye.Accordion=gP,ye.Avatar=OP,ye.Badge=AP,ye.BarCode=C1e,ye.Breadcrumb=yP,ye.Button=oP,ye.Calendar=zR,ye.Cascader=BP,ye.Chart=cH,ye.CheckBox=zP,ye.Chips=j1e,ye.Comment=lP,ye.Divider=mw,ye.Dropdown=oR,ye.HelperText=La,ye.Icon=Ke,ye.LNB=yhe,ye.Label=V1e,ye.LazyImage=AR,ye.List=$xe,ye.MobilePicker=phe,ye.Modal=_xe,ye.OTPInput=uR,ye.Pagination=She,ye.Popup=Exe,ye.QRCode=I1e,ye.QuillEditor=Tue,ye.Radio=gR,ye.ScrollCalendar=G1e,ye.ScrollSpy=PP,ye.Sheet=xxe,ye.Slider=wP,ye.Stepper=SP,ye.Switch=fR,ye.Tab=UP,ye.Table=$ue,ye.TextArea=CR,ye.TextInput=vR,ye.Thumbnail=Dxe,ye.TimeInput=Mxe,ye.WeeklyCalendar=dhe,ye.makeNavigation=H7,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});